/* sa-skin.css — giao diện nâng cấp SellAccs.net (v1, 22-11)
 * Giữ cam gạch thương hiệu; phong cách "chợ ấm": nền kem, nâu espresso, vàng hổ phách, nút/chip tròn, font Onest (OFL, tự host /fonts).
 * Chỉ ghi đè giao diện — không đụng logic / API / nội dung. Tắt: SA_SKIN=0 trong .env */

/* ---------- font ---------- */
@font-face{font-family:"Onest";font-style:normal;font-display:swap;font-weight:100 900;src:url(/fonts/onest-cyrillic-ext.woff2) format("woff2");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}
@font-face{font-family:"Onest";font-style:normal;font-display:swap;font-weight:100 900;src:url(/fonts/onest-cyrillic.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:"Onest";font-style:normal;font-display:swap;font-weight:100 900;src:url(/fonts/onest-vietnamese.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}
@font-face{font-family:"Onest";font-style:normal;font-display:swap;font-weight:100 900;src:url(/fonts/onest-latin-ext.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"Onest";font-style:normal;font-display:swap;font-weight:100 900;src:url(/fonts/onest-latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}

/* ---------- biến màu: cam gạch thương hiệu + nâu espresso + vàng hổ phách, nền kem ấm ---------- */
html:root:not(.dark){
  --background:#faf6f0;--card:#ffffff;--popover:#ffffff;--border:#eee4d6;--input:#e6dac8;
  --muted:#f6efe5;--accent:#fdf0e3;--accent-foreground:#8a2e07;
  --foreground:#1f1611;--card-foreground:#1f1611;--muted-foreground:#6f6052;--ring:#e8590c;
  --sa-ink:#1f1611;--sa-ink2:#2e211a;--sa-rust:#c2410c;--sa-rust2:#e8590c;--sa-amber:#ffb547;--sa-cream:#fbf4ea;
  --sa-sh:0 1px 2px rgba(60,35,15,.05),0 2px 8px -2px rgba(60,35,15,.06);
  --sa-sh-lg:0 2px 4px rgba(60,35,15,.05),0 16px 32px -16px rgba(160,60,10,.35);
}
html:root.dark{
  --foreground:#f3ebe3;--card-foreground:#f3ebe3;--popover-foreground:#f3ebe3;
  --background:#120d0a;--card:#1b1410;--popover:#1b1410;--border:rgba(255,235,215,.09);--input:rgba(255,235,215,.14);
  --muted:#221913;--accent:#2a1c13;--accent-foreground:#ffc79a;--muted-foreground:#b3a395;
  --sa-ink:#0b0806;--sa-ink2:#17110d;--sa-rust:#f07a3a;--sa-rust2:#ff8f4f;--sa-amber:#ffc266;--sa-cream:#221913;
  --sa-sh:0 1px 0 rgba(0,0,0,.3);--sa-sh-lg:0 2px 4px rgba(0,0,0,.35),0 16px 32px -16px rgba(0,0,0,.7);
}
html body{font-family:"Onest",ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Noto Sans",sans-serif;-webkit-font-smoothing:antialiased}
html body .font-sans{font-family:inherit}
::selection{background:#e8590c;color:#fff}

/* ---------- thanh khuyến mãi: nâu espresso + chữ hổ phách (thay dải cam-tím) ---------- */
html body #am-loyal-bar{background:var(--sa-ink)!important;color:#f3e7da!important;font-weight:500;letter-spacing:.005em;border-bottom:1px solid rgba(255,181,71,.18)}
html body #am-loyal-bar b{color:var(--sa-amber)!important;font-weight:700}

/* ---------- header ---------- */
html body header.sticky{background:color-mix(in srgb,var(--background) 88%,transparent)!important;box-shadow:none!important;border-bottom:1px solid var(--border)!important}
html body header a[aria-label^="Back to"] span.text-lg{font-size:19px!important;font-weight:750!important;letter-spacing:-.025em}
html body header input[aria-label="Search products"]{height:42px;border-radius:999px;background:var(--card);border-color:var(--border);font-size:14px;padding-left:40px;box-shadow:var(--sa-sh)}
html body header input[aria-label="Search products"]:focus{border-color:var(--sa-rust2);box-shadow:0 0 0 4px color-mix(in srgb,var(--sa-rust2) 15%,transparent)}
html body header nav a,html body header nav button{font-weight:550}
html body header button.border.bg-card,html body header a.border.bg-card{border-radius:999px;box-shadow:var(--sa-sh)}
@media (max-width:640px){html body header a[aria-label^="Back to"] span.text-lg{font-size:17px!important}html body header.sticky>div:first-child{gap:8px}}

/* thanh danh mục */
html body #am-catbar{background:transparent!important;border-top:0!important;border-bottom:1px solid var(--border)!important}
html body #am-catbar #am-catbtn{border-radius:999px!important;background:var(--sa-ink)!important;color:#fff!important;font-weight:650!important;box-shadow:0 6px 14px -8px rgba(31,22,17,.6)!important}
html.dark body #am-catbar #am-catbtn{background:var(--sa-rust)!important}
html body #am-catbar #am-chips a{border-radius:999px!important;font-weight:550!important;transition:background .15s,color .15s}
html body #am-catbar #am-chips a:hover{background:var(--accent)!important;color:var(--accent-foreground)!important}
html body #am-catbar #am-aff-pill{border-radius:999px!important;background:linear-gradient(135deg,#ffcf70,#ffa53a)!important;color:#3b1d05!important;font-weight:750!important;box-shadow:0 8px 18px -10px rgba(230,120,10,.9)!important}

/* ---------- danh mục trang chủ: kệ chip tròn, điện thoại vuốt ngang ---------- */
html body #am-home-cats{border:0!important;background:transparent!important;box-shadow:none!important;padding:4px 0 0!important}
html body #am-home-cats h2{font-size:20px!important;font-weight:750!important;letter-spacing:-.025em;margin:0 0 12px!important}
html body #am-home-cats .am-pills{display:flex!important;flex-wrap:wrap;gap:8px!important}
html body #am-home-cats a{border-radius:999px!important;border:1px solid var(--border)!important;background:var(--card)!important;box-shadow:var(--sa-sh);padding:6px 8px 6px 6px!important;height:auto!important;font-weight:600!important;font-size:14px!important;gap:8px!important;transition:border-color .15s,box-shadow .15s,transform .15s}
html body #am-home-cats a .am-pico{width:30px!important;height:30px!important;border-radius:999px!important}
html body #am-home-cats a .am-cnt{min-width:24px;text-align:center;padding:2px 7px;border-radius:999px;background:var(--muted);color:var(--muted-foreground)!important;font-size:11.5px!important;font-weight:700!important}
html body #am-home-cats a:hover{border-color:color-mix(in srgb,var(--sa-rust2) 55%,transparent)!important;box-shadow:var(--sa-sh-lg)!important;transform:translateY(-1px)}
html body #am-home-cats a.am-all{background:var(--sa-rust)!important;color:#fff!important;border-color:transparent!important;padding:6px 8px 6px 16px!important}
html body #am-home-cats a.am-all .am-cnt{background:rgba(255,255,255,.2);color:#fff!important}
@media (max-width:640px){
  html body #am-home-cats .am-pills{flex-wrap:nowrap!important;overflow-x:auto;margin:0!important;padding:2px 0 8px!important;scrollbar-width:none;-webkit-overflow-scrolling:touch;scroll-snap-type:x proximity}
  html body #am-home-cats .am-pills::-webkit-scrollbar{display:none}
  html body #am-home-cats a{flex:0 0 auto;white-space:nowrap;scroll-snap-align:start}
  html body #am-home-cats h2{font-size:18px!important}
}

/* ---------- bảng sản phẩm ---------- */
html body section.rounded-xl.overflow-hidden:has([aria-label^="Sort by"]){border-radius:16px!important;box-shadow:var(--sa-sh)!important;border-color:var(--border)!important}
html body section.rounded-xl.overflow-hidden:has([aria-label^="Sort by"])>div:first-child{background:var(--sa-cream)!important;border-bottom:1px solid var(--border)!important;padding-top:13px;padding-bottom:13px}
html body section.rounded-xl.overflow-hidden:has([aria-label^="Sort by"])>div:first-child h2{display:inline-flex;align-items:center;gap:8px;font-size:14px!important;font-weight:750!important;letter-spacing:.06em;color:var(--foreground)}
html body section.rounded-xl.overflow-hidden:has([aria-label^="Sort by"])>div:first-child h2:before{content:"";width:8px;height:8px;border-radius:999px;background:var(--sa-rust2);box-shadow:0 0 0 4px color-mix(in srgb,var(--sa-rust2) 18%,transparent)}
html body section.rounded-xl.overflow-hidden [aria-label^="Sort by"]{font-size:12px!important;font-weight:650!important;border-radius:999px!important}
/* dòng sản phẩm */
html body section.rounded-xl.overflow-hidden:has([aria-label^="Sort by"]) div.group.rounded-xl{border-radius:12px!important;margin:4px 6px;transition:background .15s,box-shadow .15s}
html body section.rounded-xl.overflow-hidden:has([aria-label^="Sort by"]) div.group.rounded-xl:hover{background:var(--sa-cream)!important;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--sa-rust2) 22%,transparent)}
html body section.rounded-xl.overflow-hidden div.group p.text-foreground\/90{font-size:14.5px!important;font-weight:500;color:var(--foreground)!important;line-height:1.45}
html body section.rounded-xl.overflow-hidden div.group span.group-hover\:underline{text-decoration:none!important}
html body section.rounded-xl.overflow-hidden div.group:hover p.text-foreground\/90{color:var(--sa-rust)!important}
html body section.rounded-xl.overflow-hidden div.group .mt-2>span.rounded-md{border-radius:999px!important;font-weight:600!important;font-size:11px!important;padding:2px 8px!important}
/* tồn kho: chữ đậm màu theo mức hàng */
html body section.rounded-xl.overflow-hidden div.group button:has(>span.h-1\.5.rounded-full){font-weight:700;font-size:13px;font-variant-numeric:tabular-nums;gap:7px}
html body section.rounded-xl.overflow-hidden div.group button>span.h-1\.5.rounded-full{width:8px!important;height:8px!important}
html body section.rounded-xl.overflow-hidden div.group button:has(>span.bg-emerald-500){color:#15803d}
html body section.rounded-xl.overflow-hidden div.group button:has(>span.bg-amber-500){color:#b45309}
html body section.rounded-xl.overflow-hidden div.group button:has(>span.bg-red-500){color:#c81e1e}
html body section.rounded-xl.overflow-hidden div.group button:has(>span.bg-emerald-500)>span{box-shadow:0 0 0 3px rgba(16,185,129,.18)}
html body section.rounded-xl.overflow-hidden div.group button:has(>span.bg-amber-500)>span{box-shadow:0 0 0 3px rgba(245,158,11,.2)}
html body section.rounded-xl.overflow-hidden div.group button:has(>span.bg-red-500)>span{box-shadow:0 0 0 3px rgba(239,68,68,.2)}
html.dark body section.rounded-xl.overflow-hidden div.group button:has(>span.bg-emerald-500){color:#6ee7b7}
html.dark body section.rounded-xl.overflow-hidden div.group button:has(>span.bg-amber-500){color:#fcd34d}
html.dark body section.rounded-xl.overflow-hidden div.group button:has(>span.bg-red-500){color:#fca5a5}
/* giá */
html body section.rounded-xl.overflow-hidden div.group span.whitespace-nowrap.font-bold{font-size:12.5px!important;font-weight:500!important;color:var(--muted-foreground)!important}
html body section.rounded-xl.overflow-hidden div.group span.whitespace-nowrap.font-bold>span.text-primary{font-size:18.5px;font-weight:750;letter-spacing:-.02em;color:var(--sa-rust);font-variant-numeric:tabular-nums;margin-left:3px}
html body section.rounded-xl.overflow-hidden div.group span.uppercase.tracking-wide{font-size:10px!important;letter-spacing:.1em!important;font-weight:600;opacity:.85}
/* nút Mua: viên tròn, có mũi tên */
html body main button.bg-primary,html body main a.bg-primary{border-radius:999px!important;font-weight:700!important;background:linear-gradient(135deg,#e8590c,#c2410c)!important;box-shadow:0 8px 16px -10px rgba(194,65,12,.95)!important;transition:transform .12s,box-shadow .12s,filter .12s}
html body main section.rounded-xl.overflow-hidden div.group button.bg-primary{padding-left:18px!important;padding-right:14px!important}
html body main section.rounded-xl.overflow-hidden div.group button.bg-primary:after{content:"→";margin-left:6px;font-weight:600;transition:transform .15s;display:inline-block}
html body main section.rounded-xl.overflow-hidden div.group:hover button.bg-primary:after{transform:translateX(2px)}
html body main button.bg-primary:hover,html body main a.bg-primary:hover{filter:brightness(1.06);transform:translateY(-1px);box-shadow:0 12px 20px -10px rgba(194,65,12,.95)!important}
/* "Xem tất cả N sản phẩm" */
html body section.rounded-xl.overflow-hidden:has([aria-label^="Sort by"])>div.border-t{background:var(--card)}
html body section.rounded-xl.overflow-hidden:has([aria-label^="Sort by"])>div.border-t>*{font-weight:700!important;border-radius:999px!important}
/* cột giá + nút rộng hơn để giá to không bị nút đè (áp cả dòng tiêu đề để chữ Price thẳng cột) */
@media (min-width:768px){
  html body section.rounded-xl.overflow-hidden:has([aria-label^="Sort by"]) div.group.rounded-xl,
  html body section.rounded-xl.overflow-hidden:has([aria-label^="Sort by"])>div:first-child{grid-template-columns:48px minmax(0,1fr) 84px 96px 140px 136px!important}
}
@media (max-width:767px){
  html body section.rounded-xl.overflow-hidden:has([aria-label^="Sort by"]) div.group.rounded-xl{margin:2px 4px;padding-top:14px;padding-bottom:14px}
  html body section.rounded-xl.overflow-hidden div.group span.whitespace-nowrap.font-bold>span.text-primary{font-size:17.5px}
}

/* ---------- banner affiliate: espresso + ánh cam ---------- */
html body #am-aff-banner{border-radius:20px!important;background:radial-gradient(120% 140% at 100% 0%,rgba(232,89,12,.55) 0%,rgba(232,89,12,0) 55%),var(--sa-ink2)!important;color:#fff!important;box-shadow:var(--sa-sh-lg)}
html body #am-aff-banner h2 b{background:var(--sa-amber)!important;color:#3b1d05!important}
html body #am-aff-banner .cta{background:linear-gradient(135deg,#ffcf70,#ffa53a)!important;color:#3b1d05!important;border-radius:999px!important;font-weight:750!important}
html body #am-aff-banner .chips span,html body #am-aff-banner li{border-radius:999px!important}

/* ---------- khối "About": thẻ kem sáng, chip cam (thay khối cam chói) ---------- */
html body main section[aria-label^="About"].bg-gradient-to-r{background:var(--card)!important;color:var(--foreground)!important;border:1px solid var(--border);border-radius:20px!important;box-shadow:var(--sa-sh)!important}
html body main section[aria-label^="About"].bg-gradient-to-r>div[aria-hidden]{background:color-mix(in srgb,var(--sa-rust2) 10%,transparent)!important}
html body main section[aria-label^="About"] h2{color:var(--foreground);letter-spacing:-.02em;font-weight:750!important}
html body main section[aria-label^="About"] p{color:var(--muted-foreground)!important}
html body main section[aria-label^="About"] ul li{background:var(--accent)!important;color:var(--accent-foreground)!important;font-weight:650!important;backdrop-filter:none!important}
html body main section[aria-label^="About"] ul li svg{color:var(--sa-rust2)}

/* ---------- SEO / FAQ ---------- */
html body #am-seo{border-radius:20px!important;box-shadow:var(--sa-sh)}
html body #am-seo h2,html body #am-seo h3{letter-spacing:-.02em}

/* ---------- thẻ chung, trang danh mục / sản phẩm ---------- */
html body main h1{letter-spacing:-.025em;font-weight:750}
html body .shadow-card{box-shadow:var(--sa-sh)}
html body .am-card{border-radius:16px!important;box-shadow:var(--sa-sh)}
html body .am-card:hover{border-color:color-mix(in srgb,var(--sa-rust2) 50%,transparent)!important;box-shadow:var(--sa-sh-lg)!important}
html body #am-shop .am-side,html body #am-shop .am-empty{border-radius:16px!important}
html body #am-shop .am-qbox,html body #am-shop select{border-radius:999px!important}

/* ---------- nút nổi ---------- */
html:root{--sa-fab:#1f1611;--sa-fab-sh:0 14px 28px -12px rgba(31,22,17,.75)}
html:root.dark{--sa-fab:linear-gradient(135deg,#e8590c,#c2410c);--sa-fab-sh:0 14px 28px -12px rgba(0,0,0,.8)}
html body button.fixed.bottom-4.right-4,html body #am-myorders,html body .am-myorders{background:var(--sa-ink)!important;color:#fff!important;border-radius:999px!important;box-shadow:0 14px 28px -14px rgba(31,22,17,.85)!important;font-weight:700!important}
html.dark body button.fixed.bottom-4.right-4,html.dark body #am-myorders,html.dark body .am-myorders{background:var(--sa-rust)!important}

/* ---------- footer ---------- */
html body footer.mt-auto{background:var(--sa-cream)!important;border-top:1px solid var(--border)!important;margin-top:40px}
html body footer.mt-auto p.font-semibold,html body footer.mt-auto h2,html body footer.mt-auto h3{letter-spacing:.08em;font-weight:750!important;color:var(--foreground)!important}
html body footer.mt-auto a:hover{color:var(--sa-rust)!important}
