/*
 * Theme TOTO — nạp sau assets/css/site.css.
 * Màu chủ đạo = var(--brand) (Admin → Cấu hình → Màu), nên 3 web dùng chung theme vẫn khác màu được.
 */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&family=Roboto+Slab:wght@400;700&display=swap');

:root {
    --font: 'Open Sans', system-ui, sans-serif;
    --slab: 'Roboto Slab', Georgia, serif;
    --ink: #333;
    --ink-2: #777;
    --line: #e6e6e6;
    --tile: #f4f4f4;
    --r-sm: 2px;
    --r-md: 3px;
    --wrap: 1200px;
    --header-h: 142px;   /* header + dải menu (dùng cho các khối "dính" khi cuộn) */
}

/* ---------- Thanh trên ---------- */
.topbar { background: #3b3530; color: #bbb; font-size: 14px; }
.topbar__in { min-height: 40px; gap: 22px; }
.topbar__links { display: flex; gap: 22px; margin-right: auto; }
.topbar__links a { color: #bbb; }
.topbar__links a:hover { color: #fff; }
.topbar__phone b { color: #eee; }
.topbar__phone a { color: #bbb; }

/* ---------- Header: logo · ô tìm kiếm giữa · giỏ hàng ---------- */
.header { background: #fff; border-bottom: 0; }
.header__in { min-height: 88px; gap: 32px; }
.logo img { max-height: 56px; }
.search { flex: 0 1 456px; margin: 0 auto; }
.search input { height: 48px; padding: 0 48px 0 16px; border: 1px solid var(--brand); border-right: 1px solid var(--brand); font-size: 15px; }
.search input:focus { border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 18%, transparent); }
.search button { position: absolute; right: 1px; top: 1px; height: 46px; width: 46px; background: transparent; color: #444; }
.search button svg { stroke-width: 2.4; }

.toto-cart { display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 48px; border: 1px dashed var(--brand); color: #333; font-family: var(--slab); font-weight: 700; text-transform: uppercase; font-size: 15px; white-space: nowrap; }
.toto-cart:hover { color: var(--brand); }
.toto-cart__icon { position: relative; display: grid; }
.toto-cart__icon svg { width: 26px; height: 26px; fill: none; stroke: #999; stroke-width: 1.5; }
.toto-cart__num { position: absolute; top: -8px; left: -6px; min-width: 20px; height: 20px; padding: 0 3px; border-radius: 10px; background: #333; color: #fff; font: 700 10px/20px var(--font); text-align: center; }

/* ---------- Dải menu: khối Danh mục + menu chính ---------- */
.tnav { background: #f4f4f4; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tnav__in { display: flex; align-items: stretch; min-height: 52px; }
.tnav__cats { position: relative; flex: 0 0 270px; background: #fff; border-inline: 1px solid var(--line); }
.tnav__cats-btn { display: flex; align-items: center; gap: 10px; height: 100%; padding: 0 18px; color: var(--brand); font-family: var(--slab); font-weight: 700; font-size: 16px; text-transform: uppercase; white-space: nowrap; }
.tnav__cats-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; }
.tnav__drop { position: absolute; top: 100%; left: -1px; right: -1px; z-index: 46; display: none; border-radius: 0; box-shadow: 0 10px 24px rgb(0 0 0 / .12); }
.tnav__cats:hover .tnav__drop, .tnav__cats:focus-within .tnav__drop { display: block; }
.tnav__drop .catnav__title, .toto-hero__cats .catnav__title { display: none; }

.tnav .nav { margin-left: auto; align-items: center; gap: 6px; }
.tnav .nav > * + .nav__link::before, .tnav .nav > * + .nav__drop > .nav__link::before { display: none; }
.tnav .nav__link { height: 32px; padding: 0 13px; border-radius: 2px; font-family: var(--slab); font-size: 15px; font-weight: 400; color: #555; }
.tnav .nav__link:hover { color: var(--brand); }
.tnav .nav__link.is-active { background: var(--brand); color: #fff; font-weight: 700; }
.tnav .nav__drop { align-items: center; }

/* ---------- Trang chủ: danh mục luôn hiện bên trái slider ---------- */
.toto-hero { display: grid; grid-template-columns: 270px 1fr; height: 420px; margin-top: 0; }
.toto-hero__cats { border-radius: 0; border-top: 0; overflow-y: auto; scrollbar-width: thin; }
.toto-hero__cats > ul > li > a { padding: 11px 18px 11px 50px; font-weight: 600; color: #444; }
.toto-hero__slider, .toto-hero__slider .stage { height: 100%; min-width: 0; }
.toto-hero .stage { background: #f4f4f4; }
.toto-hero .stage .slider__track { height: 100%; padding-inline: 0; gap: 0; }
.toto-hero .stage .slider__item { flex-basis: 100%; opacity: 1; }
.toto-hero .stage .slider__item img { height: 100%; aspect-ratio: auto; object-fit: cover; }
.toto-hero .stage__arrow { width: 24px; height: 80px; border-radius: 0; background: rgb(0 0 0 / .3); color: #fff; }
.toto-hero .stage__arrow--prev { left: 0; }
.toto-hero .stage__arrow--next { right: 0; }

/* 4 ô cam kết: nền xám, icon tròn xẫm, chữ in hoa */
.promises { margin-top: 30px; }
.promises ul { border: 0; gap: 30px; }
.promises li, .promises li + li { border: 0; padding: 0 16px 0 0; height: 50px; background: #f1f1f1; gap: 16px; }
.promises__icon { width: 50px; height: 50px; background: #555; }
.promises li > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.promises li > span:last-child, .promises li > span:last-child strong { display: inline; font-size: 14.5px; text-transform: uppercase; color: #333; font-weight: 600; }
.promises li > span:last-child strong, .promises a { color: var(--brand); }

.home-intro__title { font-family: var(--slab); }

/* ---------- Khối sản phẩm: khung viền, tiêu đề in hoa, lưới 6 cột ---------- */
.tsec { margin-top: 30px; }
.tsec > * { background: #fff; }
.tsec__head, .tgrid { border-inline: 1px solid var(--line); }
.tsec__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 15px 0; border-top: 1px solid var(--line); }
.tsec__head::after { content: none; }
.tsec__title { flex: 1; margin: 0; padding-bottom: 10px; border-bottom: 1px solid var(--line); font: 700 17px var(--slab); text-transform: uppercase; }
.tsec__title a { color: var(--brand); }
.tsec__more { padding-bottom: 10px; border-bottom: 1px solid var(--line); font-size: 13px; color: #888; white-space: nowrap; }
.tsec__more:hover { color: var(--brand); }
.tgrid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px 15px; padding: 15px 8px 18px; border-bottom: 1px solid var(--line); }

.tile--toto { border: 0; text-align: center; }
.tile--toto .tile__img { padding: 6px; }
.tile--toto .tile__body { padding: 4px 4px 8px; }
.tile--toto .tile__name { font-family: var(--slab); font-size: 15px; font-weight: 400; color: #555; margin: 4px 0 6px; }
.tile--toto .price { justify-content: center; gap: 2px 6px; }
.tile--toto .price strong { font-size: 17px; }
.tile--toto .price s { font-size: 12px; color: #aaa; }
.tile__buy button { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 40px; border: 1px dashed #bbb; background: #fff; color: #555; font: 400 15px var(--slab); text-transform: uppercase; cursor: pointer; }
.tile__buy svg { width: 15px; height: 15px; fill: currentColor; stroke: currentColor; }
.tile__buy button:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- Đăng ký nhận khuyến mãi trên ảnh nền ---------- */
.toto-news-letter { margin-top: 30px; padding: 100px 0 170px; text-align: center; background: linear-gradient(rgb(255 255 255 / .12), rgb(255 255 255 / .12)), var(--bg, #9aa) center / cover; }
.toto-news-letter h2 { margin: 0 0 10px; font-size: 44px; font-weight: 700; text-transform: uppercase; color: #fff; text-shadow: 0 2px 10px rgb(0 0 0 / .25); }
.toto-news-letter h2 span { color: var(--brand); }
.toto-news-letter form { display: flex; max-width: 590px; margin: 0 auto; }
.toto-news-letter input { flex: 1; min-width: 0; height: 40px; padding: 0 15px; border: 0; }
.toto-news-letter button { width: 105px; border: 0; background: var(--brand); color: #fff; text-transform: uppercase; font-size: 13px; cursor: pointer; }

/* ---------- Tin mới: tiêu đề đè trên ảnh ---------- */
.toto-posts { margin-top: 30px; }
.toto-posts__head { display: flex; align-items: flex-end; justify-content: space-between; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.toto-posts__head h2 { margin: 0; padding-bottom: 4px; font-size: 26px; font-weight: 700; text-transform: uppercase; color: #222; border-bottom: 3px solid var(--brand); }
.toto-posts__head h2 span { color: #888; }
.toto-posts__head a { font-size: 13px; color: #888; padding-bottom: 6px; }
.toto-posts__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.toto-post { position: relative; display: block; overflow: hidden; }
.toto-post img { width: 100%; aspect-ratio: 273 / 207; object-fit: cover; background: #f1f1f1; transition: transform .3s; }
.toto-post:hover img { transform: scale(1.04); }
.toto-post h3 { position: absolute; left: 10px; right: 10px; bottom: 0; margin: 0; padding: 8px 12px; background: rgb(0 0 0 / .65); color: #fff; font: 400 17px var(--slab); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Footer ---------- */
.footer { background: #333; color: #ddd; }
.footer__title { text-transform: none; letter-spacing: 0; font-weight: 600; font-size: 20px; }
.footer a { color: #ddd; }
.social-block a { border-radius: 3px; width: 36px; height: 36px; }
.social-block .facebook a { background: #3b5998; }
.social-block .twitter a { background: #1da1f2; }
.social-block .youtube a { background: #e52d27; }
.social-block .pinterest a { background: #cb2027; }
.footer__bottom { background: #2b2b2b; text-align: center; color: #bbb; }

/* ---------- Máy tính bảng / điện thoại ---------- */
@media (max-width: 1100px) {
    .tgrid { grid-template-columns: repeat(4, 1fr); }
    .toto-posts__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
    :root { --header-h: 60px; }
    .tnav, .toto-cart { display: none; }
    .header__in { min-height: 0; gap: 8px; padding-top: 8px; }
    .search { margin: 0 0 10px; }
    .toto-hero { grid-template-columns: 1fr; height: auto; }
    .toto-hero__cats { display: none; }
    .toto-hero .stage .slider__item img { height: auto; aspect-ratio: 2.4; }
    .promises ul { gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); } /* minmax(0): chữ dài không đẩy ô tràn màn hình */
    .promises li, .promises li + li { padding: 8px 10px; height: auto; min-height: 50px; }
    .promises li > span:last-child { white-space: normal; } /* điện thoại: cho xuống dòng thay vì cắt "…" */
    .promises li > span:last-child, .promises li > span:last-child strong { font-size: 13px; }
    .tgrid { grid-template-columns: repeat(2, 1fr); gap: 16px 8px; }
    .tile--toto .tile__name { font-size: 14px; }
    .toto-news-letter { padding: 50px 0 70px; }
    .toto-news-letter h2 { font-size: 26px; }
}

.tile--toto .price s { margin-left: 0; } /* TOTO: 2 giá căn giữa */
