/* ========================================
   Horizontal Cards Design (Bento Grid Style)
   Inspired by new-cards.html
   ======================================== */

/* Masonry Grid for Horizontal Cards - HIGH PRIORITY */
.masonry-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 24px !important;
  width: 100% !important;
  max-width: 900px !important;
  margin: 0 auto !important;
}

@media (min-width: 768px) {
  .masonry-grid {
    gap: 32px !important;
  }
}

/* Horizontal Card Container */
.product-card-premium {
  background: white;
  border-radius: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  display: flex;
  min-height: 140px;
  height: auto;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid #5a2a9c;
  position: relative;
  cursor: pointer;
  max-width: 650px;
  margin: 0 auto;
}

.product-card-premium:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(90, 42, 156, 0.12);
}

/* Request Mode - Fixed Background */
.product-card-premium.request-mode {
  background: #ffffff;
  border: 2px solid #fbbf24;
}

/* Image Column (40% width) */
.card-image-premium {
  position: relative;
  width: 40%;
  min-height: 180px;
  overflow: hidden;
  background: var(--surface-container, #edeeef);
  flex-shrink: 0;
}

.card-image-premium img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.product-card-premium:hover .card-image-premium img {
  transform: scale(1.05);
}

/* Gradient Overlay on Image - Disabled */
.card-image-premium::after {
  content: '';
  position: absolute;
  inset: 0;
  background: transparent;
  pointer-events: none;
  display: none;
}

/* Badge on Image */
.card-badge-premium {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
}

.badge-premium,
.badge-tender-premium {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary, #4e0078);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.badge-tender-premium {
  background: rgba(255, 152, 0, 0.9);
  color: white;
}

/* Favorite Button */
.favorite-btn-premium {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
}

.favorite-btn-premium:hover {
  transform: scale(1.1);
  background: white;
}

.favorite-btn-premium.active {
  background: #ff4757;
  color: white;
}

.favorite-btn-premium .material-symbols-outlined {
  font-size: 20px;
}

/* Content Section - 60% width */
.card-content-premium {
  flex: 1;
  min-width: 60%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px 16px;
}

/* Card Header */
.card-header-premium {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 6px;
}

.category-premium {
  font-size: 10px;
  font-weight: 600;
  color: var(--on-surface-variant, #eeebf0);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 3px;
}

.product-title-premium {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 800;
  color: var(--primary, #4e0078);
  line-height: 1.3;
  margin: 0;
  letter-spacing: -0.02em;
}

/* Rating */
.rating-premium {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--secondary-fixed, #ffdcbe);
  padding: 4px 10px;
  border-radius: 20px;
  flex-shrink: 0;
}

.rating-premium .material-symbols-outlined {
  font-size: 16px;
  color: var(--secondary, #8b5000);
  fill: 1;
}

.rating-premium span:last-child {
  font-size: 13px;
  font-weight: 700;
  color: var(--secondary, #8b5000);
}

/* Description */
.product-description-premium {
  font-size: 11px;
  color: #5a2a9c;
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Price Section */
.price-order-premium {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--outline-variant, #d0c2d3);
  border-bottom: 1px solid var(--outline-variant, #d0c2d3);
  margin: 6px 0;
}

.label-premium {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--outline, #7f7383);
  margin-bottom: 3px;
}

.value-premium {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: var(--primary, #4e0078);
  margin: 0;
}

.order-value-premium {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary, #4e0078);
  margin: 0;
}

.text-right-premium {
  text-align: right;
}

/* Request Banner */
.request-banner-premium {
  display: none;
}

/* Compact Request Stats (Side by Side) */
.request-stats-grid {
  display: flex;
  gap: 12px;
  margin: 10px 0;
}

.request-stat-box {
  flex: 1;
  background: #f8f9fa;
  padding: 8px 10px;
  border-radius: 8px;
  border-left: 3px solid #ff8a00;
}

.request-stat-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #888;
  margin-bottom: 2px;
}

.request-stat-value {
  font-size: 14px;
  font-weight: 800;
  color: #5a2a9c;
}

/* Actions Section */
.card-actions-premium {
  display: flex;
  gap: 8px;
  margin-top: auto;
  align-items: center;
  justify-content: space-between;
}

.contact-btn-premium {
  flex: 1;
  padding: 8px 12px;
  background: linear-gradient(135deg, var(--primary, #4e0078), var(--primary-container, #6a1b9a));
  color: white !important;
  border: none;
  border-radius: 9999px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(78, 0, 120, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-decoration: none;
  white-space: nowrap;
}

.contact-btn-premium:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 16px rgba(78, 0, 120, 0.3);
}

.contact-btn-premium:active {
  transform: scale(0.98);
}

.contact-btn-premium .material-symbols-outlined {
  font-size: 14px;
}

/* Details Button */
.details-btn-premium {
  padding: 8px 12px;
  background: transparent;
  color: var(--primary, #4e0078);
  border: 2px solid var(--primary, #4e0078);
  border-radius: 9999px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-decoration: none;
  flex-shrink: 0;
  white-space: nowrap;
}

.details-btn-premium:hover {
  background: var(--primary, #4e0078);
  color: white;
  transform: scale(1.02);
}

.details-btn-premium:active {
  transform: scale(0.98);
}

.details-btn-premium .material-symbols-outlined {
  font-size: 14px;
}

/* --- Submit Offer Button in Request Cards (Orange) --- */
.product-card-premium.request-mode .contact-btn-premium {
  background: linear-gradient(135deg, #ff8a00, #ff5e00) !important;
  box-shadow: 0 6px 18px rgba(255, 138, 0, 0.25) !important;
}

.product-card-premium.request-mode .contact-btn-premium:hover {
  background: linear-gradient(135deg, #ff7200, #ff4d00) !important;
  box-shadow: 0 10px 30px rgba(255, 138, 0, 0.35) !important;
}

.product-card-premium.request-mode .details-btn-premium {
  border-color: #ff8a00;
  color: #ff8a00;
}

.product-card-premium.request-mode .details-btn-premium:hover {
  background: #ff8a00;
  color: white;
}

/* Author Footer */
.author-info-premium {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}

.author-details-premium {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.author-name-premium {
  font-size: 11px;
  font-weight: 600;
  color: var(--on-surface, #191c1d);
}

.post-time-premium {
  font-size: 9px;
  color: var(--on-surface-variant, #4d4351);
}

.author-avatar-premium,
.author-avatar-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--outline-variant, #d0c2d3);
}

.author-avatar-placeholder {
  background: var(--primary-fixed, #f4d9ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--primary, #4e0078);
  font-size: 12px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .product-card-premium {
    flex-direction: column;
    min-height: auto;
  }

  .card-image-premium {
    width: 100%;
    min-height: 160px;
  }

  .card-content-premium {
    width: 100%;
    padding: 14px;
  }

  .product-title-premium {
    font-size: 14px;
  }

  .value-premium {
    font-size: 15px;
  }
}

/* Loading Skeleton for Horizontal Cards */
.skeleton-horizontal {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 1.5rem;
  height: 180px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Pulse Animation for Request Status */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.1);
  }
}
