/* =======================
   BADGE / CART / WISHLIST
   ======================= */

.cart-link {
  position: relative;
  text-decoration: none;
  color: inherit;
}
.cart-count {
  position: absolute;
  top: -8px;
  right: -10px;
  background-color: red;
  color: white;
  font-size: 10px;
  font-weight: bold;
  padding: 2px 5px;
  border-radius: 50%;
}

/* refinements (kept from your file) */
.cart-link {
  position: relative;
  display: inline-block;
  margin-right: 20px;
  color: inherit;
  text-decoration: none;
}
.cart-count {
  position: absolute;
  top: -8px;
  right: -12px;
  background: linear-gradient(45deg, #ff4d4d, #ff9900);
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  padding: 3px 6px;
  border-radius: 50%;
  box-shadow: 0 0 5px rgba(0,0,0,0.3);
  transition: transform 0.2s ease;
}
.cart-count:hover { transform: scale(1.2); }

.cart-hover-wrapper { position: relative; }
.cart-dropdown {
  display: none;
  position: absolute;
  top: 35px;
  right: 0;
  width: 250px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.1);
  z-index: 10;
  padding: 10px;
}
.cart-hover-wrapper:hover .cart-dropdown { display: block; }
.cart-dropdown-inner p { margin: 0; font-size: 14px; padding: 5px 0; }
.view-cart-btn {
  display: block; text-align: center; margin-top: 10px;
  background: #f4762c; color: white; padding: 6px; border-radius: 4px;
  text-decoration: none; font-weight: bold;
}

.wishlist-count {
  position: absolute;
  top: -8px; right: -10px;
  background: linear-gradient(45deg, #e60023, #ff9900);
  color: white; font-size: 11px; font-weight: bold;
  padding: 2px 6px; border-radius: 50%;
  box-shadow: 0 0 5px rgba(0,0,0,0.3);
}
.nav-buttons a[href*="wishlist"] { position: relative; display: inline-block; }

/* ==========
   NAVBAR (DESKTOP DEFAULTS)
   ========== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 999;
  background-color: #111;
  padding: 0.8rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* ==========
   FLOATING WISHLIST / TOAST (unchanged)
   ========== */
#floating-wishlist-icon {
  position: fixed;
  top: 20px; left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  background: white;
  padding: 10px 15px;
  border-radius: 30px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  animation: slideFadeDown 0.5s ease-out;
}
#floating-wishlist-icon a {
  color: #e60023; font-size: 18px; font-weight: bold;
  text-decoration: none; position: relative;
}
#floating-wishlist-icon i { margin-right: 6px; }
#floating-wishlist-icon #wishlist-count {
  position: absolute; top: -8px; right: -10px;
  background: linear-gradient(45deg, #e60023, #ff9900);
  color: white; font-size: 11px; font-weight: bold;
  padding: 2px 6px; border-radius: 50%;
  box-shadow: 0 0 5px rgba(0,0,0,0.3);
}
@keyframes slideFadeDown {
  from { opacity: 0; transform: translate(-50%, -20px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

.advanced-toast {
  position: fixed; top: 0; left: 50%;
  transform: translateX(-50%) translateY(-100%);
  background: rgba(15, 15, 15, 0.95);
  color: #f2f2f2;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 16px 28px;
  border-radius: 0 0 20px 20px;
  font-size: 15px; font-weight: 500;
  z-index: 10000;
  opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.7);
  transition: all 0.5s cubic-bezier(0.33, 1, 0.68, 1);
}
.advanced-toast.visible { transform: translateX(-50%) translateY(0); opacity: 1; pointer-events: auto; }
.advanced-toast.success { border-bottom: 3px solid #00ff88; color: #d9fdf0; }
.advanced-toast.error   { border-bottom: 3px solid #ff3c3c; color: #ffdada; }
.advanced-toast.info    { border-bottom: 3px solid #00bfff; color: #d4f0ff; }
.advanced-toast .toast-icon { font-size: 18px; line-height: 1; filter: drop-shadow(0 0 4px currentColor); }

/* ==========
   FOOTER (DESKTOP DEFAULTS)
   ========== */
.site-footer {
  width: 100%;
  background-color: #111;
  color: #eee;
  padding: 30px 60px 20px;
  font-family: 'Segoe UI', sans-serif;
}
.footer-container {
  display: flex; justify-content: space-between; flex-wrap: wrap;
  padding: 40px 0; gap: 40px;
}
.footer-section {
  flex: 1; min-width: 240px; margin: 0 20px; margin-left: 100px;
}
.footer-logo { font-size: 1.8em; font-weight: bold; color: #e91e63; }
.footer-title { font-weight: bold; margin-bottom: 12px; font-size: 1.1em; }
.footer-text { font-size: 0.95em; margin-top: 10px; line-height: 1.6; color: #ccc; }
.footer-contact p { margin: 8px 0; color: #ccc; font-size: 0.95em; }
.footer-contact a { color: #ccc; text-decoration: none; transition: color 0.3s ease; }
.footer-contact a:hover { color: #cc3366; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: #ccc; text-decoration: none; transition: color 0.3s ease; }
.footer-links a:hover { color: #cc3366; }
.social-icons { margin-top: 10px; }
.social-icons a {
  color: #ccc; font-size: 1.2em; margin-right: 15px; display: inline-block;
  transition: transform 0.3s ease, color 0.3s ease;
}
.social-icons a:hover { color: #cc3366; transform: scale(1.1); }
.footer-bottom {
  text-align: center; border-top: 1px solid #333;
  margin-top: 30px; padding-top: 15px; font-size: 0.9em; color: #999;
}
.exp { margin-left: 200px; }
.cont { margin-right: 77px; }

/* ==========
   NAV (DESKTOP DEFAULTS)
   ========== */
.navbar nav ul {
  display: flex;
  list-style: none;
  gap: 20px;
}
.navbar nav ul li a { color: white; text-decoration: none; }
.menu-icon { display: none; font-size: 24px; cursor: pointer; }

/* =========================
   MOBILE BASE (GENERIC NAV + FOOTER)
   ========================= */
@media (max-width: 768px) {
  .navbar { padding: 0.8rem 1rem; }
  .menu-icon { display: block; color: white; }

  .navbar nav ul {
    display: none;
    flex-direction: column;
    background: #000;
    position: absolute;
    top: 60px; left: 0;
    width: 100%;
    padding: 15px 0;
    gap: 15px;
    box-shadow: 0px 4px 8px rgba(0,0,0,0.4);
  }
  .navbar nav ul.active { display: flex; }
  .navbar nav ul li a {
    display: flex; align-items: center;
    padding: 10px 20px; color: white; text-decoration: none; font-size: 16px;
  }
  .navbar nav ul li a:hover { background: rgba(255,255,255,0.1); }

  /* Footer stacks nicely on mobile */
  .footer-container { flex-direction: column; align-items: center; text-align: center; }
  .footer-section { margin: 0; min-width: auto; }
  .exp, .cont { margin: 0; }
}
/* Keep footer in its own layer under page content */
.site-footer { position: relative; z-index: 1; }


/* =========================
   MOBILE-ONLY NAV UPDATES (≤768px)
   (wishlist/auth hidden, logo centered, account button visible)
   ========================= */
@media (max-width: 768px) {
  .navbar { padding: 0.8rem 1rem; display: flex; align-items: center; }
  .menu-icon { display: block; order: 1; }
  .navbar .logo { order: 2; margin: 0 auto; font-size: 1.1rem; }
  .nav-buttons { order: 3; display: flex; align-items: center; gap: 16px; margin-left: auto; }

  /* hide wishlist icon and auth buttons on mobile navbar */
  .nav-buttons > a:nth-child(1) { display: none !important; }  /* wishlist */
  .nav-buttons .sign-in,
  .nav-buttons .sign-up,
  .nav-buttons .sign-out { display: none !important; }

  /* show the mobile account trigger */
  .account-mobile-btn {
    display: inline-flex; align-items: center; justify-content: center;
    background: transparent; border: 0; color: #fff; font-size: 18px; cursor: pointer;
  }
}

/* =========================
   MOBILE ACCOUNT DRAWER (global component)
   ========================= */
.account-drawer {
  position: fixed; top: 0; right: 0; height: 100dvh; width: 320px; max-width: 90%;
  background: #111; color: #fff; transform: translateX(100%); transition: transform 0.35s ease;
  z-index: 10010; display: flex; flex-direction: column;
}
.account-drawer.open { transform: translateX(0); }

.drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid #333; font-weight: 600;
}
.drawer-close { background: none; border: 0; color: #fff; font-size: 28px; line-height: 1; cursor: pointer; }

.drawer-menu { list-style: none; margin: 0; padding: 10px 0; }
.drawer-menu li a { display: block; padding: 12px 18px; color: #fff; text-decoration: none; }
.drawer-menu li a:hover { background: rgba(255,255,255,0.08); }

.drawer-footer { margin-top: auto; padding: 16px 18px; border-top: 1px solid #333; }
.drawer-primary {
  display: block; text-align: center; background: #f4762c; color: #111;
  font-weight: 700; padding: 10px 14px; border-radius: 8px; text-decoration: none;
}

/* Drawer backdrop */
.drawer-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.35);
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease; z-index: 10005;
}
.drawer-backdrop.visible { opacity: 1; pointer-events: auto; }

/* Drawer profile block */
.drawer-profile {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px; align-items: center;
  padding: 14px 16px; border-bottom: 1px solid #333;
}
.drawer-avatar img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.drawer-user .drawer-name { font-weight: 700; }
.drawer-user .drawer-id { font-size: 12px; opacity: 0.8; }

/* =========================
   DESKTOP/LAPTOP SAFETY (≥769px): HIDE MOBILE-ONLY UI
   ========================= */
@media (min-width: 769px) {
  .account-mobile-btn { display: none !important; }
  #accountDrawer,
  .account-drawer,
  #drawerBackdrop,
  .drawer-backdrop { display: none !important; }
}
/* Show auth items inside the hamburger menu on phones only */
@media (max-width: 768px) {
  .mobile-only { display: flex !important; }      /* ul is column on mobile, flex works fine */
  .mobile-only a { width: 100%; }                 /* make the whole row tappable */
}

/* Hide those extra items on desktop */
@media (min-width: 769px) {
  .mobile-only { display: none !important; }
}

/* We keep the right-side auth buttons hidden on mobile to avoid duplicates */
@media (max-width: 768px) {
  .nav-buttons .sign-in,
  .nav-buttons .sign-up,
  .nav-buttons .sign-out { display: none !important; }
}

/* --- Mobile left slide-in menu (minimal) --- */
@media (max-width: 768px) {
  /* Turn the existing nav into an off-canvas drawer */
  .navbar nav {
    position: fixed;
    top: 0;
    left: 0;
    height: 100dvh;
    width: 82%;
    max-width: 320px;
    background: #111;          /* match your header color */
    transform: translateX(-100%);
    transition: transform .3s ease;
    z-index: 10020;
    box-shadow: 0 10px 30px rgba(0,0,0,.5);
  }
  .navbar nav.open { transform: translateX(0); }

  /* Backdrop */
  #navBackdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
    z-index: 10015;
  }
  #navBackdrop.visible {
    opacity: 1;
    pointer-events: auto;
  }

  /* Optional: stack menu items vertically if needed */
  .navbar nav ul {
    display: flex;
    flex-direction: column;
    padding: 14px;
    gap: 6px;
    margin: 0;
  }
  .navbar nav ul li a { padding: 12px 14px; }
}
/* Show a logo at the top of the mobile drawer only */
@media (max-width: 768px) {
  .drawer-brand {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    background: #000; /* match your drawer color */
    border-bottom: 1px solid rgba(255,255,255,.12);
  }
  .drawer-brand img {
    height: 34px;        /* adjust if you want bigger/smaller */
    width: auto;
    display: block;
  }

  /* (important) Keep drawer behavior scoped to mobile so desktop isn't affected */
  .navbar nav {
    position: fixed;
    top: 0; left: 0;
    height: 100dvh;
    width: 82%;
    max-width: 320px;
    background: #000;
    transform: translateX(-100%);
    transition: transform .3s ease;
    z-index: 10020;
    box-shadow: 0 10px 30px rgba(0,0,0,.45);
    display: flex;
    flex-direction: column;
  }
  .navbar nav.open { transform: translateX(0); }

  .navbar nav ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 10px 18px;
    margin: 0;
  }
  .navbar nav ul li a {
    display: flex; align-items: center; gap: 10px;
    color: #fff; text-decoration: none;
    padding: 12px 14px;
    border-radius: 10px;
  }
  .navbar nav ul li a:hover { background: rgba(255,255,255,.08); }

  #navBackdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.35);
    opacity: 0; pointer-events: none;
    transition: opacity .25s ease;
    z-index: 10015;
  }
  #navBackdrop.visible { opacity: 1; pointer-events: auto; }
}

/* Hide the drawer-brand on desktop just in case */
@media (min-width: 769px) {
  .drawer-brand { display: none !important; }
}
/* Mobile drawer brand: round logo + left-aligned title */
@media (max-width: 768px) {
  .drawer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: #000;
    border-bottom: 1px solid rgba(255,255,255,.12);
    text-align: left;
  }
  .drawer-logo {
    width: 36px;
    height: 36px;
    border-radius: 50%;    /* circle */
    object-fit: cover;     /* neat crop inside circle */
    border: 2px solid rgba(255,255,255,.18);
    background: #111;
  }
  .drawer-title {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: .2px;
    margin: 0;             /* ensure no auto-centering */
  }
}



