button, a, input, .cart-item-remove, .qty-btn {
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* --- Accessibility Focus States --- */
:focus-visible {
  outline: 2px solid #c8a882; /* var(--accent) fallback */
  outline-offset: 4px;
  box-shadow: 0 0 15px rgba(200, 168, 130, 0.4);
}

@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-delay: -1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    background-attachment: initial !important;
    scroll-behavior: auto !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
  }
}
.cart-badge.pop { animation: badgePop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
@keyframes badgePop {
  0% { transform: scale(1); }
  50% { transform: scale(1.4); }
  100% { transform: scale(1); }
}

#cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}
#cart-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

#cart-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 420px;
  max-width: 100vw;
  background: #1C1C1C; /* var(--surface) fallback */
  z-index: 10000;
  transform: translateX(100%);
  transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -20px 0 60px rgba(0,0,0,0.5);
  border-left: 1px solid rgba(255,255,255,0.05);
  color: #fff;
  font-family: 'DM Sans', sans-serif;
}
#cart-drawer.active {
  transform: translateX(0);
}

.cart-header {
  padding: 30px 40px 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.cart-header h2 {
  font-size: 20px;
  font-weight: 500;
  margin: 0;
}
.cart-close-btn {
  background: none; border: none; color: #ACACAC; /* Increased contrast from #888 */
  width: 40px; height: 40px;
  border-radius: 50%;
  display: grid; place-items: center;
  cursor: pointer;
  transition: all 0.3s;
  background: rgba(255,255,255,0.05);
}
.cart-close-btn:hover { background: #fff; color: #000; transform: rotate(90deg); }

.cart-controls {
  padding: 10px 40px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #ACACAC; /* Increased contrast from #888 */
}
.cart-controls button {
  background: none; border: none; color: inherit; font: inherit; cursor: pointer;
  transition: color 0.2s;
}
.cart-controls button:hover { color: #FF4A4A; }

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.cart-empty {
  text-align: center; margin: auto 0;
  color: #A0A0A0; /* Increased contrast from #666 */
  font-size: 14px;
}

.cart-item {
  display: flex;
  gap: 20px;
  align-items: center;
  background: rgba(255,255,255,0.02);
  padding: 15px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.03);
}
.cart-item-img {
  width: 70px; height: 70px;
  background: #252525;
  border-radius: 8px;
  object-fit: cover;
}
.cart-item-info {
  flex: 1;
}
.cart-item-title {
  font-size: 14px; font-weight: 500; margin-bottom: 4px; color: #fff;
}
.cart-item-meta {
  font-size: 11px; color: #ACACAC; margin-bottom: 8px; /* Increased contrast from #888 */
}
.cart-item-price {
  font-size: 13px; font-weight: 600; color: #fff;
}
.cart-item-actions {
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
}
.cart-item-remove {
  background: none; border: none; color: #A0A0A0; cursor: pointer; /* Increased contrast from #555 */
  width: 24px; height: 24px; display: grid; place-items: center; transition: color 0.2s;
}
.cart-item-remove:hover { color: #FF4A4A; }

.cart-qty-ctrl {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.05);
  border-radius: 50px;
  padding: 4px 6px;
}
.cart-qty-btn {
  background: none; border: none; color: #fff;
  width: 20px; height: 20px; display: grid; place-items: center; cursor: pointer;
  border-radius: 50%; opacity: 0.7; transition: opacity 0.2s, background 0.2s;
}
.cart-qty-btn:hover { opacity: 1; background: rgba(255,255,255,0.1); }
.cart-qty-val { font-size: 12px; font-weight: 600; width: 14px; text-align: center; }

.cart-footer {
  padding: 30px 40px;
  background: #111;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.cart-subtotal {
  display: flex; justify-content: space-between; margin-bottom: 20px;
  font-size: 15px; font-weight: 500;
}
.checkout-btn {
  width: 100%;
  padding: 16px;
  background: #fff;
  color: #000;
  border: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}
.checkout-btn:hover {
  transform: translateY(-2px);
  background: #eee;
}

@media (max-width: 600px) {
  #cart-drawer { width: 100%; }
  .cart-header, .cart-controls, .cart-items, .cart-footer { padding-left: 20px; padding-right: 20px; }
}

/* ── LOGIN MODAL ── */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.7); /* Darker backdrop */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10001;
}

.modal-overlay.hidden {
  display: none !important;
}

/* Dark Theme Card */
.auth-card {
  background: #1C1C1E; /* Matches your dark container */
  color: #FFFFFF;
  width: 90%;
  max-width: 400px;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  font-family: 'DM Sans', sans-serif;
  position: relative;
}

.hidden {
  display: none !important;
}

.close-btn {
  position: absolute;
  top: 15px; right: 15px;
  background: none; border: none; font-size: 24px;
  cursor: pointer; color: #888;
}

.close-btn:hover {
  color: #FFF;
}

.auth-card h2 {
  text-align: center;
  margin-bottom: 5px;
  font-size: 24px;
  font-weight: 600;
}

.subtitle {
  text-align: center;
  color: #8E8E93;
  font-size: 14px;
  margin-bottom: 25px;
}

/* Inputs styled for dark mode */
.input-group {
  margin-bottom: 15px;
}

.input-group label {
  display: block; font-size: 12px; font-weight: bold; margin-bottom: 5px; color: #EBEBF5;
}

.input-group input {
  width: 100%;
  padding: 12px;
  background: #2C2C2E; /* Dark input background */
  border: 1px solid #3A3A3C;
  color: #FFF;
  border-radius: 8px;
  box-sizing: border-box;
}

.input-group input:focus {
  outline: none;
  border-color: #FF4B4B; /* Red accent on focus */
}

.password-wrapper {
  position: relative;
}

.eye-icon {
  position: absolute;
  right: 12px; top: 12px;
  cursor: pointer; color: #8E8E93;
}

.forgot-password {
  display: block;
  text-align: right;
  color: #FF4B4B; /* Red accent matching your price tag */
  font-size: 12px;
  text-decoration: none;
  margin-bottom: 20px;
}

.primary-btn {
  width: 100%;
  background: #FF4B4B; /* Red accent button */
  color: white;
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}

.primary-btn:hover {
  background: #E53935;
}

/* Toggle Link */
.toggle-prompt {
  text-align: center;
  font-size: 13px;
  margin-top: 15px;
  color: #8E8E93;
}

.toggle-link {
  color: #FF4B4B; 
  cursor: pointer; 
  font-weight: bold;
}

.toggle-link:hover {
  text-decoration: underline;
}

/* Dividers & Social */
.divider {
  text-align: center;
  margin: 25px 0 15px;
  position: relative;
}

.divider::before {
  content: "";
  position: absolute;
  top: 50%; left: 0; width: 100%; height: 1px; background: #3A3A3C; z-index: 1;
}

.divider span {
  background: #1C1C1E; /* Match card background to cut the line */
  padding: 0 10px;
  color: #8E8E93; font-size: 12px;
  position: relative; z-index: 2;
}

.social-login {
  display: flex; gap: 10px;
}

.social-btn {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px;
  background: #2C2C2E;
  color: #FFF;
  border: 1px solid #3A3A3C; border-radius: 8px; cursor: pointer; font-weight: bold;
}

.social-btn img {
  width: 18px;
}

/* ── WISHLIST BUTTON BASE ── */
.wishlist-overlay-btn,
.add-to-wishlist-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #2A2A2A;
  border: 1px solid rgba(255,255,255,0.12);
  color: #F0F0F0;
  display: grid; place-items: center;
  cursor: pointer;
  transition: background 0.25s, transform 0.3s, border-color 0.3s;
  z-index: 10;
}
.wishlist-overlay-btn:hover,
.add-to-wishlist-btn:hover {
  background: #333;
  border-color: rgba(255,255,255,0.25);
  transform: scale(1.1) !important;
}

/* ── WISHLIST BUTTON ACTIVE STATE ── */
.wishlist-overlay-btn.active svg, 
.add-to-wishlist-btn.active svg {
  fill: #FF4A4A !important;
  stroke: #FF4A4A !important;
  transform: scale(1.2);
}

/* GLOBAL MENU DRAWER STYLES */
.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity .4s cubic-bezier(.22,1,.36,1);
    -webkit-tap-highlight-color: transparent;
  }
  .menu-overlay.active { opacity: 1; pointer-events: all; }

  .menu-drawer {
    position: absolute;
    top: 0; bottom: 0; left: 0;
    width: 420px;
    max-width: 85%;
    background: rgba(12, 12, 12, 0.45);
    backdrop-filter: blur(12px) saturate(210%);
    -webkit-backdrop-filter: blur(12px) saturate(210%);
    border-right: 1px solid rgba(255,255,255,0.08);
    display: flex;
    flex-direction: column;
    padding-top: 70px; 
    transform: translateX(-100%);
    transition: transform .4s cubic-bezier(.19, 1, 0.22, 1);
    box-shadow: 25px 0 60px rgba(0,0,0,0.4);
    will-change: transform;
    overflow: hidden; 
  }
  .menu-overlay.active .menu-drawer { transform: translateX(0); }

  .menu-content {
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow-y: auto;
    flex: 1;
    padding-bottom: 80px; 
  }

  .menu-drawer-footer {
    padding: 20px 30px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: rgba(12, 12, 12, 0.85); 
    border-top: 1px solid rgba(255,255,255,0.08);
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 10;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
  .drawer-footer-icon {
    color: var(--text-light);
    opacity: 0.4;
    cursor: pointer;
    transition: opacity .3s, transform .2s;
    width: 20px; height: 20px;
    display: grid; place-items: center;
    position: relative;
  }
  .drawer-footer-icon:hover { opacity: 0.9; transform: translateY(-3px); }
  .drawer-footer-icon svg { width: 100%; height: 100%; fill: currentColor; }
  .drawer-footer-icon .count {
    position: absolute;
    top: -5px; right: -8px;
    background: #FF4A4A;
    color: #fff;
    font-size: 8px;
    font-weight: 700;
    width: 14px; height: 14px;
    border-radius: 50%;
    display: grid; place-items: center;
  }

  .menu-link {
    font-family: 'DM Sans', sans-serif;
    font-size: 18px;
    font-weight: 500;
    color: var(--text-light);
    text-decoration: none;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background .3s, transform .2s;
    cursor: pointer;
    letter-spacing: .2px;
  }
  .menu-link:last-child { border-bottom: none; }
  .menu-link span.arrow {
    font-size: 20px;
    opacity: 0.3;
    transition: transform .3s, opacity .3s;
  }
  .menu-link:hover { background: rgba(255,255,255,0.03); }
  .menu-link:hover span.arrow { transform: translateX(5px); opacity: 0.8; }

  .menu-close {
    position: absolute;
    top: 25px; left: 30px;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    color: white;
    border: none;
    font-size: 22px;
    cursor: pointer;
    display: grid; place-items: center;
    transition: background .3s, transform .2s;
    z-index: 1001;
  }
  .menu-close:hover { background: rgba(255,255,255,0.12); transform: rotate(90deg); }

/* UNIVERSAL SEARCH BUTTON APP-WIDE */
.nav-shop, button.nav-shop {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  background: rgba(255,255,255,0.06) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  color: var(--accent) !important;
  padding: 9px 24px !important;
  border-radius: 30px !important;
  font-weight: 500 !important;
  font-size: 14px !important;
  font-family: 'DM Sans', sans-serif !important;
  cursor: pointer !important;
  transition: all .25s !important;
}
.nav-shop:hover, button.nav-shop:hover {
  background: rgba(255,255,255,0.12) !important;
  color: #fff !important;
  transform: scale(1.03) !important;
}
.nav-shop svg, button.nav-shop svg {
  fill: currentColor !important;
  width: 14px !important;
  height: 14px !important;
  transition: transform .25s !important;
}
.nav-shop:hover svg, button.nav-shop:hover svg {
  transform: scale(1.1) !important;
}

/* STICKY NAV GLOBALLY */
.nav-bar, header.nav-bar {
  position: sticky !important;
  top: 0 !important;
  z-index: 9999 !important;
  background: rgba(18, 18, 18, 0.85) !important;
  backdrop-filter: blur(12px) saturate(150%) !important;
  -webkit-backdrop-filter: blur(12px) saturate(150%) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

@keyframes btnPop {
  0% { transform: scale(1); }
  50% { transform: scale(0.85); background-color: var(--accent); color: #000; }
  70% { transform: scale(1.15); }
  100% { transform: scale(1); }
}
.btn-pop-success {
  animation: btnPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards !important;
}

.nav-circle-btn { transform: translateZ(0); }

