/* ===================================
   OLANREWAJU GOLD GLOBAL STYLES
   (navbar removed, only globals remain)
=================================== */

:root {
  --gold: #d4af37;
  --dark: #111;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  overflow-x: hidden; /* prevents horizontal scroll */
}

/* ===== Header (hidden for now) ===== */
.header {
  background: var(--gold);
  color: white;
  text-align: center;
  padding: 40px;
}

.header button {
  background: var(--gold);
  border: none;
  font-weight: bold;
}

/* ===== Space under nav placeholder ===== */
.nav-space {
  height: 60px; /* adjust if you want taller spacing */
}

/* ===== Product Grid ===== */
.products {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 12px;
  width: 100%;
}

/* ===== Desktop ===== */
@media (min-width: 1024px) {
  .products {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ===== Drawer Overlay ===== */
#cartOverlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 999;
}

/* ===== Drawer ===== */
#cartDrawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 360px;
  max-width: 90%;
  height: 100%;
  background: #fff;
  z-index: 1000;
  padding: 16px;
  overflow-y: auto;
  transition: right 0.3s ease;
}

/* ===== Drawer Head ===== */
.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

/* ===== Buttons inside drawer ===== */
#cartDrawer button {
  background: var(--gold);
  padding: 10px;
  border: none;
  cursor: pointer;
  margin-top: 6px;
}

#cartDrawer button:first-of-type {
  font-weight: bold;
}

/* ===============================
   PRODUCT CARD IMAGE FIX
=============================== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.product-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background-color: #f8f8f8;
  display: block;
  border-radius: 8px;
}

.product-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
}

.product-card {
  width: 100%;
  min-width: 0;
}

/* ===============================
   PRODUCT NAME FIX (ALL DEVICES)
================================= */

.product-card h3 {
  white-space: nowrap; /* prevent next line */
  overflow: hidden; /* hide overflow text */
  text-overflow: ellipsis; /* show ... */
}

/* ===== Gold Add To Cart Button ===== */
.product-card > button {
  background: #d4af37;
  color: #111;
  border: none;
  padding: 10px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 6px;
}

.product-card > button:hover {
  opacity: 0.85;
}

/* =============================
   NAVBAR GLOBAL
============================= */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 10px;
  background: #fff;
  gap: 15px;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo {
  height: 36px;
}

/* =============================
   DESKTOP SEARCH
============================= */
.nav-search {
  flex: 1;
  max-width: 600px;
  background: #f1f1f1;
  border-radius: 30px;
  display: flex;
  align-items: center;
  padding: 8px 14px;
  border: 2px solid transparent;
  transition: 0.2s ease;
}

.nav-search.active {
  border-color: #1a8f3c;
}

.nav-search input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 15px;
}

.search-icon,
.close-icon {
  border: none;
  background: none;
  font-size: 18px;
  cursor: pointer;
}

.close-icon {
  display: none;
  margin-left: 6px;
}

.nav-search.active .close-icon {
  display: block;
}

/* =============================
   RIGHT SIDE ITEMS
============================= */
.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* currency */
.currency {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.currency img {
  width: 22px;
  height: 14px;
  object-fit: cover;
}

.currency .arrow {
  font-size: 9px;
}

.currency-dropdown {
  position: absolute;
  top: 32px;
  right: 0;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 500;

  opacity: 0;
  pointer-events: none;
  transform: translateY(5px);
  transition: 0.2s ease;
}

.currency.active .currency-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* login */
.login-text {
  display: inline;
}
.login-icon {
  display: none;
}

/* cart badge */
.cart {
  position: relative;
  font-size: 22px;
  cursor: pointer;
}
.badge {
  position: absolute;
  top: -6px;
  right: -10px;
  background: #1a8f3c;
  color: white;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 50%;
}

/* =============================
   MOBILE
============================= */
.mobile-search-btn {
  display: none;
  font-size: 20px;
  background: none;
  border: none;
  cursor: pointer;
}

.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  transform: translateY(-100%);
  transition: 0.3s ease;
  z-index: 2000;
}

.search-overlay.active {
  transform: translateY(0);
}

.search-box {
  flex: 1;
  background: #f1f1f1;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.search-box input {
  border: none;
  background: transparent;
  outline: none;
  width: 100%;
}

.close-search {
  font-size: 24px;
  border: none;
  background: none;
  cursor: pointer;
}
.categories-section {
  padding: 20px 16px;
}

.categories-desktop {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.category-item {
  padding: 10px 16px;
  border: 1px solid #ddd;
  border-radius: 20px;
  text-decoration: none;
  color: #111;
  font-weight: 500;
}

.category-item:hover {
  background: #f5f5f5;
}

.categories-drawer {
  position: fixed;
  inset: 0;
  background: #fff;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  z-index: 1000;
}

.categories-drawer.open {
  transform: translateY(0);
}

.categories-mobile {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid #eee;
}

.drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 420px;
  max-width: 90%;
  height: 100%;
  background: #fff;
  z-index: 1001; /* must be above overlay */
  padding: 24px;
  overflow-y: auto;
  transition: right 0.3s ease;
}

/* Show drawer when open class is added */
.drawer.open {
  right: 0;
}

/* ===============================
   BANK DRAWER SAFE CONTROL
=============================== */

/* Hidden by default */
.bank-drawer {
  right: -100%;
  transition: right 0.3s ease;
}

/* Show only when open class is added */
.bank-drawer.open {
  right: 0;
}

/* Overlay hidden by default */
#bankOverlay {
  display: none;
}

/* Show overlay only when active */
#bankOverlay.active {
  display: block;
}

.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1000; /* below drawer */
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 40px auto;
  width: 100%;
}

.pagination button {
  padding: 8px 14px;
  border: none;
  border-radius: 6px;
  background: #f2f2f2;
  cursor: pointer;
  font-weight: 500;
}

.pagination button.active {
  background: #d4af37; /* gold */
  color: #111;
}

.pagination button:hover {
  opacity: 0.85;
}

/* image container */
.image-wrap {
  position: relative;
}

/* stock badge */
.stock {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: bold;
  border-radius: 4px;
  color: white;
  z-index: 2;
}

.stock {
  position: absolute;
  top: 6px;
  left: 6px;
  font-size: 9px;          /* smaller text */
  font-weight: 600;
  padding: 2px 5px;        /* smaller badge */
  border-radius: 12px;
  color: #fff;
  letter-spacing: 0.2px;
}

/* lighter green */
.stock.in {
  background: #4ade80;
}

/* lighter red */
.stock.out {
  background: #f87171;
}

/* ============================
   FOOTER
============================= */
.footer {
  background: #111; /* dark but not too dark */
  color: #eee;
  margin-top: 40px;
  padding: 30px 20px;
  font-size: 14px;
}

.footer h4 {
  font-size: 13px;
  margin-bottom: 10px;
  font-weight: 600;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}

.footer-contact p {
  margin: 4px 0;
}

/* subscribe area */
.subscribe-box {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.subscribe-box input {
  padding: 10px;
  border-radius: 4px;
  border: none;
  width: 260px;
  max-width: 100%;
}

.subscribe-box button {
  background: gold;
  border: none;
  padding: 10px 14px;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
}

/* bottom */
.footer-bottom {
  margin-top: 25px;
  border-top: 1px solid #333;
  padding-top: 15px;
}

.footer-bottom a {
  color: gold;
  text-decoration: none;
  font-weight: bold;
}

/* =============================
PRODUCT PAGE
============================= */
.product-page {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 20px;
}

/* Top section: image + info */
.product-detail {
  display: flex;
  align-items: flex-start;
  gap: 50px;
  padding: 40px 20px;
  max-width: 1200px;
  margin: auto;
}

/* Product image container */
.product-image {
  flex: 1 1 300px;
  max-width: 420px;
  overflow: hidden;
  position: relative;
}

.product-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
}

/* Stock badge */
.product-image .stock {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 10px;
  font-weight: bold;
  border-radius: 4px;
  color: #fff;
  z-index: 2;
  font-size: 12px;
}

.stock.in {
  background: #16a34a;
} /* green for in stock */
.stock.out {
  background: #dc2626;
} /* red for out of stock */

/* Product info */
.product-info {
  flex: 1;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.product-info h1 {
  font-size: 24px;
  margin: 0;
}

.product-info .price {
  font-size: 20px;
  font-weight: bold;
  color: gold;
}

.product-info .category {
  font-size: 14px;
  color: #aaa;
}

/* Quantity + cart button */
.qty-cart {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
}

.qty-cart button {
  padding: 6px 12px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
}

#addToCartBtn {
  padding: 10px 15px;
  font-size: 16px;
  background: gold;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

/* RELATED PRODUCTS SECTION */
.related-products {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.related-products h2 {
  font-size: 20px;
  margin-bottom: 15px;
}

/* Grid of related products */
#relatedProductsGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 15px;
}

button:disabled,
.disabled-btn {
  background: #ccc;
  cursor: not-allowed;
  opacity: 0.7;
}

.floating-whatsapp-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  cursor: pointer;
  background-color: #25d366; /* WhatsApp green */
  border: 3px solid white; /* White border */
  border-radius: 50%;
  width: 55px;
  height: 55px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s;
}

.floating-whatsapp-button:hover {
  transform: scale(1.1);
}

.floating-whatsapp-button svg {
  width: 30px;
  height: 30px;
}

.floating-whatsapp-notification {
  position: absolute;
  top: -5px;
  right: -5px;
  background: white;
  color: #25d366;
  font-size: 12px;
  font-weight: bold;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #25d366;
}

/* Default Light Mode */
body {
  transition:
    background-color 0.3s,
    color 0.3s;
}

/* Categories section & main content */
.main-content,
.categories-container {
  background-color: #fff;
  color: #000;
  transition:
    background-color 0.3s,
    color 0.3s;
  margin-top: 30px;
}

/* Dark Mode */
body.dark-mode .main-content,
body.dark-mode .categories-container {
  background-color: #121212; /* dark background */
  color: #fff; /* white text */
}

/* Category links */
.category-item {
  color: #000;
  transition: color 0.3s;
}

body.dark-mode .category-item {
  color: #fff;
}

/* Product cards text stays the same */
.product-card,
.product-card h3,
.product-card p,
.product-card span {
  color: inherit; /* keeps default color in both modes */
}

/* =============================
   MINIMAL FLOATING THEME TOGGLE
============================= */
.theme-toggle {
  position: fixed;
  bottom: 90px; /* above WhatsApp button */
  right: 20px;
  z-index: 9999;
  width: auto; /* only size of emoji */
  height: auto;
  background: none; /* fully transparent */
  border: none; /* no border */
  font-size: 28px; /* emoji size */
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: transform 0.2s;
}

.theme-toggle:hover {
  transform: scale(1.2); /* subtle hover effect */
}

/* ===== Dark Mode Global Styling for All Pages with Cards ===== */
body.dark-mode .main-content {
  background-color: #121212; /* dark background for main content */
  color: #ffffff; /* default text color for headings/categories if needed */
}

/* All product cards inside any .products container */
body.dark-mode .products .product-card {
  background-color: #1e1e1e; /* dark card background */
  color: inherit; /* preserve original text colors like homepage */
}

/* Optional: change only the category name inside cards if needed */
body.dark-mode .products .product-card .category {
  color: #ffffff;
}

/* You can also ensure pagination buttons don't invert text */
body.dark-mode .pagination button {
  background-color: #2a2a2a;
  color: #ffffff;
}

/* Dark mode for checkout page */
body.dark-mode .checkout-container {
  background-color: #121212;
  color: #fff;
}

body.dark-mode .checkout-left section,
body.dark-mode .checkout-right {
  background-color: #1e1e1e; /* dark gray for cards/sections */
  color: #fff;
}

body.dark-mode #placeOrderBtn {
  background-color: #d4af37; /* can keep gold button same */
  color: #111;
}

body.dark-mode .cart-price {
  color: #ffffff;
}

/* ==============================
   DARK MODE - MOBILE CATEGORIES DROPDOWN
============================== */

body.dark-mode .categories-mobile-dropdown {
  background-color: #1e1e1e; /* dark background */
  border-top: 1px solid #333;
}

body.dark-mode .categories-mobile-dropdown .category-item {
  color: #ffffff;
  border-color: #333;
}

body.dark-mode .categories-mobile-dropdown .category-item:hover {
  background-color: #2a2a2a;
}

/* ================= CART DRAWER ITEM ================= */

.cart-item {
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}

.cart-row {
  display: flex;
  gap: 12px;
}

.cart-img {
  width: 70px;
  height: 70px;
  object-fit: contain;
  background: #f8f8f8;
  border-radius: 6px;
}

.cart-info {
  flex: 1;
}

.cart-name {
  font-weight: 600;
  margin-bottom: 4px;
}

.cart-price {
  color: #333;
  margin-bottom: 8px;
}

.cart-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-controls button {
  padding: 4px 8px;
  cursor: pointer;
}

.remove-btn {
  background: none;
  border: none;
  color: red;
  cursor: pointer;
}

/* ==============================
   CHECKOUT LAYOUT
============================== */

.checkout-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  padding: 40px 20px;
  max-width: 1200px;
  margin: auto;
}

/* Left column sections */
.checkout-left section {
  background: #fff;
  padding: 20px;
  border: 1px solid #eee;
  border-radius: 8px;
  margin-bottom: 20px;
}

/* Right column */
.checkout-right {
  background: #f8f8f8;
  padding: 25px;
  border-radius: 8px;
  height: fit-content;
  position: sticky;
  top: 100px;
}

.checkout-right h3 {
  margin-top: 0;
}

/* Order summary spacing */
.checkout-right p {
  margin: 10px 0;
}

/* Place order button full width */
#placeOrderBtn {
  width: 100%;
  padding: 14px;
  background: #d4af37;
  border: none;
  font-weight: bold;
  cursor: pointer;
  margin-top: 20px;
}

#placeOrderBtn:hover {
  opacity: 0.9;
}

/* Hide mobile dropdown by default */
.categories-mobile-dropdown {
  display: none;
  flex-direction: column;
  gap: 12px;
  padding: 12px 16px;
  background: #fff;
  border-top: 1px solid #eee;
}

/* Hide mobile button on desktop */
.mobile-only {
  display: none;
}

.product-variations {
  margin: 15px 0;
}

.variation-group {
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
}

.variation-group label {
  font-size: 14px;
  margin-bottom: 5px;
  font-weight: 500;
}

.variation-select {
  padding: 8px;
  border: 1px solid #ccc;
  background: transparent;
  font-size: 14px;
}

/* =========================
   PRODUCT IMAGE GALLERY
========================= */
/* =========================
   PRODUCT IMAGE GALLERY
========================= */

.product-image {
  flex: 0 0 auto;
  max-width: 600px;
}

.image-gallery {
  display: flex;
  gap: 20px;
  align-items: stretch; /* important */
}

/* MAIN IMAGE */
.main-image-wrapper {
  position: relative;
  width: 500px;
  height: 500px;
  background: #f8f8f8;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

#mainProductImage {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* THUMBNAILS (LEFT COLUMN) */
.thumbnail-list {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 500px; /* EXACT same as main image */
}

.thumbnail {
  width: 80px; /* smaller width */
  height: 90px; /* 5 of this ≈ 500px */
  object-fit: contain;
  background: #f8f8f8;
  border-radius: 6px;
  border: 1px solid #eee;
  cursor: pointer;
}

.thumbnail.active {
  border: 2px solid #d4af37;
}

/* SLIDE BUTTONS */
.slide-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: none;
  font-size: 22px;
  padding: 10px 14px;
  cursor: pointer;
  border-radius: 4px;
  z-index: 3;
}

.slide-btn.prev {
  left: 10px;
}

.slide-btn.next {
  right: 10px;
}

/* =========================
   BREADCRUMB
========================= */
.breadcrumb {
  max-width: 1200px;
  margin: 15px auto;
  padding: 0 15px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #777;
}

.breadcrumb a {
  text-decoration: none;
  color: #000;
  font-weight: 500;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.separator {
  font-size: 16px;
  color: #aaa;
}

/* Dark mode */
body.dark-mode .breadcrumb a {
  color: #fff;
}

body.dark-mode .breadcrumb {
  color: #bbb;
}

/* PAYMENT PROOF UI */

.payment-proof-upload{
margin-top:20px;
padding:16px;
border-top:1px solid #eee;
}

.proof-title{
font-weight:bold;
display:block;
margin-bottom:10px;
}

.proof-upload-box{
border:2px dashed #ccc;
border-radius:10px;
padding:20px;
text-align:center;
cursor:pointer;
transition:0.3s;
position:relative;
}

.proof-upload-box:hover{
border-color:#000;
background:#fafafa;
}

.upload-icon{
font-size:30px;
margin-bottom:5px;
}

.upload-content p{
margin:5px 0;
font-weight:500;
}

.upload-content small{
color:#666;
}

.proof-preview{
display:none;
max-width:100%;
border-radius:8px;
margin-top:10px;
}

.upload-proof-btn{
width:100%;
margin-top:12px;
padding:12px;
background:black;
color:white;
border:none;
border-radius:6px;
font-weight:bold;
cursor:pointer;
}

.upload-proof-btn:hover{
background:#333;
}

.proof-help{
font-size:12px;
color:#777;
margin-top:8px;
text-align:center;
}

.track-btn-footer {
    background-color: gold;
    color: black;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 5px;
    font-weight: bold;
    transition: background 0.3s;
  }

  .track-btn-footer:hover {
    background-color: greenyellow;
    text-decoration: underline;
  }


/* MOBILE LAYOUT */

@media (max-width: 750px) {
  /* Hide desktop categories on mobile */
  .categories-desktop {
    display: none;
  }

  /* Smaller product name on small mobile */
  .product-card h3 {
    font-size: 15px; /* reduce size */
    font-weight: 700; /* reduce boldness */
  }

  /* Show mobile button */
  .mobile-only {
    display: inline-block;
    background: #d4af37;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
  }

  /* Show dropdown when active */
  .categories-mobile-dropdown.active {
    display: flex;
  }

  .categories-mobile-dropdown {
    max-height: 40vh;
    overflow-y: auto;
    padding-right: 6px;
    scroll-behavior: smooth;
  }

  /* Nice subtle scrollbar (Chrome/Edge) */
  .categories-mobile-dropdown::-webkit-scrollbar {
    width: 6px;
  }

  .categories-mobile-dropdown::-webkit-scrollbar-thumb {
    background: #d4af37;
    border-radius: 10px;
  }

  body.dark-mode .categories-mobile-dropdown::-webkit-scrollbar-track {
    background: #121212;
  }
}

/* Responsive (mobile) */
@media (max-width: 900px) {
  .checkout-container {
    grid-template-columns: 1fr;
  }

  .checkout-right {
    position: static;
  }
}

/* Tablet */
@media (max-width: 1024px) {
  .products {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Mobile */
@media (max-width: 750px) {
  .products {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Extra small screens */
@media (max-width: 350px) {
  .products {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Reuse homepage product-card CSS for related products */
/* .product-card, .image-wrap, .stock already styled in your homepage CSS */

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .product-detail {
    flex-direction: column;
  }

  #relatedProductsGrid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  #relatedProductsGrid {
    grid-template-columns: 1fr;
  }

  .qty-cart {
    gap: 5px;
  }
}

/* mobile */
@media (max-width: 600px) {
  .footer-top {
    flex-direction: column;
  }

  .subscribe-box {
    flex-direction: column;
  }

  .subscribe-box button {
    width: fit-content;
  }
}

/* RESPONSIVE */
@media (max-width: 750px) {
  .nav-search {
    display: none;
  }
  .mobile-search-btn {
    display: block;
  }
}

@media (max-width: 420px) {
  .login {
    display: flex; /* keep flex */
    align-items: center;
    gap: 4px; /* optional: spacing between icon and text */
  }

  .login-text {
    display: none; /* hide text */
  }

  .login-icon {
    display: inline-flex; /* show icon */
    font-size: 20px;
  }
}

/* ===========================
   FORCE 2 COLUMNS FOR RELATED
   =========================== */

@media (max-width: 750px) {
  .related-products .products {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 350px) {
  .related-products .products {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* ==========================
   MOBILE NAVBAR FIX
========================== */
@media (max-width: 750px) {
  .navbar {
    flex-wrap: wrap; /* allow items to wrap if needed */
    padding: 10px 14px; /* reduce padding on small screens */
  }

  .navbar > a.logo {
    flex: 0 0 auto; /* logo stays left */
  }

  .nav-right {
    margin-left: auto; /* push all right-side items to the right */
    display: flex;
    align-items: center;
    gap: 10px;
  }

  /* Ensure buttons, currency, cart don't shrink */
  .nav-right button,
  .nav-right .currency,
  .nav-right .cart {
    flex-shrink: 0;
  }

  /* Hide desktop search, show mobile search button */
  .nav-search {
    display: none;
  }

  .mobile-search-btn {
    display: block;
  }

  /* Make logo slightly smaller on small screens */
  .logo {
    height: 30px;
  }
}

/* Homepage H1 alignment for small screens */
@media (max-width: 600px) {
  .homepage-header h1 {
    text-align: left;
    padding-left: 16px; /* optional spacing from left edge */
    font-size: 22px; /* optionally reduce font size on small screens */
  }
}

/* ==============================
   DARK MODE - CART DRAWER
============================== */

body.dark-mode #cartDrawer {
  background-color: #1e1e1e;
  color: #ffffff;
}

body.dark-mode #cartOverlay {
  background: rgba(0, 0, 0, 0.6);
}

body.dark-mode .cart-item {
  border-bottom: 1px solid #333;
}

body.dark-mode .cart-img {
  background: #2a2a2a;
}

body.dark-mode .cart-price {
  color: #ffffff;
}

/* ==============================
   DARK MODE - CHECKOUT DRAWERS
============================== */

/* Delivery Drawer */
body.dark-mode #deliveryDrawer {
  background-color: #1e1e1e;
  color: #ffffff;
}

/* Shipping Drawer */
body.dark-mode #shippingDrawer {
  background-color: #1e1e1e !important; /* override inline white */
  color: #ffffff;
}

/* Bank Drawer */
body.dark-mode #bankDrawer {
  background-color: #1e1e1e;
  color: #ffffff;
}

/* Drawer headers */
body.dark-mode .drawer-header,
body.dark-mode .drawer-head {
  border-bottom: 1px solid #333;
}

/* Drawer overlays darker */
body.dark-mode .drawer-overlay {
  background: rgba(0, 0, 0, 0.6);
}

body.dark-mode #shippingOverlay {
  background: rgba(0, 0, 0, 0.6) !important;
}

/* Inputs inside drawers */
body.dark-mode .drawer input,
body.dark-mode .drawer select,
body.dark-mode .drawer textarea {
  background-color: #2a2a2a;
  color: #ffffff;
  border: 1px solid #444;
}

/* Placeholder color */
body.dark-mode .drawer input::placeholder,
body.dark-mode .drawer textarea::placeholder {
  color: #bbb;
}

/* Buttons inside drawers */
body.dark-mode .drawer button {
  background-color: #d4af37;
  color: #111;
}

/* Bank transfer warning text */
body.dark-mode #bankDrawer p {
  color: #ffffff;
}

/* =================================
   PRODUCT GALLERY MOBILE FIX
================================= */
@media (max-width: 900px) {

  .product-detail {
    flex-direction: column;
    padding: 10px;
    gap: 10px;
  }

  .product-image {
    width: 100%;
    max-width: 100%;
  }

  .image-gallery {
    flex-direction: column;
    width: 100%;
    gap: 10px; /* optional: reduce gallery gap */
  }

  /* MAIN IMAGE */
  .main-image-wrapper {
    order: 1;
    width: 100%;
    height: auto;       /* override fixed height */
    aspect-ratio: 1 / 1;
  }

  #mainProductImage {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  /* THUMBNAILS */
  .thumbnail-list {
    order: 2;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    margin-top: 6px;
    width: 100%;
    height: auto;       /* override fixed height */
  }

  .thumbnail {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
  }

  .product-info {
    width: 100%;       /* stretch left to right */
    margin: 0;         /* remove any default margin */
    padding: 0 5px;    /* optional slight horizontal padding */
  }
}

/* ==========================
   MOBILE-PROOF VARIATION SELECT
========================== */
.variation-group {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  min-width: 0;       /* allow flex children to shrink */
  box-sizing: border-box;
}

.variation-select {
  width: 100%;
  max-width: 100%;
  min-width: 0;       /* critical for small screens */
  padding: 10px 40px 10px 12px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="6"><polygon points="0,0 10,0 5,6" fill="%23333"/></svg>') no-repeat right 12px center;
  background-size: 10px 6px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  flex-shrink: 1;    /* allows it to shrink if parent has padding */
}

/* Ensure option text doesn’t break layout */
.variation-select option {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Small screens: force max width and respect container padding */
@media (max-width: 420px) {
  .variation-group,
  .variation-select {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
  }
}