/* ==========================================================================
   STARVALLEY - COMPONENTS & INTERACTIVE UI
   ========================================================================== */

/* ==========================================================================
   PRODUCT CARDS & GRIDS
   ========================================================================== */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

/* Asymmetric Product Grid */
.asymmetric-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 2rem;
}

.asymmetric-grid .product-card:nth-child(1) {
  grid-column: span 6;
}
.asymmetric-grid .product-card:nth-child(2),
.asymmetric-grid .product-card:nth-child(3) {
  grid-column: span 3;
}
.asymmetric-grid .product-card:nth-child(4),
.asymmetric-grid .product-card:nth-child(5) {
  grid-column: span 3;
}
.asymmetric-grid .product-card:nth-child(6) {
  grid-column: span 6;
}
.asymmetric-grid .product-card:nth-child(n+7) {
  grid-column: span 4;
}

/* Product Card */
.product-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-brand);
}

.product-card-badge {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  background-color: var(--brand-red);
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
  z-index: 2;
  box-shadow: 0 2px 8px var(--brand-red-glow);
}

.product-image-box {
  width: 100%;
  height: 250px;
  background: radial-gradient(circle, #FAFDFB 0%, #EFF6F2 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  overflow: hidden;
  position: relative;
}

.product-card:nth-child(1) .product-image-box,
.product-card.featured-large .product-image-box {
  height: 320px;
}

.product-img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  transition: transform var(--transition-normal);
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.12));
}

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

.product-category-tag {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand-green);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.35rem;
}

.product-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--brand-green-dark);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.product-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-pack-sizes {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.pack-pill {
  background-color: var(--brand-green-subtle);
  color: var(--brand-green-dark);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-brand);
}

.product-card-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-view-btn {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--brand-red);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: gap var(--transition-fast);
}

.product-card:hover .product-view-btn {
  gap: 0.65rem;
}

/* ==========================================================================
   CATEGORY FILTER PILLS
   ========================================================================== */

.filter-nav-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.filter-btn {
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 700;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-pill);
  background-color: #FFFFFF;
  color: var(--brand-green-dark);
  border: 1.5px solid var(--border-medium);
  transition: all var(--transition-normal);
}

.filter-btn:hover {
  border-color: var(--brand-green);
  color: var(--brand-green);
  background-color: var(--brand-green-subtle);
}

.filter-btn.active {
  background-color: var(--brand-green);
  color: #FFFFFF;
  border-color: var(--brand-green);
  box-shadow: 0 4px 14px var(--brand-green-glow);
}

/* ==========================================================================
   PRODUCT DETAIL PAGE SPECIFICS
   ========================================================================== */

.product-detail-hero {
  padding: 4rem 0 5rem 0;
  background: linear-gradient(180deg, #FFFFFF 0%, var(--bg-alt) 100%);
}

.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 4rem;
  align-items: flex-start;
}

.product-detail-gallery {
  position: sticky;
  top: 100px;
}

.detail-main-img-box {
  background: #FFFFFF;
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 460px;
}

.detail-main-img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.15));
}

.detail-thumbnails {
  display: flex;
  gap: 1rem;
  margin-top: 1.25rem;
}

.detail-thumb-item {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  background: #FFFFFF;
  border: 2px solid transparent;
  padding: 0.5rem;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: all var(--transition-fast);
}

.detail-thumb-item.active,
.detail-thumb-item:hover {
  border-color: var(--brand-green);
}

.detail-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-detail-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.detail-title {
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 800;
  color: var(--brand-green-dark);
  line-height: 1.2;
}

.detail-pack-box {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.detail-pack-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--brand-green-dark);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.pack-size-selector {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.pack-size-btn {
  background-color: var(--brand-green-subtle);
  color: var(--brand-green-dark);
  border: 1.5px solid var(--border-medium);
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 700;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-sm);
}

.detail-feature-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.detail-feature-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1rem;
  color: var(--text-main);
}

.detail-feature-icon {
  color: var(--accent-fresh);
  flex-shrink: 0;
}

.detail-section-card {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 2rem;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  margin-top: 1.5rem;
}

.detail-card-heading {
  font-size: 1.25rem;
  color: var(--brand-green-dark);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.serving-ideas-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.serving-idea-tag {
  background-color: var(--bg-alt);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--brand-green-dark);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ==========================================================================
   FORMS & INPUTS
   ========================================================================== */

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1.25rem;
}

.form-label {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--brand-green-dark);
}

.form-control {
  width: 100%;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-medium);
  background-color: #FFFFFF;
  color: var(--text-main);
  font-size: 0.98rem;
  transition: all var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--brand-green);
  box-shadow: 0 0 0 4px var(--brand-green-subtle);
}

.form-control.is-invalid {
  border-color: var(--brand-red);
}

.invalid-feedback {
  font-size: 0.8rem;
  color: var(--brand-red);
  font-weight: 600;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

/* Contact Card Container */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3.5rem;
}

.contact-card-box {
  background: #FFFFFF;
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-subtle);
}

.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  margin: 2rem 0;
}

.contact-info-item {
  display: flex;
  gap: 1.25rem;
}

.contact-info-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--brand-green-subtle);
  color: var(--brand-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

/* ==========================================================================
   GALLERY & LIGHTBOX
   ========================================================================== */

.masonry-gallery {
  column-count: 3;
  column-gap: 1.5rem;
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 1.5rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-md);
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  display: block;
  transition: transform var(--transition-slow);
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(9, 44, 33, 0.9) 0%, rgba(9, 44, 33, 0.2) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-title {
  color: #FFFFFF;
  font-size: 1.1rem;
  font-weight: 700;
}

.gallery-cat {
  color: var(--brand-gold);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Lightbox Modal */
.lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.lightbox-modal.is-active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
  color: #FFFFFF;
  margin-top: 1rem;
  font-size: 1.1rem;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: background var(--transition-fast);
}

.lightbox-close:hover {
  background: var(--brand-red);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: all var(--transition-fast);
}

.lightbox-nav:hover {
  background: var(--brand-green);
}

.lightbox-nav.prev { left: 1.5rem; }
.lightbox-nav.next { right: 1.5rem; }

/* ==========================================================================
   TOAST NOTIFICATION
   ========================================================================== */

.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: #FFFFFF;
  border-radius: var(--radius-md);
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.95rem;
  border-left: 4px solid var(--brand-green);
  animation: slideInRight 0.35s ease forwards;
  min-width: 300px;
}

.toast.error {
  border-left-color: var(--brand-red);
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
