/* Modern Liturgical Shop Theme - U Archanioła */
/*
 * Browser Compatibility: Chrome 79+, Firefox 63+, Safari 13.1+, Edge 79+
 * Tested with: Chrome 109 (Windows 7), Safari 13.1+ (macOS)
 * 
 * Fallbacks included for:
 * - :has() selector → JS fallback (.is-checked class) for Safari < 15.4
 * - inset: 0 → replaced with top/right/bottom/left for Safari < 14.1
 * - backdrop-filter → -webkit- prefix for Safari
 * - gap in flexbox → margin fallback for Safari < 14.1 (critical elements)
 */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

/* ============================================
   CSS GRID FALLBACK FOR CHROME 49 (Windows XP)
   Using flexbox as fallback for browsers without grid
   ============================================ */
@supports not (display: grid) {
  /* Product grid fallback */
  .product-grid,
  .products-grid {
    display: flex !important;
    flex-wrap: wrap;
    margin: -12px;
  }
  .product-grid > *,
  .products-grid > * {
    flex: 0 0 calc(33.333% - 24px);
    margin: 12px;
    max-width: calc(33.333% - 24px);
  }
  
  /* Checkout grid fallback */
  .checkout-grid {
    display: flex !important;
    flex-wrap: wrap;
    margin: -6px;
  }
  .checkout-grid > * {
    flex: 0 0 calc(50% - 12px);
    margin: 6px;
  }
  
  /* Checkout options fallback */
  .checkout-options {
    display: flex !important;
    flex-direction: column;
  }
  .checkout-options > * {
    margin-bottom: 8px;
  }
  
  /* Cart layout fallback */
  .cart-layout {
    display: block !important;
  }
  .cart-layout > * {
    margin-bottom: 20px;
  }
  
  /* Attributes content fallback */
  .attributes-content {
    display: flex !important;
    flex-wrap: wrap;
  }
  .attributes-content > * {
    flex: 0 0 calc(33.333% - 16px);
    margin: 8px;
  }
}

/* ============================================
   FLEXBOX GAP FALLBACK FOR SAFARI 13.1-14.0
   Using margin on children as fallback
   ============================================ */
@supports not (gap: 1px) {
  /* Header */
  .header-actions > * { margin-left: 12px; }
  .header-actions > *:first-child { margin-left: 0; }
  .header-top-menu > * { margin-left: 8px; }
  .header-top-menu > *:first-child { margin-left: 0; }
  
  /* Cart */
  .cart-header > * { margin-right: 6px; }
  .cart-actions > * { margin-right: 6px; }
  .cart-summary .row > * { margin-left: 8px; }
  .cart-summary .row > *:first-child { margin-left: 0; }
  
  /* Filters */
  .filters-primary > * { margin-right: 6px; margin-bottom: 6px; }
  .filter-group > * { margin-right: 3px; }
  .price-range > * { margin-right: 2px; }
  .attribute-options > * { margin-right: 4px; margin-bottom: 4px; }
  
  /* Category menu */
  .category-label > * { margin-right: 3px; }
  
  /* Product cards */
  .product-card-content > * { margin-bottom: 6px; }
  .product-card-content > *:last-child { margin-bottom: 0; }
  
  /* Breadcrumb */
  .breadcrumb > * { margin-right: 5px; }
  
  /* Pagination */
  .pagination-nav > * { margin-right: 4px; }
  .pagination-pages > * { margin-right: 2px; }
  
  /* Checkout */
  .checkout-sections > * { margin-bottom: 8px; }
  .checkout-options .option > * { margin-right: 5px; }
  
  /* Reviews */
  .reviews-controls > * { margin-right: 4px; }
  .review-rating > * { margin-right: 2px; }
  .review-author > * { margin-right: 7px; }
}

/* ============================================
   MOBILE LEGACY FIXES (iOS 9-12, Android 4.x)
   ============================================ */
/* Flexbox prefixes for old Android Browser */
.filters-primary,
.filter-group,
.header-actions,
.cart-actions,
.category-label,
.checkout-options .option {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
}

/* Touch scroll for iOS */
.cart-table-wrap,
.categories-nav,
.carousel-grid {
  -webkit-overflow-scrolling: touch;
}

/* Fix for iOS input zoom (font-size < 16px causes zoom) */
@media screen and (max-width: 768px) {
  input[type="text"],
  input[type="email"],
  input[type="number"],
  input[type="tel"],
  input[type="password"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* Tap highlight removal for iOS */
a, button, input, select, textarea, label {
  -webkit-tap-highlight-color: transparent;
}

:root {
  /* Vita z Taiwan — maroon & gold palette */
  --primary: #8B0000;        /* deep maroon */
  --primary-dark: #6f0000;   /* darker maroon */
  --primary-light: #B22222;  /* firebrick light */
  --secondary: #C5A572;      /* warm gold */
  --parchment: #f8f4ef;      /* parchment background */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --dark: #1f2937;
  --gray: #6b7280;
  --light-gray: #f3f4f6;
  --border: #e5e7eb;
  --white: #ffffff;
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --radius: 8px;
  --transition: all 0.2s ease;
}

/* Checkout */
.checkout-sections {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.checkout-section h2 {
  margin: 0 0 12px 0;
}

/* Stripe Payment Sections */
.stripe-payment-section {
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stripe-error {
  padding: 12px;
  margin-bottom: 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  color: #dc2626;
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.stripe-info-text {
  font-size: 13px;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 6px;
}

.checkout-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.checkout-options {
  display: grid;
  gap: 8px;
}

.checkout-options .option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  cursor: pointer;
}

.checkout-options .option input[type="radio"] {
  width: 18px; height: 18px;
}

/* Fallback for browsers without :has() support - JS adds .is-checked class */
.checkout-options .option.is-checked {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139,0,0,0.12);
}
/* Modern browsers with :has() support */
@supports selector(:has(*)) {
  .checkout-options .option:has(input[type="radio"]:checked) {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139,0,0,0.12);
  }
}

.order-summary-table {
  width: 100%;
  border-collapse: collapse;
}
.order-summary-table th,
.order-summary-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.order-summary-table thead th { background: #fafafa; font-weight: 700; }

.order-totals { margin-top: 10px; }
.order-totals .row { display: flex; justify-content: space-between; margin: 6px 0; }
.order-totals .total { font-size: 18px; font-weight: 700; color: var(--primary); padding-top: 8px; border-top: 2px solid var(--border); }

/* Cart Page */
.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.cart-header h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  color: var(--dark);
  font-family: 'Playfair Display', serif;
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.cart-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.cart-table th,
.cart-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.cart-table td { vertical-align: top; }

.cart-table .product-cell {
  max-width: 600px;
}
.cart-table .product-cell a {
  word-break: break-word;
}

/* Fixed widths for numeric/action columns after removing Variant column */
.cart-table thead th:nth-child(2),
.cart-table tbody td:nth-child(2) { width: 160px; }
.cart-table thead th:nth-child(3),
.cart-table tbody td:nth-child(3) { width: 130px; white-space: nowrap; }
.cart-table thead th:nth-child(4),
.cart-table tbody td:nth-child(4) { width: 130px; white-space: nowrap; }
.cart-table thead th:nth-child(5),
.cart-table tbody td:nth-child(5) { width: 160px; }

/* Clamp long product names to two lines */
.cart-table .product-cell .product-name {
  text-decoration: none;
  color: inherit;
  font-weight: 600;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Subtle variant line under product name when present */
.cart-table .product-cell .variant-sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--gray);
}

.cart-table thead th {
  background: #fafafa;
  font-weight: 700;
  color: var(--dark);
}

.cart-table tbody tr:hover {
  background: #fcfcfc;
}

.cart-table .actions-cell {
  white-space: nowrap;
}

.cart-table .actions-cell form,
.cart-table .actions-cell a {
  display: inline-block;
  margin: 0 3px 3px 0;
}

.cart-table .actions-cell form:last-child,
.cart-table .actions-cell a:last-child {
  margin-right: 0;
}

.cart-table .actions-cell .btn-sm {
  white-space: nowrap;
}

.qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.qty-control button {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f7f7f7;
  border: none;
  cursor: pointer;
}

.qty-control input[type="number"] {
  width: 60px;
  padding: 6px 8px;
  border: none;
  text-align: center;
  outline: none;
}

.cart-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  padding: 14px;
  background: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin-top: 12px;
}

.cart-actions form {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.cart-actions .error {
  color: var(--danger);
  font-size: 13px;
  font-weight: 500;
  width: 100%;
}

.coupon-input {
  max-width: 220px;
  min-width: 180px;
}

.free-shipping {
  margin-top: 12px;
  padding: 10px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: #fcfcfc;
}

.free-shipping .progress {
  height: 8px;
  background: #eee;
  border-radius: 9999px;
  overflow: hidden;
  margin-top: 8px;
}

.free-shipping .bar {
  height: 100%;
  background: linear-gradient(90deg, var(--secondary), var(--primary));
  transition: width 0.3s ease;
}

.cart-summary {
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 18px;
  max-width: 100%;
}

.cart-summary .row {
  display: flex;
  justify-content: space-between;
  margin: 8px 0;
  font-size: 14px;
}

.cart-summary .total {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  margin-top: 10px;
  padding-top: 10px;
  border-top: 2px solid var(--border);
}

.cart-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (max-width: 1200px) {
  .cart-layout {
    grid-template-columns: 1fr;
  }
  .cart-summary {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  /* No column hidden now; Variant column removed */
  .qty-control button { width: 28px; height: 28px; }
  .qty-control input[type="number"] { width: 44px; }
  .cart-table .product-cell { max-width: 100%; }
  /* Smaller product card image on mobile */
  .product-card-image-wrapper { height: 220px; }
  .cart-header h1 { font-size: 24px; }
  .cart-actions { padding: 12px; gap: 12px; }
  .cart-summary { padding: 16px; }
  .btn-sm { padding: 6px 10px; font-size: 12px; }
}

/* Image Modal */
.img-modal {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: none;
  z-index: 1000;
}
.img-modal[aria-hidden="false"] { display: block; }
.img-modal-backdrop {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0,0,0,0.6);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.img-modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #000;
  padding: 8px;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  max-width: 90vw;
  max-height: 90vh;
}
.img-modal-content img {
  display: block;
  max-width: 86vw;
  max-height: 80vh;
  width: auto;
  height: auto;
}
.img-modal-close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--white);
  color: var(--dark);
  font-size: 22px;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--dark);
  background: var(--parchment);
  line-height: 1.7;
  font-size: 15px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  box-shadow: var(--shadow-lg);
  position: -webkit-sticky; /* iOS Safari 6-12 */
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 3px solid var(--secondary);
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
}

header h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.8px;
  font-family: 'Playfair Display', serif;
}

header a {
  color: var(--white);
  text-decoration: none;
  transition: var(--transition);
}

header nav.header-nav {
  display: flex;
  gap: 32px;
  align-items: center;
  flex: 1;
  justify-content: flex-end;
}

.header-top-menu {
  display: flex;
  gap: 16px;
  align-items: center;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
  padding-right: 24px;
}

.header-top-menu a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
  transition: var(--transition);
  border-radius: var(--radius);
}

.header-top-menu a:hover {
  background: rgba(197, 165, 114, 0.2);
  transform: translateY(-1px);
}

.header-top-menu i {
  color: var(--secondary);
}

.header-actions {
  display: flex;
  gap: 24px;
  align-items: center;
}

.header-actions a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-weight: 500;
  transition: var(--transition);
  color: var(--white);
  text-decoration: none;
}

.header-actions a:hover {
  background: rgba(197, 165, 114, 0.18);
  transform: translateY(-1px);
}

/* Sidebar */
aside.sidebar {
  width: 280px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  position: -webkit-sticky; /* iOS Safari 6-12 */
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* iOS momentum scroll */
}

aside.sidebar h3 {
  margin: 0 0 10px 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--secondary);
}

aside.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

aside.sidebar li {
  margin-bottom: 4px;
}

aside.sidebar a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  color: var(--gray);
  text-decoration: none;
  border-radius: 6px;
  transition: var(--transition);
  font-size: 14px;
}

aside.sidebar a:hover {
  background: var(--light-gray);
  color: var(--primary);
}

aside.sidebar a.active {
  background: var(--primary);
  color: var(--white);
  font-weight: 600;
}

/* Category Toggle */
.category-toggle {
  display: none;
}

.category-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  color: var(--dark);
  cursor: pointer;
  border-radius: 6px;
  transition: var(--transition);
  font-weight: 600;
  font-size: 13px;
  user-select: none;
}

.category-label:hover {
  background: var(--light-gray);
  color: var(--primary);
}

.category-label a {
  padding: 0;
  margin: 0;
  color: inherit;
  text-decoration: none;
  display: inline;
  flex: 1;
}

.category-label a:hover {
  padding: 0;
  background: none;
  transform: none;
}

.category-label i {
  transition: transform 0.3s ease;
  color: var(--secondary);
  flex-shrink: 0;
}

/* Ukryj podkategorie domyślnie */
.category-toggle ~ .category-list {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.3s ease;
}

/* Pokaż podkategorie gdy zaznaczony */
.category-toggle:checked ~ .category-list {
  max-height: 2000px;
  opacity: 1;
}

/* Ikony plus/minus dla kategorii z podkategoriami (czyste CSS - bez JS) */
.category-label.has-children::before {
  content: '+';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  font-size: 14px;
  font-weight: 700;
  color: var(--secondary);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.category-toggle:checked ~ .category-label.has-children::before {
  content: '−';
}

/* Pogrub etykietę rozwiniętej kategorii */
.category-toggle:checked ~ .category-label {
  font-weight: 700;
}

.category-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.category-list > li {
  position: relative;
}

.category-list > li > .category-list {
  padding-left: 12px;
  margin-top: 2px;
}

.category-link {
  display: block !important;
  padding: 6px 10px 6px 24px !important;
  color: #374151 !important;
  text-decoration: none;
  border-radius: 6px;
  transition: var(--transition);
  font-size: 13px;
  font-weight: 500;
}

.category-link:hover {
  background: var(--light-gray);
  color: var(--primary);
}

/* Pagination - Modern Design */
.pagination-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 20px;
  background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.pagination-info {
  display: flex;
  align-items: center;
}

.pagination-text {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--gray);
  margin: 0;
}

.pagination-text .font-semibold {
  font-weight: 600;
  color: var(--dark);
}

.pagination-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--dark);
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.pagination-btn:hover {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(139, 0, 0, 0.15);
}

.pagination-btn-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.pagination-pages {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pagination-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--dark);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.pagination-page:hover {
  border-color: var(--primary);
  background: rgba(139, 0, 0, 0.05);
  color: var(--primary);
  transform: translateY(-2px);
}

.pagination-page-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 8px rgba(139, 0, 0, 0.2);
}

.pagination-page-active:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #ffffff;
  transform: none;
}

.pagination-dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  color: var(--gray);
  font-size: 14px;
  font-weight: 600;
}

/* Category Filters - Modern Design */
.category-filters {
  background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.filters-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filters-primary {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-label {
  display: none;
}

.filter-select {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #ffffff;
  font-size: 13px;
  color: var(--dark);
  cursor: pointer;
  transition: all 0.15s ease;
  min-width: 140px;
}

.filter-select:hover,
.filter-select:focus {
  border-color: var(--primary);
  outline: none;
}

.price-range {
  display: flex;
  align-items: center;
  gap: 4px;
}

.filter-input {
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  color: var(--dark);
  transition: all 0.15s ease;
}

.price-input {
  width: 70px;
}

.filter-input:hover,
.filter-input:focus {
  border-color: var(--primary);
  outline: none;
}

.filter-input::placeholder {
  color: #9ca3af;
}

.price-separator {
  color: var(--gray);
  font-size: 12px;
}

.filter-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  padding: 0;
  font-size: 13px;
}

.filter-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.checkbox-custom {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--border);
  border-radius: 3px;
  background: #ffffff;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.filter-checkbox:hover .checkbox-custom {
  border-color: var(--primary);
}

.filter-checkbox input[type="checkbox"]:checked + .checkbox-custom {
  background: var(--primary);
  border-color: var(--primary);
}

.filter-checkbox input[type="checkbox"]:checked + .checkbox-custom::after {
  content: '';
  width: 4px;
  height: 8px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-bottom: 2px;
}

.checkbox-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--dark);
}

.btn-filter {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-filter:hover {
  background: var(--primary-dark);
}

.btn-filter i,
.btn-filter svg {
  width: 14px !important;
  height: 14px !important;
}

/* Attributes Section */
.filters-attributes {
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.attributes-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 0;
  background: transparent;
  border: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray);
  cursor: pointer;
  transition: all 0.15s ease;
}

.attributes-header:hover {
  color: var(--primary);
}

.attributes-header-content {
  display: flex;
  align-items: center;
  gap: 6px;
}

.attributes-header-content svg {
  width: 14px !important;
  height: 14px !important;
}

.toggle-icon {
  color: inherit;
  transition: transform 0.2s ease;
  flex-shrink: 0;
  width: 16px !important;
  height: 16px !important;
}

.attributes-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.2s ease, padding 0.2s ease;
  padding-top: 0;
}

.attributes-content.is-expanded {
  max-height: 1000px;
  opacity: 1;
  padding-top: 12px;
}

.attribute-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.attribute-group-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--dark);
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.attribute-options {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.attribute-option {
  display: inline-flex;
  align-items: center;
  gap: 0;
  cursor: pointer;
  user-select: none;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: #fff;
  transition: all 0.15s ease;
  font-size: 12px;
  color: var(--dark);
}

.attribute-option:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.attribute-option input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.attribute-option .checkbox-custom {
  display: none;
}

.attribute-option input[type="checkbox"]:checked ~ .option-label {
  color: #fff;
}

/* :has() fallback for Safari < 15.4 */
.attribute-option.is-checked,
.attribute-option:has(input:checked) {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.option-label {
  font-size: 12px;
  color: inherit;
  white-space: nowrap;
}

/* Homepage shop reviews - Modern Design */
.homepage-reviews {
  position: relative;
  padding: 0;
}

.reviews-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.reviews-header-content h2 {
  margin: 0 0 8px 0;
  font-size: 28px;
  font-weight: 700;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 12px;
}

.reviews-header-content h2 i {
  width: 32px;
  height: 32px;
  color: var(--primary);
}

.reviews-subtitle {
  margin: 0;
  font-size: 15px;
  color: var(--gray);
  font-weight: 400;
}

.reviews-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.reviews-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.reviews-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(139, 69, 19, 0.15);
  transform: translateY(-2px);
}

.reviews-btn:hover i {
  color: #ffffff;
}

.reviews-btn i {
  width: 20px;
  height: 20px;
  color: var(--dark);
  transition: color 0.2s ease;
}

.reviews-carousel {
  position: relative;
}

.reviews-track {
  position: relative;
  min-height: 320px;
}

.review-card {
  opacity: 0;
  transform: translateX(30px) scale(0.95);
  transition: opacity 0.4s ease, transform 0.4s ease;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.03), 0 10px 20px rgba(0, 0, 0, 0.05);
}

.review-card.is-active {
  opacity: 1;
  transform: translateX(0) scale(1);
  position: relative;
}

.review-quote-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.review-quote-icon i {
  width: 24px;
  height: 24px;
  color: #ffffff;
}

.review-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
}

.review-star {
  width: 20px;
  height: 20px;
  color: #e5e7eb;
  transition: all 0.2s ease;
}

.review-star.is-filled {
  color: #fbbf24;
  filter: drop-shadow(0 1px 2px rgba(251, 191, 36, 0.3));
}

.review-text {
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
  color: #374151;
  font-style: italic;
  flex-grow: 1;
}

.review-author {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.review-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 22px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.review-author-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.review-author-name {
  font-weight: 600;
  font-size: 16px;
  color: var(--dark);
}

.review-verified {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #10b981;
  font-weight: 500;
}

.review-verified i {
  width: 16px;
  height: 16px;
}

.reviews-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.reviews-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: #d1d5db;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.reviews-dot:hover {
  background: #9ca3af;
  transform: scale(1.2);
}

.reviews-dot.is-active {
  background: var(--primary);
  width: 32px;
  border-radius: 5px;
}

@media (max-width: 768px) {
  .reviews-header {
    flex-direction: column;
    gap: 16px;
  }
  
  .reviews-header-content h2 {
    font-size: 22px;
  }
  
  .review-card {
    padding: 24px;
  }
  
  .review-text {
    font-size: 15px;
  }
  
  .reviews-track {
    min-height: 380px;
  }
}

.category-link:hover {
  background: rgba(197, 165, 114, 0.18) !important; /* gold tint like header hover */
  color: var(--dark) !important;
}

.category-link i {
  color: var(--secondary);
  flex-shrink: 0;
}

/* Main Content */
main {
  padding: 32px 0;
}

.content-wrapper {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.main-content {
  flex: 1;
  min-width: 0;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--gray);
  margin-bottom: 0;
  padding: 0;
  background: transparent;
  font-weight: 500;
}

.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

.breadcrumb a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.breadcrumb-separator {
  color: var(--border);
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 32px;
  margin-top: 32px;
}

/* Search results / wishlist grid: 3 produkty w rzędzie na desktopie */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 32px;
}

/* Ujednolicone wymiary zdjęć w wynikach wyszukiwania / ulubionych */
.products-grid .product-card .product-image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 260px;
  overflow: hidden;
  background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
}

.products-grid .product-card .product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Carousel behavior is applied under the mobile media query below */

.product-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  position: relative;
}

.product-card:hover {
  box-shadow: 0 12px 24px rgba(139,0,0,0.15), 0 4px 8px rgba(0,0,0,0.08);
  transform: translateY(-8px);
}

.product-card:hover .product-card-image {
  transform: none;
}

.product-card:hover .product-card-overlay {
  opacity: 1;
}

.product-card-image-wrapper {
  position: relative;
  width: 100%;
  height: 300px;
  overflow: hidden;
  background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
}

.product-card-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
}

.product-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
  padding: 20px;
  opacity: 0;
  transition: opacity 0.35s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-card-quick-view {
  background: var(--white);
  color: var(--primary);
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.product-card-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.product-card-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-family: 'Playfair Display', serif;
  letter-spacing: -0.3px;
}

.product-card-price {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  margin-top: auto;
  font-family: 'Inter', sans-serif;
  letter-spacing: -0.5px;
}

/* Add to Cart Button */
.cart-btn {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(139, 0, 0, 0.25), 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 10;
  padding: 0;
}

.cart-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 8px 20px rgba(139, 0, 0, 0.35), 0 4px 8px rgba(0, 0, 0, 0.15);
}

.cart-btn:active {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 4px 12px rgba(139, 0, 0, 0.3);
}

.cart-btn i {
  width: 20px;
  height: 20px;
  stroke-width: 2.5;
}

.cart-btn svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.5;
}

.product-card-wrap {
  position: relative;
}

.product-card-wrap:hover .cart-btn {
  transform: translateY(-2px) scale(1.05);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.cart-summary .btn-primary {
  width: 100%;
  margin-top: 16px;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 600;
}

.btn-secondary {
  background: var(--secondary);
  color: var(--dark);
}

.btn-secondary:hover {
  background: #b89558;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
}

.btn-sm {
  padding: 6px 10px;
  font-size: 12px;
}

.btn-success {
  background: var(--success);
  color: var(--white);
}

.btn-success:hover {
  background: #059669;
}

/* Card */
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.card h2 {
  margin: 0 0 20px 0;
  font-size: 26px;
  font-weight: 600;
  color: var(--dark);
  font-family: 'Playfair Display', serif;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.card h2 svg,
.card h2 i {
  flex-shrink: 0;
}

/* Product Page */
.product-detail {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}

.product-detail h1 {
  font-size: 40px;
  font-weight: 600;
  margin: 0 0 20px 0;
  color: var(--dark);
  font-family: 'Playfair Display', serif;
  letter-spacing: -1px;
  line-height: 1.2;
}

.product-info {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.product-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--light-gray);
  color: var(--gray);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}

.product-price {
  font-size: 36px;
  font-weight: 700;
  color: var(--primary);
  margin: 20px 0;
}

.product-gallery {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 24px 0;
}

.product-gallery img {
  border-radius: var(--radius);
  border: 2px solid var(--border);
  transition: var(--transition);
  cursor: pointer;
}

.product-gallery img:hover {
  border-color: var(--primary);
  transform: scale(1.05);
}

.product-description {
  line-height: 1.8;
  color: var(--gray);
  margin: 24px 0;
}

/* Category description typography */
.category-section article h2 {
  font-size: 18px;
  line-height: 1.5;
  margin: 0 0 10px 0;
  overflow-wrap: break-word !important;
  word-break: break-word !important;
  white-space: normal !important;
  max-width: 100% !important;
  width: 100%;
  display: block !important;
}

/* Forms */
.input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  font-family: inherit;
  transition: var(--transition);
}

.input:focus {
  outline: none;
  border-color: var(--primary);
  /* maroon focus ring */
  box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.12);
}

select.input {
  cursor: pointer;
}

/* Footer */
footer {
  background: var(--dark);
  color: var(--white);
  margin-top: 60px;
  padding: 40px 0 20px;
}

footer a {
  color: var(--primary-light);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Utilities */
.text-muted {
  color: var(--gray);
}

.text-center {
  text-align: center;
}

.mt-4 {
  margin-top: 24px;
}

.mb-4 {
  margin-bottom: 24px;
}

/* ========================================
   RESPONSIVE DESIGN - MOBILE & TABLET
   ======================================== */

/* Tablet: 769px - 1024px */
@media (max-width: 1024px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }
  
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }
  
  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
  
  aside.sidebar {
    width: 240px;
  }
}

/* Mobile: max 768px */
@media (max-width: 768px) {
  /* Global */
  body {
    font-size: 14px;
  }
  
  .container {
    padding-left: 12px;
    padding-right: 12px;
  }
  
  /* Header - Mobile Optimized */
  header .container {
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 12px;
  }
  
  header h1 {
    font-size: 20px;
  }
  
  header nav.header-nav {
    gap: 16px;
    width: 100%;
    justify-content: space-around;
    order: 3;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .header-actions {
    gap: 12px;
    flex-wrap: nowrap;
  }
  
  .header-actions a {
    padding: 8px 10px;
    font-size: 13px;
    min-width: 40px;
    justify-content: center;
  }
  
  .header-actions a span {
    display: none;
  }
  
  .header-actions i {
    margin: 0;
  }
  
  /* Hide top menu on very small screens */
  .header-top-menu {
    display: none;
  }
  
  /* Main Content Layout */
  main {
    padding: 20px 0;
  }
  
  .content-wrapper {
    flex-direction: column;
    gap: 16px;
  }
  
  /* Sidebar - Full Width on Mobile */
  aside.sidebar {
    width: 100%;
    position: static;
    max-height: none;
    padding: 16px;
  }
  
  aside.sidebar h3 {
    font-size: 16px;
  }
  
  /* Collapsible categories on mobile */
  .categories-nav {
    max-height: 400px;
    overflow-y: auto;
  }
  
  /* Product Grid - 2 columns on mobile */
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 20px;
  }
  
  .product-card-image-wrapper {
    height: 180px;
  }
  
  .product-card-content {
    padding: 12px;
    gap: 8px;
  }
  
  .product-card-title {
    font-size: 14px;
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }
  
  .product-card-price {
    font-size: 16px;
  }
  
  .cart-btn {
    width: 36px;
    height: 36px;
    right: 8px;
    bottom: 8px;
  }
  
  .cart-btn i,
  .cart-btn svg {
    width: 16px;
    height: 16px;
  }
  
  /* Search Results / Wishlist - Single Column */
  .products-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 20px;
  }
  
  .products-grid .product-card .product-image {
    height: 200px;
  }
  
  /* Breadcrumb */
  .breadcrumb {
    font-size: 12px;
    gap: 6px;
    flex-wrap: wrap;
  }
  
  /* Buttons */
  .btn {
    padding: 10px 18px;
    font-size: 14px;
    width: 100%;
    justify-content: center;
  }
  
  .btn-sm {
    padding: 6px 12px;
    font-size: 12px;
  }
  
  /* Cart Page */
  .cart-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
  }
  
  .cart-header h1 {
    font-size: 22px;
  }
  
  .cart-table-wrap {
    border-radius: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .cart-table {
    min-width: 600px;
  }
  
  .cart-table th,
  .cart-table td {
    padding: 8px 10px;
    font-size: 13px;
  }
  
  .cart-table .product-cell {
    max-width: 200px;
  }
  
  .cart-table thead th:nth-child(2),
  .cart-table tbody td:nth-child(2) {
    width: 120px;
  }
  
  .cart-table thead th:nth-child(3),
  .cart-table tbody td:nth-child(3),
  .cart-table thead th:nth-child(4),
  .cart-table tbody td:nth-child(4) {
    width: 100px;
  }
  
  .cart-actions {
    flex-direction: column;
    padding: 12px;
    gap: 10px;
  }
  
  .cart-summary {
    padding: 16px;
  }
  
  .cart-summary h3 {
    font-size: 18px;
  }
  
  /* Checkout */
  .checkout-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .checkout-section h2 {
    font-size: 18px;
  }
  
  .order-summary-table th,
  .order-summary-table td {
    padding: 8px 10px;
    font-size: 13px;
  }
  
  .order-totals {
    font-size: 14px;
  }
  
  .order-totals .total {
    font-size: 16px;
  }
  
  /* Forms */
  .input,
  .select,
  textarea {
    font-size: 14px;
    padding: 10px 12px;
  }
  
  label {
    font-size: 13px;
  }
  
  /* Cards */
  .card {
    padding: 16px;
    border-radius: 10px;
  }
  
  /* Footer */
  footer {
    margin-top: 40px;
    padding: 24px 0 16px;
  }
  
  footer .container {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  footer h4,
  footer h5 {
    font-size: 16px;
    margin-bottom: 10px;
  }
  
  footer .footer-nav {
    gap: 8px;
  }
  
  footer a {
    font-size: 13px;
  }
  
  /* Product Detail Page */
  .product-detail-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .product-images {
    max-width: 100%;
  }
  
  .product-info h1 {
    font-size: 22px;
  }
  
  .product-price {
    font-size: 26px;
  }
  
  /* Sliders/Carousel */
  .carousel-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 12px;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }
  
  .carousel-grid > * {
    min-width: 75%;
    flex-shrink: 0;
    scroll-snap-align: start;
  }
  
  /* Newsletter */
  section form {
    flex-direction: column;
  }
  
  section form .input {
    min-width: 100%;
  }
  
  /* Modals */
  .modal-content {
    margin: 20px;
    max-width: calc(100% - 40px);
    max-height: calc(100vh - 40px);
  }
  
  /* Pagination */
  .pagination {
    font-size: 13px;
    gap: 4px;
  }
  
  .pagination a,
  .pagination span {
    padding: 6px 10px;
  }
  
  /* Flash Messages */
  .flash {
    font-size: 13px;
    padding: 10px 14px;
  }
  
  /* Quantity Controls */
  .qty-control {
    gap: 4px;
  }
  
  .qty-control button {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }
  
  .qty-control input[type="number"] {
    width: 44px;
    font-size: 14px;
  }
  
  /* Pagination Mobile */
  .pagination-wrapper {
    flex-direction: column;
    align-items: center;
    padding: 16px;
    gap: 16px;
  }
  
  .pagination-info {
    width: 100%;
    justify-content: center;
  }
  
  .pagination-text {
    font-size: 13px;
    gap: 4px;
  }
  
  .pagination-nav {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .pagination-btn {
    width: 36px;
    height: 36px;
  }
  
  .pagination-page {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    font-size: 13px;
  }
  
  .pagination-dots {
    min-width: 36px;
    height: 36px;
  }
  
  /* Category Filters Mobile */
  .filters-primary {
    gap: 8px;
  }
  
  .filter-select {
    min-width: 120px;
    flex: 1;
  }
  
  .price-input {
    width: 60px;
  }
  
  .btn-filter {
    padding: 6px 10px;
  }
  
  .attributes-content {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  
  .attribute-group {
    padding: 8px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 6px;
  }
}

/* Extra Small Mobile: max 480px */
@media (max-width: 480px) {
  /* Single column product grid */
  .product-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .product-card-image-wrapper {
    height: 240px;
  }
  
  header h1 {
    font-size: 18px;
  }
  
  .header-actions {
    gap: 8px;
  }
  
  .header-actions a {
    padding: 6px 8px;
    font-size: 12px;
  }
  
  /* Carousel takes more width */
  .carousel-grid > * {
    min-width: 90%;
  }
  
  /* Larger touch targets */
  .btn {
    padding: 12px 20px;
    font-size: 15px;
  }
  
  /* Stack cart summary items */
  .cart-summary .row {
    font-size: 13px;
  }
  
  /* Reviews */
  .review-card {
    padding: 20px;
  }
  
  .review-text {
    font-size: 14px;
  }
  
  .reviews-btn {
    width: 40px;
    height: 40px;
  }
  
  .reviews-btn i {
    width: 18px;
    height: 18px;
  }
}
