/*
 * Giao diện Sơn Hà Miền Bắc — theo bố cục web cũ sonhamienbac.com
 * Đỏ: thanh menu, tên khối, giá, nhãn giảm giá · Xanh lá: thanh tiêu đề khối · Xanh dương: ô dịch vụ trang chủ
 * Nạp SAU assets/css/site.css (ghi đè giao diện gốc).
 */
:root {
    --sh-red: #d71920;
    --sh-red-dark: #b3141a;
    --sh-green: #1a8a1a;
    --sh-blue: #1f72b8;
    --brand: var(--sh-red);
    --brand-ink: #fff;
    --ink: #333;
    --ink-2: #777;
    --line: #e3e3e3;
    --font: Arial, Helvetica, "Segoe UI", sans-serif;
    --wrap: 1320px; /* khung toàn trang: width 100%, max-width 1320px (.wrap ở site.css) */
    --header-h: 0px;
}
body { font-size: 14px; color: var(--ink); }
a:hover { color: var(--sh-red); }

/* ---------- Header ---------- */
.sh-header { background: #fff; position: relative; z-index: 40; }
.sh-header__in { display: flex; align-items: flex-start; gap: 14px; min-height: 72px; padding-top: 8px; }
.sh-header__in > * { min-width: 0; }
.sh-header__menu { display: none; }
.sh-logo { flex: none; }
.sh-logo img { max-height: 54px; width: auto; }
.sh-search { flex: 0 1 340px; margin: 4px 0 0; }
.sh-phones, .sh-toplinks, .sh-cart { flex: none; white-space: nowrap; }
.sh-search input { height: 26px; border: 1px solid #1f4e8c; border-right: 0; border-radius: 3px 0 0 3px; font-size: 12px; padding: 0 8px; }
.sh-search button { height: 26px; width: 30px; background: #fff; color: #1f4e8c; border: 1px solid #1f4e8c; border-left: 0; border-radius: 0 3px 3px 0; }
.sh-phones { display: grid; gap: 0; line-height: 1.35; }
.sh-phones a { display: flex; align-items: center; gap: 6px; color: var(--sh-red); font-weight: 700; font-size: 14px; }
.sh-phones svg { width: 16px; height: 16px; color: #1f72b8; }
.sh-slogan { color: var(--sh-green); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.sh-toplinks { display: flex; gap: 14px; margin: 8px 0 0 auto; font-size: 12px; }
.sh-toplinks a { color: #444; position: relative; }
.sh-hot { display: inline-block; margin-left: 3px; padding: 0 3px; font-size: 9px; line-height: 13px; font-weight: 700; color: #fff; background: var(--sh-red); border-radius: 2px; vertical-align: top; animation: sh-blink 1s steps(2) infinite; }
@keyframes sh-blink { 50% { background: #f5a623; } }
.sh-cart { display: flex; align-items: stretch; background: #222; color: #fff; border-radius: 2px; overflow: hidden; margin-top: 0; }
.sh-cart:hover { color: #fff; }
.sh-cart__text { padding: 5px 8px; font-size: 11px; }
.sh-cart__icon { position: relative; background: #1f72b8; display: grid; place-items: center; padding: 0 8px; }
.sh-cart__icon svg { width: 20px; height: 20px; }
.sh-cart .badge { display: none; }

/* Thanh menu đỏ */
.sh-nav { background: var(--sh-red); position: sticky; top: 0; z-index: 45; box-shadow: 0 2px 6px rgb(0 0 0 / .15); }
.sh-nav__in { display: flex; flex-wrap: nowrap; justify-content: space-between; }
.sh-nav__link { display: block; padding: 0 10px; line-height: 44px; color: #fff; font-size: 12px; font-weight: 700; text-transform: uppercase; white-space: nowrap; }
.sh-nav__link:hover, .sh-nav__link.is-active, .sh-nav__drop:hover > .sh-nav__link { background: var(--sh-red-dark); color: #fff; }
.sh-nav__link--caret::after { content: "▾"; margin-left: 4px; font-size: 10px; }
.sh-nav__drop { position: relative; }
.sh-nav__sub { display: none; position: absolute; left: 0; top: 100%; min-width: 250px; background: #fff; box-shadow: 0 6px 18px rgb(0 0 0 / .15); border-top: 3px solid var(--sh-red-dark); z-index: 50; }
.sh-nav__drop:hover .sh-nav__sub, .sh-nav__drop:focus-within .sh-nav__sub { display: block; }
.sh-nav__sub a { display: block; padding: 9px 14px; font-size: 14px; border-bottom: 1px solid #f0f0f0; }
.sh-nav__sub a:hover { background: #fdf0f0; }

/* ---------- Trang chủ ---------- */
.sh-hero { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr); gap: 12px; margin-top: 12px; }
.sh-hero--full { grid-template-columns: minmax(0, 1fr); }
.sh-hero__side img { width: 100%; height: 100%; object-fit: cover; }
.sh-hero .stage { background: none; }
.sh-hero .stage .slider__track { padding-inline: 0; gap: 0; }
.sh-hero .stage .slider__item { flex: 0 0 100%; opacity: 1; }
.sh-hero .stage .slider__item img { aspect-ratio: 1000 / 400; }
.sh-hero .stage__arrow--prev { left: 8px; }
.sh-hero .stage__arrow--next { right: 8px; }

.sh-services { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 12px; background: var(--sh-blue); color: #fff; padding-inline: 0; max-width: calc(var(--wrap) - 32px); }
.sh-services > div { display: flex; align-items: center; gap: 8px; padding: 10px 8px; }
.sh-services > div + div { border-left: 1px solid rgb(255 255 255 / .25); }
.sh-services__icon { flex: 0 0 42px; height: 42px; border-radius: 50%; background: #fff; color: var(--sh-blue); display: grid; place-items: center; }
.sh-services__icon svg { width: 24px; height: 24px; }
.sh-services p { margin: 0; font-size: 12.5px; line-height: 1.5; }
.sh-services b { display: block; text-transform: uppercase; font-size: 12.5px; }

/* ---------- Khối sản phẩm: thanh xanh lá, tên khối nền đỏ ---------- */
.sh-block { margin-top: 24px; }
.sh-block__bar { display: flex; align-items: stretch; flex-wrap: wrap; background: var(--sh-green); min-height: 42px; }
.sh-block__title { display: flex; align-items: center; padding: 0 18px; background: var(--sh-red); color: #fff; font-size: 15px; font-weight: 700; text-transform: uppercase; position: relative; }
.sh-block__title a { color: #fff; }
.sh-block__title::after { content: ""; position: absolute; right: -14px; top: 0; border-style: solid; border-width: 42px 14px 0 0; border-color: var(--sh-red) transparent transparent transparent; }
.sh-block__bar--plain .sh-block__title { background: none; text-transform: none; font-weight: 400; font-size: 17px; }
.sh-block__bar--plain .sh-block__title::after { display: none; }
.sh-block__title { flex: none; }
.sh-block__links { flex: 1; min-width: 0; display: flex; flex-wrap: nowrap; overflow: hidden; align-items: center; padding-left: 22px; }
.sh-block__links a { flex: none; color: #fff; font-size: 12px; text-transform: uppercase; padding: 0 8px; border-left: 1px solid rgb(255 255 255 / .5); line-height: 1.2; white-space: nowrap; }
.sh-block__bar--sale .sh-block__title { font-weight: 700; text-transform: uppercase; font-size: 13px; }
.sh-block__links a:first-child { border-left: 0; }
.sh-block__links a:hover { color: #ffe08a; }

.sh-grid { display: grid; gap: 0; border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
.sh-grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.sh-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sh-block__bar + .sh-grid { border-top: 0; }

/* ---------- Ô sản phẩm ---------- */
.sh-card { min-width: 0; display: flex; flex-direction: column; padding: 6px 6px 12px; background: #fff; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: box-shadow .2s; }
.sh-card:hover { box-shadow: 0 0 12px rgb(0 0 0 / .18); position: relative; z-index: 1; }
.sh-card__img { position: relative; display: block; }
.sh-card__img img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.sh-card__off { position: absolute; left: 4px; top: 4px; width: 44px; height: 44px; border-radius: 50%; background: var(--sh-red); color: #fff; font-weight: 700; font-size: 15px; display: grid; place-items: center; }
.sh-card__stock { position: absolute; right: 4px; bottom: 4px; background: #555; color: #fff; font-size: 12px; padding: 1px 6px; border-radius: 2px; }
/* Nhãn HOT (SP khuyến mãi) — ngôi sao răng cưa đỏ góc phải như web cũ */
.sh-card__hot { position: absolute; right: 6px; top: 6px; width: 40px; height: 40px; display: grid; place-items: center; color: #fff; font: 700 11px/1 Arial, sans-serif; transform: rotate(18deg);
    background: var(--sh-red); clip-path: polygon(50% 0, 61% 12%, 75% 6%, 78% 21%, 93% 25%, 88% 39%, 100% 50%, 88% 61%, 93% 75%, 78% 79%, 75% 94%, 61% 88%, 50% 100%, 39% 88%, 25% 94%, 22% 79%, 7% 75%, 12% 61%, 0 50%, 12% 39%, 7% 25%, 22% 21%, 25% 6%, 39% 12%); }
/* Rê chuột: lớp xanh lá phủ cả ô — mô tả ngắn + CHI TIẾT / ĐẶT HÀNG (chỉ máy tính có chuột) */
.sh-card { position: relative; }
.sh-card__over { display: none; }
@media (hover: hover) and (min-width: 901px) {
    .sh-card__over {
        position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; padding: 12px 10px 10px;
        background: rgb(26 150 26 / .93) repeating-linear-gradient(45deg, rgb(255 255 255 / .05) 0 6px, transparent 6px 12px);
        color: #fff; font-size: 12px; line-height: 1.6; opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s;
    }
    .sh-card:hover .sh-card__over { opacity: 1; visibility: visible; }
}
.sh-card__brief { flex: 1; overflow: hidden; }
.sh-card__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.sh-card__btns form { display: contents; }
.sh-card__btns a, .sh-card__btns button { display: block; padding: 7px 4px; background: #fff; color: var(--sh-green); border: 0; font: 700 12px/1.2 Arial, sans-serif; text-transform: uppercase; text-align: center; cursor: pointer; }
.sh-card__btns a:hover, .sh-card__btns button:hover { background: #ffe9a8; color: var(--sh-green); }
.sh-card.is-out .sh-card__img img { opacity: .55; }
.sh-card__name { margin: 10px 0 0; font-size: 13px; font-weight: 700; line-height: 1.5; color: #333; min-height: 39px; }
.sh-card__name a:hover { color: var(--sh-red); }
.sh-card__price { margin-top: auto; padding-top: 10px; display: flex; align-items: baseline; justify-content: space-between; gap: 6px; flex-wrap: wrap; }
.sh-card__price s { color: #888; font-size: 12px; white-space: nowrap; }
.sh-card__price strong { margin-left: auto; color: var(--sh-red); font-size: 16px; font-weight: 700; white-space: nowrap; }

/* ---------- Danh sách sản phẩm: cột lọc trái ---------- */
.sh-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 20px; align-items: start; margin-bottom: 30px; }
.sh-side { border-right: 1px solid var(--line); padding: 4px 16px 20px 4px; }
.sh-side__box + .sh-side__box { margin-top: 18px; }
.sh-side__title { font-size: 14px; font-weight: 700; margin-bottom: 6px; color: #333; }
.sh-side__links, .sh-side__checks { list-style: none; margin: 0; padding: 0 0 0 14px; }
.sh-side__links a, .sh-side__checks a { display: block; font-size: 13px; color: #444; padding: 2px 0; }
.sh-side__links a.is-current { color: var(--sh-red); font-weight: 700; }
.sh-side__checks a { position: relative; padding-left: 20px; padding-block: 4px; }
.sh-side__checks a::before { content: ""; position: absolute; left: 0; top: 7px; width: 13px; height: 13px; border: 1px solid #aaa; border-radius: 2px; background: linear-gradient(#fff, #e9e9e9); }
.sh-side__checks a.is-on { color: var(--sh-red); font-weight: 700; }
.sh-side__checks a.is-on::before { background: var(--sh-red); border-color: var(--sh-red); }
.sh-side__checks a.is-on::after { content: ""; position: absolute; left: 4px; top: 9px; width: 5px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.sh-side__reset { display: inline-block; margin-top: 16px; color: var(--sh-red); font-size: 13px; }
.sh-side .side-banners { margin-top: 18px; }
.sh-main { min-width: 0; }
.sh-cat-banner { width: 100%; margin: 10px 0 4px; }
.sh-heading { margin-bottom: 0; min-height: 54px; }
.sh-heading .sh-block__title { font-size: 20px; text-transform: uppercase; }
.sh-filter-btn { display: none; margin: auto 10px auto auto; border: 1px solid #fff; background: none; color: #fff; padding: 4px 12px; border-radius: 3px; cursor: pointer; }
.sh-main > .sh-grid, .sh-main > .empty { margin-top: 0; }
.sh-main > .prose { margin: 14px 0; }
.sh-block--sub { margin-top: 18px; }
.sh-block--sub .sh-block__title { font-size: 16px; }
.sh-more { display: block; text-align: right; margin-top: 8px; color: var(--sh-green); font-weight: 700; font-size: 13px; }
.sh-more:hover { color: var(--sh-red); }
.sh-main .pagination { margin-top: 18px; }

/* ---------- Footer ---------- */
.sh-footer { margin-top: 40px; border-top: 1px solid var(--line); background: #fff; color: #444; font-size: 14px; }
.sh-footer__stores { padding-block: 26px 18px; border-bottom: 1px solid var(--line); }
.sh-footer__stores h3, .sh-footer__stores h4 { color: #1f72b8; font-size: 16px; margin: 0 0 10px; }
.sh-footer__stores .sh-stores { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; }
.sh-footer__stores p { margin: 0; line-height: 1.6; }
.sh-footer__main { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 30px; padding-block: 26px; }
.sh-footer__main:has(> :only-child) { grid-template-columns: minmax(0, 1fr); }
.sh-footer__about img { max-width: 260px; height: auto; }
.sh-footer__about p { margin: 0 0 4px; }
.sh-footer__policies { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 4px; }
.sh-footer__policies a { color: #444; }
.sh-footer__policies a:hover { color: var(--sh-red); }
.sh-footer__map iframe { width: 100%; height: 300px; border: 0; }
.sh-footer__bottom { background: var(--sh-red); color: #fff; font-size: 13px; padding: 10px 0; }
.sh-hotline { position: fixed; left: 0; bottom: 0; z-index: 54; background: var(--sh-red); color: #fff; padding: 6px 16px; font-size: 17px; font-weight: 700; }
.sh-hotline b { font-size: 21px; }
.sh-hotline:hover { color: #fff; background: var(--sh-red-dark); }

/* ---------- Trang chi tiết sản phẩm: ảnh | thông tin | SP bán chạy ---------- */
.sh-pd { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 10px; align-items: start; margin-bottom: 30px; }
.sh-pd__top { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1fr); gap: 20px; margin-bottom: 14px; }
.sh-pd__gallery { position: static; }
.sh-pd__gallery .gallery__main { position: relative; border: 0; }
.sh-pd__gallery .gallery__main img { padding: 0; }
.sh-pd__off { left: 4px; top: 4px; width: 52px; height: 52px; font-size: 17px; }
.sh-pd__name { font-size: 18px; font-weight: 700; text-transform: uppercase; color: #333; margin: 4px 0 12px; }
.sh-pd__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 6px; }
.sh-pd__label { font-style: italic; font-size: 12px; color: #555; }
.sh-pd__price strong { color: var(--sh-red); font-size: 24px; font-style: italic; }
.sh-pd__price s { color: #777; font-style: italic; }
.sh-pd__price small { font-size: 10px; font-style: italic; color: #555; }
.sh-pd__meta { list-style: none; margin: 0 0 6px; padding: 0; display: grid; grid-template-columns: auto auto; justify-content: start; gap: 2px 18px; font-size: 12px; color: #444; }
.sh-pd__meta .in-stock { color: #333; }
.sh-pd__excerpt { font-size: 12px; margin: 8px 0 10px 6px; line-height: 1.6; }
.sh-pd__excerpt p { margin: 0; }
.sh-pd__buy { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 6px 0 12px; }
.sh-pd__buy .qty { height: 40px; }
.sh-buy-now {
    position: relative; display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 22px 0 8px; border: 0; border-radius: 4px; cursor: pointer;
    background: linear-gradient(#ef3b2d, #b71c1c); color: #fff; font: 700 italic 21px/1 Arial, sans-serif; text-transform: uppercase; box-shadow: 0 3px 0 #7d1010;
}
.sh-buy-now:hover { filter: brightness(1.08); }
.sh-buy-now__seal { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: radial-gradient(#ffd54a, #c99700); color: #5a3d00; font: 700 11px/1 Arial, sans-serif; text-align: center; font-style: normal; }
.sh-buy-now__seal small { display: block; font-size: 6px; text-transform: uppercase; }
.sh-add-cart { height: 40px; padding: 0 14px; border: 1px solid #ccc; background: #fff; border-radius: 4px; cursor: pointer; font-size: 13px; }
.sh-add-cart:hover { border-color: var(--sh-red); color: var(--sh-red); }
.sh-consult { display: inline-flex; align-items: center; gap: 10px; padding: 8px 18px 8px 10px; background: var(--sh-green); color: #fff; }
.sh-consult:hover { color: #fff; filter: brightness(1.08); }
.sh-consult__icon { display: grid; place-items: center; width: 46px; height: 46px; border: 2px solid #fff; border-radius: 50%; }
.sh-consult__icon svg { width: 26px; height: 26px; fill: #fff; stroke: none; }
.sh-consult small { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; }
.sh-consult > span:last-child { font-size: 22px; font-weight: 700; line-height: 1.2; }

.sh-tabs .tabs__list { background: var(--sh-green); border: 0; gap: 0; }
.sh-tabs .tabs__list button { color: #fff; font-weight: 700; font-size: 13px; padding: 9px 22px; border: 0; border-right: 1px solid rgb(255 255 255 / .35); margin: 0; }
.sh-tabs .tabs__list button[aria-selected="true"], .sh-tabs .tabs__list button:hover { color: #fff; background: rgb(0 0 0 / .14); box-shadow: none; }
.sh-tabs .tabs__panel { padding: 14px 0; font-size: 13px; }
.sh-tabs .prose { font-size: 13px; line-height: 1.6; }
.sh-specs table { width: 100% !important; border-collapse: collapse; font-size: 13px; }
.sh-specs td { padding: 6px 10px; text-align: center; border: 0; }
.sh-specs tr:nth-child(even) td { background: #f3f3f3; }

.sh-best { border: 1px solid var(--line); border-top: 0; }
.sh-best__title { background: var(--sh-green); color: #fff; font-size: 13px; font-weight: 700; text-transform: uppercase; text-align: center; padding: 9px; margin: 0 -1px; }
.sh-best__item { display: grid; grid-template-columns: 80px 1fr; gap: 4px 10px; padding: 8px; border-top: 1px solid var(--line); font-size: 12px; }
.sh-best__item img { width: 80px; height: 80px; object-fit: contain; }
.sh-best__info { display: grid; align-content: start; gap: 4px; }
.sh-best__model { color: #555; }
.sh-best__info strong { color: var(--sh-red); font-size: 14px; }
.sh-best__name { grid-column: 1 / -1; font-weight: 700; color: #333; }
.sh-best__item:hover .sh-best__name, .sh-best__item.is-current .sh-best__name { color: var(--sh-red); }

/* ---------- Nút liên hệ nhanh (máy tính): cột ô vuông đỏ sát mép phải như web cũ ---------- */
@media (min-width: 901px) {
    .cdock { right: 0; bottom: 140px; gap: 2px; }
    .cdock__icon { width: 40px; height: 40px; border-radius: 4px 0 0 4px; background: var(--sh-red) !important; box-shadow: none; animation: none !important; }
    .cdock__icon svg { width: 22px; height: 22px; }
    .cdock__item--chat .cdock__icon--bot { width: 40px; height: 40px; margin: 0; filter: none; padding: 6px; }
    .cdock__item--call { display: flex; }
    .cdock__label { right: 46px; }
    .cdock__item--call .cdock__label { opacity: 0; } /* số đã có ở nhãn Hotline góc trái */
    .cdock__item--call:hover .cdock__label { opacity: 1; }
    .cdock .to-top { width: 40px; height: 40px; border-radius: 4px 0 0 4px; margin-top: 12px; }
}

/* ---------- Điện thoại / máy tính bảng ---------- */
@media (max-width: 1100px) {
    .sh-toplinks { display: none; }
    .sh-grid--5 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .sh-header__in { flex-wrap: wrap; gap: 8px 12px; min-height: 0; padding-block: 8px; }
    .sh-header__menu { display: inline-grid; }
    .sh-logo img { max-height: 40px; }
    .sh-phones { display: none; }
    .sh-cart { margin: 0 0 0 auto; align-self: center; background: none; color: var(--ink); }
    .sh-cart__text { display: none; }
    .sh-cart__icon { background: none; color: var(--sh-red); }
    .sh-cart .badge:not([hidden]) { display: grid; }
    .sh-search { order: 10; flex-basis: 100%; max-width: none; margin: 0; }
    .sh-search input { height: 38px; }
    .sh-search button { height: 38px; }
    .sh-nav { display: none; }
    .sh-hero { grid-template-columns: minmax(0, 1fr); }
    .sh-hero__side { display: none; }
    .sh-services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sh-services > div:nth-child(3) { border-left: 0; }
    .sh-services > div:nth-child(n + 3) { border-top: 1px solid rgb(255 255 255 / .25); }
    .sh-grid--5, .sh-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sh-block__links { padding: 6px 10px; flex-basis: 100%; overflow-x: auto; flex-wrap: nowrap; }
    .sh-block__links a { white-space: nowrap; }
    .sh-layout { grid-template-columns: minmax(0, 1fr); }
    .sh-layout > .sh-side { display: none; border: 0; }
    .sh-layout > .sh-side.is-open { display: block; position: fixed; inset: 0; z-index: 70; background: #fff; padding: 16px 16px 96px; overflow-y: auto; }
    .sh-filter-btn { display: block; }
    .sh-card__price strong { font-size: 15px; }
    .sh-footer__stores .sh-stores, .sh-footer__main { grid-template-columns: minmax(0, 1fr); }
    .sh-hotline { display: none; } /* điện thoại đã có thanh Gọi · Zalo dưới đáy */
    .sh-pd, .sh-pd__top { grid-template-columns: minmax(0, 1fr); }
    .sh-best { display: none; }
    .sh-tabs .tabs__list { overflow-x: auto; flex-wrap: nowrap; }
    .sh-tabs .tabs__list button { white-space: nowrap; padding: 9px 14px; }
}
