/* ===================================
   PRODUCTS PAGE — STYLES
=================================== */

/* === LOADER === */
.loader {
  position: fixed;
  inset: 0;
  background: var(--brown);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loader.hidden { 
  opacity: 0; 
  visibility: hidden; 
}

.loader-inner { 
  text-align: center; 
}

.loader-biscuit {
  font-size: 4rem;
  animation: loaderSpin 1.5s linear infinite;
  display: inline-block;
  margin-bottom: 1rem;
}

@keyframes loaderSpin {
  0% { transform: rotate(0) scale(1); }
  50% { transform: rotate(180deg) scale(1.2); }
  100% { transform: rotate(360deg) scale(1); }
}

.loader-bar {
  width: 200px;
  height: 3px;
  background: rgba(255,255,255,0.2);
  border-radius: 10px;
  overflow: hidden;
  margin: 0 auto;
}

.loader-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 10px;
  animation: loaderProgress 2s ease forwards;
}

@keyframes loaderProgress {
  0% { width: 0; }
  100% { width: 100%; }
}

.loader-logo {
  height: 50px;
  width: 100px;
}

/* === PRODUCTS SECTION === */
.products-page {
  min-height: 100vh;
  background: var(--cream);
  padding: 140px 5% 60px;
}

.products-header {
  text-align: center;
  margin-bottom: 5rem;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* === PRODUCT CARD === */
.product-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 20px var(--shadow);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid rgba(212, 168, 83, 0.1);
}

.product-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 20px 50px rgba(212, 168, 83, 0.3);
  border-color: var(--gold);
}

.product-image {
  width: 100%;
  height: 280px;
  background: linear-gradient(135deg, var(--cream-dark), var(--cream));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  font-weight: 700;
  color: var(--gold-light);
  position: relative;
  overflow: hidden;
}

.product-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(212, 168, 83, 0.1));
}

.product-content {
  padding: 2rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.product-name {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--brown);
  margin-bottom: 0.8rem;
  line-height: 1.3;
}

.product-description {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.product-specs {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.product-spec {
  background: rgba(212, 168, 83, 0.1);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold-dark);
}

.product-actions {
  display: flex;
  gap: 1rem;
}

.product-actions a,
.product-actions button {
  flex: 1;
  padding: 0.8rem 1rem;
  border-radius: 40px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
  text-align: center;
  border: none;
  font-family: var(--font-body);
}

.product-details-btn {
  background: var(--gold);
  color: var(--brown);
}

.product-details-btn:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
}

.product-enquire-btn {
  background: var(--brown);
  color: var(--cream);
  text-decoration: none;
}

.product-enquire-btn:hover {
  background: var(--gold-dark);
  transform: translateY(-2px);
}

/* === PRODUCT DETAIL PAGE === */
.product-detail-page {
  min-height: 100vh;
  background: var(--cream);
  padding: 140px 5% 60px;
}

.product-detail-container {
  max-width: 1200px;
  margin: 0 auto;
}

.product-detail-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  margin-bottom: 5rem;
  align-items: start;
}

.product-detail-image {
  width: 100%;
  height: 500px;
  background: linear-gradient(135deg, var(--cream-dark), var(--cream));
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8rem;
  font-weight: 700;
  color: var(--gold-light);
  box-shadow: 0 10px 50px rgba(62, 31, 5, 0.1);
}

.product-detail-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.product-detail-info h1 {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 900;
  color: var(--brown);
  line-height: 1.2;
}

.product-detail-description {
  font-size: 1.1rem;
  color: var(--text-light);
  line-height: 1.8;
}

.product-detail-specs {
  background: rgba(212, 168, 83, 0.1);
  padding: 2rem;
  border-radius: var(--radius);
  border-left: 4px solid var(--gold);
}

.detail-spec-item {
  display: flex;
  justify-content: space-between;
  padding: 0.8rem 0;
  border-bottom: 1px solid rgba(212, 168, 83, 0.2);
}

.detail-spec-item:last-child {
  border-bottom: none;
}

.detail-spec-label {
  font-weight: 600;
  color: var(--brown);
}

.detail-spec-value {
  color: var(--gold-dark);
  font-weight: 700;
}

/* === PRODUCT SPECIFICATIONS TABLE === */
.specifications-table {
  width: 100%;
  margin: 4rem 0;
  border-collapse: collapse;
  background: var(--white);
  box-shadow: 0 4px 20px var(--shadow);
  border-radius: var(--radius);
  overflow: hidden;
}

.specifications-table thead {
  background: linear-gradient(135deg, var(--brown), var(--brown-mid));
  color: var(--cream);
}

.specifications-table th {
  padding: 1.2rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
}

.specifications-table td {
  padding: 1rem 1.2rem;
  border-bottom: 1px solid rgba(212, 168, 83, 0.1);
}

.specifications-table tbody tr:hover {
  background: rgba(212, 168, 83, 0.05);
}

.specifications-table tbody tr:last-child td {
  border-bottom: none;
}

/* === PRODUCT VARIANTS === */
.product-variants {
  margin: 4rem 0;
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: 0 4px 20px var(--shadow);
}

.product-variants h3 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--brown);
  margin-bottom: 2rem;
}

.variants-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
}

.variant-card {
  background: linear-gradient(135deg, var(--cream), var(--cream-dark));
  padding: 2rem;
  border-radius: var(--radius);
  text-align: center;
  border: 2px solid transparent;
  transition: var(--transition);
  cursor: pointer;
}

.variant-card:hover {
  border-color: var(--gold);
  box-shadow: 0 8px 30px rgba(212, 168, 83, 0.3);
}

.variant-size {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gold-dark);
  margin-bottom: 1rem;
}

.variant-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-light);
}

.variant-info strong {
  color: var(--brown);
}

/* === CTA SECTION === */
.product-cta {
  background: linear-gradient(135deg, var(--brown), var(--brown-mid));
  color: var(--cream);
  padding: 3rem;
  border-radius: var(--radius-lg);
  text-align: center;
  margin: 5rem 0;
}

.product-cta h3 {
  font-family: var(--font-display);
  font-size: 2rem;
  margin-bottom: 1rem;
}

.product-cta p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  opacity: 0.95;
}

.product-cta-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.product-cta-buttons a,
.product-cta-buttons button {
  padding: 1rem 2rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  font-family: var(--font-body);
  text-decoration: none;
}

.cta-primary {
  background: var(--gold);
  color: var(--brown);
}

.cta-primary:hover {
  background: var(--gold-light);
  transform: translateY(-3px);
}

.cta-secondary {
  background: transparent;
  color: var(--cream);
  border: 2px solid var(--cream);
}

.cta-secondary:hover {
  background: var(--cream);
  color: var(--brown);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .products-page {
    padding: 100px 4% 40px;
  }

  .products-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .product-detail-header {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .product-detail-image {
    height: 300px;
    font-size: 4rem;
  }

  .product-detail-info h1 {
    font-size: 2rem;
  }

  .specifications-table {
    font-size: 0.85rem;
  }

  .specifications-table th,
  .specifications-table td {
    padding: 0.8rem 0.6rem;
  }

  .variants-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
  }

  .product-cta {
    padding: 2rem;
  }

  .product-cta-buttons {
    flex-direction: column;
  }

  .product-cta-buttons a,
  .product-cta-buttons button {
    width: 100%;
  }
}
