@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@500;700;800;900&display=swap');*{box-sizing:border-box}body{margin:0;background:#fffaf2;color:#29263d;font-family:Nunito,sans-serif}button,input,select,textarea{font:inherit}header{height:76px;background:#fff;border-bottom:1px solid #eee5d9;padding:0 7%;display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;z-index:10}.logo{font-size:25px;font-weight:900}.logo span{color:#ff7544}nav{display:flex;align-items:center;gap:18px}nav a{color:#29263d;text-decoration:none;font-weight:800}nav button{border:0;background:#29263d;color:#fff;border-radius:11px;padding:10px 15px}.hero[hidden]{display:none!important}.hero{padding:70px 9%;display:flex;justify-content:space-between;align-items:center;background:linear-gradient(125deg,#fff0d9,#fff 60%,#fff0f4)}.hero h1{font-size:clamp(40px,6vw,70px);line-height:1;max-width:780px;margin:15px 0}.hero p{color:#777}.hero small,main small{color:#ff7544;font-weight:900}main{padding:60px 8%}.bar{display:flex;justify-content:space-between;align-items:center;gap:15px}.bar input{width:320px;padding:13px;border:1px solid #ddd;border-radius:12px}.cats{display:flex;gap:10px;overflow:auto;padding:20px 0}.cats button{border:1px solid #ddd;background:#fff;border-radius:20px;padding:9px 15px;white-space:nowrap}.cats button.sel{background:#29263d;color:#fff}.grid{display:grid;grid-template-columns:repeat(4,1fr);gap:20px}.card{background:#fff;border:1px solid #eee5d9;border-radius:20px;overflow:hidden}.card img{width:100%;height:210px;object-fit:cover}.cardbody{padding:16px}.card h3{margin:7px 0}.price{font-weight:900;font-size:19px}.stock{display:block;color:#777;font-size:13px;margin:7px 0}.add,.primary{border:0;background:#ff7544;color:#fff;border-radius:10px;padding:10px 14px;font-weight:900;cursor:pointer}.add{float:none;display:block;margin:16px 0 0 auto}.drawer{position:fixed;right:-440px;top:0;width:440px;max-width:100%;height:100%;background:#fff;z-index:30;padding:28px;transition:.3s;box-shadow:-15px 0 50px #0002}.drawer.on{right:0}.shade{position:fixed;inset:0;background:#0007;z-index:25;display:none}.shade.on{display:block}.close{float:right;border:0;background:#eee;border-radius:8px;padding:8px}.cartline{display:flex;justify-content:space-between;padding:14px 0;border-bottom:1px solid #eee}.modal{position:fixed;inset:0;background:#0007;display:none;place-items:center;z-index:40}.modal.on{display:grid}.box{background:#fff;border-radius:20px;padding:28px;width:min(500px,92%)}.box form{display:grid;gap:12px}.box input,.box textarea,.box select{padding:13px;border:1px solid #ddd;border-radius:10px}.admin{max-width:1150px;margin:auto}.tabs{display:flex;gap:10px;margin:25px 0}.tabs button{padding:12px 18px;border:0;border-radius:10px;background:#eee}.tabs button.on{background:#29263d;color:#fff}.panel{display:none}.panel.on{display:block}.formgrid{display:grid;grid-template-columns:1fr 1fr;gap:12px;background:#fff;border:1px solid #eee5d9;padding:20px;border-radius:18px}.formgrid input,.formgrid textarea,.formgrid select{padding:12px;border:1px solid #ddd;border-radius:9px}.full{grid-column:1/-1}.row{display:flex;align-items:center;gap:15px;background:#fff;border:1px solid #eee5d9;border-radius:15px;padding:12px;margin:9px 0}.row img{width:80px;height:60px;object-fit:cover;border-radius:8px}.grow{flex:1}.row small{display:block;color:#777}.edit,.danger{border:0;border-radius:8px;padding:9px 12px;cursor:pointer}.edit{background:#fff0cf}.danger{background:#29263d;color:#fff}.order{background:#fff;border:1px solid #eee5d9;border-radius:15px;padding:18px;margin:10px 0}.order small{display:block;color:#777}.order select{float:right;padding:8px;border:1px solid #ddd;border-radius:8px}.catrow{display:flex;gap:10px;align-items:center;background:#fff;padding:12px;border:1px solid #eee5d9;border-radius:12px;margin:8px 0}.catrow input{flex:1;padding:9px;border:1px solid #ddd;border-radius:8px}@media(max-width:900px){.grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:600px){.hero{display:block}.grid{grid-template-columns:1fr 1fr}.bar{display:block}.bar input{width:100%;margin-top:10px}.formgrid{grid-template-columns:1fr}.full{grid-column:auto}.drawer{width:100%}}

.card img,.card h3{cursor:pointer}.card img{transition:.2s}.card:hover img{transform:scale(1.02)}
.details{position:fixed;inset:0;background:#0008;display:none;place-items:center;z-index:50;padding:20px}.details.on{display:grid}
.detailsbox{width:min(900px,96%);max-height:92vh;overflow:auto;background:#fff;border-radius:24px;padding:28px;display:grid;grid-template-columns:1fr 1fr;gap:30px;position:relative}
.detailsbox>img{width:100%;max-height:500px;object-fit:cover;border-radius:18px}.detailsinfo h2{font-size:34px;margin:8px 0}.detailsinfo .desc{color:#666;line-height:1.7;white-space:pre-wrap}.detailsinfo .bigprice{font-size:28px;font-weight:900;margin:20px 0}.qtybox{display:flex;align-items:center;gap:15px;margin:18px 0}.qtybox button{border:1px solid #ddd;background:#fff;border-radius:9px;width:38px;height:38px;cursor:pointer}.qtybox span{font-weight:900;font-size:18px}.details-close{position:absolute;right:18px;top:18px;border:0;background:#eee;border-radius:10px;padding:9px;cursor:pointer;z-index:2}.detailsbuy{width:100%;padding:14px;font-size:16px}
@media(max-width:700px){.detailsbox{grid-template-columns:1fr;padding:18px}.detailsinfo h2{font-size:26px}}

.buy-now{width:100%;padding:14px;font-size:16px;margin-top:10px;background:#29263d!important}

.lang{display:flex;gap:5px;align-items:center}.lang button{border:1px solid #ddd;background:#fff;border-radius:8px;padding:6px 8px;cursor:pointer}.lang button.active{background:#29263d;color:#fff}.adminlang{margin-left:auto}

.lang{display:flex!important;align-items:center;gap:6px}
.lang button{display:inline-flex!important;align-items:center;justify-content:center;min-width:42px;height:34px;border:1px solid #ddd;background:#fff;border-radius:10px;padding:4px 7px;font-size:12px;font-weight:900;cursor:pointer;opacity:1!important;transition:.15s}
.lang button.active{background:#29263d!important;color:#fff!important;border-color:#29263d!important;box-shadow:0 2px 8px #29263d33;transform:translateY(-1px)}
.lang button:hover{transform:translateY(-1px);border-color:#aaa}

/* FINAL RESPONSIVE / CART FIX */
html,body{width:100%;max-width:100%;overflow-x:hidden}
body.cart-open{overflow:hidden}

.drawer{right:-460px!important;left:auto!important;top:0!important;width:440px!important;max-width:calc(100vw - 16px)!important;height:100dvh!important;z-index:100!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch}
.drawer.on{right:0!important}
.shade{z-index:90!important}

.cats{width:100%;max-width:100%;overflow-x:auto;overflow-y:hidden;display:flex;flex-wrap:nowrap;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.cats::-webkit-scrollbar{display:none}
.cats button{flex:0 0 auto!important;display:inline-flex!important;align-items:center;justify-content:center;cursor:pointer}

@media(max-width:700px){
  header{width:100%!important;max-width:100%!important;padding:0 12px!important}
  nav{gap:6px!important;max-width:100%;overflow:hidden}
  .hero{width:100%!important;max-width:100%!important;padding:45px 20px!important;overflow:hidden}
  main{width:100%!important;max-width:100%!important;padding:35px 16px!important;overflow:hidden}
  .bar{width:100%;max-width:100%;display:block}
  .bar input{width:100%!important;max-width:100%!important}
  .grid{width:100%!important;max-width:100%!important;grid-template-columns:1fr!important}
  .card{width:100%!important;min-width:0!important}
  .drawer{
    width:min(440px,calc(100vw - 12px))!important;
    max-width:calc(100vw - 12px)!important;
    right:-100vw!important;
    padding:20px!important;
    border-radius:18px 0 0 18px;
  }
  .drawer.on{right:0!important}
  .cartline{gap:12px;align-items:flex-start}
  .cartline>div:first-child{min-width:0;overflow-wrap:anywhere}
  .cartline>b{white-space:nowrap}
  .details{padding:10px!important}
  .detailsbox{width:100%!important;max-width:100%!important;max-height:94dvh!important}
  .modal{padding:10px!important}
  .box{width:100%!important;max-width:100%!important;max-height:94dvh!important;overflow:auto}
}

/* HARD CLICK FIX */
#cats{position:relative!important;z-index:20!important;pointer-events:auto!important}
#cats button{position:relative!important;z-index:21!important;pointer-events:auto!important;touch-action:manipulation!important;cursor:pointer!important}

/* FINAL MOBILE INITIAL STATE FIX */
#drawer:not(.on){
  right:-110vw!important;
  left:auto!important;
  visibility:hidden!important;
  transform:translateX(0)!important;
  pointer-events:none!important;
}
#drawer.on{
  right:0!important;
  left:auto!important;
  visibility:visible!important;
  pointer-events:auto!important;
}
#shade:not(.on){
  display:none!important;
  pointer-events:none!important;
}
#shade.on{
  display:block!important;
  pointer-events:auto!important;
}
@media(max-width:700px){
  #drawer:not(.on){right:-110vw!important}
  #drawer.on{right:0!important}
}

/* CART HARD INITIAL STATE */
#drawer[hidden], #shade[hidden] { display:none !important; }
#drawer.on:not([hidden]) { display:block !important; }
#shade.on:not([hidden]) { display:block !important; }

/* LANGUAGE FLAGS ONLY */
.lang button{
  font-family:"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif!important;
  font-size:22px!important;
  line-height:1!important;
  min-width:44px!important;
  height:38px!important;
  padding:2px 8px!important;
  text-indent:0!important;
  overflow:visible!important;
}

/* HEADER MOBILE FIT ONLY */
@media(max-width:700px){
  header{
    width:100%!important;
    max-width:100%!important;
    overflow:hidden!important;
    padding:8px 10px!important;
  }
  header nav{
    display:flex!important;
    align-items:center!important;
    justify-content:flex-end!important;
    gap:6px!important;
    width:auto!important;
    min-width:0!important;
    overflow:visible!important;
    flex:1 1 auto!important;
  }
  header .logo{
    flex:0 0 auto!important;
    white-space:nowrap!important;
    margin-right:6px!important;
  }
  header nav > a{
    flex:0 1 auto!important;
    min-width:0!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    font-size:20px!important;
  }
  header .lang{
    flex:0 0 auto!important;
    gap:4px!important;
  }
  header .lang button{
    min-width:38px!important;
    width:38px!important;
    height:34px!important;
    font-size:19px!important;
    padding:1px 3px!important;
  }
  header nav > button:last-child{
    flex:0 0 44px!important;
    width:44px!important;
    min-width:44px!important;
    height:42px!important;
    padding:5px!important;
    margin:0!important;
  }
}

/* WILDBERRIES-STYLE MOBILE PRODUCT CARDS — visual only */
@media (max-width: 700px){
  main{padding:28px 14px 100px!important}
  .grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important;align-items:start!important}
  .card.wb-card{border:0!important;border-radius:18px!important;background:transparent!important;overflow:visible!important;min-width:0!important;box-shadow:none!important}
  .wb-media{position:relative;width:100%;aspect-ratio:1/1.08;background:#f2f2f5;border-radius:18px;overflow:hidden}
  .wb-media img{display:block!important;width:100%!important;height:100%!important;max-height:none!important;object-fit:cover!important;background:#f2f2f5;cursor:pointer}
  .wb-icon{position:absolute;top:8px;width:34px;height:34px;border:0;background:rgba(255,255,255,.96);border-radius:50%;font-size:22px;line-height:34px;padding:0;z-index:3;color:#1f1c29;box-shadow:0 2px 8px rgba(0,0,0,.08)}
  .wb-view{left:8px;font-size:17px}
  .wb-fav{right:8px;font-size:27px;font-family:Arial,sans-serif}
  .wb-badges{position:absolute;left:0;bottom:8px;display:flex;flex-direction:column;align-items:flex-start;gap:3px;z-index:2}
  .wb-badges span{background:#f5b7ff;color:#a336db;font-size:10px;font-weight:900;line-height:1;padding:6px 9px;border-radius:0 12px 12px 0;letter-spacing:.2px}
  .wb-cart{position:absolute;right:7px;bottom:7px;width:42px;height:42px;border:0;border-radius:15px;background:#9b35f5;color:#fff;font-size:23px;box-shadow:0 5px 14px rgba(111,30,180,.25);z-index:4;cursor:pointer}
  .wb-body{padding:7px 5px 4px!important}
  .wb-price-row{display:flex;align-items:center;min-height:27px}
  .wb-card .price{font-size:22px!important;line-height:1.05;color:#ef3d75;font-weight:900}
  .wb-category{display:block;color:#2b2838!important;font-size:14px!important;font-weight:800;margin:7px 0 2px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .wb-card h3{font-size:14px!important;line-height:1.22!important;font-weight:700;margin:0!important;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;color:#55515e}
  .wb-rating{font-size:12px;color:#55515e;margin-top:6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .wb-rating span{color:#ff9d18;font-size:17px;vertical-align:-1px}
  .wb-rating em{font-style:normal;color:#777}
  .wb-card p,.wb-card .stock,.wb-card .add{display:none!important}
}

/* FINAL: exactly 2 product columns on mobile */
@media (max-width:700px){
  main #grid.grid, main .products-grid {
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:12px!important;
    width:100%!important;
  }
  main #grid.grid > .card {
    width:auto!important;
    min-width:0!important;
  }
}

/* V4 CLEAN WILDBERRIES GRID */
.wb-view,.wb-fav{display:none!important}
@media (max-width:700px){
  main #grid.grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important}
  main #grid.grid>.card{width:auto!important;min-width:0!important}
}

/* V5 RESPONSIVE PRODUCT DESIGN
   Desktop and mobile intentionally use different card layouts.
*/
@media (min-width:701px){
  main{padding:48px 7% 80px!important}
  .grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:22px!important}
  .card.wb-card{border:1px solid #eee5d9!important;border-radius:22px!important;background:#fff!important;overflow:hidden!important;box-shadow:0 5px 18px rgba(41,38,61,.05)!important;transition:transform .18s,box-shadow .18s}
  .card.wb-card:hover{transform:translateY(-3px);box-shadow:0 12px 28px rgba(41,38,61,.10)!important}
  .wb-media{position:relative;width:100%;aspect-ratio:1/1;background:#f5f3f7;overflow:hidden}
  .wb-media img{display:block!important;width:100%!important;height:100%!important;max-height:none!important;object-fit:cover!important;background:#f5f3f7;cursor:pointer;transition:transform .25s}
  .card.wb-card:hover .wb-media img{transform:scale(1.035)}
  .wb-badges{position:absolute;left:0;bottom:12px;display:flex;flex-direction:column;gap:4px;z-index:2}
  .wb-badges span{background:#f5b7ff;color:#9b35d7;font-size:12px;font-weight:900;line-height:1;padding:7px 11px;border-radius:0 13px 13px 0}
  .wb-cart{position:absolute!important;right:10px!important;bottom:10px!important;width:46px!important;height:46px!important;border:0!important;border-radius:17px!important;background:#9b35f5!important;color:#fff!important;font-size:21px!important;line-height:1!important;box-shadow:0 7px 18px rgba(111,30,180,.28)!important;z-index:5!important;cursor:pointer!important;display:flex!important;align-items:center!important;justify-content:center!important;transition:transform .15s,background .15s!important}
  .wb-cart:hover{transform:scale(1.06);background:#8525e5!important}
  .wb-body{padding:14px 16px 17px!important}
  .wb-price-row{display:flex;align-items:center;min-height:31px}
  .wb-card .price{font-size:24px!important;line-height:1.05;color:#29263d;font-weight:900}
  .wb-category{display:block;color:#ff7544!important;font-size:13px!important;font-weight:900;margin:8px 0 3px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .wb-card h3{font-size:18px!important;line-height:1.25!important;font-weight:800;margin:0!important;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;color:#29263d}
  .wb-rating{font-size:13px;color:#666;margin-top:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .wb-rating span{color:#ff9d18;font-size:17px;vertical-align:-1px}
  .wb-rating em{font-style:normal;color:#777}
  .wb-view,.wb-fav{display:none!important}
}

@media (max-width:700px){
  /* Mobile remains the compact Wildberries-like 2-column version */
  main{padding:22px 14px 100px!important}
  .grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important}
  .card.wb-card{border:0!important;border-radius:18px!important;background:transparent!important;box-shadow:none!important}
  .wb-media{aspect-ratio:1/1.08!important}
  .wb-cart{display:flex!important;align-items:center!important;justify-content:center!important}
  header{height:64px!important}
  .hero{padding:34px 18px!important}
  .hero h1{font-size:clamp(36px,10vw,54px)!important}
}

/* FINAL STICKY HEADER: logo, language flags and cart stay visible while scrolling */
header{
  position:fixed!important;
  top:0!important;
  left:0!important;
  right:0!important;
  width:100%!important;
  max-width:100%!important;
  z-index:1000!important;
}
body{padding-top:76px!important}
@media(max-width:700px){
  header{height:64px!important;padding:8px 10px!important}
  body{padding-top:64px!important}
}

.success-modal{position:fixed;inset:0;background:rgba(41,38,61,.58);display:none;place-items:center;padding:20px;z-index:80;backdrop-filter:blur(3px)}.success-modal.on{display:grid}.success-box{position:relative;width:min(460px,100%);background:#fffaf2;border:1px solid #eee5d9;border-radius:28px;padding:38px 30px 30px;text-align:center;box-shadow:0 24px 70px rgba(41,38,61,.22);animation:successIn .22s ease-out}.success-close{position:absolute;right:16px;top:16px;border:0;background:#fff;color:#29263d;width:40px;height:40px;border-radius:12px;font-size:22px;cursor:pointer;box-shadow:0 4px 14px rgba(41,38,61,.08)}.success-icon{width:76px;height:76px;margin:0 auto 18px;border-radius:50%;display:grid;place-items:center;background:#ff7544;color:#fff;font-size:42px;font-weight:900;box-shadow:0 10px 28px rgba(255,117,68,.28)}.success-box h2{margin:0 0 12px;font-size:28px;line-height:1.15;color:#29263d}.success-box p{margin:0 0 24px;color:#777;font-size:18px;font-weight:700}.success-btn{width:100%;min-height:52px;font-size:16px}.success-box .primary{background:#ff7544}@keyframes successIn{from{opacity:0;transform:translateY(10px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}@media(max-width:600px){.success-modal{padding:14px}.success-box{border-radius:24px;padding:34px 20px 22px}.success-icon{width:68px;height:68px;font-size:36px}.success-box h2{font-size:24px}.success-box p{font-size:16px}}

/* PRODUCT DETAILS: keep the sticky header visible and keep the product dialog fully scrollable */
body.details-open{overflow:hidden!important}
.details{
  position:fixed!important;
  top:76px!important;
  left:0!important;
  right:0!important;
  bottom:0!important;
  width:100%!important;
  max-width:none!important;
  height:calc(100dvh - 76px)!important;
  padding:14px!important;
  overflow:hidden!important;
  align-items:center!important;
  justify-items:center!important;
}
.detailsbox{
  width:min(900px,100%)!important;
  max-width:900px!important;
  max-height:calc(100dvh - 104px)!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
}
.detailsbox>img{max-height:46dvh!important;object-fit:contain!important}
@media(max-width:700px){
  .details{
    top:64px!important;
    height:calc(100dvh - 64px)!important;
    padding:10px!important;
  }
  .detailsbox{
    width:100%!important;
    max-width:100%!important;
    max-height:calc(100dvh - 84px)!important;
    display:block!important;
    padding:16px!important;
    border-radius:20px!important;
    overflow-y:auto!important;
    overscroll-behavior:contain;
  }
  .detailsbox>img{
    display:block!important;
    width:100%!important;
    height:auto!important;
    max-height:36dvh!important;
    object-fit:contain!important;
    margin:0 auto 16px!important;
  }
  .detailsinfo{padding-bottom:8px!important}
  .detailsinfo h2{margin:6px 0 10px!important}
  .detailsinfo .bigprice{margin:14px 0!important}
  .qtybox{margin:14px 0!important}
  .detailsbuy,.buy-now{margin-bottom:10px!important}
}


/* PRODUCT DETAILS MOBILE: safe-area + always-visible purchase actions */
.detailsbox{scrollbar-gutter:stable;}
.details-actions{display:flex;flex-direction:column;gap:10px;}
.details-actions .detailsbuy,.details-actions .buy-now{margin-top:0!important;margin-bottom:0!important;}
@media(max-width:700px){
  .details{
    top:64px!important;
    height:calc(100dvh - 64px)!important;
    min-height:0!important;
    padding:10px 10px max(10px, env(safe-area-inset-bottom))!important;
    align-items:stretch!important;
  }
  .detailsbox{
    width:100%!important;
    max-width:100%!important;
    height:100%!important;
    max-height:none!important;
    min-height:0!important;
    display:block!important;
    padding:14px 16px calc(14px + env(safe-area-inset-bottom))!important;
    border-radius:22px!important;
    overflow-y:auto!important;
    overscroll-behavior:contain!important;
    -webkit-overflow-scrolling:touch!important;
    scroll-padding-bottom:calc(130px + env(safe-area-inset-bottom))!important;
  }
  .detailsbox>img{
    width:100%!important;
    height:min(31dvh,310px)!important;
    max-height:none!important;
    object-fit:contain!important;
    margin:0 auto 14px!important;
    border-radius:18px!important;
  }
  .detailsinfo{padding-bottom:0!important;}
  .detailsinfo h2{font-size:clamp(25px,7.2vw,34px)!important;line-height:1.08!important;margin:5px 0 9px!important;}
  .detailsinfo .desc{font-size:clamp(17px,4.7vw,22px)!important;line-height:1.45!important;}
  .detailsinfo .bigprice{font-size:clamp(28px,7.5vw,36px)!important;margin:12px 0!important;}
  .qtybox{margin:12px 0!important;}
  .details-actions{
    position:sticky!important;
    bottom:0!important;
    z-index:5!important;
    margin:12px -2px 0!important;
    padding:10px 2px calc(8px + env(safe-area-inset-bottom))!important;
    background:linear-gradient(to bottom,rgba(255,255,255,0),#fff 12px,#fff 100%)!important;
  }
  .details-actions .primary{
    width:100%!important;
    min-height:54px!important;
    flex:0 0 auto!important;
  }
  .details-close{top:10px!important;right:10px!important;}
}

/* CART DRAWER: never cover or slide underneath the fixed header */
.drawer{
  z-index:1100!important;
  top:76px!important;
  height:calc(100dvh - 76px)!important;
  max-height:calc(100dvh - 76px)!important;
  overflow-y:auto!important;
  -webkit-overflow-scrolling:touch!important;
  padding-bottom:max(28px, env(safe-area-inset-bottom))!important;
}
.shade{z-index:1050!important;top:76px!important;}
@media(max-width:700px){
  .drawer{
    top:64px!important;
    height:calc(100dvh - 64px)!important;
    max-height:calc(100dvh - 64px)!important;
    padding:18px 16px max(18px, env(safe-area-inset-bottom))!important;
  }
  .shade{top:64px!important;}
}

/* Custom in-site notice dialog: never use the browser's default alert popup */
.notice-modal{position:fixed;inset:0;background:rgba(41,38,61,.58);display:none;place-items:center;padding:20px;z-index:120;backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}
.notice-modal.on{display:grid}
.notice-box{position:relative;width:min(430px,100%);background:#fffaf2;border:1px solid #eee5d9;border-radius:26px;padding:34px 28px 26px;text-align:center;box-shadow:0 24px 70px rgba(41,38,61,.28);animation:noticeIn .2s ease-out}
.notice-close{position:absolute;right:14px;top:14px;width:40px;height:40px;border:0;background:#fff;border-radius:12px;color:#29263d;font-size:22px;cursor:pointer;box-shadow:0 4px 14px rgba(41,38,61,.08)}
.notice-icon{width:64px;height:64px;margin:0 auto 16px;border-radius:50%;display:grid;place-items:center;background:#ff7544;color:#fff;font-size:34px;font-weight:900;box-shadow:0 9px 24px rgba(255,117,68,.25)}
.notice-box h2{margin:0 0 10px;font-size:26px;line-height:1.15;color:#29263d}
.notice-box p{margin:0 0 22px;color:#666;font-size:18px;line-height:1.45;font-weight:700}
.notice-btn{width:100%;min-height:50px;font-size:16px}
@keyframes noticeIn{from{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}
body.notice-open{overflow:hidden}
@media(max-width:600px){.notice-modal{padding:16px}.notice-box{border-radius:24px;padding:32px 20px 20px}.notice-box h2{font-size:23px}.notice-box p{font-size:16px}.notice-icon{width:60px;height:60px;font-size:31px}}

/* CART MOBILE SCROLL ISOLATION
   When the cart drawer is open, the page behind it must not move. Only the
   drawer's contents may scroll. */
html:has(body.cart-open),
body.cart-open{
  overscroll-behavior:none!important;
}
body.cart-open{
  position:fixed!important;
  left:0!important;
  right:0!important;
  width:100%!important;
  overflow:hidden!important;
  touch-action:none!important;
}
.drawer.on{
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior:contain!important;
  -webkit-overflow-scrolling:touch!important;
  touch-action:pan-y!important;
  scrollbar-gutter:stable;
}
.shade.on{
  touch-action:none!important;
  overscroll-behavior:none!important;
}


/* Product code labels */
.wb-code{display:block;margin-top:6px;color:#777;font-size:14px;line-height:1.3;font-weight:500}
.detail-code{display:block;margin-top:4px;color:#777;font-size:15px;line-height:1.35;font-weight:500}



/* XSHOP FIX v2: keep the close button inside the product dialog and visible while scrolling */
.details .detailsbox{position:relative!important;}
.details .details-close{
  position:sticky!important;
  top:0!important;
  grid-column:1 / -1!important;
  justify-self:end!important;
  align-self:start!important;
  margin:0 0 -54px auto!important;
  z-index:20!important;
  width:48px!important;
  height:48px!important;
  min-width:48px!important;
  padding:0!important;
  display:grid!important;
  place-items:center!important;
  border:1px solid rgba(41,38,61,.09)!important;
  border-radius:15px!important;
  background:rgba(255,255,255,.98)!important;
  color:#29263d!important;
  font-size:24px!important;
  line-height:1!important;
  box-shadow:0 6px 20px rgba(41,38,61,.14)!important;
  cursor:pointer!important;
}
.details .details-close:hover{box-shadow:0 8px 24px rgba(41,38,61,.18)!important;}
@media(max-width:700px){
  .details .details-close{width:44px!important;height:44px!important;min-width:44px!important;margin-bottom:-44px!important;border-radius:13px!important;font-size:22px!important;}
}

/* Animated category side panel */
.search-tools{display:flex;align-items:center;gap:10px;min-width:0}
.category-open{flex:0 0 auto;border:0;border-radius:12px;padding:12px 15px;background:#29263d;color:#fff;font-weight:900;cursor:pointer;transition:transform .18s ease,background .18s ease}
.category-open:active{transform:scale(.97)}
.category-shade{position:fixed;inset:0;background:rgba(20,18,30,.52);z-index:1300;opacity:0;visibility:hidden;transition:opacity .28s ease,visibility .28s ease;backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px)}
.category-shade.on{opacity:1;visibility:visible}
.category-drawer{position:fixed;z-index:1301;left:0;top:0;bottom:0;width:min(390px,88vw);max-width:100%;background:#fff;border-radius:0 24px 24px 0;box-shadow:18px 0 55px rgba(0,0,0,.18);padding:22px 18px calc(22px + env(safe-area-inset-bottom));transform:translateX(-105%);visibility:hidden;transition:transform .32s cubic-bezier(.22,.8,.25,1),visibility .32s;display:flex;flex-direction:column;overflow:hidden}
.category-drawer.on{transform:translateX(0);visibility:visible}
.category-drawer-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 2px 16px;border-bottom:1px solid #eee;margin-bottom:8px;flex:0 0 auto}
.category-drawer-head h2{margin:0;font-size:23px;font-weight:900}
.category-close{width:42px;height:42px;border:0;border-radius:13px;background:#f3f2f6;color:#29263d;font-size:30px;line-height:1;cursor:pointer;flex:0 0 auto}
.category-drawer #cats{display:flex!important;flex-direction:column;align-items:stretch;gap:7px;overflow-y:auto;overflow-x:hidden;padding:8px 2px 20px;margin:0;min-height:0;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.category-drawer #cats button{width:100%;text-align:left;white-space:normal;border:0;border-radius:12px;background:#fff;padding:13px 14px;font-weight:800;color:#29263d;transition:background .18s ease,transform .18s ease}
.category-drawer #cats button:hover{background:#fff1e9}
.category-drawer #cats button.sel{background:#29263d;color:#fff}
body.categories-open{overflow:hidden}
@media(max-width:700px){.search-tools{width:100%;margin-top:10px}.search-tools input{flex:1;width:0!important;min-width:0}.bar{display:block}.category-drawer{width:min(360px,88vw);padding:18px 14px calc(18px + env(safe-area-inset-bottom))}.category-drawer-head h2{font-size:21px}}

/* Header search/category controls: left side, language/cart remain on the right */
header .header-search-tools{display:flex;align-items:center;gap:10px;flex:1 1 auto;min-width:0;margin-right:24px}
header .header-search-tools input{width:min(390px,42vw);min-width:120px;padding:12px 15px;border:1px solid #ddd;border-radius:12px;background:#fff;color:#29263d;outline:none}
header .header-search-tools input:focus{border-color:#b8b4cc;box-shadow:0 0 0 3px rgba(41,38,61,.07)}
header nav{flex:0 0 auto}
@media(max-width:700px){
  header{gap:8px!important}
  header .header-search-tools{gap:6px;flex:1 1 auto;min-width:0;margin-right:4px}
  header .header-search-tools .category-open{font-size:0!important;width:40px;min-width:40px;height:40px;padding:0!important;display:grid;place-items:center}
  header .header-search-tools .category-open:before{content:'☰';font-size:20px}
  header .header-search-tools input{flex:1 1 auto;width:0!important;min-width:0!important;max-width:none!important;padding:10px 8px;font-size:13px}
  header nav{flex:0 0 auto!important;gap:4px!important}
  header .lang button{min-width:32px!important;width:32px!important;height:32px!important;font-size:16px!important}
  header nav>button:last-child{flex:0 0 40px!important;width:40px!important;min-width:40px!important;height:40px!important;font-size:13px!important}
}

/* Admin-managed header brand text */
.header-brand{flex:0 1 auto;min-width:0;max-width:28%;margin-right:16px;font-size:clamp(16px,2vw,25px);font-weight:900;line-height:1.15;color:#29263d;overflow-wrap:anywhere}
.header-brand:empty{display:none}
.header-search-tools{flex:1 1 auto;min-width:0}
@media(max-width:700px){.header-brand{max-width:22%;font-size:14px;margin-right:8px}.header-search-tools{gap:6px}}
