/* am-skin.css — giao diện nâng cấp AccsMarket.net (v1, 22-11)
 * Giữ màu thương hiệu xanh #00764f. Phong cách "sàn giao dịch": góc vuông vức 8–12px, font Manrope (OFL, tự host /fonts),
 * bảng sản phẩm rõ ràng, tồn kho tô màu theo mức hàng, giá nổi bật. Chỉ ghi đè giao diện — không đụng logic / API / nội dung.
 * Gỡ: xoá thẻ <link> am-skin.css trong source-alerts.js (hoặc đặt AM_SKIN=0 trong .env). */

/* ---------- font ---------- */
@font-face{font-family:"Manrope";font-style:normal;font-display:swap;font-weight:200 800;src:url(/fonts/manrope-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:"Manrope";font-style:normal;font-display:swap;font-weight:200 800;src:url(/fonts/manrope-cyrillic.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:"Manrope";font-style:normal;font-display:swap;font-weight:200 800;src:url(/fonts/manrope-greek.woff2) format("woff2");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}
@font-face{font-family:"Manrope";font-style:normal;font-display:swap;font-weight:200 800;src:url(/fonts/manrope-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:"Manrope";font-style:normal;font-display:swap;font-weight:200 800;src:url(/fonts/manrope-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:"Manrope";font-style:normal;font-display:swap;font-weight:200 800;src:url(/fonts/manrope-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 ---------- */
html:root:not(.dark){
  --background:#f3f6f4;--border:#e1e8e3;--input:#d5dfd8;--muted:#eef3ef;--accent:#e4f3ec;--accent-foreground:#004d33;
  --foreground:#0d1f17;--card-foreground:#0d1f17;--muted-foreground:#56685f;--ring:#00a36c;
  --am-ink:#0a2219;--am-deep:#005c3d;--am-mint:#e4f3ec;--am-gold:#ffd25e;
  --am-sh:0 1px 0 rgba(10,34,25,.03),0 1px 3px rgba(10,34,25,.06);
  --am-sh-lg:0 1px 2px rgba(10,34,25,.05),0 12px 28px -14px rgba(0,92,61,.28);
}
html:root.dark{
  --foreground:#e8f0ec;--card-foreground:#e8f0ec;--popover-foreground:#e8f0ec;
  --background:#0a110e;--card:#111a16;--popover:#111a16;--border:rgba(255,255,255,.08);--input:rgba(255,255,255,.12);
  --muted:#16211c;--accent:#14261e;--accent-foreground:#9ee6c4;--muted-foreground:#94a89e;
  --am-ink:#050c09;--am-deep:#00a36c;--am-mint:#14261e;
  --am-sh:0 1px 0 rgba(0,0,0,.25);--am-sh-lg:0 1px 2px rgba(0,0,0,.3),0 14px 30px -14px rgba(0,0,0,.6);
}

html body{font-family:"Manrope",ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Noto Sans",sans-serif;-webkit-font-smoothing:antialiased;font-feature-settings:"tnum" 0}
html body .font-sans{font-family:inherit}
::selection{background:#00764f;color:#fff}

/* ---------- thanh khuyến mãi: xanh đậm + chữ vàng (thay dải cam-tím) ---------- */
html body #am-loyal-bar{background:linear-gradient(90deg,#062a1d 0%,#00543a 50%,#062a1d 100%)!important;color:#e6f6ee!important;font-weight:600;letter-spacing:.01em}
html body #am-loyal-bar b{color:var(--am-gold)!important}

/* ---------- header ---------- */
html body header.sticky{background:color-mix(in srgb,var(--card) 92%,transparent)!important;box-shadow:0 1px 0 var(--border)!important;border-bottom:0!important}
html body header.sticky>div:first-child{height:62px}
html body header a[aria-label^="Back to"] span.text-lg{font-size:19px!important;font-weight:800!important;letter-spacing:-.03em}
html body header input[aria-label="Search products"]{height:40px;border-radius:10px;background:var(--muted);border-color:transparent;font-size:14px;font-weight:500}
html body header input[aria-label="Search products"]:focus-visible,html body header input[aria-label="Search products"]:focus{background:var(--card);border-color:var(--primary);box-shadow:0 0 0 3px color-mix(in srgb,var(--primary) 16%,transparent)}
html body header a[href="#/seller"]{font-weight:700}
html body header button.border.bg-card,html body header a.border.bg-card{border-radius:9px}
@media (max-width:640px){html body header a[aria-label^="Back to"] span.text-lg{font-size:16.5px!important;letter-spacing:-.035em}html body header.sticky>div:first-child{gap:8px;height:58px}}

/* thanh danh mục */
html body #am-catbar{background:var(--card)!important;border-top:1px solid var(--border)!important}
html body #am-catbar #am-catbtn{border-radius:9px!important;background:var(--am-ink)!important;color:#fff!important;font-weight:700!important;box-shadow:none!important}
html.dark body #am-catbar #am-catbtn{background:#00764f!important}
html body #am-catbar #am-chips a{border-radius:8px!important;font-weight:600!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:9px!important;background:linear-gradient(135deg,#ffe08a,#ffc93c)!important;color:#3d2a00!important;font-weight:800!important;box-shadow:0 6px 14px -8px rgba(201,140,0,.8)!important}

/* ---------- khối danh mục trang chủ: ô vuông vức, điện thoại vuốt ngang ---------- */
html body #am-home-cats{border:1px solid var(--border)!important;border-radius:12px!important;background:var(--card)!important;box-shadow:var(--am-sh);padding:16px 16px 14px!important}
html body #am-home-cats h2{font-size:17px!important;font-weight:800!important;letter-spacing:-.02em;margin:0 0 12px!important}
html body #am-home-cats .am-pills{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(118px,1fr));gap:8px!important}
html body #am-home-cats a{display:grid!important;grid-template-columns:28px minmax(0,1fr);grid-template-rows:auto auto;column-gap:8px;min-height:56px;align-items:center;height:auto!important;
  padding:9px 10px!important;border-radius:10px!important;border:1px solid var(--border)!important;background:var(--card)!important;font-size:14px!important;font-weight:700!important;line-height:1.2;transition:border-color .15s,box-shadow .15s,transform .15s}
html body #am-home-cats a .am-pico{grid-row:1/3;width:28px!important;height:28px!important;border-radius:8px!important}
html body #am-home-cats a .am-pico svg{width:18px;height:18px}
html body #am-home-cats a>span:not(.am-pico):not(.am-cnt){grid-column:2;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:13px}
html body #am-home-cats a .am-cnt{grid-column:2;font-size:11.5px!important;font-weight:700!important;color:var(--muted-foreground)!important;margin-top:2px}
html body #am-home-cats a:hover{border-color:color-mix(in srgb,var(--primary) 55%,transparent)!important;box-shadow:var(--am-sh-lg)!important;transform:translateY(-1px)!important}
html body #am-home-cats a.am-all{grid-template-columns:minmax(0,1fr);background:var(--primary)!important;color:#fff!important;border-color:transparent!important;padding-left:14px!important}
html body #am-home-cats a.am-all .am-cnt{grid-column:1;color:rgba(255,255,255,.8)!important}
html.dark body #am-home-cats a.am-all{background:#00764f!important}
@media (max-width:640px){
  html body #am-home-cats{padding:14px 0 12px!important}
  html body #am-home-cats h2{padding:0 14px}
  html body #am-home-cats .am-pills{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto;scroll-snap-type:x mandatory;padding:0 14px 4px;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  html body #am-home-cats .am-pills::-webkit-scrollbar{display:none}
  html body #am-home-cats a{flex:0 0 auto;min-width:128px;max-width:170px;scroll-snap-align:start}
}

/* ---------- dải cam kết (khối "About" cũ) : gọn, đặt ngay dưới danh mục ---------- */
html body main>div.flex-col>section#am-home-cats{order:1!important}
html body main>div.flex-col>section[aria-label^="About"]:not(#am-aff-banner):not(#am-seo):not(.am-keep){order:2!important}
html body main>div.flex-col>div.flex-col{order:3!important}
html body main>div.flex-col>section#am-aff-banner{order:4!important}
html body main>div.flex-col>section#am-seo{order:6!important}
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:12px!important;box-shadow:var(--am-sh)!important;padding:14px 18px!important}
html body main section[aria-label^="About"].bg-gradient-to-r>div[aria-hidden]{display:none}
html body main section[aria-label^="About"] h2{font-size:15px!important;font-weight:800!important;letter-spacing:-.015em;color:var(--foreground)}
html body main section[aria-label^="About"] p{display:none}
html body main section[aria-label^="About"] ul li{background:var(--accent)!important;color:var(--accent-foreground)!important;border-radius:8px!important;font-weight:700!important;backdrop-filter:none!important}
html body main section[aria-label^="About"] ul li svg{color:var(--primary)}
@media (max-width:640px){
  html body main section[aria-label^="About"].bg-gradient-to-r{padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important;overflow:visible!important}
  html body main section[aria-label^="About"] h2,html body main section[aria-label^="About"] .max-w-xl{display:none}
  html body main section[aria-label^="About"] ul{flex-wrap:nowrap!important;overflow-x:auto;scrollbar-width:none;margin:0 -16px;padding:0 16px}
  html body main section[aria-label^="About"] ul::-webkit-scrollbar{display:none}
  html body main section[aria-label^="About"] ul li{flex:0 0 auto;white-space:nowrap;background:var(--card)!important;border:1px solid var(--border)}
  html body #am-home-cats a.am-all{min-width:92px}
}

/* ---------- bảng sản phẩm ---------- */
html body section.rounded-xl.overflow-hidden:has([aria-label^="Sort by"]){border-radius:12px!important;box-shadow:var(--am-sh)!important}
html body section.rounded-xl.overflow-hidden:has([aria-label^="Sort by"])>div:first-child{background:var(--card)!important;border-bottom:1px solid var(--border)!important;padding-top:12px;padding-bottom:12px}
html body section.rounded-xl.overflow-hidden:has([aria-label^="Sort by"])>div:first-child h2{position:relative;font-size:15.5px!important;font-weight:800!important;letter-spacing:-.02em;padding-left:12px}
html body section.rounded-xl.overflow-hidden:has([aria-label^="Sort by"])>div:first-child h2:before{content:"";position:absolute;left:0;top:2px;bottom:2px;width:3px;border-radius:3px;background:var(--primary)}
html body section.rounded-xl.overflow-hidden [aria-label^="Sort by"]{font-size:11.5px!important;text-transform:uppercase;letter-spacing:.06em;font-weight:700!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:0!important;border:0!important;box-shadow:none!important;position:relative;transition:background .12s}
html body section.rounded-xl.overflow-hidden:has([aria-label^="Sort by"]) div.group.rounded-xl:hover{background:color-mix(in srgb,var(--accent) 60%,transparent)!important}
html body section.rounded-xl.overflow-hidden:has([aria-label^="Sort by"]) div.group.rounded-xl:hover:before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--primary)}
html body section.rounded-xl.overflow-hidden div.group p.text-foreground\/90{font-size:14px!important;font-weight:560;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(--am-deep)!important}
/* nhãn 48h / sao / % / đã bán */
html body section.rounded-xl.overflow-hidden div.group .mt-2>span.rounded-md{border-radius:6px!important;font-weight:700!important;font-size:11px!important;padding:3px 7px!important}
/* tồn kho: ô màu theo mức hàng */
html body section.rounded-xl.overflow-hidden div.group button:has(>span.h-1\.5.rounded-full){padding:4px 10px;border-radius:999px;font-weight:700;font-size:12.5px;font-variant-numeric:tabular-nums}
html body section.rounded-xl.overflow-hidden div.group button:has(>span.bg-emerald-500){background:#e3f5ec;color:#00653f}
html body section.rounded-xl.overflow-hidden div.group button:has(>span.bg-amber-500){background:#fff3d6;color:#8a5a00}
html body section.rounded-xl.overflow-hidden div.group button:has(>span.bg-red-500){background:#ffe4e4;color:#b42318}
html body section.rounded-xl.overflow-hidden div.group button:has(>span.bg-destructive){background:var(--muted);color:var(--muted-foreground)}
html.dark body section.rounded-xl.overflow-hidden div.group button:has(>span.bg-emerald-500){background:rgba(16,185,129,.14);color:#6ee7b7}
html.dark body section.rounded-xl.overflow-hidden div.group button:has(>span.bg-amber-500){background:rgba(245,158,11,.14);color:#fcd34d}
html.dark body section.rounded-xl.overflow-hidden div.group button:has(>span.bg-red-500){background:rgba(239,68,68,.15);color:#fca5a5}
/* giá */
html body section.rounded-xl.overflow-hidden div.group span.whitespace-nowrap.font-bold{font-size:12.5px!important;font-weight:600!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:18px;font-weight:800;letter-spacing:-.02em;color:var(--primary);font-variant-numeric:tabular-nums;margin-left:2px}
html body section.rounded-xl.overflow-hidden div.group span.uppercase.tracking-wide{font-size:10px!important;letter-spacing:.08em!important;font-weight:700}
/* nút Mua */
html body main button.bg-primary,html body main a.bg-primary{border-radius:9px!important;font-weight:800!important;letter-spacing:.01em;background:linear-gradient(180deg,#00875a,#00764f)!important;box-shadow:0 1px 0 rgba(255,255,255,.18) inset,0 6px 14px -8px rgba(0,92,61,.9)!important;transition:transform .12s,box-shadow .12s,filter .12s}
html body main button.bg-primary:hover,html body main a.bg-primary:hover{filter:brightness(1.06);transform:translateY(-1px)}
html body main button.bg-primary:active{transform:none}
/* "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:color-mix(in srgb,var(--muted) 55%,var(--card))}
html body section.rounded-xl.overflow-hidden:has([aria-label^="Sort by"])>div.border-t>*{font-weight:800!important;border-radius:8px!important}
@media (max-width:767px){
  html body section.rounded-xl.overflow-hidden:has([aria-label^="Sort by"]) div.group.rounded-xl{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:17px}
}

/* ---------- banner affiliate ---------- */
html body #am-aff-banner{border-radius:12px!important}
html body #am-aff-banner .cta{background:linear-gradient(135deg,#ffe08a,#ffc93c)!important;color:#3d2a00!important;border-radius:9px!important;font-weight:800!important}
html body #am-aff-banner h2 b{color:var(--am-gold)!important}

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

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

/* ---------- nút nổi ---------- */
html body button.fixed.bottom-4.right-4,html body #am-myorders,html body .am-myorders{background:var(--am-ink)!important;color:#fff!important;border-radius:12px!important;box-shadow:0 12px 26px -12px rgba(10,34,25,.8)!important;font-weight:800!important}
html.dark body button.fixed.bottom-4.right-4,html.dark body #am-myorders{background:#00764f!important}

/* ---------- footer ---------- */
html body footer.mt-auto{background:var(--card)!important;border-top:1px solid var(--border)!important;margin-top:36px}
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:800!important;color:var(--foreground)!important}
html body footer.mt-auto a:hover{color:var(--primary)!important}
