/*
Theme Name: Mobile Bazar
Description: Dynamic mobile phone shop theme with CPTs
Version: 2.0
Author: Mobile Bazar
Text Domain: mobile-bazar
*/

:root{
  --bg:#eef3f8;
  --card:#ffffff;
  --text:#1f2937;
  --muted:#6b7280;
  --line:#dbe4ee;
  --soft:#f7f9fc;
  --soft2:#f2f5f9;
  --primary:#2563eb;
  --primary-dark:#1d4ed8;
  --green:#16a34a;
  --red:#dc2626;
  --shadow:0 1px 2px rgba(15,23,42,.04);
  --shadow-lg:0 8px 22px rgba(15,23,42,.08);
  --header-bg:#0f0f0f;
  --header-text:#ffffff;
  --header-muted:#b0b0b0;
  --header-line:#2a2a2a;
  --slider-w:1600px;
  --slider-h:720px;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0;overflow-x:hidden}
body{
  font-family:'Hind Siliguri',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
  background:var(--bg);
  color:var(--text);
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}
a{text-decoration:none;color:inherit;transition:color .18s}
img{max-width:100%;display:block;height:auto}
button{font-family:inherit}
input,select,textarea{font-family:inherit}
.hidden{display:none!important}

.container{
  width:min(1220px, calc(100% - 32px));
  margin:0 auto;
  padding-top:150px;
  padding-bottom:20px;
}

/* ================= HEADER ================= */
.headerFixed{
  position:fixed;
  top:0;
  left:0;
  right:0;
  z-index:9999;
  background:var(--header-bg);
  border-bottom:1px solid var(--header-line);
  box-shadow:0 4px 22px rgba(0,0,0,.18);
}
.headerInner{
  width:min(1220px, calc(100% - 32px));
  margin:0 auto;
}
.topbar{
  height:58px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  border-bottom:1px solid rgba(255,255,255,.06);
}
.brand{
  font-size:20px;
  font-weight:800;
  color:var(--header-text);
  letter-spacing:.2px;
  line-height:1;
  display:inline-flex;
  align-items:center;
}
.top-actions{
  display:flex;
  align-items:center;
  gap:12px;
  flex-shrink:0;
}
.btn-call{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  background:var(--primary);
  color:#fff;
  padding:9px 16px;
  border-radius:999px;
  font-size:13px;
  font-weight:700;
  line-height:1;
  white-space:nowrap;
  transition:.2s;
  border:none;
  cursor:pointer;
}
.btn-call:hover{
  background:var(--primary-dark);
  color:#fff;
}

.navbar{
  height:56px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}
.navWrap{
  flex:1 1 auto;
  min-width:0;
  height:100%;
  display:flex;
  align-items:center;
}
.navRight{
  display:flex;
  align-items:center;
  gap:12px;
  flex:0 0 auto;
}

.nav-links{
  display:flex!important;
  align-items:center;
  gap:34px;
  margin:0!important;
  padding:0!important;
  list-style:none!important;
  white-space:nowrap;
  overflow-x:auto;
  overflow-y:hidden;
  width:100%;
  -ms-overflow-style:none;
  scrollbar-width:none;
}
.nav-links::-webkit-scrollbar{display:none}
.nav-links > li,
.nav-links li.menu-item,
.nav-links ul li{
  list-style:none!important;
  margin:0!important;
  padding:0!important;
  flex:0 0 auto;
  position:relative;
}
.nav-links li::before,
.nav-links li::after{
  display:none!important;
  content:none!important;
}
.nav-links a{
  display:inline-block;
  color:var(--header-muted);
  font-size:14px;
  font-weight:500;
  line-height:1;
  padding:0;
}
.nav-links a:hover,
.nav-links .current-menu-item > a,
.nav-links .current_page_item > a,
.nav-links .current-menu-ancestor > a{
  color:#fff;
}

.nav-links li ul.sub-menu{
  position:absolute;
  top:calc(100% + 14px);
  left:0;
  min-width:200px;
  background:var(--header-bg);
  border:1px solid var(--header-line);
  border-radius:12px;
  box-shadow:0 12px 32px rgba(0,0,0,.35);
  padding:8px;
  opacity:0;
  visibility:hidden;
  transform:translateY(-6px);
  transition:.2s;
  z-index:1000;
  display:block!important;
  list-style:none!important;
  margin:0;
}
.nav-links li:hover ul.sub-menu{
  opacity:1;
  visibility:visible;
  transform:translateY(0);
}
.nav-links ul.sub-menu li{
  display:block;
  width:100%;
}
.nav-links ul.sub-menu a{
  display:block;
  padding:10px 12px;
  border-radius:8px;
  color:var(--header-muted);
}
.nav-links ul.sub-menu a:hover{
  background:rgba(255,255,255,.06);
  color:#fff;
}

.menu,.menu ul{
  list-style:none!important;
  margin:0;
  padding:0;
}
.menu li{
  list-style:none!important;
  margin:0;
  padding:0;
}
.menu li::before,
.menu li::after{
  content:none!important;
  display:none!important;
}

.hamburger{
  display:none;
  width:42px;
  height:42px;
  border-radius:12px;
  border:1px solid var(--header-line);
  background:transparent;
  cursor:pointer;
  align-items:center;
  justify-content:center;
  padding:0;
  flex:0 0 42px;
}
.hamburger:hover{background:rgba(255,255,255,.06)}
.hamburger .bars{
  width:18px;
  height:14px;
  position:relative;
  display:block;
}
.hamburger .bars span{
  position:absolute;
  left:0;right:0;
  height:2px;
  background:#fff;
  border-radius:2px;
  transition:.2s;
}
.hamburger .bars span:nth-child(1){top:0}
.hamburger .bars span:nth-child(2){top:6px}
.hamburger .bars span:nth-child(3){top:12px}
.hamburger[aria-expanded="true"] .bars span:nth-child(1){top:6px;transform:rotate(45deg)}
.hamburger[aria-expanded="true"] .bars span:nth-child(2){opacity:0}
.hamburger[aria-expanded="true"] .bars span:nth-child(3){top:6px;transform:rotate(-45deg)}

.mobileMenu{
  display:none;
  position:absolute;
  top:100%;
  left:12px;
  right:12px;
  margin-top:8px;
  background:var(--header-bg);
  border:1px solid var(--header-line);
  border-radius:14px;
  box-shadow:0 16px 40px rgba(0,0,0,.45);
  padding:12px;
  z-index:9998;
}
.mobileMenu.open{display:block}
.mobile-nav{
  list-style:none!important;
  margin:0;
  padding:0;
}
.mobile-nav li{
  list-style:none!important;
  margin:0;
  padding:0;
}
.mobile-nav a{
  display:block;
  padding:12px 14px;
  color:var(--header-muted);
  border-radius:10px;
  font-size:14px;
  font-weight:500;
}
.mobile-nav a:hover{
  background:rgba(255,255,255,.06);
  color:#fff;
}

/* ===== SEARCH ===== */
.searchBoxArea{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  width:42px;
  min-width:42px;
  height:42px;
  flex:0 0 42px;
  overflow:visible;
}
.searchExpand{
  position:absolute;
  top:50%;
  right:21px;
  transform:translateY(-50%);
  height:42px;
  width:0;
  opacity:0;
  overflow:hidden;
  transition:width .28s ease, opacity .2s ease;
  z-index:1;
  pointer-events:none;
}
.searchExpand.open{
  width:280px;
  opacity:1;
  pointer-events:auto;
}
.searchExpand input{
  width:280px;
  height:42px;
  border:1px solid #2c2c2c;
  border-radius:999px;
  padding:0 54px 0 16px;
  outline:none;
  background:#ffffff;
  color:#111827;
  font-size:14px;
  line-height:42px;
}
.searchExpand input::placeholder{color:#9ca3af}
.searchIconBtn{
  position:relative;
  z-index:2;
  width:42px;
  height:42px;
  min-width:42px;
  border-radius:999px;
  border:1px solid #3a3a3a;
  background:#1b1b1b;
  color:#fff;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0;
  margin:0;
  flex:0 0 42px;
}
.searchIconBtn:hover{
  background:#252525;
  border-color:#555;
}
.searchResults{
  position:absolute;
  top:calc(100% + 8px);
  right:0;
  width:360px;
  max-width:calc(100vw - 32px);
  background:#fff;
  border:1px solid #dbe4ee;
  border-radius:12px;
  box-shadow:0 16px 40px rgba(0,0,0,.18);
  padding:8px;
  max-height:380px;
  overflow:auto;
  display:none;
  z-index:10000;
}
.searchResults.show{display:block}
.resultItem{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:10px;
  cursor:pointer;
  color:#1f2937;
  transition:background .15s;
}
.resultItem:hover{background:#f8fafc}
.resultTitle{font-weight:800;font-size:14px;color:#111827}
.resultSub{color:#6b7280;font-size:12px;margin-top:2px}
.resultPrice{color:var(--primary);font-weight:900;font-size:13px;white-space:nowrap}
.search-empty{
  padding:14px;
  color:#6b7280;
  font-size:13px;
  text-align:center;
}

.admin-bar .headerFixed{top:32px}
@media screen and (max-width:782px){
  .admin-bar .headerFixed{top:46px}
}

/* PRICE */
.price-old{
  text-decoration:line-through;
  color:#9ca3af;
  font-size:13px;
  font-weight:600;
  margin-right:6px;
}
.price-new{
  color:var(--green);
  font-weight:900;
  font-size:15px;
}
.details-price .price-new{font-size:28px}
.details-price .price-old{font-size:15px}
.badge-discount{
  display:inline-block;
  background:#ef4444;
  color:#fff;
  font-size:11px;
  font-weight:800;
  padding:2px 8px;
  border-radius:999px;
  margin-left:8px;
  vertical-align:middle;
}

/* ============================================================
   HERO SLIDER — 1600 × 720, auto-fit, fully responsive
   ============================================================ */
.hero.heroSlider{
  position:relative;
  width:100%;
  max-width:var(--slider-w);          /* 1600px */
  aspect-ratio: 1600 / 720;           /* exact ratio */
  margin:0 auto 28px;
  border-radius:16px;
  overflow:hidden;
  background:#f4ede2;
  border:1px solid rgba(219,228,238,.8);
  box-shadow:var(--shadow);
}

.hero.heroSlider .hero__slide{
  position:absolute;
  inset:0;
  display:block;
  padding:0;
  opacity:0;
  transform:none;
  transition:opacity .4s ease;
  pointer-events:none;
  visibility:hidden;
}
.hero.heroSlider .hero__slide.active{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
}

.hero.heroSlider .slideLink{
  display:block;
  width:100%;
  height:100%;
  cursor:pointer;
  overflow:hidden;
}
.hero.heroSlider .slideLink--static{
  cursor:default;
}

/* CORE: auto-fit / cover — যেকোনো image ঠিকভাবে ভরবে, distort হবে না */
.hero.heroSlider .slideLink img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center center;
  background:#f4ede2;
}

/* Slider controls */
.slider-controls{
  position:absolute;
  right:14px;
  bottom:14px;
  display:flex;
  gap:10px;
  align-items:center;
  background:rgba(255,255,255,.78);
  backdrop-filter:blur(4px);
  -webkit-backdrop-filter:blur(4px);
  border:1px solid rgba(219,228,238,.9);
  border-radius:999px;
  padding:8px 10px;
  z-index:10;
}
.iconbtn{
  width:34px;
  height:34px;
  border-radius:999px;
  border:1px solid rgba(219,228,238,.9);
  background:#fff;
  cursor:pointer;
  display:grid;
  place-items:center;
  font-size:16px;
  color:#1f2937;
  transition:.15s;
}
.iconbtn:hover{background:#f1f5f9}
.dots{display:flex;gap:6px}
.dot{
  width:8px;
  height:8px;
  border-radius:50%;
  background:#cbd5e1;
  cursor:pointer;
  transition:.2s;
}
.dot.active{background:var(--primary);width:20px;border-radius:999px}

/* Legacy hero helpers */
.hero-card{
  background:rgba(255,255,255,.75);
  border-radius:16px;
  padding:22px;
  box-shadow:var(--shadow);
}
.hero-tag{
  font-size:13px;
  color:#64748b;
  margin-bottom:10px;
}
.hero h1{
  margin:0 0 10px;
  font-size:34px;
  line-height:1.2;
  color:#1f2937;
}
.hero p{
  margin:0 0 18px;
  color:var(--muted);
  font-size:14px;
}
.hero .btn{
  border:none;
  background:var(--primary);
  color:#fff;
  border-radius:999px;
  padding:9px 20px;
  font-size:14px;
  font-weight:600;
  cursor:pointer;
  transition:.2s;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.hero .btn:hover{background:var(--primary-dark);color:#fff}

/* SECTION */
.section{
  margin-bottom:32px;
  scroll-margin-top:150px;
}
.section-head{
  display:flex;
  justify-content:space-between;
  align-items:end;
  margin-bottom:12px;
}
.section-title{
  font-size:24px;
  font-weight:800;
  margin:0;
  color:#1f2937;
}
.section-sub{
  color:var(--muted);
  font-size:13px;
  margin-top:2px;
}

/* CARD */
.grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:14px;
}
.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:12px;
  overflow:hidden;
  box-shadow:var(--shadow);
  cursor:pointer;
  transition:transform .2s, box-shadow .2s;
  display:block;
  color:inherit;
}
.card:hover{
  transform:translateY(-3px);
  box-shadow:var(--shadow-lg);
}
.card-image{
  height:220px;
  margin:10px;
  border-radius:10px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(180deg,#f8fbff,#e8eef6);
  overflow:hidden;
  padding:10px;
}
.card-image img{
  max-width:100%;
  max-height:100%;
  object-fit:contain;
}
.card-body{
  padding:0 12px 14px;
}
.card-title{
  font-size:15px;
  font-weight:800;
  margin:2px 0 4px;
  color:#1f2937;
  line-height:1.3;
}
.card-spec{
  color:var(--muted);
  font-size:12px;
  margin-bottom:6px;
}
.card .price{
  color:var(--primary);
  font-weight:900;
  font-size:15px;
}

/* DETAILS */
.breadcrumb{
  color:var(--muted);
  font-size:13px;
  margin:4px 0 14px;
}
.breadcrumb a{color:var(--primary);font-weight:600}
.details-top{
  background:#fff;
  border:1px solid var(--line);
  border-radius:12px;
  box-shadow:var(--shadow);
  padding:24px;
  display:grid;
  grid-template-columns:320px 1fr;
  gap:26px;
  margin-top:12px;
}
.imageSection{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.details-image{
  background:transparent;
  border:2px solid var(--line);
  border-radius:14px;
  min-height:320px;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  position:relative;
  padding:14px;
}
.details-image img{
  max-width:100%;
  max-height:300px;
  object-fit:contain;
}
.galleryTrack{
  display:flex;
  gap:10px;
  overflow-x:auto;
  padding:4px 0;
  scrollbar-width:none;
}
.galleryTrack::-webkit-scrollbar{display:none}
.galleryThumb{
  flex:0 0 56px;
  height:64px;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  opacity:.55;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff;
  padding:4px;
}
.galleryThumb.active{
  opacity:1;
  border-color:var(--primary);
}
.galleryThumb img{
  max-width:100%;
  max-height:100%;
  object-fit:contain;
}
.colorLabel{
  font-size:12px;
  color:var(--muted);
  text-align:center;
  font-weight:600;
  margin-top:4px;
}
.details-info h1{
  margin:0 0 6px;
  font-size:34px;
  line-height:1.2;
}
.details-price{
  margin:8px 0 16px;
}
.spec-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:10px;
}
.spec-box{
  border:1px solid var(--line);
  border-radius:10px;
  padding:12px 14px;
  background:#fafcff;
}
.spec-label{
  color:var(--muted);
  font-size:12px;
  margin-bottom:4px;
}
.spec-value{
  font-weight:900;
  font-size:15px;
}

/* FEATURE */
.featureWrap{
  margin-top:18px;
  display:grid;
  gap:14px;
}
.featureCard{
  background:#fff;
  border:1px solid var(--line);
  border-radius:8px;
  overflow:hidden;
  box-shadow:var(--shadow);
}
.featureHead{
  padding:12px 16px;
  font-weight:800;
  font-size:16px;
  background:#fafbfd;
  border-bottom:1px solid var(--line);
  display:flex;
  align-items:center;
  gap:10px;
}
.featureHead .ficon{
  width:30px;
  height:30px;
  display:grid;
  place-items:center;
  background:#eef3ff;
  border-radius:8px;
  font-size:18px;
}
.featureTable{
  width:100%;
  border-collapse:collapse;
  font-size:13px;
}
.featureTable td{
  padding:10px 16px;
  border-bottom:1px solid #e8eef5;
}
.featureTable tr:last-child td{border-bottom:none}
.featureTable td:first-child{
  width:38%;
  color:#4b5563;
  font-weight:700;
}
.featureTable td:last-child{
  color:#6b7280;
}

/* SIMILAR */
.similarSection{
  background:#fff;
  border:1px solid var(--line);
  border-radius:12px;
  padding:20px;
  margin-top:24px;
  box-shadow:var(--shadow);
}
.similarSection .section-title{
  font-size:18px;
  margin:0;
}
.simGrid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
  margin-top:12px;
}
.simCard{
  background:var(--soft2);
  border:1px solid var(--line);
  border-radius:10px;
  padding:14px;
  cursor:pointer;
  color:inherit;
  display:block;
}
.simName{
  font-weight:800;
  font-size:14px;
  color:#1f2937;
  margin-bottom:4px;
}
.simSpec{
  color:var(--muted);
  font-size:12px;
  margin-bottom:6px;
}
.simPrice{
  font-weight:900;
  font-size:14px;
  color:var(--primary);
}

/* FOOTER */
.copy{
  text-align:center;
  color:var(--muted);
  font-size:13px;
  margin:40px 0 30px;
  padding:20px 16px;
  border-top:1px solid var(--line);
}
.footerInner{
  display:flex;
  flex-direction:column;
  gap:4px;
  align-items:center;
}
.footerBrand{
  font-size:15px;
  font-weight:800;
  color:var(--text);
  margin:0;
}
.footerText{
  margin:0;
  color:var(--muted);
  font-size:13px;
}

/* LIGHTBOX */
.lightbox{
  position:fixed;
  inset:0;
  z-index:99999;
  background:rgba(0,0,0,.75);
  backdrop-filter:blur(6px);
  display:none;
  align-items:center;
  justify-content:center;
  padding:20px;
}
.lightbox.open{display:flex}
.lightboxContent{
  background:#fff;
  border-radius:20px;
  padding:20px;
  max-width:90vw;
  max-height:90vh;
  position:relative;
  box-shadow:0 24px 60px rgba(0,0,0,.4);
}
.lightboxClose{
  position:absolute;
  top:10px;
  right:12px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:999px;
  font-size:20px;
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  cursor:pointer;
  color:#1f2937;
}
.lightboxContent img{
  max-height:80vh;
  max-width:100%;
  object-fit:contain;
  margin:0 auto;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Large screens (>1600px): slider centered, max 1600px */
@media (min-width:1360px){
  .hero.heroSlider{
    border-radius:18px;
    margin-bottom:32px;
  }
}

/* Fluid от 1024 — 1360 */
@media (max-width:1360px) and (min-width:1025px){
  .hero.heroSlider{
    max-width:100%;
    aspect-ratio: 1600 / 720;
  }
}

/* Tablets */
@media (max-width:1024px){
  .hero.heroSlider{
    max-width:100%;
    aspect-ratio: 16 / 9;
    border-radius:14px;
    margin-bottom:22px;
  }
}

@media (max-width:960px){
  .nav-links{gap:24px}
  .details-top{grid-template-columns:280px 1fr;gap:20px}
  .details-info h1{font-size:28px}
}

@media (max-width:860px){
  .grid{grid-template-columns:repeat(2,1fr)}
  .details-top{grid-template-columns:1fr}
  .simGrid{grid-template-columns:repeat(2,1fr)}
  .card-image{height:200px}
}

@media (max-width:782px){
  .admin-bar .headerFixed{top:46px}
  .container{padding-top:120px}
  .hero.heroSlider{
    aspect-ratio: 16 / 9;
    border-radius:12px;
    margin-bottom:18px;
  }
}

@media (max-width:640px){
  body{overflow-x:hidden}
  .headerInner{width:calc(100% - 20px)}
  .topbar{height:58px}
  .navbar{
    height:50px;
    justify-content:space-between;
  }
  .navWrap{display:none}
  .navRight{
    width:100%;
    justify-content:space-between;
    align-items:center;
    gap:0;
  }
  .hamburger{
    display:inline-flex;
    order:1;
  }
  .searchBoxArea{
    order:2;
    margin-left:auto;
    width:42px;
    min-width:42px;
    height:42px;
    flex:0 0 42px;
  }
  .searchExpand{right:21px}
  .searchExpand.open{width:240px}
  .searchExpand input{
    width:240px;
    height:42px;
    padding:0 54px 0 16px;
  }
  .searchIconBtn{
    width:42px;
    height:42px;
    min-width:42px;
    flex:0 0 42px;
  }
  .btn-call{
    padding:8px 14px;
    font-size:12px;
  }
  .brand{font-size:18px}
  .container{
    width:calc(100% - 20px);
    padding-top:124px;
  }
  .searchResults{
    position:absolute;
    top:calc(100% + 8px);
    right:0;
    width:260px;
    max-width:260px;
    left:auto;
  }
  .mobileMenu{
    left:10px;
    right:10px;
    top:100%;
    margin-top:6px;
  }

  /* Mobile: slider 16:9 → আরো responsive */
  .hero.heroSlider{
    aspect-ratio: 16 / 9;
    border-radius:12px;
    margin-bottom:16px;
  }
  .slider-controls{
    right:8px;
    bottom:8px;
    padding:5px 7px;
    transform:scale(.88);
  }
  .iconbtn{
    width:30px;
    height:30px;
    font-size:14px;
  }

  .grid{grid-template-columns:1fr;gap:12px}
  .card-image{height:240px}
  .section-title{font-size:20px}
  .details-info h1{font-size:24px}
  .simGrid{grid-template-columns:1fr}
  .spec-grid{grid-template-columns:1fr}
  .details-image{min-height:260px}
  .details-image img{max-height:240px}
  .details-top{padding:16px}
}

@media (max-width:420px){
  .brand{font-size:16px}
  .btn-call{padding:7px 12px;font-size:11px}
  .searchExpand.open{width:200px}
  .searchExpand input{width:200px}
  .searchResults{
    width:220px;
    max-width:220px;
  }
  /* Mobile ছোট: slider কে আরো ছোট height */
  .hero.heroSlider{
    aspect-ratio: 16 / 9;
  }
  .slider-controls{
    transform:scale(.82);
    right:6px;
    bottom:6px;
  }
}