/* ====== OFFER BAR ====== */
.top-offer {
    background: linear-gradient(90deg, #111, #2b2b2b);
    color: #f1f1f1;
    text-align: center;
    font-size: 12px;
    padding: 8px 0;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ====== HEADER WRAPPER ====== */
.main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
    border-bottom: 1px solid #e6e6e6;
}

.main-header.scrolled {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transform: translateY(-4px);
}

/* ====== MIDDLE BAR ====== */
.middle-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 6%;
    transition: padding 0.3s ease;
}

.main-header.scrolled .middle-bar {
    padding: 12px 6%;
}

/* ====== LOGO ====== */
.logo {
    font-size: 28px;
    font-weight: 600;
    color: #111;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* ====== SEARCH BAR ====== */
.search-bar {
    position: relative;
    width: 45%;
    max-width: 480px;
    margin-left: 120px;   
}


.search-bar input {
    width: 100%;
    padding: 12px 46px 12px 18px;
    border: 1px solid #dcdcdc;
    border-radius: 6px;
    outline: none;
    transition: 0.3s;
    font-size: 14px;
    background: #fafafa;
}

.search-bar input:focus {
    border-color: #111;
    background: #fff;
    box-shadow: none;
}

.search-bar i {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #777;
    font-size: 16px;
    cursor: pointer;
}

/* ====== HEADER RIGHT ====== */
.header-right {
    display: flex;
    align-items: center;
    gap: 18px;
    font-family: "Poppins", sans-serif;
}

/* ====== ICONS ====== */
.icons {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 20px;
    color: #222;
}

.icons i {
    cursor: pointer;
    transition: transform 0.2s ease, color 0.2s ease;
    padding: 6px;
}

.icons i:hover {
    color: #000;
    transform: translateY(-2px);
}

/* Badge */
.cart-count,
.fav-count {
    background: #111;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
}

/* ====== NAVBAR ====== */
.navbar {
    background: #ffffff;
    border-top: 1px solid #ededed;
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 36px;
    padding: 14px 0;
    list-style: none;
}

.nav-links li a {
    text-decoration: none;
    color: #222;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.4px;
    position: relative;
}

/* Premium underline */
.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background: #111;
    transition: width 0.3s ease;
}

.nav-links li a:hover::after,
.nav-links li a.active::after {
    width: 100%;
}

.nav-links li a:hover {
    color: #000;
}

/* ====== LOGIN BUTTON ====== */
.login-btn a,
.btn-login {
    background: linear-gradient(135deg, #111, #333);
    color: #fff;
    padding: 8px 18px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    transition: 0.3s;
    border: none;
}

.login-btn a:hover,
.btn-login:hover {
    background: #000;
}

/* ====== MOBILE MENU ====== */
.menu-toggle {
    display: none;
    font-size: 26px;
    color: #111;
    cursor: pointer;
    padding: 12px 20px;
}

@media (max-width: 768px) {

    .search-bar,
    .icons {
        display: none;
    }

    .menu-toggle {
        display: block;
        position: absolute;
        right: 20px;
        top: 18px;
    }

    .nav-links {
        flex-direction: column;
        background: #ffffff;
        text-align: center;
        width: 100%;
        display: none;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    }

    .nav-links.active {
        display: flex;
        animation: dropDown 0.3s ease;
    }

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

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .nav-links li a {
        padding: 14px 0;
    }

    .nav-links li a:hover {
        background: #f4f4f4;
        color: #000;
    }
}

/******** logo ******/

.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo img {
    height: 40px;
}

.logo span {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 1.2px;
    color: #111;
    text-transform: uppercase;
}


/***====== Cart Icon Quantity Badge ======***/
.icons {
    position: relative;
    display: flex;
    align-items: center;
    gap: 18px;
}

#cartIcon {
    position: relative;
    font-size: 22px;
    color: #333;
    cursor: pointer;
    transition: color 0.3s ease;
}

#cartIcon {
    transition: all 0.3s ease;
}

#cartIcon:hover {
    color: #3FB7A8;
    transform: scale(1.1);
}

.cart-count {
    position: absolute;
    top: -6px;
    right: -10px;
    background: #e91e63;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 50%;
    min-width: 18px;
    text-align: center;
    line-height: 1.2;
    display: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ✅ Bounce animation when count updates */
.cart-count.bump {
    transform: scale(1.2);
    opacity: 0.9;
}

/***====== Favourite Icon Quantity Badge ======***/
#favIcon {
    position: relative;
    font-size: 22px;
    color: #333;
    cursor: pointer;
    transition: color 0.3s ease;
}

#favIcon {
    transition: 0.3s ease;
}

#favIcon:hover {
    color: #3FB7A8;
    transform: scale(1.1);
}


.fav-count {
    position: absolute;
    top: -6px;
    right: -10px;
    background: #e91e63;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 50%;
    min-width: 18px;
    text-align: center;
    line-height: 1.2;
    display: none;
    z-index: 99;
    transition: transform 0.3s ease, opacity 0.3s ease;
}


/* ❤️ Bounce animation on update */
.fav-count.bump {
    transform: scale(1.2);
    opacity: 0.9;
}

.icon-box {
    position: relative;
    display: flex;
    align-items: left;
}

/* ===== LOGIN / SIGNUP BUTTON ===== */
.btn-login {
    background: linear-gradient(90deg, #46C2B4, #1F8E84);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(233, 30, 99, 0.25);
    font-family: "Poppins", sans-serif;
}

.btn-login:hover {
    background: linear-gradient(90deg, #1F8E84, #46C2B4);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(180, 58, 80, 0.35);
}

.btn-login:active {
    transform: scale(0.97);
}

/* ===== LOGIN BUTTON WRAPPER ===== */
.login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 15px;
}

.login-btn a {
    text-decoration: none;
}

/* ===== USER DROPDOWN ===== */
.user-dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 40px;
    right: 0;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    width: 180px;
    z-index: 9999;
    overflow: hidden;
    animation: fadeIn 0.2s ease-in-out;
}

.dropdown-menu a {
    display: block;
    padding: 10px 15px;
    color: #333;
    font-size: 14px;
    text-decoration: none;
    transition: 0.2s;
}

.dropdown-menu a:hover {
    background: #fff1f4;
    color: #e91e63;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== TOAST ===== */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #323232;
    color: #fff;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 14px;
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 99999;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Fav button should NOT get pink background */
.fav-btn {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* Normal state = grey heart */
.fav-btn i {
    color: #aaa;
    transition: 0.2s ease;
    font-size: 18px;
}

/* Active = only heart should be pink  */
.fav-btn.active i {
    color: #e91e63 !important;
}

/* Optional hover effect */
.fav-btn:hover i {
    color: #e91e63;
}

/* ================= MOBILE HEADER FIX ================= */

@media (max-width: 768px) {

  .middle-bar {
    position: relative;
    padding: 12px 14px;
  }

  .search-bar,
  .icons {
    display: none;
  }

  /* Toggle clean position */
  .menu-toggle {
    display: flex;
    position: relative;   /* ❌ absolute hata diya */
    right: auto;
    top: auto;
    font-size: 24px;
    margin-left: auto;    /* 🔥 right push */
    padding: 8px;
  }

  /* Navbar */
  .navbar {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    background: #fff;
    width: 100%;
    text-align: left;
    border-top: 1px solid #eee;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li a {
    padding: 14px 18px;
    border-bottom: 1px solid #eee;
    font-size: 15px;
  }
}

/* ============================= */
/* ===== MOBILE LEFT DRAWER ==== */
/* ============================= */

.mobile-drawer {
  position: fixed;
  top: 0;
  left: -280px;                 /* hidden by default */
  width: 280px;
  height: 100vh;
  background: #fff;
  z-index: 9999;
  box-shadow: 6px 0 40px rgba(0,0,0,0.15);
  transition: left 0.35s ease;
  display: flex;
  flex-direction: column;
}

.mobile-drawer.active {
  left: 0;                      /* slide in */
}

/* ===== Overlay ===== */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s ease;
}

.drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ===== Prevent body scroll when open ===== */
body.drawer-open {
  overflow: hidden;
}

/* ============================= */
/* ===== Drawer Header ========= */
/* ============================= */

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px;
  border-bottom: 1px solid #eee;
}

.drawer-header img {
  height: 36px;
}

.drawer-header i {
  font-size: 22px;
  cursor: pointer;
}

/* ============================= */
/* ===== Scrollable Body ======= */
/* ============================= */

.drawer-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 20px;
}

/* ============================= */
/* ===== Drawer User Section ==== */
/* ============================= */

.drawer-user {
  padding: 16px;
}

.drawer-login-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, #46C2B4, #1F8E84);
  color: #fff;
  text-decoration: none;
}

.drawer-login-btn i {
  font-size: 26px;
}

.drawer-profile-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #111;
}

.drawer-profile-link strong {
  font-size: 14px;
}

/* ============================= */
/* ===== Links ================= */
/* ============================= */

.drawer-links {
  list-style: none;
  padding: 6px 0;
  margin: 0;
}

.drawer-links li a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  font-size: 15px;
  color: #111;
  text-decoration: none;
  border-radius: 10px;
  margin: 2px 12px;
  transition: background 0.2s ease;
}

.drawer-links li a i {
  font-size: 18px;
  width: 22px;
  text-align: center;
  color: #555;
}

.drawer-links li a:hover {
  background: #f5f5f5;
}

/* ============================= */
/* ===== Divider & Extra ======= */
/* ============================= */

.drawer-divider {
  height: 1px;
  background: #eee;
  margin: 14px 16px;
}

.drawer-extra a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  font-size: 14px;
  color: #444;
  text-decoration: none;
}

.drawer-extra a i {
  font-size: 16px;
  color: #777;
}

.drawer-extra a:hover {
  background: #f7f7f7;
}

/* ============================= */
/* ===== HEADER ICON FIX ======= */
/* ============================= */

.header-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.icons {
  display: flex;
  align-items: center;
  gap: 18px;
}

.icon-box {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-box i,
#userIcon {
  font-size: 22px;
  color: #333;
  cursor: pointer;
  transition: 0.2s ease;
}

.icon-box i:hover,
#userIcon:hover {
  color: #e91e63;
  transform: translateY(-2px);
}

/* ===== Badge ===== */

.cart-count,
.fav-count {
  position: absolute;
  top: -6px;
  right: -10px;
  min-width: 18px;
  height: 18px;
  background: #e91e63;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
}

/* ============================= */
/* ===== Hide Desktop Drawer === */
/* ============================= */

@media(min-width:769px){
  .mobile-drawer,
  .drawer-overlay{
    display:none;
  }
}

/* ============================= */
/* ===== Hide Header Icons Mobile */
/* ============================= */

@media (max-width: 768px) {
  .header-right,
  .login-btn,
  #loginSection,
  #userSection,
  .icons {
    display: none !important;
  }
}
