:root{
  --c-bg:#ffffff; --c-text:#1a1a1a; --c-muted:#666;
  --c-accent:#ea2700;
  --c-purple:#9c0193;
  --c-purple-weak:#fbe7fa;
  --container:1180px; --radius:14px;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;color:var(--c-text);background-color:#f6f7f9;line-height:1.5}
.visually-hidden{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.container{max-width:var(--container);margin-inline:auto;padding:0 16px}
.site-boxed .site{background:#fff;box-shadow:0 8px 30px rgba(0,0,0,.05);margin:0 auto}
.header-main{display:flex;align-items:center;justify-content:space-between;padding:10px 0}
.site-title a{text-decoration:none;color:var(--c-text);font-weight:800}

/* Banner */
.header-banner{margin:8px 0;overflow:hidden}
.header-banner img{display:block;width:100%;height:auto;object-fit:cover}
.header-banner .banner-link{display:block}

/* Desktop nav */
.main-navigation{background:#fff;border-top:1px solid #eee;border-bottom:1px solid #eee}
.main-navigation .menu{list-style:none;display:flex;gap:18px;padding:8px 0;margin:0;flex-wrap:wrap}
.main-navigation a{display:flex;align-items:center;gap:6px;text-decoration:none;color:#222;padding:8px 10px}
.main-navigation a:hover,.main-navigation li.is-active a{background:#f3f4f6}
.i-home{width:18px;height:18px;fill:currentColor}

/* Mobile bar */
.mobilebar{display:none;background:transparent}
.mobilebar__inner{display:flex;align-items:center;justify-content:space-between;background:var(--c-purple);color:#fff;padding:12px 14px;margin:0}
.mobilebar .brand{font-weight:800;color:#fff}
.hamburger{width:36px;height:36px;border:0;background:transparent;display:grid;gap:5px;padding:0;cursor:pointer}
.hamburger span{display:block;height:3px;background:#fff}

/* Offcanvas Nav */
#mobilenav{position:fixed;inset:0 35% 0 0;max-width:360px;background:#fff;transform:translateX(-100%);transition:.3s ease;z-index:999;box-shadow:8px 0 30px rgba(0,0,0,.08)}
#mobilenav[aria-hidden="false"]{transform:none}
.mobilenav__inner{height:100%;display:flex;flex-direction:column;max-height:100vh;overflow:auto}
.mobilenav__top{padding:16px;font-weight:800;border-bottom:1px solid #eee}
.mobile-menu{list-style:none;margin:0;padding:8px 0;overflow:auto}
.mobile-menu li a{display:block;padding:14px 16px;text-decoration:none;color:#111;font-size:16px}
.mobile-menu li.is-active a{background:#f5f5f7;font-weight:700;color:#9c0193}
.menu_close{position:absolute;right:8px;top:8px;border:0;background:transparent;font-size:28px;line-height:1;cursor:pointer}

/* HERO SLIDER */
.hero-slider{position:relative;overflow:hidden;background:#000}
.hero-slider .slides{position:relative;width:100%;height:clamp(180px, 38vw, 480px)}
@supports (aspect-ratio: 16/9){ .hero-slider .slides{aspect-ratio:26/10;height:auto} }
.hero-slider .slide{position:absolute;inset:0;opacity:0;visibility:hidden;transition:opacity .6s ease,visibility .6s step-end}
.hero-slider .slide.is-active{opacity:1;visibility:visible}
.hero-slider img{display:block;width:100%;height:100%;object-fit:cover}
.hero-slider .nav{position:absolute;top:50%;transform:translateY(-50%);background:rgba(255,255,255,.65);border:0;width:38px;height:38px;border-radius:50%;cursor:pointer;z-index:2}
.hero-slider .prev{left:10px}
.hero-slider .next{right:10px}
.hero-slider .dots{position:absolute;left:50%;bottom:10px;transform:translateX(-50%);display:flex;gap:6px;z-index:2}
.hero-slider .dots button{width:8px;height:8px;border-radius:50%;border:0;background:rgba(255,255,255,.6);cursor:pointer}
.hero-slider .dots button.is-active{background:#fff}

/* Sections */
.product-block{margin-top:28px}
.block-head{display:block;margin-bottom:12px}
.block-head h2,.section-title{background:var(--c-purple);color:#fff;padding:12px 14px;font-weight:800;letter-spacing:.2px;margin:0 0 6px 0}
.block-head h2 a,.section-title a{color:#fff;text-decoration:none}
.block-head h2 a:hover,.section-title a:hover{color:#fff}
.block-head .viewall{display:block;text-align:right;margin-top:4px;font-size:14px;color:var(--c-purple);text-decoration:none}

/* Grid */
.product-grid{list-style:none;display:grid;gap:14px;margin:0;padding:0}
.product-grid.col-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.product-card{background:#fff;border:1px solid #eee;overflow:hidden;transition:transform .12s ease, box-shadow .12s ease}
.product-card:hover{transform:translateY(-2px);box-shadow:0 8px 24px rgba(0,0,0,.06)}
.product-card .thumb{display:block;aspect-ratio:1/1;background:#f6f7f9}
.product-card img{width:100%;height:100%;object-fit:cover}
.product-card .meta{padding:10px}
.product-card h3{font-size:15px;line-height:1.35;margin:0 0 4px}
.price{color:#d00;font-weight:600}

/* Layout two columns */
.layout{display:grid;grid-template-columns:1fr 320px;gap:24px}

/* Sidebar */
.sidebar .widget{background:#fff;border:1px solid color-mix(in srgb, var(--c-purple) 28%, #eee);padding:14px;margin-bottom:16px;box-shadow:0 6px 22px rgba(156,1,147,.08)}
.sidebar .widget h2{margin:0 0 10px;font-size:18px;color:var(--c-purple)}
.sidebar .widget .highlight{background:var(--c-purple-weak);padding:10px}
.v-menu{list-style:none;margin:0;padding:0}
.v-menu li a{display:block;padding:8px 0;color:#111;text-decoration:none;border-bottom:1px dashed #eee}
.v-menu li a:hover{color:var(--c-purple)}
.v-menu li:last-child a{border-bottom:0}

/* Footer */
.site-footer{margin-top:28px}
.footer-widgets{background:#111;color:#eee;padding:26px 0}
.footer-widgets h4{color:#fff;margin:0 0 10px}
.footer-widgets a{color:#ddd;text-decoration:none}
.grid-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
.info,.list{margin:0;padding:0;list-style:none}
.map-embed .map-box{display:inline-block;background:#222;color:#fff;padding:10px 12px}
.site-info{background:#0d0d0d;color:#bbb;text-align:center;padding:12px}

/* Social ring */
.social-ring{position:fixed;right:16px;bottom:max(16px, env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:10px;z-index:1100}
.ring-btn{display:flex;align-items:center;gap:8px;background:var(--c-accent);color:#fff;text-decoration:none;padding:10px 12px;border-radius:999px;box-shadow:0 8px 20px rgba(234,39,0,.35)}
.ring-btn svg{width:18px;height:18px;fill:#fff}
.zalo-text{font-weight:700}
#backTop{position:fixed;right:16px;bottom:92px;background:#000;color:#fff;border:0;width:36px;height:36px;cursor:pointer;opacity:.7}

/* Responsive */
@media (max-width: 992px){
  .layout{grid-template-columns:1fr}
  .mobilebar{display:block;position:sticky;top:0;z-index:1000;box-shadow:0 1px 0 rgba(0,0,0,.04)}
  .main-navigation{display:none}
  .header-main{display:none}
  .container{padding:0 12px}
  .product-grid.col-3{grid-template-columns:repeat(2,minmax(0,1fr))}
  .block-head{margin-top:8px}
}
@media (max-width: 560px){
  .product-grid.col-3{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width: 380px){
  .product-grid.col-3{grid-template-columns:1fr}
}
@media (max-width: 991.98px){
  .header-banner{margin:6px 0 4px}
  .mobilebar{position:sticky;top:0;z-index:1000}
  .mobilebar__inner{padding:10px 12px}
  .block-head{margin-top:6px}
  .block-head h2{font-size:18px;line-height:1.3;padding:10px 12px}
  .block-head .viewall{font-size:13px}
  .has-ring #content{padding-bottom:110px}
}

/* Offcanvas rộng hơn trên màn rất nhỏ */
@media (max-width:420px){
  #mobilenav{inset:0;max-width:100%}
}

/* Quickview modal */
.product-modal{position:fixed;inset:0;z-index:1000;display:none;align-items:center;justify-content:center;background:rgba(0,0,0,.6)}
.product-modal.is-open{display:flex}
.product-modal__dialog{width:min(960px,92vw);background:#fff;border-radius:12px;overflow:hidden;box-shadow:0 20px 80px rgba(0,0,0,.35);animation:modalIn .18s ease}
@keyframes modalIn{from{transform:translateY(10px);opacity:0}to{transform:none;opacity:1}}
.product-modal__media{background:#f6f7f9;display:flex;align-items:center;justify-content:center;min-height:280px}
.product-modal__media img{width:100%;height:100%;object-fit:contain;max-height:65vh}
.product-modal__body{padding:16px}
.product-modal__title{margin:0 0 6px;font-size:20px;font-weight:800}
.product-modal__meta{color:#666;font-size:14px;margin-bottom:10px}
.product-modal__desc{color:#222;line-height:1.6}
.product-modal__actions{display:flex;gap:10px;margin-top:12px;flex-wrap:wrap}
.product-modal__actions .btn{padding:10px 12px;border-radius:10px;text-decoration:none;display:inline-block}
.btn--primary{background:var(--c-purple);color:#fff}
.btn--outline{border:1px solid var(--c-purple);color:var(--c-purple);background:#fff}
.btn--danger{background:var(--c-accent);color:#fff}
.product-modal__close{position:absolute;right:10px;top:10px;width:36px;height:36px;border:0;border-radius:10px;background:rgba(0,0,0,.5);color:#fff;font-size:20px;cursor:pointer}
@media (min-width:860px){
  .product-modal__dialog{display:grid;grid-template-columns:52% 48%}
  .product-modal__media{min-height:440px}
}
body.modal-open{overflow:hidden}

/* Sidebar images & misc */
.sidebar img{max-width:100%;height:auto}
.v-slider{position:relative;overflow:hidden}
.v-slider-track{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}
.v-item{display:flex;align-items:center;gap:10px;padding:8px 0;border-bottom:1px solid #eee}
.v-thumb{flex:0 0 88px}
.v-thumb img{display:block;width:88px;height:88px;object-fit:cover;border-radius:8px}
.v-meta{flex:1;min-width:0}
.v-meta a{display:block;font-weight:600;line-height:1.35;color:#111;text-decoration:none}
.v-meta a:hover{text-decoration:underline}
.v-meta .price{margin-top:4px;color:#9c0193;font-weight:600}
@media (max-width:360px){
  .v-thumb{flex:0 0 76px}
  .v-thumb img{width:76px;height:76px}
  .v-meta a{font-size:14px}
  .v-meta .price{font-size:13px}
}

/* Cleanups */
.product-card .thumb img{display:block;width:100%;height:auto;border-radius:8px}
.widget img{max-width:100%;height:auto}
.site-header{position:relative;z-index:999}
.header-banner{margin-bottom:6px}
.mobilebar .hamburger{background:transparent;border:0;padding:8px 2px;cursor:pointer}
.mobilebar .hamburger span{display:block;width:28px;height:3px;margin:5px 0;background:#fff}
/* Ẩn hẳn offcanvas khi đóng (để không chặn click) */
#mobilenav[aria-hidden="true"]{display:none}