/* Shop Archive Page Styles */
section {
  margin-top: 0;
}
:where(.wp-site-blocks) > * {
  margin-block-start: 0;
}
/* =========================================
   SHOP HERO
   ========================================= */
.shop-hero {
  position: relative;
  padding: 60px 0 80px;
  background: var(--dark-bg);
  overflow: hidden;
  text-align: center;
}
.shop-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent, var(--dark-charcoal));
}
.shop-hero h1 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 32px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-dark-heading);
  margin-bottom: 32px;
}
.shop-hero p {
  font-size: 18px;
  color: var(--text-dark-body);
  max-width: 520px;
  margin: 0 auto 24px;
  line-height: 1.6;
}
.shop-hero .copper-line {
  width: 60px;
  height: 3px;
  background: var(--copper-gradient);
  margin: 0 auto;
  border-radius: 2px;
}

/* Certification Badges */
.shop-certifications {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-bottom: 24px;
}
.certification-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.certification-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(184,115,51,0.18);
  border: 1px solid rgba(184,115,51,0.35);
  color: var(--copper);
  backdrop-filter: blur(10px);
}
.certification-icon svg {
  width: 20px;
  height: 20px;
}
.certification-label {
  font-size: 12px;
  color: var(--text-dark-body);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
}

/* =========================================
   FILTER BAR
   ========================================= */
.filter-bar {
  position: sticky;
  top: 62px;
  z-index: 900;
  background: rgba(28,28,28,0.75);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 16px 0;
  transition: all 0.4s ease;
}
.filter-bar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.filter-chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.filter-chip {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 100px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-dark-body);
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  text-decoration: none;
}
.filter-chip::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--copper-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 100px;
  z-index: -1;
}
.filter-chip:hover {
  border-color: rgba(184,115,51,0.4);
  color: var(--text-dark-heading);
  transform: scale(1.03);
}
.filter-chip.active {
  border-color: var(--copper);
  color: #fff;
  background: transparent;
}
.filter-chip.active::before {
  opacity: 1;
}
.sort-dropdown {
  position: relative;
}
.sort-select {
  appearance: none;
  -webkit-appearance: none;
  padding: 10px 40px 10px 16px;
  border-radius: 100px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.05em;
  color: var(--text-dark-body);
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
}
.sort-select:hover,
.sort-select:focus {
  border-color: rgba(184,115,51,0.4);
  color: var(--text-dark-heading);
}
.sort-select option {
  background: var(--dark-charcoal);
  color: var(--text-dark-body);
}
.sort-dropdown::after {
  content: '';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid var(--copper);
  pointer-events: none;
}

/* =========================================
   PRODUCT GRID SECTION
   ========================================= */
.product-section {
  background: var(--light-bg);
  padding: 60px 0 80px;
  position: relative;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.product-grid .product-card--featured {
  background: rgba(184, 115, 51, 0.2);
  animation: featured-glow 3s ease-in-out infinite;
}

/* =========================================
   SHOP PRODUCT CARDS
   ========================================= */
.product-grid .product-card {
  background: var(--light-card);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.35s ease;
  cursor: pointer;
}
.product-grid .product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(184,115,51,0.12), 0 4px 16px rgba(0,0,0,0.08);
}
.product-grid .product-card::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(184,115,51,0.3), rgba(212,149,106,0.2), rgba(184,115,51,0.3));
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
  filter: blur(8px);
}
.product-grid .product-card:hover::after {
  opacity: 1;
}

/* Full-card click overlay – stretches the image <a> across the entire card */
.product-card-image::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
}

.product-card-image {
  position: static;
  overflow: hidden;
  height: 280px;
  display: block;
}
.product-card-footer {
  position: relative;
  z-index: 3;
}
.product-grid .product-card--featured .product-card-image {
  height: 280px;
}
.product-card-image img {
  margin-left: 20%;
  width: 60%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.product-card:hover .product-card-image img {
  transform: scale(1.06);
}

.product-badge.best-seller {
  background: rgba(184,115,51,0.35);
  border-color: rgba(184,115,51,0.4);
  border-radius: 100px;
}
.product-badge.sale-badge {
  background: rgba(255,255,255,0.25);
  border-color: rgba(255,255,255,0.35);
  border-radius: 100px;
}

.product-roast {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: 6px;
}
.product-card-body h3 {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 20px;
  color: var(--text-light-heading);
  margin-bottom: 6px;
  transition: color 0.3s ease;
}
.product-card:hover .product-card-body h3 {
  color: var(--copper);
}
.product-origin {
  font-size: 13px;
  color: var(--text-light-muted);
  margin-bottom: 10px;
}
.product-card-body .product-price {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 18px;
  color: var(--text-light-heading);
  margin-bottom: 12px;
}

.product-grid .flavor-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              opacity 0.3s ease 0.1s;
}
.product-grid .product-card:hover .flavor-pills {
  max-height: 60px;
  opacity: 1;
}
.product-grid .flavor-pill {
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  border: 1px solid var(--light-border);
  color: var(--text-light-body);
  background: var(--light-bg);
  transition: all 0.2s ease;
}
.product-grid .product-card:hover .flavor-pill {
  border-color: rgba(184,115,51,0.25);
}

.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px 20px;
}
.view-link {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--copper);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.3s ease;
  text-decoration: none;
}
.view-link:hover {
  gap: 10px;
}
.view-link svg {
  transition: transform 0.3s ease;
}
.view-link:hover svg {
  transform: translateX(3px);
}

/* =========================================
   AJAX ADD TO CART BUTTON
   ========================================= */
.ajax-add-to-cart {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: var(--copper-gradient);
  border: none;
  border-radius: 100px;
  padding: 10px 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  z-index: 3;
  pointer-events: auto;
}
.ajax-add-to-cart:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(184,115,51,0.3);
}
.ajax-add-to-cart.loading {
  pointer-events: none;
  opacity: 0.8;
}
.btn-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btn-spin 0.6s linear infinite;
  vertical-align: middle;
}
.btn-error-text {
  font-size: 11px;
  letter-spacing: 0.02em;
  text-transform: none;
}
@keyframes btn-spin {
  to { transform: rotate(360deg); }
}

/* Single product AJAX error */
.ajax-cart-error {
  color: #c0392b;
  font-size: 13px;
  margin-top: 8px;
  font-weight: 500;
}

/* Single product button loading spinner */
.single_add_to_cart_button .btn-spinner {
  margin-right: 8px;
}

/* =========================================
   PAGINATION
   ========================================= */
.shop-pagination {
  padding: 40px 0 0;
  text-align: center;
}
.shop-pagination .woocommerce-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
}
.shop-pagination .woocommerce-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 4px;
  border: 1px solid var(--light-border);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  color: var(--text-light-body);
  text-decoration: none;
  transition: all 0.3s ease;
}
.shop-pagination .woocommerce-pagination .page-numbers:hover {
  border-color: rgba(184,115,51,0.4);
  color: var(--copper);
}
.shop-pagination .woocommerce-pagination .page-numbers.current {
  background: var(--copper-gradient);
  border-color: transparent;
  color: #fff;
}

/* =========================================
   NO PRODUCTS
   ========================================= */
.woocommerce-no-products {
  text-align: center;
  padding: 80px 0;
}
.woocommerce-no-products p {
  font-size: 18px;
  color: var(--text-light-muted);
  margin-bottom: 24px;
}

/* =========================================
   CTA SECTION
   ========================================= */
.cta-section {
  background: var(--dark-bg);
  padding: 100px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-glass {
  max-width: 700px;
  margin: 0 auto;
  padding: 60px 50px;
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  position: relative;
}
.cta-section .copper-label {
  margin-bottom: 20px;
}
.cta-section h2 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 40px;
  color: var(--text-dark-heading);
  margin-bottom: 16px;
}
.cta-section p {
  font-size: 17px;
  color: var(--text-dark-body);
  max-width: 480px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

/* =========================================
   SHOP PAGE — MOBILE (max-width: 767px)
   ========================================= */
@media (max-width: 767px) {

  /* --- Shop Hero --- */
  .shop-hero {
    padding: 100px 0 40px;
    min-height: auto;
  }
  .shop-hero h1 {
    font-size: 16px;
    margin-bottom: 12px;
  }
  .shop-hero p {
    font-size: 14px;
    margin-bottom: 12px;
  }
  .shop-hero .copper-line {
    width: 40px;
  }
  .shop-certifications {
    gap: 12px;
    margin-top: 24px;
    justify-content: center;
  }
  .certification-card {
    gap: 5px;
  }
  .certification-icon {
    width: 24px;
    height: 24px;
  }
  .certification-icon svg {
    width: 10px;
    height: 10px;
  }
  .certification-label {
    font-size: 6px;
    letter-spacing: 0.06em;
  }

  /* --- Filter Bar --- */
  .filter-bar {
    top: 50px;
    padding: 10px 0;
  }
  .filter-bar .container {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }
  .filter-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 8px;
    padding-bottom: 4px;
  }
  .filter-chips::-webkit-scrollbar {
    display: none;
  }
  .filter-chip {
    padding: 6px 14px;
    font-size: 11px;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .sort-select {
    padding: 10px 36px 10px 14px;
    font-size: 12px;
    width: 100%;
    min-height: 44px;
  }

  /* --- Product Section --- */
  .product-section {
    padding: 32px 0 48px;
  }

  /* --- Product Grid: 2 columns --- */
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .product-grid .product-card--featured {
    animation: featured-glow 3s ease-in-out infinite;
  }

  /* --- Product Cards --- */
  .product-card-image {
    height: auto;
    aspect-ratio: 1 / 1;
  }
  .product-grid .product-card--featured .product-card-image {
    height: auto;
  }
  .product-card-body {
    padding: 10px;
  }
  .product-roast {
    font-size: 10px;
    margin-bottom: 4px;
  }
  .product-card-body h3 {
    font-size: 14px;
    margin-bottom: 4px;
  }
  .product-origin {
    font-size: 11px;
    margin-bottom: 6px;
  }
  .product-card-body .product-price {
    font-size: 15px;
    margin-bottom: 8px;
  }
  .product-badge.best-seller,
  .product-badge.sale-badge {
    font-size: 9px;
    padding: 3px 8px;
  }
  .product-grid .flavor-pills {
    gap: 4px;
  }
  .product-grid .flavor-pill {
    padding: 3px 8px;
    font-size: 10px;
  }
  .product-card-footer {
    padding: 0 10px 12px;
  }
  .view-link {
    font-size: 11px;
  }
  .ajax-add-to-cart {
    padding: 8px 16px;
    font-size: 11px;
  }

  /* --- Pagination --- */
  .shop-pagination {
    padding: 28px 0 0;
  }
  .shop-pagination .woocommerce-pagination .page-numbers {
    width: 38px;
    height: 38px;
    font-size: 13px;
  }

  /* --- No Products --- */
  .woocommerce-no-products {
    padding: 48px 0;
  }
  .woocommerce-no-products p {
    font-size: 15px;
  }

  /* --- CTA Section --- */
  .cta-section {
    padding: 48px 0;
  }
  .cta-glass {
    padding: 32px 20px;
    border-radius: 12px;
  }
  .cta-section h2 {
    font-size: 24px;
    margin-bottom: 12px;
  }
  .cta-section p {
    font-size: 14px;
    margin-bottom: 24px;
  }

}
