:root{
  --blue:#2f80ed;
  --blue-soft:#f2f7ff;
  --text:#1f2933;
}

*{
  margin:0;
  padding:0;
  box-sizing:border-box;
  font-family:Inter,system-ui,sans-serif;
}

body{ background:#fff; }

/* ================= HEADER ================= */
.cx-header{
  position:relative;
  z-index:1000;
  background:#fff;
}

.cx-topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:16px 20px;
  border-bottom:1px solid #eee;
}

.cx-logo img{ height:40px; }

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

.cx-actions a{
  color:var(--text);
  font-size:18px;
  position:relative;
}

.hamburger{
  display:none;
  font-size:22px;
  cursor:pointer;
}


/* ================= SEARCH BAR (DESKTOP) ================= */
.cx-search{
  position:relative;
  display:flex;
  align-items:center;
  width:420px;
  padding:2px;
  border-radius:14px;
  background:linear-gradient(
    120deg,
    #1e3a8a,   /* dark blue */
    #be185d,   /* dark pink */
    #facc15,   /* yellow */
    #22c55e    /* light green */
  );
}

.cx-search i{
  position:absolute;
  left:16px;
  font-size:14px;
  color:#64748b;
}

.cx-search input{
  width:100%;
  border:none;
  outline:none;
  padding:12px 16px 12px 42px;
  border-radius:12px;
  font-size:14px;
  background:#fff;
  color:#1f2933;
}

/* subtle focus polish */
.cx-search input:focus{
  box-shadow:0 0 0 3px rgba(47,128,237,.15);
}
/* ================= MAIN MENU ================= */
.cx-main-menu{
  display:flex;
  gap:26px;
  margin-left:20px;
}

.cx-main-menu a{
  text-decoration:none;
  font-size:14px;
  font-weight:600;
  color:var(--text);
  position:relative;
}

.cx-main-menu a::after{
  content:'';
  position:absolute;
  left:0;
  bottom:-6px;
  width:0;
  height:2px;
  background:var(--blue);
  transition:.3s ease;
}

.cx-main-menu a:hover::after{
  width:100%;
}

/* ================= CATEGORY BAR (DESKTOP) ================= */
.cx-category-bar{
  padding:14px 60px;
  border-bottom:1px solid #eee;
}

.cx-category-bar ul{
  display:flex;
  gap:32px;
  list-style:none;

  /* 🔥 FIX FOR SMALL SCREENS */
  flex-wrap: nowrap;        /* stay in one line */
  white-space: nowrap;      /* prevent text wrap */
  overflow-x: auto;         /* horizontal scroll */
  overflow-y: hidden;

  scrollbar-width: none;    /* Firefox */
}

.cx-category-bar ul::-webkit-scrollbar{
  display: none;            /* Chrome / Safari */
}


.cx-category-bar li{
  font-weight:600;
  cursor:pointer;

  white-space: nowrap;   /* 🔥 prevent 2nd line */
  flex-shrink: 0;        /* 🔥 prevent squeezing */
}


/* ================= MEGA DROPDOWN (DESKTOP) ================= */
.cx-mega-wrapper{
  position:absolute;
  left:0;
  top:100%;
  width:100%;
  height: calc(100vh - 170px); /* 🔥 MUST be height, not max-height */
  background:linear-gradient(180deg,#eef4ff,#f8fbff);
  overflow: hidden;
  opacity:0;
  visibility:hidden;
  transform:translateY(30px) scale(.98);
  transition:.45s cubic-bezier(.4,0,.2,1);
}
.cx-mega{
  height: 100%;
  display: grid;
  grid-template-columns: 260px 1fr;
}



.cx-mega-wrapper.active{
  opacity:1;
  visibility:visible;
  transform:translateY(0) scale(1);
}

/* ===== MEGA LEFT HEADER (PROFESSIONAL) ===== */
.cx-mega-left-header{
  position: sticky;
  top: 0;
  z-index: 3;

  padding: 18px 16px 14px;
  background:
    linear-gradient(
      180deg,
      #ffffff 0%,
      #f8fbff 100%
    );

  border-bottom: 1px solid #e5e7eb;
}

/* CATEGORY TITLE */
.cx-mega-left-header h4{
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .3px;
  color: #0f172a;

  display: flex;
  align-items: center;
  gap: 8px;
}

/* subtle accent bar */
.cx-mega-left-header h4::before{
  content: '';
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: linear-gradient(
    180deg,
    #38bdf8,   /* blue */
    #f472b6,   /* pink */
    #86efac,   /* green */
    #fde047    /* yellow */
  );
}

/* spacing between header and list */
.cx-mega-left ul{
  padding-top: 12px;
}


.cx-mega-left li::before{
  content:'';
  position:absolute;
  left:0;
  top:50%;
  width:0;
  height:2px;
  background:var(--blue);
  transition:.3s ease;
}

.cx-mega-left li:hover{
  background:#f1f5ff;
  transform:none;
  box-shadow:0 6px 16px rgba(0,0,0,.08);
}

/* 🚫 Disable hover effect for FIRST "ALL" item in mega panel */
.cx-mega-left li:first-child:hover{
  background: none;
  transform: none;
  box-shadow: none;
}



.cx-mega-left li:hover::before{
  width:10px;
}


.cx-mega{
 
  padding:10px 5px;
  display:grid;
  grid-template-columns:260px 1fr;
}



.cx-mega-left h4{
  color:var(--blue);
  margin-bottom:16px;
}

.cx-mega-left ul{
  list-style:none;
}

.cx-mega-left{
  height:100%;
  overflow-y:auto;
  background:linear-gradient(180deg, #ffffff, #f8fbff);
  border-right:1px solid #e5e7eb;
}

/* 🔥 Increase left panel width on large desktops (24") */
@media (min-width: 1600px){
  .cx-mega{
    grid-template-columns: 340px 1fr;
  }
}

/* Sticky title */
.cx-mega-left h4{
  position:sticky;
  top:0;
  background:#fff;
  padding:12px 10px;
  font-size:15px;
  font-weight:700;
  color:#1e3a8a;
  z-index:2;
}
.cx-mega-left li{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 16px;
  margin-bottom:6px;
  border-radius:10px;
  font-size:14px;
  font-weight:500;
  background:#fff;
  color:#111827;
  box-shadow:0 2px 10px rgba(0,0,0,.04);
  transition:.25s ease;
  cursor:pointer;
}



.cx-mega-left li .arrow{
  margin-left:auto;
  font-size:11px;
  color:#94a3b8;
}

.cx-mega-left li:hover{
  background:linear-gradient(135deg,#eef2ff,#f8fbff);
  transform:translateX(6px);
  box-shadow:0 12px 30px rgba(99,102,241,.15);
}

@media(max-width:991px){
  .cx-mega-wrapper{
    display:none !important;
  }
}

/* FIXED HEIGHT MEGA DROPDOWN */
.cx-mega-wrapper{
  max-height: calc(100vh - 140px); /* header + category bar space */
  overflow: hidden;
}

/* GRID AREA */
.cx-mega{
  height: 100%;
}
/* LEFT PANEL SCROLL */
.cx-mega-left{
  height: 100%;            /* 🔥 REQUIRED */
  overflow-y: auto;
  padding-right: 12px;
  border-right:1px solid #ddd;
}


/* optional smooth scroll feel */
.cx-mega-left ul{
  padding-bottom: 20px;
}
.cx-mega-right{
  align-self: flex-start;
}
/* CUSTOM SCROLLBAR (DESKTOP) */
.cx-mega-left::-webkit-scrollbar{
  width: 6px;
}

.cx-mega-left::-webkit-scrollbar-track{
  background: transparent;
}

.cx-mega-left::-webkit-scrollbar-thumb{
  background: #c7d2fe;
  border-radius: 10px;
}

.cx-mega-left::-webkit-scrollbar-thumb:hover{
  background: #6366f1;
}



/* ================= MOBILE SIDEBAR ================= */
.cx-sidebar{
  position:fixed;
  top:0;
  left:-100%;
  width:280px;
  height:100vh;
  background:#fff;
  z-index:2000;
  padding:20px;
  transition:.35s ease;
  overflow-y:auto;
}

.cx-sidebar.active{
  left:0;
}

.cx-sidebar-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:20px;
}

.cx-sidebar h3{
  font-size:16px;
}

.cx-sidebar ul{
  list-style:none;
}

.cx-sidebar .cat{
  padding:14px 0;
  font-weight:600;
  display:flex;
  justify-content:space-between;
  cursor:pointer;
  border-bottom:1px solid #eee;
}

.cx-sidebar .subs{
  max-height:0;
  overflow:hidden;
  transition:max-height .3s ease;
}

.cx-sidebar .subs li{
  padding:10px 0 10px 14px;
  font-size:14px;
  color:#555;
}

/* OVERLAY */
.cx-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.45);
  z-index:1500;
  display:none;
}

.cx-overlay.active{
  display:block;
}

/* ================= MOBILE SEARCH BAR ================= */
.cx-search-mobile{
  display:none; /* hidden by default (desktop) */
  position:relative;
  margin-top: 40px;
   z-index: 900;
  margin:12px 16px;
  padding:2px;
  border-radius:14px;
  background:linear-gradient(
    120deg,
    #1e3a8a,   /* dark blue */
    #be185d,   /* dark pink */
    #facc15,   /* yellow */
    #22c55e    /* light green */
  );
}

.cx-search-mobile i{
  position:absolute;
  left:16px;
  top:50%;
  transform:translateY(-50%);
  font-size:14px;
  color:#64748b;
}

.cx-search-mobile input{
  width:100%;
  border:none;
  outline:none;
  padding:12px 16px 12px 42px;
  border-radius:12px;
  font-size:14px;
  background:#fff;
  color:#1f2933;
}


/* ================= RESPONSIVE ================= */
@media(max-width:991px){
  .cx-category-bar{ display:none; }
  .hamburger{ display:block; }
  .cx-search{ display:none; }
   .cx-search-mobile{ display:block;
        margin-top:8px;  }
         .cx-main-menu{ display:none; }
}

/* =========================================================
   PRODUCT GRID (AUTO RESPONSIVE)
   4–6 cards based on screen width
========================================================= */
.cx-mega-right{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  align-content: start;
  gap: 18px;
  padding: 12px 26px 12px 30px;
  justify-content: start;

  /* 🔥 ENABLE SCROLL (MATCH LEFT PANEL) */
  height: 100%;
  overflow-y: auto;
}
.cx-mega-right::-webkit-scrollbar{
  width: 6px;
}

.cx-mega-right::-webkit-scrollbar-thumb{
  background: #c7d2fe;
  border-radius: 10px;
}

.cx-mega-right::-webkit-scrollbar-thumb:hover{
  background: #6366f1;
}



/* =========================================================
   SMALL PRODUCT CARD (FIXED SIZE – ADMIN IMAGE SAFE)
========================================================= */
.cx-product{
  background:#ffffff;
  border-radius:12px;
  padding:8px;
  box-shadow:0 4px 14px rgba(0,0,0,.08);

  max-width:250px;
  width:100%;

  aspect-ratio: 1 / 1.15;  /* 🔥 near-square */

  display:flex;
  flex-direction:column;
}

/* =========================================================
   IMAGE CONTAINER (FIXED)
========================================================= */
.cx-product .img-wrap{
  width:100%;
 height:55%;             /* 🔥 fixed image height */
  border-radius:10px;
  background:#f6f7fb;
  overflow:hidden;
  flex-shrink:0; 
  display:flex;
  align-items:center;
  justify-content:center;
  aspect-ratio: 4 / 3;

}

/* IMAGE FIT (NO CROP, NO STRETCH) */
.cx-product .img-wrap img{
  width:100%;
  height:100%;
  display:block;        /* 🔥 THIS is critical */
  object-fit:contain;
  object-position:center;
}


/* =========================================================
   PRODUCT TITLE
========================================================= */
.cx-product h5{
  font-size:12.5px;
  font-weight:600;
  color:#111827;
  margin:6px 0 4px;
  line-height:1.25;

  /* keep cards equal height */
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

/* =========================================================
   ACTION BUTTONS
========================================================= */
.cx-actions-btn{
  margin-top:auto;
  display:flex;
  gap:6px;
}

.cx-actions-btn button{
  flex:1;
  border:none;
  padding:6px;
  border-radius:8px;
  font-size:11px;
  font-weight:600;
  cursor:pointer;
  transition:background .2s ease;
}

/* BUTTON COLORS */
.buy-now{
  background:#2f80ed;
  color:#ffffff;
}

.buy-now:hover{
  background:#2563eb;
}

.view-details{
  background:#eef4ff;
  color:#2f80ed;
}

.view-details:hover{
  background:#e0e7ff;
}

/* =========================================================
   HOVER EFFECT (NO RESIZE)
========================================================= */
.cx-product:hover{
  box-shadow:0 10px 24px rgba(0,0,0,.12);
}


/* ===== DESKTOP SIDE PANEL (AMAZON STYLE) ===== */
.cx-desktop-panel{
  position:fixed;
  top:0;
  left:-360px;
  width:360px;
  height:100vh;
  background:#fff;
  z-index:3000;
  transition:.35s ease;
  display:flex;
  flex-direction:column;
}

.cx-desktop-panel.active{
  left:0;
}

/* HEADER */
.cx-desktop-header{
  background:#232f3e;
  color:#fff;
  padding:18px 20px;
  display:flex;
  justify-content:space-between;
  align-items:center;
}

.cx-user{
  display:flex;
  align-items:center;
  gap:12px;
  font-size:15px;
}

.cx-user i{
  font-size:20px;
}

.cx-desktop-header .fa-xmark{
  font-size:22px;
  cursor:pointer;
}

/* BODY */
.cx-desktop-body{
  flex:1;
  overflow-y:auto;
  padding:14px 0;
}

/* SECTIONS */
.cx-desk-section{
  border-bottom:1px solid #eee;
  padding:14px 0;
}

.cx-desk-section h4{
  padding:0 20px 10px;
  font-size:15px;
  color:#111;
}

/* LINKS */
.cx-desk-section ul{
  list-style:none;
}

.cx-desk-section li{
  padding:12px 20px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  cursor:pointer;
  transition:.25s ease;
}

.cx-desk-section li span{
  font-size:14px;
  color:#333;
}

.cx-desk-section li i{
  font-size:12px;
  color:#888;
  transition:.25s ease;
}

.cx-desk-section li:hover{
  background:#f3f3f3;
}

.cx-desk-section li:hover i{
  transform:translateX(4px);
  color:#111;
}

/* HIDE ON MOBILE */
@media(max-width:991px){
  .cx-desktop-panel,
  .cx-all-menu{
    display:none !important;
  }
}

/* 🌊 PREMIUM CONTINUOUS OCEAN WAVE */
.cx-mega-wave{
  position:absolute;
  left:0;
  bottom:0;
  width:100%;
  height:20px;
  pointer-events:none;
  z-index:6;
  overflow:hidden;
}

/* MAIN WAVE SURFACE */
.cx-mega-wave::before{
  content:'';
  position:absolute;
  left:0;
  bottom:-6px;
  width:100%;
  height:120%;

  background:
    linear-gradient(
      90deg,
      rgba(56,189,248,.35),
      rgba(244,114,182,.30),
      rgba(134,239,172,.28),
      rgba(253,224,71,.28),
      rgba(56,189,248,.35)
    );

  background-size: 200% 100%;   /* 🔑 critical */
  background-position: 0% 0%;

  border-radius: 100% 100% 0 0;
  filter: blur(.6px);

  animation:
    cx-wave-bg 12s linear infinite,
    cx-wave-rise 4.2s ease-in-out infinite;
}


/* SOFT LIGHT REFLECTION */
.cx-mega-wave::after{
  content:'';
  position:absolute;
  left:-50%;
  bottom:0;
  width:200%;
  height:100%;

  background:
    linear-gradient(
      90deg,
      rgba(255,255,255,.08),
      rgba(255,255,255,.18),
      rgba(255,255,255,.08)
    );

  animation: cx-wave-drift 14s linear infinite reverse;
  opacity:.6;
}

@keyframes cx-wave-bg{
  from { background-position: 0% 0%; }
  to   { background-position: 100% 0%; }
}


/* 🌊 HIGH ↔ LOW MOTION (SMOOTH) */
@keyframes cx-wave-rise{
  0%   { bottom:-6px; }
  50%  { bottom:  4px; }
  100% { bottom:-6px; }
}

/* DESKTOP ONLY */
@media(max-width:991px){
  .cx-mega-wave{ display:none; }
}


/* ===== INSTANT PREMIUM UPLIFT ===== */
.cx-product{
  position: relative;
  transform: translateY(0);

  /* animate lift only */
  transition: transform .28s cubic-bezier(.4,0,.2,1);
}

/* lock image completely */
.cx-product .img-wrap img{
  transform: none !important;
  transition: none !important;
}

/* shadow appears immediately */
.cx-product:hover{
  transform: translateY(-6px);

  /* NO transition delay on shadow */
  box-shadow:
    0 10px 25px rgba(15,23,42,.12),
    0 4px 12px rgba(56,189,248,.35),
    0 5px 18px rgba(134,239,172,.28),
    0 3px 8px rgba(253,224,71,.22);
}

.cart-badge{
  position:absolute;
  top:-6px;
  right:-8px;
  background:#e11d48;   /* red */
  color:#fff;
  font-size:11px;
  font-weight:700;
  min-width:18px;
  height:18px;
  padding:0 5px;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  line-height:1;
}

@media (min-width: 1600px){

  .cx-product{
    height:290px;
    padding:12px;
  }

  .cx-product .img-wrap{
    height:140px;
  }

  .cx-product h5{
    font-size:14px;
    line-height:1.35;
  }

  .cx-actions-btn button{
    font-size:12px;
    padding:8px;
  }
}

@media (min-width: 1920px){

  .cx-product{
    height:350px;
    padding:14px;
  }

  .cx-product .img-wrap{
    height:190px;
  }

  .cx-product h5{
    font-size:15px;
  }

  .cx-actions-btn button{
    font-size:13px;
    padding:9px;
  }
}

/* ❤️ WISHLIST BUTTON */
.cx-wishlist{
  position:relative;   /* 🔑 NOT absolute */
  z-index:1; 
  top:8px;
  right:8px;
 

  width:34px;
  height:34px;
  border:none;
  border-radius:50%;
  background:rgba(255,255,255,.9);
  backdrop-filter: blur(6px);

  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;

  box-shadow:0 4px 10px rgba(0,0,0,.12);
  transition:.25s ease;
}

.cx-wishlist i{
  font-size:14px;
  color:#e11d48;
}

.cx-wishlist:hover{
  transform:scale(1.1);
}
/* ⭐ RATING + VERIFIED */
.cx-rating{
  display:flex;
  align-items:center;
  gap:6px;
  margin-bottom:6px;
  font-size:11px;
}

.cx-rating .stars{
  color:#facc15;   /* amazon yellow */
  letter-spacing:1px;
}

.cx-rating .verified{
  display:flex;
  align-items:center;
  gap:4px;
  font-size:10.5px;
  font-weight:600;
  color:#16a34a;   /* green */
}

.cx-rating .verified i{
  font-size:12px;
}

.cx-wishlist-wrap{
  position:absolute;
  top:8px;
  right:8px;
  z-index:6;
  display:flex;
  flex-direction:column;
  align-items:flex-end; /* align under heart */
}


/* login message */
.cx-wishlist-msg{
  margin-top:6px;
  padding:6px 8px;
  font-size:10.5px;
  font-weight:600;
  color:#fff;
  background:#111827;
  border-radius:6px;
  white-space:nowrap;
   position:relative;   /* 🔑 create its own layer */
  z-index:10;          /* 🔼 above the button */

  opacity:0;
  transform:translateY(-4px);
  pointer-events:none;

  transition:.25s ease;
}
.cx-wishlist-msg::before{
  content:'';
  position:absolute;
  top:-4px;
  right:10px;
  width:8px;
  height:8px;
  background:#111827;
  transform:rotate(45deg);
}


/* visible state */
.cx-wishlist-msg.show{
  opacity:1;
  transform:translateY(0);
}

/* 🔔 Add-to-cart login tooltip */
.cx-cart-tooltip{
  position:absolute;
  top:100%;
  right:0;
  margin-top:6px;

  padding:6px 8px;
  font-size:10.5px;
  font-weight:600;
  color:#fff;
  background:#111827;
  border-radius:6px;
  white-space:nowrap;

  z-index:20;
  opacity:0;
  transform:translateY(-4px);
  transition:.25s ease;
  pointer-events:none;
}

.cx-cart-tooltip.show{
  opacity:1;
  transform:translateY(0);
}

.cx-cart-tooltip::before{
  content:'';
  position:absolute;
  top:-4px;
  right:10px;
  width:8px;
  height:8px;
  background:#111827;
  transform:rotate(45deg);
}

