/* ============================================================
   PRODUCT PAGE — Redesigned
   Clean, modern e-commerce look with green accent palette
   ============================================================ */

   @import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=DM+Sans:wght@400;500;600&display=swap');

   /* ===== Design Tokens ===== */
   :root {
     --green-50:  #f0fdf4;
     --green-100: #dcfce7;
     --green-400: #4ade80;
     --green-500: #22c55e;
     --green-600: #16a34a;
     --green-700: #15803d;
   
     --primary:        var(--green-500);
     --primary-hover:  var(--green-600);
     --primary-shadow: rgba(34, 197, 94, 0.35);
   
     --accent:       #0ea5e9;   /* sky blue — pops against green */
     --danger:       #ef4444;
     --warning:      #f59e0b;
     --star-color:   #facc15;
   
     --text:         #111827;
     --text-muted:   #6b7280;
     --text-light:   #9ca3af;
   
     --bg:           #f9fafb;
     --card:         #ffffff;
     --border:       #e5e7eb;
     --border-light: #f3f4f6;
   
     --radius-sm:  6px;
     --radius-md:  12px;
     --radius-lg:  20px;
     --radius-full: 999px;
   
     --shadow-sm:  0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.04);
     --shadow-md:  0 4px 16px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.04);
     --shadow-lg:  0 10px 32px rgba(0,0,0,.10), 0 4px 12px rgba(0,0,0,.05);
   
     --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
   
     /* Match single_products/view.php public header */
     --store-yellow: #ffd600;
     --store-header-text: #2d3748;
   }
   
   /* ===== Reset / Base ===== */
   *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
   
   body {
     background: var(--bg);
     font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
     color: var(--text);
     line-height: 1.6;
     -webkit-font-smoothing: antialiased;
   }
   
   /* ===== Public header (same as view.php) ===== */
   .public-header {
     position: fixed;
     top: 0;
     left: 0;
     right: 0;
     height: 68px;
     z-index: 2000;
     display: flex;
     align-items: center;
     justify-content: space-between;
     gap: 12px;
     padding: 0 18px;
     background: var(--store-yellow);
     box-shadow: 0 2px 16px rgba(26, 44, 91, 0.13);
     font-family: 'Nunito', sans-serif;
   }
   
   .public-header__brand {
     display: inline-flex;
     align-items: center;
     flex-shrink: 0;
   }
   
   .public-header__logo {
     height: 28px;
     width: auto;
     object-fit: contain;
     display: block;
   }
   
   .public-header__cta {
     display: flex;
     align-items: center;
     gap: 10px;
     flex-shrink: 0;
   }
   
   .public-header .header-login-link {
     color: var(--store-header-text);
     font-weight: 800;
     text-decoration: none;
     padding: 8px 10px;
     border-radius: 9999px;
     transition: background 0.2s, color 0.2s;
     white-space: nowrap;
   }
   
   .public-header .header-login-link:hover {
     background: rgba(255, 255, 255, 0.35);
   }
   
   .public-header .header-apply-btn {
     background: rgba(255, 255, 255, 0.7);
     color: var(--store-header-text);
     padding: 9px 14px;
     border-radius: 9999px;
     font-weight: 900;
     text-decoration: none;
     box-shadow: 0 4px 14px rgba(26, 44, 91, 0.18);
     display: inline-flex;
     align-items: center;
     justify-content: center;
     white-space: nowrap;
     transition: transform 0.15s, background 0.2s, box-shadow 0.2s;
   }
   
   .public-header .header-apply-btn:hover {
     background: rgba(255, 255, 255, 0.85);
     transform: translateY(-1px);
     box-shadow: 0 6px 16px rgba(26, 44, 91, 0.22);
   }
   
   h1, h2, h3, h4, h5 {
     font-family: 'Plus Jakarta Sans', sans-serif;
     font-weight: 700;
   }
   
   /* ===== Layout ===== */
   .main-content {
     margin-left: auto;
     margin-right: auto;
     max-width: 1360px;
     display: flex;
     flex-direction: column;
     gap: 24px;
     /* Below fixed .public-header (68px); matches view.php .container margin-top: 92px */
     padding: 92px 24px 48px;
   }
   
   /* ===== Product Container ===== */
   .product-container {
     background: var(--card);
     border-radius: var(--radius-lg);
     box-shadow: var(--shadow-md);
     padding: 36px;
     display: flex;
     flex-wrap: wrap;
     gap: 36px;
     position: relative;
     border: 1px solid var(--border-light);
   }
   
   /* ===== Back Button ===== */
   .back-button {
     position: absolute;
     top: 24px;
     left: 24px;
     background: var(--card);
     border: 1.5px solid var(--border);
     color: var(--text-muted);
     padding: 8px 14px;
     border-radius: var(--radius-full);
     cursor: pointer;
     display: flex;
     align-items: center;
     gap: 6px;
     font-size: 0.88rem;
     font-weight: 600;
     transition: var(--transition);
     z-index: 10;
     text-decoration: none;
     font-family: 'Plus Jakarta Sans', sans-serif;
   }
   
   .back-button:hover {
    background: var(--yellow);
    border-color: var(--yellow);
    color: var(--text);
     transform: translateX(-2px);
   }
   
   .back-button i { font-size: 0.9rem; }
   
   /* ===== Image Section ===== */
   .product-images {
     flex: 1;
     min-width: 300px;
     max-width: 520px;
     display: flex;
     flex-direction: column;
     align-items: center;
     gap: 16px;
   }
   
   .image-slider {
     position: relative;
     width: 100%;
     aspect-ratio: 1 / 1;
     display: flex;
     justify-content: center;
     align-items: center;
     overflow: hidden;
     border-radius: var(--radius-lg);
     background: var(--green-50);
     border: 1px solid var(--green-100);
   }
   
   .main-image {
     width: 100%;
     height: 100%;
     object-fit: contain;
     transition: opacity 0.3s ease;
     border-radius: var(--radius-md);
     padding: 12px;
   }
   
   .image-loading-spinner {
     position: absolute;
     color: var(--green-500);
     font-size: 2rem;
   }
   
   .image-nav {
     position: absolute;
     top: 50%;
     transform: translateY(-50%);
     background: rgba(255,255,255,0.95);
     color: var(--text);
     border-radius: 50%;
     width: 38px;
     height: 38px;
     box-sizing: border-box;
     padding: 0;
     display: inline-flex;
     align-items: center;
     justify-content: center;
     line-height: 1;
     font-size: 14px;
     cursor: pointer;
     transition: var(--transition);
     box-shadow: var(--shadow-sm);
     border: 1px solid var(--border);
     z-index: 2;
   }
   
   .image-nav:hover {
    background: var(--yellow);
    color: var(--text);
    border-color: var(--yellow);
     box-shadow: var(--shadow-md);
   }
   
   .prev-main { left: 12px; }
   .next-main { right: 12px; }
   
   /* ===== Thumbnails ===== */
   .thumbnail-container {
     width: 100%;
     max-width: 520px;
   }
   
   .thumbnails-wrapper {
     overflow: hidden;
     width: 100%;
   }
   
   .thumbnail-wrapper {
     display: flex;
     gap: 10px;
     transition: transform 0.3s ease;
     padding: 4px 2px;
   }
   
   .thumbnail {
     width: 72px;
     height: 72px;
     border-radius: var(--radius-sm);
     cursor: pointer;
     object-fit: cover;
     transition: var(--transition);
     border: 2px solid transparent;
     background: var(--green-50);
     flex-shrink: 0;
   }
   
   .thumbnail:hover {
    border-color: var(--yellow);
     transform: translateY(-2px);
     box-shadow: var(--shadow-sm);
   }
   
   .thumbnail.active {
     border-color: #374151;
     box-shadow: 0 0 0 3px #f3f4f6;
   }
   
   .thumbnail-nav {
     background: var(--card);
     border: 1px solid var(--border);
     color: var(--text-muted);
     border-radius: 50%;
     width: 30px;
     height: 30px;
     box-sizing: border-box;
     padding: 0;
     display: inline-flex;
     align-items: center;
     justify-content: center;
     line-height: 1;
     font-size: 12px;
     cursor: pointer;
     transition: var(--transition);
     flex-shrink: 0;
   }
   
   .thumbnail-nav:hover {
    background: var(--yellow);
    color: var(--text);
    border-color: var(--yellow);
   }
   
   /* ===== Product Details ===== */
   .product-details {
     flex: 1;
     min-width: 300px;
     display: flex;
     flex-direction: column;
     padding: 4px 8px 0;
   }
   
   .product-title {
     font-size: 1.85rem;
     font-weight: 800;
     color: var(--text);
     line-height: 1.25;
     margin-bottom: 12px;
     letter-spacing: -0.02em;
   }
   
   /* ===== Rating Summary (in product details) ===== */
   .product-rating-summary {
     margin-bottom: 14px;
   }
   
   .rating-overview { display: flex; align-items: center; }
   
   .average-rating {
     display: flex;
     align-items: center;
     gap: 10px;
   }
   
   .rating-value {
     font-size: 1.6rem;
     font-weight: 800;
     color: var(--text);
     font-family: 'Plus Jakarta Sans', sans-serif;
   }
   
   .stars { display: flex; gap: 2px; }
   
   .stars i {
     font-size: 1rem;
     color: #e5e7eb;
   }
   
   .stars i.filled { color: var(--star-color); }
   
   .rating-count {
     font-size: 0.85rem;
     color: var(--text-muted);
   }
   
   /* ===== Category pill ===== */
   .product-category {
     font-size: 0.8rem;
     font-weight: 600;
     color: var(--text-muted);
     background: var(--bg);
     border: 1px solid var(--border);
     padding: 4px 12px;
     border-radius: var(--radius-full);
     display: inline-block;
     margin-bottom: 18px;
     letter-spacing: 0.02em;
     text-transform: uppercase;
   }
   
   /* ===== Price ===== */
   .product-price-container {
     display: flex;
     align-items: baseline;
     gap: 12px;
     margin-bottom: 16px;
     flex-wrap: wrap;
   }
   
   .product-price {
     font-size: 2.4rem;
     font-weight: 800;
     color: var(--danger);
     line-height: 1;
     font-family: 'Plus Jakarta Sans', sans-serif;
     letter-spacing: -0.02em;
   }
   
   .product-price.original-price {
     font-size: 1.25rem;
     font-weight: 500;
     color: var(--text-light);
     text-decoration: line-through;
   }
   
   .product-price.discounted-price {
     font-size: 2.4rem;
     font-weight: 800;
     color: var(--danger);
   }
   
   .discount-badge {
     background: #fef2f2;
     color: var(--danger);
     border: 1px solid #fecaca;
     padding: 4px 10px;
     border-radius: var(--radius-full);
     font-size: 0.82rem;
     font-weight: 700;
     letter-spacing: 0.02em;
     align-self: center;
   }
   
   /* ===== Seller / Shipping info ===== */
   .seller-info,
   .shipping-info {
     font-size: 0.92rem;
     color: var(--text-muted);
     margin: 5px 0;
     display: flex;
     align-items: center;
     gap: 6px;
   }
   
   .seller-info span,
   .shipping-info span {
     font-weight: 600;
     color: var(--text);
   }
   
   /* ===== Description ===== */
   .variations-section {
     margin: 20px 0;
     background: var(--bg);
     border-radius: var(--radius-md);
     padding: 16px 18px;
     border: 1px solid var(--border-light);
   }
   
   .variation-label {
     font-size: 0.85rem;
     font-weight: 700;
     text-transform: uppercase;
     letter-spacing: 0.06em;
     color: var(--text-muted);
     margin-bottom: 8px;
   }
   
   .variation-description {
     font-size: 0.95rem;
     color: var(--text);
     line-height: 1.7;
   }
   
   /* ===== Quantity ===== */
   .quantity-section {
     display: flex;
     align-items: center;
     gap: 16px;
     margin: 20px 0;
   }
   
   .quantity-label {
     font-size: 0.92rem;
     font-weight: 600;
     color: var(--text);
     white-space: nowrap;
   }
   
   .quantity-controls {
     display: flex;
     align-items: center;
     gap: 0;
     background: var(--bg);
     border: 1.5px solid var(--border);
     border-radius: var(--radius-full);
     overflow: hidden;
     width: fit-content;
   }
   
   .qty-btn {
     background: transparent;
     border: none;
     width: 40px;
     height: 40px;
     font-size: 1.2rem;
     cursor: pointer;
     color: var(--text-muted);
     transition: var(--transition);
     display: flex;
     align-items: center;
     justify-content: center;
     flex-shrink: 0;
   }
   
   .qty-btn:hover {
    background: var(--yellow);
    color: var(--text);
   }
   
   .quantity-input {
     width: 52px;
     height: 40px;
     text-align: center;
     font-size: 1rem;
     font-weight: 600;
     border: none;
     border-left: 1.5px solid var(--border);
     border-right: 1.5px solid var(--border);
     background: var(--card);
     color: var(--text);
    appearance: textfield;
    -moz-appearance: textfield;
     outline: none;
   }
   
   .quantity-input::-webkit-outer-spin-button,
   .quantity-input::-webkit-inner-spin-button {
     -webkit-appearance: none;
   }
   
   .stock-left {
     font-size: 0.85rem;
     color: var(--text-muted);
   }
   
   .low-stock {
     color: var(--warning);
     font-weight: 600;
   }
   
   /* ===== BUY NOW BUTTON — GREEN ===== */
   .buy-now {
     background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
     color: #fff;
     border: none;
     padding: 15px 22px;
     font-size: 1rem;
     font-weight: 800;
     border-radius: var(--radius-full);
     cursor: pointer;
     transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
     display: flex;
     align-items: center;
     justify-content: center;
     gap: 10px;
     margin: 16px 0 6px;
     width: 100%;
     box-shadow: 0 6px 20px rgba(22, 163, 74, 0.40), 0 2px 6px rgba(22,163,74,0.20);
     text-transform: uppercase;
     letter-spacing: 0.07em;
     font-family: 'Plus Jakarta Sans', sans-serif;
     position: relative;
     overflow: hidden;
   }
   
   .buy-now::after {
     content: '';
     position: absolute;
     inset: 0;
     background: linear-gradient(135deg, rgba(255,255,255,0.18) 0%, transparent 60%);
     pointer-events: none;
   }
   
   .buy-now:hover {
     background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
     transform: translateY(-2px);
     box-shadow: 0 10px 28px rgba(22, 163, 74, 0.50), 0 4px 10px rgba(22,163,74,0.25);
   }
   
   .buy-now:active {
     transform: translateY(0);
     box-shadow: 0 4px 12px rgba(22, 163, 74, 0.35);
   }
   
   .buy-now i {
     font-size: 1.1rem;
     position: relative;
     z-index: 2;
   }
   
   /* ===== Voucher Countdown ===== */
   .desktop-voucher-info {
     display: flex;
     align-items: center;
     gap: 8px;
     margin-top: 6px;
     font-size: 0.78rem;
     color: var(--text-muted);
   }
   
   .desktop-voucher-label { font-weight: 500; }
   
   .desktop-voucher-countdown {
     padding: 2px 10px;
     border-radius: var(--radius-full);
     background: var(--green-50);
     border: 1px solid var(--green-100);
     font-weight: 700;
     letter-spacing: 0.06em;
     color: var(--green-700);
     font-size: 0.8rem;
   }
   
   .desktop-voucher-info .desktop-voucher-countdown::before {
     content: 'Ends in ';
     font-weight: 500;
     color: var(--text-muted);
   }
   
   /* ===== Share Section ===== */
   .share-section {
     display: flex;
     align-items: center;
     gap: 14px;
     margin-top: 22px;
     padding-top: 20px;
     border-top: 1px solid var(--border-light);
   }
   
   .share-section span {
     font-size: 0.88rem;
     color: var(--text-muted);
     font-weight: 500;
   }
   
   .share-link {
     font-size: 1.3rem;
     color: var(--text-light);
     transition: var(--transition);
     text-decoration: none;
     width: 36px;
     height: 36px;
     display: flex;
     align-items: center;
     justify-content: center;
     border-radius: 50%;
     background: var(--bg);
     border: 1px solid var(--border);
   }
   
  .share-link:hover {
    transform: translateY(-2px);
    background: var(--yellow);
    border-color: var(--yellow);
    color: var(--text);
  }
   
   /* ===== Badges ===== */
   .badge {
     display: inline-flex;
     align-items: center;
     padding: 3px 10px;
     font-size: 0.74rem;
     font-weight: 700;
     border-radius: var(--radius-full);
     letter-spacing: 0.03em;
     text-transform: uppercase;
   }
   
   .badge-primary  { background: var(--green-100); color: var(--green-700); }
   .badge-success  { background: #ecfdf5; color: #065f46; }
   .badge-warning  { background: #fffbeb; color: #92400e; }
   
   /* ===== Mobile sticky Buy Now ===== */
   .mobile-sticky-buy { display: none; }
   
   @media (max-width: 768px) {
     body { padding-bottom: 84px; }
   
     .desktop-buy-now { display: none; }
   
     .mobile-sticky-buy {
       position: fixed;
       left: 0;
       right: 0;
       bottom: 0;
       z-index: 999;
       padding: 12px 16px;
       background: rgba(255,255,255,0.97);
       backdrop-filter: blur(12px);
       box-shadow: 0 -4px 20px rgba(0,0,0,0.10);
       display: flex;
       justify-content: center;
       align-items: center;
       border-top: 1px solid var(--border-light);
     }
   
     .mobile-sticky-buy .mobile-buy-now {
       max-width: 480px;
       width: 100%;
       margin: 0;
       display: flex;
       flex-direction: row;
       align-items: center;
       justify-content: space-between;
       gap: 10px;
       padding: 14px 20px;
     }
   
     .mobile-buy-main {
       display: flex;
       align-items: center;
       gap: 8px;
       font-size: 1rem;
     }
   
     .mobile-voucher-wrap {
       display: flex;
       flex-direction: column;
       align-items: flex-end;
       font-size: 0.72rem;
       line-height: 1.3;
     }
   
     .mobile-voucher-text {
       color: rgba(255,255,255,0.8);
       font-weight: 500;
     }
   
     .mobile-voucher-countdown {
       margin-top: 2px;
       padding: 2px 8px;
       border-radius: var(--radius-full);
       background: rgba(0,0,0,0.15);
       font-weight: 700;
       letter-spacing: 0.06em;
       font-size: 0.78rem;
     }
   
     .mobile-sticky-buy.voucher-expired .mobile-voucher-text { opacity: 0.6; }
     .mobile-sticky-buy.voucher-expired .mobile-voucher-countdown { background: rgba(0,0,0,0.08); color: rgba(255,255,255,0.5); }
   }
   
   /* ===== Comments / Reviews Section ===== */
   .comments-container {
     background: var(--card);
     border-radius: var(--radius-lg);
     box-shadow: var(--shadow-md);
     padding: 36px;
     border: 1px solid var(--border-light);
   }
   
   .comments-container h3 {
     font-size: 1.4rem;
     font-weight: 800;
     color: var(--text);
     margin-bottom: 28px;
     display: flex;
     align-items: center;
     gap: 12px;
     letter-spacing: -0.01em;
   }
   
   .comments-container h3::before {
     content: '';
     display: block;
     width: 4px;
     height: 22px;
     background: linear-gradient(to bottom, var(--green-500), var(--green-700));
     border-radius: var(--radius-full);
     flex-shrink: 0;
   }
   
   /* ===== Rating Summary (reviews section) ===== */
   .rating-summary {
     display: flex;
     gap: 32px;
     margin-bottom: 32px;
     padding: 24px;
     background: var(--bg);
     border-radius: var(--radius-lg);
     border: 1px solid var(--border);
     flex-wrap: wrap;
   }
   
   .rating-filters {
     flex: 1;
     min-width: 200px;
   }
   
   .rating-filters h4,
   .rating-distribution h4 {
     font-size: 0.8rem;
     font-weight: 700;
     text-transform: uppercase;
     letter-spacing: 0.07em;
     color: var(--text-muted);
     margin-bottom: 14px;
   }
   
   .filter-options {
     display: flex;
     flex-direction: column;
     gap: 6px;
   }
   
   .filter-btn {
     background: var(--card);
     border: 1.5px solid var(--border);
     color: var(--text);
     padding: 7px 14px;
     border-radius: var(--radius-full);
     cursor: pointer;
     font-size: 0.84rem;
     font-weight: 500;
     transition: var(--transition);
     display: flex;
     align-items: center;
     gap: 8px;
     text-align: left;
   }
   
   .filter-btn:hover {
    border-color: var(--yellow);
    background: var(--yellow);
     color: var(--text);
   }
   
   .filter-btn.active {
     background: #374151;
     border-color: #374151;
     color: #fff;
     font-weight: 700;
   }
   
   .filter-btn .progress-container {
     flex: 1;
     height: 5px;
     background: rgba(0,0,0,0.1);
     border-radius: var(--radius-full);
     overflow: hidden;
     margin: 0;
   }
   
   .filter-btn.active .progress-container { background: rgba(255,255,255,0.3); }
   
   .filter-btn .progress-bar {
     height: 100%;
     background: var(--green-400);
     border-radius: var(--radius-full);
   }
   
   .filter-btn.active .progress-bar { background: rgba(255,255,255,0.85); }
   
   .rating-distribution {
     flex: 2;
     min-width: 250px;
   }
   
   .star-row {
     display: flex;
     align-items: center;
     gap: 10px;
     margin-bottom: 9px;
   }
   
   .star-label {
     width: 52px;
     font-size: 0.83rem;
     color: var(--text-muted);
     flex-shrink: 0;
   }
   
   .progress-container {
     flex: 1;
     height: 7px;
     background: rgba(0,0,0,0.07);
     border-radius: var(--radius-full);
     overflow: hidden;
   }
   
   .progress-bar {
     height: 100%;
     background: linear-gradient(90deg, #f59e0b, #fbbf24);
     border-radius: var(--radius-full);
     transition: width 0.6s cubic-bezier(0.4,0,0.2,1);
   }
   
   .star-count {
     width: 32px;
     text-align: right;
     font-size: 0.82rem;
     color: var(--text-muted);
     flex-shrink: 0;
   }
   
   /* ===== Comment Form ===== */
   .comment-form {
     background: var(--bg);
     padding: 24px;
     border-radius: var(--radius-lg);
     margin-bottom: 32px;
     border: 1px solid var(--border);
   }
   
   .form-group { margin-bottom: 16px; }
   
   .form-group label {
     display: block;
     margin-bottom: 8px;
     font-size: 0.88rem;
     font-weight: 700;
     color: var(--text);
     text-transform: uppercase;
     letter-spacing: 0.04em;
   }
   
   .rating-input {
     display: flex;
     flex-direction: row-reverse;
     justify-content: flex-end;
   }
   
   .rating-input input[type="radio"] { display: none; }
   
   .rating-input label {
     cursor: pointer;
     font-size: 1.6rem;
     color: #e5e7eb;
     transition: color 0.15s;
     margin-right: 4px;
   }
   
   .rating-input input[type="radio"]:checked ~ label { color: var(--star-color); }
   .rating-input label:hover,
   .rating-input label:hover ~ label { color: var(--star-color); }
   
   .form-group textarea {
     width: 100%;
     padding: 14px 16px;
     border: 1.5px solid var(--border);
     border-radius: var(--radius-md);
     font-size: 0.95rem;
     resize: vertical;
     min-height: 110px;
     transition: var(--transition);
     background: var(--card);
     font-family: 'DM Sans', sans-serif;
     color: var(--text);
     line-height: 1.6;
   }
   
   .form-group textarea:focus {
    border-color: var(--yellow);
     outline: none;
    box-shadow: 0 0 0 3px rgba(255, 214, 0, 0.25);
   }
   
   .submit-comment {
     background: #374151;
     color: #fff;
     border: none;
     padding: 11px 22px;
     font-size: 0.92rem;
     font-weight: 700;
     border-radius: var(--radius-full);
     cursor: pointer;
     transition: var(--transition);
     display: inline-flex;
     align-items: center;
     gap: 8px;
     font-family: 'Plus Jakarta Sans', sans-serif;
     letter-spacing: 0.04em;
   }
   
   .submit-comment:hover {
    background: var(--yellow);
    color: var(--text);
     transform: translateY(-1px);
     box-shadow: var(--shadow-md);
   }
   
   /* ===== Comment Cards ===== */
   .comments-list { display: flex; flex-direction: column; gap: 1px; }
   
   .comment {
     padding: 20px 0;
     border-bottom: 1px solid var(--border-light);
     animation: fadeUp 0.35s ease-out forwards;
   }
   
   .comment:last-child { border-bottom: none; }
   
   .comment-header {
     display: flex;
     align-items: flex-start;
     gap: 14px;
     margin-bottom: 12px;
   }
   
   .user-avatar {
     flex-shrink: 0;
     width: 44px;
     height: 44px;
     border-radius: 50%;
     overflow: hidden;
   }
   
   .user-avatar img {
     width: 100%;
     height: 100%;
     object-fit: cover;
   }
   
   .avatar-placeholder {
     width: 44px;
     height: 44px;
     border-radius: 50%;
     background: linear-gradient(135deg, #6b7280, #374151);
     display: flex;
     align-items: center;
     justify-content: center;
     font-size: 1rem;
     font-weight: 800;
     color: #fff;
     font-family: 'Plus Jakarta Sans', sans-serif;
   }
   
   .user-info {
     display: flex;
     flex-direction: column;
     gap: 4px;
     flex: 1;
   }
   
   .user-name {
     font-size: 0.95rem;
     font-weight: 700;
     color: var(--text);
   }
   
   .comment-rating {
     display: flex;
     gap: 2px;
   }
   
   .comment-rating i {
     font-size: 0.85rem;
     color: #e5e7eb;
   }
   
   .comment-rating i.filled { color: var(--star-color); }
   
   .comment-date {
     font-size: 0.78rem;
     color: var(--text-light);
   }
   
   .edit-comment-btn {
     background: none;
     border: none;
     color: var(--text-muted);
     font-size: 0.8rem;
     cursor: pointer;
     padding: 3px 8px;
     border-radius: var(--radius-sm);
     transition: var(--transition);
     display: inline-flex;
     align-items: center;
     gap: 4px;
     width: fit-content;
   }
   
   .edit-comment-btn:hover {
    background: var(--yellow);
     color: var(--text);
   }
   
   .comment-body p {
     font-size: 0.93rem;
     line-height: 1.7;
     color: var(--text);
   }
   
   .comment-media {
     display: flex;
     flex-wrap: wrap;
     gap: 8px;
     margin-top: 12px;
   }
   
   .comment-media-item {
     width: 80px;
     height: 80px;
     border-radius: var(--radius-sm);
     overflow: hidden;
     border: 1px solid var(--border);
     cursor: pointer;
   }
   
   .comment-image {
     width: 100%;
     height: 100%;
     object-fit: cover;
     transition: transform 0.3s ease;
   }
   
   .comment-image:hover { transform: scale(1.05); }
   
   /* ===== No Comments ===== */
   .no-comments {
     text-align: center;
     padding: 48px 20px;
     color: var(--text-muted);
     font-size: 0.95rem;
   }
   
   /* ===== Edit Comment Form ===== */
   .edit-comment-form {
     background: var(--bg);
     border: 1px solid var(--border);
     border-radius: var(--radius-lg);
     padding: 20px;
     margin-top: 14px;
     max-width: 100%;
     overflow: hidden;
   }
   
   .edit-comment-form .edit-rating {
     display: flex;
     flex-direction: row;
     flex-wrap: wrap;
     gap: 6px;
     margin-bottom: 14px;
   }
   
   .media-management { margin-top: 12px; }
   
   .current-media {
     display: flex;
     flex-wrap: wrap;
     gap: 8px;
     margin-bottom: 10px;
   }
   
   .media-item {
     position: relative;
     width: 80px;
     height: 80px;
     border-radius: var(--radius-sm);
     overflow: visible;
   }
   
   .media-thumbnail {
     width: 80px;
     height: 80px;
     object-fit: cover;
     border-radius: var(--radius-sm);
     border: 1px solid var(--border);
   }
   
   .remove-media {
     position: absolute;
     top: -6px;
     right: -6px;
     width: 20px;
     height: 20px;
     background: var(--danger);
     color: #fff;
     border: none;
     border-radius: 50%;
     font-size: 0.65rem;
     cursor: pointer;
     display: flex;
     align-items: center;
     justify-content: center;
   }
   
   .upload-btn {
     display: inline-flex;
     align-items: center;
     gap: 8px;
     padding: 9px 16px;
     border-radius: var(--radius-md);
     background: var(--card);
     border: 1.5px dashed var(--border);
     color: var(--text-muted);
     font-size: 0.88rem;
     cursor: pointer;
     transition: var(--transition);
   }
   
   .upload-btn:hover {
    border-color: var(--yellow);
    color: var(--text);
    background: var(--yellow);
   }
   
   .media-preview {
     display: flex;
     flex-wrap: wrap;
     gap: 8px;
     margin-top: 10px;
   }
   
   .form-actions {
     display: flex;
     gap: 10px;
     margin-top: 14px;
   }
   
   .form-actions button {
     padding: 9px 18px;
     border-radius: var(--radius-full);
     font-size: 0.88rem;
     font-weight: 600;
     cursor: pointer;
     transition: var(--transition);
     font-family: 'Plus Jakarta Sans', sans-serif;
   }
   
   .form-actions button[type="button"] {
     background: var(--card);
     border: 1.5px solid var(--border);
     color: var(--text-muted);
   }
   
   .form-actions button[type="button"]:hover {
    background: var(--yellow);
    border-color: var(--yellow);
   }
   
   .form-actions button[type="submit"] {
     background: #374151;
     border: none;
     color: #fff;
     box-shadow: var(--shadow-sm);
   }
   
   .form-actions button[type="submit"]:hover {
    background: var(--yellow);
    color: var(--text);
     transform: translateY(-1px);
   }
   
   /* ===== Pagination ===== */
   .pagination {
     display: flex;
     justify-content: center;
     align-items: center;
     gap: 6px;
     margin-top: 32px;
     flex-wrap: wrap;
   }
   
   .pagination a {
     display: inline-flex;
     align-items: center;
     justify-content: center;
     min-width: 38px;
     height: 38px;
     padding: 0 10px;
     border-radius: var(--radius-md);
     text-decoration: none;
     font-size: 0.88rem;
     font-weight: 600;
     color: var(--text-muted);
     background: var(--card);
     border: 1.5px solid var(--border);
     transition: var(--transition);
   }
   
   .pagination a:hover {
    border-color: var(--yellow);
     color: var(--text);
    background: var(--yellow);
   }
   
   .pagination a.active {
     background: #374151;
     border-color: #374151;
     color: #fff;
     box-shadow: var(--shadow-sm);
   }
   
   /* ===== Out of Stock ===== */
   .out-of-stock-btn {
     background: #e5e7eb !important;
     color: var(--text-light) !important;
     cursor: not-allowed !important;
     box-shadow: none !important;
   }
   
   .out-of-stock-btn:hover {
     transform: none !important;
     box-shadow: none !important;
   }
   
   .out-of-stock-image {
     filter: grayscale(40%);
     opacity: 0.75;
   }
   
   .out-of-stock-overlay {
     position: absolute;
     inset: 0;
     background: rgba(0,0,0,0.45);
     display: flex;
     align-items: center;
     justify-content: center;
     z-index: 2;
     border-radius: var(--radius-lg);
   }
   
   .out-of-stock-overlay span {
     background: var(--danger);
     color: #fff;
     padding: 10px 22px;
     border-radius: var(--radius-full);
     font-weight: 700;
     font-size: 1rem;
     letter-spacing: 0.04em;
     font-family: 'Plus Jakarta Sans', sans-serif;
   }
   
   /* ===== Delivery Section ===== */
   .delivery-section { margin: 20px 0; }
   
   .delivery-label {
     font-weight: 700;
     font-size: 0.88rem;
     text-transform: uppercase;
     letter-spacing: 0.06em;
     color: var(--text-muted);
     margin-bottom: 12px;
   }
   
   .delivery-options { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
   
   .delivery-option {
     display: flex;
     align-items: center;
     cursor: pointer;
     padding: 10px 18px;
     border: 1.5px solid var(--border);
     border-radius: var(--radius-full);
     transition: var(--transition);
     font-size: 0.9rem;
     font-weight: 500;
   }
   
   .delivery-option:hover { border-color: var(--primary); color: var(--green-700); }
   
   .delivery-option input[type="radio"]:checked + .option-label {
     color: var(--green-700);
     font-weight: 700;
   }
   
   .pickup-locations {
     margin-top: 14px;
     padding: 16px;
     border: 1px solid var(--border);
     border-radius: var(--radius-lg);
     background: var(--green-50);
   }
   
   .pickup-label { font-weight: 700; font-size: 0.88rem; margin-bottom: 10px; color: var(--text); }
   
   .branch-info {
     padding: 12px;
     background: var(--card);
     border-radius: var(--radius-md);
     border: 1px solid var(--green-100);
     margin-bottom: 14px;
   }
   
   .branch-map { height: 280px; border-radius: var(--radius-md); overflow: hidden; }
   
   /* ===== Review Button (in comment) ===== */
   .review-button {
     background: #374151;
     color: #fff;
     border: none;
     padding: 7px 14px;
     border-radius: var(--radius-full);
     cursor: pointer;
     font-size: 0.83rem;
     font-weight: 700;
     transition: var(--transition);
     display: inline-flex;
     align-items: center;
     gap: 5px;
     margin-top: 10px;
     font-family: 'Plus Jakarta Sans', sans-serif;
   }
   
   .review-button:hover {
    background: var(--yellow);
    color: var(--text);
     box-shadow: var(--shadow-sm);
   }
   
   .item-review-button { margin-top: 10px; text-align: right; }
   
   /* ===== Modal ===== */
   #orderModal {
     position: fixed;
     inset: 0;
     background: rgba(0,0,0,0.55);
     backdrop-filter: blur(4px);
     z-index: 1000;
     display: none;
     align-items: center;
     justify-content: center;
     overflow-y: auto;
     padding: 24px;
   }
   
   #orderModal[style*="block"] { display: flex !important; }
   
   #modalContent {
     background: var(--card);
     border-radius: var(--radius-lg);
     box-shadow: var(--shadow-lg);
     max-width: 600px;
     width: 100%;
     max-height: 90vh;
     overflow-y: auto;
     position: relative;
   }
   
   /* ===== Lightbox ===== */
   .lightbox-overlay {
     position: fixed;
     inset: 0;
     background: rgba(17, 10, 163, 0.9);
     z-index: 9999;
     display: flex;
     align-items: center;
     justify-content: center;
     backdrop-filter: blur(6px);
   }
   
   .lightbox-content {
     position: relative;
     max-width: 90vw;
     max-height: 90vh;
   }
   
   .lightbox-content img {
     max-width: 90vw;
     max-height: 90vh;
     border-radius: var(--radius-md);
     object-fit: contain;
   }
   
   .lightbox-close {
     position: absolute;
     top: -14px;
     right: -14px;
     background: var(--card);
     border: none;
     width: 32px;
     height: 32px;
     border-radius: 50%;
     font-size: 1rem;
     cursor: pointer;
     display: flex;
     align-items: center;
     justify-content: center;
     color: var(--text);
     box-shadow: var(--shadow-md);
     transition: var(--transition);
   }
   
   .lightbox-close:hover { background: var(--danger); color: #fff; }
   
   /* ===== Loading Spinner ===== */
   @keyframes spin {
     to { transform: rotate(360deg); }
   }
   
   .image-loading-spinner i {
     animation: spin 1s linear infinite;
   }
   
   .loading-spinner {
     width: 36px;
     height: 36px;
     border: 3px solid var(--green-100);
     border-top-color: var(--primary);
     border-radius: 50%;
     animation: spin 0.8s linear infinite;
   }
   
   button .fa-spinner { animation: spin 0.8s linear infinite; }
   
   /* ===== Animation ===== */
   @keyframes fadeUp {
     from { opacity: 0; transform: translateY(10px); }
     to   { opacity: 1; transform: translateY(0); }
   }
   
   .comment.hidden-comment { display: none; }
   
   /* ===== Scrollbar ===== */
   ::-webkit-scrollbar { width: 6px; height: 6px; }
   ::-webkit-scrollbar-track { background: var(--bg); border-radius: 3px; }
   ::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
   ::-webkit-scrollbar-thumb:hover { background: #9ca3af; }
   
   /* ===== Rating Filter Container ===== */
   .rating-filter-container { position: relative; margin-bottom: 24px; }
   
   .rating-filter-button {
     background: var(--card);
     border: 1.5px solid var(--border);
     padding: 9px 16px;
     border-radius: var(--radius-full);
     cursor: pointer;
     display: flex;
     align-items: center;
     justify-content: space-between;
     width: 190px;
     transition: var(--transition);
     font-size: 0.88rem;
     font-weight: 600;
     color: var(--text);
   }
   
   .rating-filter-button:hover { border-color: var(--primary); }
   
   .rating-filter-button::after {
     content: "▾";
     margin-left: 8px;
     transition: transform 0.2s ease;
     color: var(--text-muted);
   }
   
   .rating-filter-button.active::after { transform: rotate(180deg); }
   
   .rating-filter-dropdown {
     position: absolute;
     top: calc(100% + 6px);
     left: 0;
     background: var(--card);
     border: 1.5px solid var(--border);
     border-radius: var(--radius-lg);
     width: 190px;
     z-index: 100;
     box-shadow: var(--shadow-lg);
     max-height: 0;
     overflow: hidden;
     transition: max-height 0.3s ease, opacity 0.2s ease;
     opacity: 0;
   }
   
   .rating-filter-dropdown.show { max-height: 300px; opacity: 1; }
   
   .filter-option {
     padding: 10px 16px;
     cursor: pointer;
     display: flex;
     align-items: center;
     justify-content: space-between;
     transition: background 0.15s ease;
     font-size: 0.88rem;
   }
   
   .filter-option:hover { background: var(--bg); }
   .filter-option.active { color: var(--text); font-weight: 700; }
   .filter-option .star-count { color: var(--text-light); font-size: 0.8rem; }
   
   /* ===== Responsive ===== */
   @media (max-width: 992px) {
     .main-content { padding: 92px 16px 32px; }
   
     .product-container {
       flex-direction: column;
       padding: 24px;
       margin-top: 0;
     }
   
     .product-images,
     .product-details { max-width: 100%; }
   
     .back-button { top: 20px; left: 20px; }
   
     .comments-container { padding: 24px; }
   }
   
   @media (max-width: 768px) {
     /* view.php: .container { margin-top: 82px } */
     .main-content { padding: 82px 12px 24px; }
   
     .product-title { font-size: 1.55rem; }
     .product-price { font-size: 1.9rem; }
     .product-price.discounted-price { font-size: 1.9rem; }
   
     .rating-summary { gap: 20px; padding: 18px; }
   }
   
   @media (max-width: 576px) {
     .thumbnail { width: 60px; height: 60px; }
     .quantity-section { flex-direction: column; align-items: flex-start; gap: 8px; }
     .comment-header { flex-wrap: wrap; }
     .user-avatar { margin-bottom: 4px; }
   
     .edit-comment-form { padding: 16px; }
     .edit-comment-form .edit-rating { gap: 4px; }
     .edit-comment-form .edit-rating label {
       font-size: 1.3rem;
       flex: 0 0 calc(20% - 4px);
       text-align: center;
     }
     .media-management,
     .media-upload,
     .upload-btn { width: 100%; }
   }
   
   @media (max-width: 400px) {
     .edit-comment-form .edit-rating label {
       font-size: 1.15rem;
       flex: 0 0 calc(20% - 3px);
     }
   }
   
   /* Seller card (aligned with customer/products product page) */
   .seller-card-container {
     margin-top: 30px;
     width: 100%;
   }
   
   .seller-card-mini {
     background: #fff;
     border-radius: 12px;
     box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
     padding: 20px;
     display: flex;
     gap: 20px;
     align-items: flex-start;
     transition: all 0.3s ease;
     border: 1px solid #e0e0e0;
     margin-top: -3.5%;
     margin-bottom: -1%;
   }
   
   .seller-avatar-mini {
     width: 80px;
     height: 80px;
     border-radius: 50%;
     overflow: hidden;
     flex-shrink: 0;
   }
   
   .seller-avatar-mini img {
     width: 100%;
     height: 100%;
     object-fit: cover;
   }
   
   .seller-info-mini { flex-grow: 1; width: 100%; }
   
   .seller-main-info {
     display: flex;
     justify-content: space-between;
     gap: 20px;
     width: 100%;
   }
   
   .seller-name-mini {
     font-size: 1.2rem;
     margin: 0 0 8px 0;
     color: #2b2d42;
     font-weight: 700;
   }
   
   .seller-meta-mini {
     display: flex;
     align-items: center;
     flex-wrap: wrap;
     gap: 20px 28px;
     margin-bottom: 14px;
   }
   
   .seller-followers-mini {
     display: flex;
     align-items: center;
     gap: 8px;
     margin-bottom: 0;
   }
   
   .seller-followers-mini .followers-icon-mini { color: #ffc107; font-size: 1.05rem; }
   .followers-count-mini { color: #5f6c7b; font-size: 0.95rem; font-weight: 500; }
   
   .seller-stats-mini { display: flex; align-items: center; gap: 15px; margin-bottom: 0; }
   
   .stat-item-mini {
     display: flex;
     align-items: center;
     gap: 8px;
     font-size: 0.95rem;
     font-weight: 500;
     color: #5f6c7b;
   }
   .stat-item-mini i { color: #4361ee; font-size: 1.05rem; }
   
   .seller-actions-mini {
     display: flex;
     flex-direction: column;
     gap: 10px;
     min-width: 120px;
     align-items: flex-end;
   }
   
   .view-shop-btn-mini {
     background: #4361ee;
     color: #fff;
     padding: 8px 15px;
     border-radius: 6px;
     text-decoration: none;
     font-size: 0.85rem;
     display: flex;
     align-items: center;
     gap: 5px;
     transition: all 0.2s ease;
     width: 100%;
     justify-content: center;
   }
   .view-shop-btn-mini:hover { background: #3a56d4; transform: translateY(-2px); }
   
   @media (max-width: 768px) {
     .seller-card-mini { flex-direction: column; align-items: center; text-align: center; }
     .seller-main-info { flex-direction: column; }
     .seller-meta-mini { justify-content: center; }
     .seller-actions-mini {
       flex-direction: row;
       width: 100%;
       margin-top: 15px;
     }
   }
   @media (max-width: 480px) {
     .seller-actions-mini { flex-direction: column; }
   }
   .seller-link { color: #4361ee; font-weight: 600; text-decoration: none; }
   .seller-link:hover { text-decoration: underline; }

   /* Center Font Awesome chevrons inside circular nav buttons (override FA inline-block) */
   .image-slider-controls .image-nav,
   i.thumbnail-nav {
     display: inline-flex !important;
     align-items: center !important;
     justify-content: center !important;
     box-sizing: border-box;
     padding: 0 !important;
     margin: 0;
     line-height: 1 !important;
     vertical-align: middle;
   }

   i.image-nav::before,
   i.thumbnail-nav::before {
     display: block;
     line-height: 1;
     position: relative;
     top: 1px;
   }

/* Product detail page — info column layout */
.product-details {
    padding: 16px 20px 12px !important;
    gap: 0;
}

.product-details .product-category {
    font-size: 0.875rem;
    font-weight: 500;
    color: #9ca3af;
    background: none;
    border: none;
    padding: 0;
    margin: 0 0 12px;
    display: block;
    text-transform: none;
    letter-spacing: normal;
    line-height: 1.4;
}

.product-title-row {
    margin-bottom: 14px;
}

.product-title-row .product-title {
    margin: 0;
    width: 100%;
    line-height: 1.3;
    word-break: break-word;
}

.product-inline-rating {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 18px;
}

.product-inline-rating .stars {
    display: flex;
    gap: 2px;
}

.product-inline-rating .stars i {
    font-size: 0.85rem;
    color: #e5e7eb;
}

.product-inline-rating .stars i.filled {
    color: var(--star-color, #f59e0b);
}

.product-inline-rating .rating-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text, #1f2937);
}

.product-inline-rating .rating-count {
    font-size: 0.85rem;
    color: var(--text-muted, #6b7280);
    white-space: nowrap;
}

.product-details .product-price-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 14px;
    margin-bottom: 10px;
}

.product-price.product-price-current,
.product-price-current {
    color: var(--yellow, #ffd600) !important;
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1;
    margin: 0;
    text-decoration: none !important;
}

.product-price.product-price-was,
.product-price-was {
    font-size: 1.2rem;
    font-weight: 500;
    color: #9ca3af !important;
    text-decoration: line-through;
    margin: 0;
}

.product-price-container .discount-badge {
    background: rgba(255, 214, 0, 0.2);
    color: #1a1a2e;
    border: 1px solid var(--yellow, #ffd600);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    margin: 0;
}

.product-description-block {
    margin: 0 0 20px;
}

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

.product-description-wrap.is-collapsed .product-description-inner {
    max-height: 4.5em;
    overflow: hidden;
}

.product-description-wrap.is-collapsed .product-description {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-description-wrap.is-collapsed::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1.5em;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--card, #fff));
    pointer-events: none;
}

.product-description-wrap.is-expanded .product-description-inner {
    max-height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 6px;
}

.product-description-wrap.is-expanded .product-description {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
}

.product-description-wrap.is-expanded::after {
    display: none;
}

.product-description-inner {
    transition: max-height 0.25s ease;
}

.product-description {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text, #374151);
    margin: 0;
}

.product-description-toggle {
    margin-top: 8px;
    padding: 0;
    border: none;
    background: none;
    color: var(--green-600, #16a34a);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}

.product-description-toggle:hover {
    text-decoration: underline;
}

.product-meta-stats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin: 0 0 24px;
    padding: 14px 0;
    border-top: 1px solid var(--border-light, #e5e7eb);
    border-bottom: 1px solid var(--border-light, #e5e7eb);
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-muted, #6b7280);
}

.product-meta-stats .meta-item {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0;
    white-space: nowrap;
}

.product-meta-stats .meta-divider {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #d1d5db;
    flex-shrink: 0;
}

.product-meta-stats .meta-item strong,
.product-meta-stats .stock-left {
    font-weight: 700;
    color: var(--text, #1f2937);
}

.product-meta-stats .seller-link {
    color: var(--green-600, #16a34a);
    font-weight: 600;
    text-decoration: none;
}

.product-meta-stats .seller-link:hover {
    text-decoration: underline;
}

.product-details .variations-section.product-group-variants {
    margin-top: 0;
    margin-bottom: 20px;
}

.product-purchase-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 12px;
    margin: 8px 0 28px;
    width: 100%;
}

.product-purchase-row .quantity-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 0;
    flex: 0 0 auto;
}

.product-purchase-row .quantity-label {
    display: none;
}

.product-purchase-row .quantity-controls {
    height: 100%;
}

.product-purchase-row .add-to-cart,
.product-purchase-row .buy-now {
    margin: 0;
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
    width: auto;
}

.product-purchase-row--single .buy-now {
    flex: 1 1 0;
}

.product-details .share-section {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 14px;
    margin-top: 0;
    padding-top: 20px;
    border-top: 1px solid var(--border-light, #e5e7eb);
}

.product-details .share-link {
    color: #1a1a2e;
    background: rgba(255, 214, 0, 0.35);
    border: 1px solid var(--yellow, #ffd600);
    width: 40px;
    height: 40px;
    font-size: 1.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition, all 0.2s ease);
    flex-shrink: 0;
}

.product-details .share-link:hover {
    background: var(--yellow, #ffd600);
    border-color: var(--yellow, #ffd600);
    color: #1a1a2e;
    transform: translateY(-2px);
}

.product-details i[class*="fa-"],
.product-purchase-row i[class*="fa-"],
.product-images i[class*="fa-"],
.back-button i[class*="fa-"] {
    font-style: normal;
    line-height: 1;
    display: inline-block;
    position: relative;
    z-index: 1;
}

.product-details i.fa-solid,
.product-details i.fas,
.product-purchase-row i.fa-solid,
.product-purchase-row i.fas,
.back-button i.fa-solid {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900;
}

.product-details i.fa-brands,
.product-details i.fab,
.product-details .share-link i {
    font-family: "Font Awesome 6 Brands" !important;
    font-weight: 400;
}

.product-purchase-row .add-to-cart i,
.product-purchase-row .buy-now i {
    font-size: 1.1rem;
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .product-purchase-row {
        flex-wrap: wrap;
    }

    .product-purchase-row .quantity-section {
        width: 100%;
    }

    .product-purchase-row .add-to-cart,
    .product-purchase-row .buy-now {
        flex: 1 1 calc(50% - 5px);
        min-width: calc(50% - 5px);
    }

    .product-purchase-row--single .buy-now {
        flex: 1 1 100%;
        min-width: 100%;
    }

    .product-meta-stats {
        gap: 8px 10px;
        padding: 12px 0;
    }

    .product-meta-stats .meta-item {
        white-space: normal;
    }
}

.product-images {
    display: flex;
    flex-direction: column;
}

.product-images--group .thumbnail-container {
    display: none !important;
}

.product-images .image-slider .image-carousel-indicators {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 12;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    padding: 0;
    margin: 0;
    background: none;
    border: none;
    box-shadow: none;
}

.product-images .image-carousel-indicators[hidden] {
    display: none !important;
}

.product-images .carousel-indicator-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    pointer-events: auto;
}

.product-images .carousel-indicator {
    width: 7px;
    height: 7px;
    min-width: 7px;
    min-height: 7px;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease, opacity 0.25s ease;
    opacity: 0.85;
}

.product-images .carousel-indicator:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.75);
}

.product-images .carousel-indicator.is-active {
    width: 22px;
    background: var(--yellow, #ffd600);
    opacity: 1;
    box-shadow: 0 0 10px rgba(255, 214, 0, 0.5);
}

.product-images .carousel-indicator-count {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
    line-height: 1;
    pointer-events: none;
    user-select: none;
}

.product-group-variants-below-images {
    width: 100%;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

.product-group-variants-below-images .variation-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.product-group-variants-below-images .group-variant-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 8px;
}

.product-group-variants-below-images .group-variant-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 8px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.2s, background 0.2s;
    min-height: 0;
}

.product-group-variants-below-images .group-variant-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.product-group-variants-below-images .group-variant-option.selected {
    border-color: #001a6e;
    background: #f0f4ff;
}

.product-group-variants-below-images .group-variant-thumb {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 6px;
    background: #f3f4f6;
    flex-shrink: 0;
}

.product-group-variants-below-images .group-variant-name {
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.25;
    color: #111827;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    width: 100%;
}

.product-group-variants-below-images .group-variant-meta {
    display: flex;
    flex-direction: column;
    gap: 1px;
    font-size: 0.68rem;
    line-height: 1.2;
}

.product-group-variants-below-images .group-variant-price {
    color: #ca8a04;
    font-weight: 700;
}

.product-group-variants-below-images .group-variant-stock {
    color: #64748b;
}

/* Main image — fixed frame with overlay controls */
.product-images .image-slider {
    position: relative;
    width: 100%;
    max-width: 520px;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    flex-shrink: 0;
}

.product-images .image-slider-media {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.product-images .image-slider-media .main-image {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    cursor: zoom-in;
    padding: 12px;
    box-sizing: border-box;
}

.product-images .image-slider-media .image-loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
}

.product-images .image-slider-controls {
    position: absolute;
    inset: 0;
    z-index: 10;
    pointer-events: none;
}

.product-images .image-slider-controls .image-nav,
.product-images .image-slider-controls .image-enlarge-btn {
    position: absolute;
    pointer-events: auto;
    margin: 0;
    padding: 0;
    border: none;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: none;
    box-sizing: border-box;
    line-height: 1;
    font-size: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: var(--text, #1f2937);
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.product-images .image-slider-controls .image-nav {
    top: 50%;
    bottom: auto;
    left: auto;
    right: auto;
    transform: translateY(-50%);
}

.product-images .image-slider-controls .prev-main {
    left: 12px;
}

.product-images .image-slider-controls .next-main {
    right: 12px;
}

.product-images .image-enlarge-btn {
    top: 12px;
    right: 12px;
    transform: none;
    font-size: 15px;
}

.product-images .image-slider-controls .image-nav:hover,
.product-images .image-enlarge-btn:hover {
    background: var(--yellow, #facc15);
}

.product-images .image-slider-controls .image-nav i,
.product-images .image-enlarge-btn i {
    pointer-events: none;
}

.product-image-lightbox.lightbox {
    cursor: zoom-out;
}

.product-image-lightbox .lightbox-stage {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 92vw;
    max-height: 90vh;
    pointer-events: none;
}

.product-image-lightbox .lightbox-content {
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 92vw;
    max-height: 90vh;
}

.product-image-lightbox.lightbox .lightbox-content img {
    max-width: 92vw;
    max-height: 90vh;
    object-fit: contain;
    display: block;
}

.product-image-lightbox .lightbox-counter {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    color: var(--yellow, #ffd600);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    background: rgba(0, 0, 0, 0.72);
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 214, 0, 0.45);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
    z-index: 10002;
    pointer-events: none;
    white-space: nowrap;
}
