/* =====================================================================
   A6STOREZ - TEMU-STYLE MARKETPLACE LAYOUT
   Brand colours: deep green + gold (not Temu orange).
   Loaded from header.php so it applies to every page.
===================================================================== */
:root{
  --g-900:#063B25;
  --g-800:#0A5A39;
  --g-700:#0E7A47;
  --g-600:#147A43;
  --g-100:#E7F4EC;
  --g-50:#F2F9F5;
  --gold:#F5B82E;
  --gold-d:#D99A0B;
  --gold-l:#FFF3CF;
  --red:#E5383B;
  --ink:#17231B;
  --muted:#6B7770;
  --line:#E6EBE7;
  --bg:#F4F6F4;
  --card:#FFFFFF;
  --radius:14px;
  --shadow:0 2px 10px rgba(6,59,37,.08);
  --wrap:1280px;
}

html{scroll-behavior:smooth}
body{
  background:var(--bg)!important;
  color:var(--ink);
  font-family:Inter,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  -webkit-font-smoothing:antialiased;
  padding-bottom:0;
}
img{max-width:100%}
.tm-wrap{max-width:var(--wrap);margin:0 auto;padding:0 12px}

/* ---------- old chrome is replaced by the new header ---------- */
.top,.nav,.mobile-menu,.menu-toggle{display:none!important}
.pwa-bottom-nav{display:none!important}

/* ---------- ANNOUNCEMENT BAR ---------- */
.tm-announce{
  background:linear-gradient(90deg,var(--g-900),var(--g-700));
  color:#fff;font-size:12.5px;font-weight:600;
  height:34px;overflow:hidden;position:relative;
}
.tm-announce-track{height:34px}
.tm-announce-item{
  height:34px;line-height:34px;text-align:center;padding:0 10px;
  position:absolute;inset:0;opacity:0;transition:opacity .5s;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.tm-announce-item.on{opacity:1}
.tm-announce b{color:var(--gold)}

/* ---------- HEADER ---------- */
.tm-header{
  position:sticky;top:0;z-index:900;background:#fff;
  box-shadow:0 1px 0 var(--line);
}
.tm-head-row{
  display:flex;align-items:center;gap:10px;
  max-width:var(--wrap);margin:0 auto;padding:9px 12px;
}
.tm-logo{display:flex;align-items:center;flex:0 0 auto}
.tm-logo img{height:38px;width:auto;border-radius:8px;display:block}
.tm-search{
  flex:1;display:flex;align-items:center;min-width:0;
  border:2px solid var(--g-700);border-radius:999px;background:#fff;overflow:hidden;
}
.tm-search input{
  flex:1;min-width:0;border:0;outline:0;background:transparent;
  padding:10px 14px;font-size:14px;color:var(--ink);
}
.tm-search button{
  border:0;background:linear-gradient(135deg,var(--gold),var(--gold-d));
  color:var(--g-900);font-weight:800;padding:0 18px;height:38px;margin:2px;
  border-radius:999px;cursor:pointer;display:flex;align-items:center;gap:6px;font-size:14px;
}
.tm-search button svg{width:18px;height:18px}
.tm-actions{display:flex;align-items:center;gap:4px;flex:0 0 auto}
.tm-act{
  position:relative;display:flex;flex-direction:column;align-items:center;gap:2px;
  padding:4px 10px;color:var(--ink);font-size:11px;font-weight:600;border-radius:10px;
}
.tm-act:hover{background:var(--g-50)}
.tm-act svg{width:24px;height:24px}
.tm-badge{
  position:absolute;top:0;right:4px;min-width:17px;height:17px;padding:0 4px;
  background:var(--red);color:#fff;border-radius:99px;font-size:10px;line-height:17px;
  text-align:center;font-weight:800;
}
.tm-badge[data-zero="1"]{display:none}

/* category rail */
.tm-rail{background:#fff;border-top:1px solid var(--line)}
.tm-rail-in{
  max-width:var(--wrap);margin:0 auto;padding:0 8px;
  display:flex;gap:4px;overflow-x:auto;scrollbar-width:none;
}
.tm-rail-in::-webkit-scrollbar{display:none}
.tm-rail a{
  flex:0 0 auto;padding:10px 12px;font-size:13.5px;font-weight:600;color:#33433A;
  border-bottom:3px solid transparent;white-space:nowrap;
}
.tm-rail a:hover,.tm-rail a.on{color:var(--g-700);border-bottom-color:var(--gold)}
.tm-rail a.hot{color:var(--red)}

/* ---------- BOTTOM TAB BAR (mobile) ---------- */
.tm-bottom{display:none}
@media(max-width:820px){
  body{padding-bottom:72px!important}
  .tm-bottom{
    display:flex;position:fixed;left:0;right:0;bottom:0;z-index:950;background:#fff;
    border-top:1px solid var(--line);padding:6px 4px calc(6px + env(safe-area-inset-bottom));
    justify-content:space-around;box-shadow:0 -4px 16px rgba(6,59,37,.07);
  }
  .tm-bottom a,.tm-bottom button{
    flex:1;display:flex;flex-direction:column;align-items:center;gap:2px;position:relative;
    font-size:10.5px;font-weight:700;color:#5C6B63;background:none;border:0;padding:2px 0;
    font-family:inherit;cursor:pointer;
  }
  .tm-bottom svg{width:23px;height:23px}
  .tm-bottom .on{color:var(--g-700)}
  .tm-bottom .tm-spin-tab span.ico{
    width:42px;height:42px;margin-top:-22px;border-radius:50%;display:flex;align-items:center;
    justify-content:center;background:linear-gradient(135deg,var(--gold),var(--gold-d));
    box-shadow:0 4px 12px rgba(217,154,11,.5);color:var(--g-900);border:3px solid #fff;
  }
  .tm-bottom .tm-badge{top:-2px;right:calc(50% - 22px)}
  .tm-actions .tm-act span.lbl{display:none}
  .tm-act-hide-m{display:none!important}
  .whatsapp-float{bottom:86px!important;right:12px!important;width:46px!important;height:46px!important;font-size:22px!important}
}

/* ---------- HERO CAROUSEL ---------- */
.tm-hero{margin-top:10px;position:relative}
.tm-hero-track{
  display:flex;overflow-x:auto;scroll-snap-type:x mandatory;gap:10px;
  scrollbar-width:none;border-radius:var(--radius);
}
.tm-hero-track::-webkit-scrollbar{display:none}
.tm-slide{
  flex:0 0 100%;scroll-snap-align:center;border-radius:var(--radius);overflow:hidden;
  min-height:190px;padding:22px 20px;display:flex;align-items:center;justify-content:space-between;
  gap:14px;color:#fff;position:relative;text-decoration:none;
}
.tm-slide h2{margin:0 0 6px;font-size:clamp(22px,5vw,38px);line-height:1.08;font-weight:900;letter-spacing:-.5px}
.tm-slide p{margin:0 0 14px;font-size:clamp(13px,2.6vw,16px);opacity:.92;max-width:430px}
.tm-slide .tm-cta{
  display:inline-block;background:var(--gold);color:var(--g-900);font-weight:900;
  padding:10px 20px;border-radius:999px;font-size:14px;
}
.tm-slide-1{background:linear-gradient(120deg,var(--g-900),var(--g-700) 70%,#1c9a5c)}
.tm-slide-2{background:linear-gradient(120deg,#2b1a00,#8a5b00 60%,var(--gold-d))}
.tm-slide-3{background:linear-gradient(120deg,#0b3d2a,#147A43 55%,#7bc67e)}
.tm-slide-art{
  flex:0 0 auto;width:min(36%,230px);aspect-ratio:1;display:flex;align-items:center;justify-content:center;
}
.tm-slide-art img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 10px 18px rgba(0,0,0,.35));border-radius:14px}
.tm-slide-art .big{font-size:clamp(70px,16vw,130px);line-height:1}
.tm-dots{display:flex;gap:6px;justify-content:center;margin-top:8px}
.tm-dots i{width:7px;height:7px;border-radius:99px;background:#c9d3cd;transition:.3s}
.tm-dots i.on{width:20px;background:var(--g-700)}

/* ---------- TRUST STRIP ---------- */
.tm-trust{
  display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-top:10px;
}
.tm-trust div{
  background:#fff;border-radius:12px;padding:10px 8px;display:flex;align-items:center;gap:8px;
  font-size:11.5px;font-weight:700;line-height:1.25;box-shadow:var(--shadow);
}
.tm-trust svg{flex:0 0 22px;width:22px;height:22px;color:var(--g-700)}
.tm-trust small{display:block;font-weight:500;color:var(--muted);font-size:10.5px}
@media(max-width:700px){
  .tm-trust{grid-template-columns:repeat(2,1fr)}
}

/* ---------- SECTION BLOCKS ---------- */
.tm-sec{margin-top:14px;background:#fff;border-radius:var(--radius);padding:14px 12px;box-shadow:var(--shadow)}
.tm-sec-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px;flex-wrap:wrap}
.tm-sec-title{margin:0;font-size:18px;font-weight:900;color:var(--g-900);display:flex;align-items:center;gap:8px}
.tm-sec-more{font-size:13px;font-weight:700;color:var(--g-700)}

/* flash */
.tm-flash{background:linear-gradient(180deg,#FFF6DC,#fff 55%)}
.tm-flash .tm-sec-title{color:#8a5200}
.tm-timer{display:flex;align-items:center;gap:4px;font-size:12px;font-weight:700;color:#8a5200}
.tm-timer b{
  background:var(--g-900);color:#fff;border-radius:6px;padding:4px 6px;min-width:26px;
  text-align:center;font-variant-numeric:tabular-nums;font-size:13px
}
.tm-hscroll{
  display:flex;gap:10px;overflow-x:auto;scroll-snap-type:x proximity;padding-bottom:6px;
  scrollbar-width:thin;
}
.tm-hscroll .tm-card{flex:0 0 150px;scroll-snap-align:start}
@media(min-width:700px){.tm-hscroll .tm-card{flex-basis:190px}}

/* categories (round icons) */
.tm-cats{display:grid;grid-template-columns:repeat(5,1fr);gap:12px 6px}
.tm-cat{display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center}
.tm-cat-img{
  width:100%;max-width:76px;aspect-ratio:1;border-radius:50%;overflow:hidden;background:var(--g-50);
  display:flex;align-items:center;justify-content:center;border:2px solid var(--g-100);font-size:28px;
}
.tm-cat-img img{width:100%;height:100%;object-fit:cover}
.tm-cat span.n{font-size:11.5px;font-weight:700;line-height:1.2;color:#2a3a31;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
@media(min-width:760px){.tm-cats{grid-template-columns:repeat(10,1fr)}.tm-cat-img{max-width:88px}}

/* spend more save more */
.tm-sms{
  background:linear-gradient(120deg,var(--g-900),var(--g-700));color:#fff;border-radius:var(--radius);
  padding:14px;margin-top:14px;
}
.tm-sms h3{margin:0 0 2px;font-size:17px;font-weight:900}
.tm-sms h3 b{color:var(--gold)}
.tm-sms p{margin:0 0 12px;font-size:12.5px;opacity:.9}
.tm-sms-tiers{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.tm-tier{
  background:rgba(255,255,255,.12);border:1px dashed rgba(245,184,46,.7);border-radius:12px;
  padding:9px 4px;text-align:center;
}
.tm-tier em{display:block;font-style:normal;font-size:10.5px;opacity:.85}
.tm-tier strong{display:block;font-size:15px;color:var(--gold);font-weight:900;margin-top:2px}
.tm-tier small{display:block;font-size:10px;opacity:.85;margin-top:1px}
@media(max-width:480px){.tm-sms-tiers{grid-template-columns:repeat(2,1fr)}}

/* smart buy chips */
.tm-smart{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.tm-smart a{
  background:var(--g-50);border:1px solid var(--g-100);border-radius:12px;padding:10px 6px;
  text-align:center;font-size:11.5px;font-weight:800;color:var(--g-900);display:flex;
  flex-direction:column;gap:4px;align-items:center;
}
.tm-smart a i{font-style:normal;font-size:24px}
@media(min-width:760px){.tm-smart{grid-template-columns:repeat(9,1fr)}}

/* ---------- PRODUCT GRID + CARD ---------- */
.tm-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}
@media(min-width:640px){.tm-grid{grid-template-columns:repeat(3,1fr);gap:10px}}
@media(min-width:960px){.tm-grid{grid-template-columns:repeat(4,1fr)}}
@media(min-width:1180px){.tm-grid{grid-template-columns:repeat(5,1fr)}}

.tm-card{
  background:#fff;border-radius:12px;overflow:hidden;display:flex;flex-direction:column;
  border:1px solid var(--line);transition:box-shadow .2s,transform .2s;min-width:0;
}
.tm-card:hover{box-shadow:0 8px 22px rgba(6,59,37,.14);transform:translateY(-2px)}
.tm-card-img{
  position:relative;display:block;aspect-ratio:1/1;background:#f1f4f2;overflow:hidden;
}
.tm-card-img img{width:100%;height:100%;object-fit:cover;display:block}
.tm-card-noimg{display:flex;width:100%;height:100%;align-items:center;justify-content:center;font-size:44px}
.tm-tag{
  position:absolute;left:0;top:8px;background:linear-gradient(90deg,var(--g-800),var(--g-600));
  color:#fff;font-size:10.5px;font-weight:800;padding:3px 9px 3px 7px;
  border-radius:0 99px 99px 0;letter-spacing:.2px;
}
.tm-tag-off{background:linear-gradient(90deg,#c62828,var(--red))}
.tm-card-body{padding:8px 9px 10px;display:flex;flex-direction:column;gap:5px;flex:1}
.tm-card-title{
  font-size:13px;line-height:1.3;color:var(--ink);font-weight:500;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:34px;
}
.tm-lowstock{font-size:11px;font-weight:800;color:var(--red)}
.tm-card-bottom{display:flex;align-items:flex-end;justify-content:space-between;gap:6px;margin-top:auto}
.tm-price{display:flex;flex-direction:column;line-height:1.15;min-width:0}
.tm-price strong{font-size:16px;font-weight:900;color:var(--g-800);white-space:nowrap}
.tm-price del{font-size:11px;color:#9AA59E;margin-top:1px}
.tm-addbtn{
  flex:0 0 auto;display:inline-flex;align-items:center;gap:1px;border:0;cursor:pointer;
  background:linear-gradient(135deg,var(--gold),var(--gold-d));color:var(--g-900);
  border-radius:999px;padding:7px 11px;font-weight:900;font-size:15px;line-height:1;
}
.tm-addbtn span{font-size:13px}
.tm-addbtn:active{transform:scale(.94)}
.tm-addbtn-opts{font-size:11.5px;padding:8px 11px;background:var(--g-100);color:var(--g-800)}

/* ---------- SHOP PAGE ---------- */
.tm-shophead{display:flex;justify-content:space-between;align-items:flex-end;gap:10px;margin:14px 0 8px;flex-wrap:wrap}
.tm-shophead h1{margin:0;font-size:22px;font-weight:900;color:var(--g-900)}
.tm-shophead p{margin:2px 0 0;font-size:13px;color:var(--muted)}
.tm-sort{
  border:1px solid var(--line);background:#fff;border-radius:999px;padding:9px 14px;font-size:13px;
  font-weight:700;color:var(--ink);font-family:inherit
}
.tm-chips{display:flex;gap:8px;overflow-x:auto;padding:4px 0 10px;scrollbar-width:none}
.tm-chips::-webkit-scrollbar{display:none}
.tm-chips a{
  flex:0 0 auto;padding:8px 15px;border-radius:999px;background:#fff;border:1px solid var(--line);
  font-size:13px;font-weight:700;color:#33433A
}
.tm-chips a.on{background:var(--g-800);color:#fff;border-color:var(--g-800)}
.tm-empty{background:#fff;border-radius:var(--radius);padding:40px 16px;text-align:center}
.tm-btn{
  display:inline-block;background:linear-gradient(135deg,var(--gold),var(--gold-d));color:var(--g-900);
  font-weight:900;border-radius:999px;padding:12px 24px;border:0;cursor:pointer;font-size:15px
}
.tm-pager{display:flex;justify-content:center;gap:6px;margin:18px 0;flex-wrap:wrap}
.tm-pager a,.tm-pager span{
  min-width:38px;height:38px;display:flex;align-items:center;justify-content:center;border-radius:99px;
  background:#fff;border:1px solid var(--line);font-weight:800;font-size:13px;padding:0 12px
}
.tm-pager .on{background:var(--g-800);color:#fff;border-color:var(--g-800)}

/* ---------- FOOTER ---------- */
.tm-footer{background:var(--g-900);color:#dfeee5;margin-top:26px;padding:26px 0 18px}
.tm-footer-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:22px;max-width:var(--wrap);margin:0 auto;padding:0 14px}
.tm-footer h4{margin:0 0 10px;color:var(--gold);font-size:14px;font-weight:900}
.tm-footer p,.tm-footer li,.tm-footer a{font-size:13px;line-height:1.7;color:#cfe3d6}
.tm-footer ul{list-style:none;margin:0;padding:0}
.tm-footer a:hover{color:#fff;text-decoration:underline}
.tm-footer-bar{
  max-width:var(--wrap);margin:18px auto 0;padding:14px 14px 0;border-top:1px solid rgba(255,255,255,.14);
  font-size:12px;color:#a9c5b4;display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap
}
@media(max-width:760px){.tm-footer-grid{grid-template-columns:1fr 1fr}}

/* ---------- SPIN WHEEL ---------- */
.tm-spin-fab{
  position:fixed;left:12px;bottom:20px;z-index:940;border:0;cursor:pointer;
  background:linear-gradient(135deg,var(--gold),var(--gold-d));color:var(--g-900);
  border-radius:999px;padding:10px 16px;font-weight:900;font-size:13px;
  box-shadow:0 6px 18px rgba(217,154,11,.5);display:flex;align-items:center;gap:7px;font-family:inherit;
  animation:tmPulse 2.4s infinite;
}
@keyframes tmPulse{0%,100%{transform:scale(1)}50%{transform:scale(1.06)}}
@media(max-width:820px){.tm-spin-fab{display:none}}

.tm-modal{
  position:fixed;inset:0;z-index:2000;background:rgba(5,25,16,.72);display:none;
  align-items:center;justify-content:center;padding:14px;overflow-y:auto;
}
.tm-modal.open{display:flex}
.tm-modal-box{
  background:linear-gradient(180deg,#0b4a2f,#063B25);color:#fff;border-radius:22px;
  width:100%;max-width:400px;padding:22px 18px 20px;text-align:center;position:relative;
  box-shadow:0 20px 60px rgba(0,0,0,.5);border:2px solid var(--gold);
}
.tm-modal-x{
  position:absolute;right:10px;top:8px;background:rgba(255,255,255,.14);color:#fff;border:0;
  width:32px;height:32px;border-radius:50%;font-size:18px;cursor:pointer;line-height:1
}
.tm-modal h3{margin:0 0 4px;font-size:22px;font-weight:900;color:var(--gold)}
.tm-modal p.sub{margin:0 0 14px;font-size:13px;opacity:.9}
.tm-wheel-wrap{position:relative;width:min(300px,76vw);aspect-ratio:1;margin:0 auto 14px}
.tm-wheel-pointer{
  position:absolute;top:-10px;left:50%;transform:translateX(-50%);z-index:3;
  width:0;height:0;border-left:13px solid transparent;border-right:13px solid transparent;
  border-top:24px solid var(--gold);filter:drop-shadow(0 2px 3px rgba(0,0,0,.5));
}
.tm-wheel{
  width:100%;height:100%;border-radius:50%;border:6px solid var(--gold);position:relative;
  transition:transform 5s cubic-bezier(.12,.7,.1,1);box-shadow:0 0 0 4px rgba(255,255,255,.15),0 8px 26px rgba(0,0,0,.45);
  overflow:hidden;
}
.tm-wheel svg{width:100%;height:100%;display:block}
.tm-wheel-hub{
  position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:54px;height:54px;border-radius:50%;
  background:var(--gold);color:var(--g-900);font-weight:900;font-size:12px;display:flex;align-items:center;
  justify-content:center;z-index:2;border:4px solid #fff;box-shadow:0 3px 10px rgba(0,0,0,.4)
}
.tm-spin-go{width:100%}
.tm-spin-go[disabled]{opacity:.6;cursor:default}
.tm-result{
  margin-top:12px;background:rgba(255,255,255,.1);border-radius:12px;padding:12px;font-size:14px;display:none
}
.tm-result.show{display:block}
.tm-result code{
  display:inline-block;margin:6px 0;background:#fff;color:var(--g-900);font-weight:900;font-size:18px;
  padding:6px 14px;border-radius:8px;letter-spacing:1px
}
.tm-result a{color:var(--gold);font-weight:800}

/* ---------- CART PROGRESS (spend more save more) ---------- */
.tm-cartbar{
  background:linear-gradient(120deg,var(--g-900),var(--g-700));color:#fff;border-radius:var(--radius);
  padding:13px 14px;margin:0 0 14px;
}
.tm-cartbar strong{color:var(--gold)}
.tm-cartbar .t{font-size:14px;font-weight:700;margin-bottom:9px;line-height:1.35}
.tm-prog{height:10px;background:rgba(255,255,255,.2);border-radius:99px;overflow:hidden}
.tm-prog i{display:block;height:100%;background:linear-gradient(90deg,var(--gold),#ffe08a);border-radius:99px;transition:width .6s}
.tm-cartbar .steps{display:flex;justify-content:space-between;font-size:10.5px;opacity:.85;margin-top:6px}

/* ---------- RESTYLE OF EXISTING PAGES ---------- */
.container{max-width:var(--wrap)!important;margin:0 auto!important;padding-left:12px!important;padding-right:12px!important}
.btn{
  background:linear-gradient(135deg,var(--gold),var(--gold-d))!important;color:var(--g-900)!important;
  border:0!important;border-radius:999px!important;font-weight:900!important;cursor:pointer
}
.btn.secondary{background:#fff!important;border:1.5px solid var(--g-700)!important;color:var(--g-700)!important}
.card{border-radius:12px!important;border:1px solid var(--line)!important;box-shadow:none!important;background:#fff}
input,select,textarea{font-family:inherit}
input:focus,select:focus,textarea:focus{outline:2px solid var(--gold);outline-offset:0;border-color:var(--g-700)!important}
h1,h2,h3{letter-spacing:-.2px}
.whatsapp-float{background:#25D366}

/* product page: sticky buy area on phones */
@media(max-width:820px){
  .product-actions,.product-buy-actions{position:relative}
}

/* ---------- DESKTOP POLISH ---------- */
@media(min-width:821px){
  .tm-search{max-width:640px;margin:0 auto}
  .tm-slide{min-height:260px;padding:30px 40px}
  .tm-hero-track{scroll-snap-type:x mandatory}
}
@media(max-width:520px){
  .tm-logo img{height:32px}
  .tm-search input{padding:9px 10px;font-size:13px}
  .tm-search button{padding:0 12px}
  .tm-search button .w{display:none}
  .tm-act-user{display:none!important}
}
