/* Cửa hàng Agoliva (cua-hang.html) — bố cục siêu thị mẹ & bé, màu theo style.css. */
.ch-thanh { position: sticky; top: 74px; z-index: 30; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 6px 18px -14px rgba(160,50,100,.4); }
.ch-thanh .wrap { display: flex; align-items: center; gap: 14px; padding-block: 10px; }
.ch-ten { font-family: var(--font-head); font-weight: 800; font-size: 17px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.ch-ten b { color: var(--olive); }
.ch-tim { flex: 1; display: flex; min-width: 0; border: 2px solid var(--olive); border-radius: 99px; overflow: hidden; background: #fff; }
.ch-tim input { flex: 1; min-width: 0; border: 0; padding: 9px 16px; font: inherit; font-size: 15px; background: transparent; color: var(--ink); }
.ch-tim input:focus { outline: none; }
.ch-tim button { border: 0; background: var(--olive); color: #fff; font-weight: 700; padding: 0 20px; cursor: pointer; font: inherit; font-weight: 700; }
.ch-nut-gio { display: flex; align-items: center; gap: 8px; border: 0; background: var(--olive-50); color: var(--ink); border-radius: 99px; padding: 7px 14px 7px 10px; cursor: pointer; font: inherit; font-size: 14px; font-weight: 600; position: relative; }
.ch-nut-gio svg { width: 22px; height: 22px; }
.ch-so { position: absolute; top: -5px; left: 22px; background: var(--olive); color: #fff; border-radius: 99px; font-size: 11px; min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 4px; }

.ch-banner { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); gap: 12px; padding-block: 18px 12px; }
.ch-banner-lon { border-radius: 22px; background: var(--olive-50); padding: 30px 36px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); align-items: center; gap: 16px; min-height: 300px; }
.ch-banner-lon > div { display: grid; gap: 12px; justify-items: start; }
.ch-banner-lon h1 { font-family: var(--font-head); font-size: clamp(26px, 3.2vw, 38px); line-height: 1.12; margin: 0; text-wrap: balance; }
.ch-banner-lon p { margin: 0; color: var(--muted); max-width: 42ch; }
.ch-nho { font-size: 12.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--olive); }
.ch-banner-hinh { width: min(230px, 90%); justify-self: center; color: var(--ink); }
.ch-banner-ben { display: grid; gap: 12px; }
.ch-banner-ben a { border-radius: 22px; padding: 20px 22px; display: grid; align-content: center; gap: 4px; text-decoration: none; color: var(--ink); }
.ch-banner-ben b { font-family: var(--font-head); font-size: 19px; }
.ch-banner-ben span { font-size: 14px; color: var(--muted); }
.ch-b1 { background: var(--lav-50); } .ch-b2 { background: #FFF4E2; }
.ch-cam-ket { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ch-cam-ket div { background: #fff; border-radius: 16px; padding: 12px 16px; display: grid; font-size: 13.5px; line-height: 1.35; border: 1px solid var(--line); }
.ch-cam-ket span { color: var(--muted); }

.ch-khoi { padding-block: 22px; }
.ch-tieu { font-family: var(--font-head); font-size: 22px; text-transform: uppercase; letter-spacing: .01em; margin: 0 0 14px; display: flex; align-items: center; gap: 10px; }
.ch-tieu::before { content: ""; width: 6px; height: 22px; border-radius: 3px; background: var(--olive); flex: 0 0 auto; }
.ch-tieu-hang { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.ch-tieu-hang .ch-tieu { margin: 0; }
.ch-tieu-hang a { color: var(--olive); font-weight: 600; font-size: 14.5px; text-decoration: none; }

.ch-dm { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 10px; background: #fff; border-radius: 22px; padding: 18px; border: 1px solid var(--line); }
.ch-dm button { border: 0; background: none; display: grid; justify-items: center; gap: 8px; text-align: center; font: inherit; font-size: 13.5px; font-weight: 600; line-height: 1.25; cursor: pointer; color: var(--ink); padding: 0; }
.ch-dm .tron { width: 100%; max-width: 100px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; transition: transform .2s; }
.ch-dm .tron svg { width: 50%; height: 50%; }
.ch-dm button:hover .tron, .ch-dm button[aria-pressed="true"] .tron { transform: translateY(-3px); box-shadow: 0 0 0 3px var(--olive); }

.ch-tab { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; }
.ch-tab button, .ch-chip-nhom button { flex: 0 0 auto; border: 1.5px solid var(--line); background: #fff; border-radius: 99px; padding: 7px 15px; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; color: var(--ink); }
.ch-tab button[aria-pressed="true"], .ch-chip-nhom button[aria-pressed="true"] { background: var(--olive); border-color: var(--olive); color: #fff; }
.ch-chip-nhom { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.ch-loc { display: flex; gap: 8px; }
.ch-loc select { border: 1.5px solid var(--line); border-radius: 99px; padding: 7px 12px; font: inherit; font-size: 14px; background: #fff; color: var(--ink); }
.ch-dem { color: var(--muted); font-size: 14px; margin: 4px 0 10px; }

.ch-luoi { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.ch-sp { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 10px; display: grid; gap: 6px; align-content: start; position: relative; min-width: 0; transition: box-shadow .2s, border-color .2s; }
.ch-sp:hover { border-color: var(--olive); box-shadow: var(--shadow); }
.ch-sp .anh { aspect-ratio: 1; max-width: 100%; border-radius: 12px; background: var(--olive-50); overflow: hidden; position: relative; display: block; border: 0; padding: 0; cursor: pointer; width: 100%; }
.ch-sp .anh img { width: 100%; height: 100%; object-fit: cover; }
.ch-sp .anh .trong { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-head); font-weight: 800; color: var(--olive); font-size: 28px; }
.ch-giam { position: absolute; top: 8px; left: 8px; background: #E0402C; color: #fff; font-size: 12px; font-weight: 700; padding: 2px 7px; border-radius: 6px; }
.ch-moi { position: absolute; top: 8px; right: 8px; background: #23874F; color: #fff; font-size: 11.5px; font-weight: 700; padding: 2px 7px; border-radius: 6px; }
.ch-hieu { font-size: 11.5px; color: var(--olive); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.ch-sp .ten { font-size: 14px; font-weight: 500; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; color: var(--ink); text-decoration: none; background: none; border: 0; padding: 0; text-align: left; font-family: inherit; cursor: pointer; }
.ch-sp .tuoi { font-size: 12.5px; color: var(--muted); }
.ch-gia { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; font-variant-numeric: tabular-nums; }
.ch-gia b { font-family: var(--font-head); font-weight: 900; font-size: 17px; color: #E0402C; }
.ch-gia s { font-size: 12.5px; color: var(--muted); }
.ch-kho { font-size: 12.5px; color: #23874F; font-weight: 600; }
.ch-kho.het { color: var(--muted); } .ch-kho.it { color: #C27A00; }
.ch-mua { border: 0; border-radius: 99px; padding: 9px 10px; font: inherit; font-weight: 700; font-size: 14px; background: var(--olive); color: #fff; cursor: pointer; }
.ch-mua:hover { background: var(--olive-d); }
.ch-mua:disabled { background: var(--line); color: var(--muted); cursor: not-allowed; }
.ch-tai, .ch-rong { grid-column: 1 / -1; color: var(--muted); text-align: center; padding: 30px 10px; }
.ch-rong b { display: block; font-family: var(--font-head); font-size: 20px; color: var(--ink); margin-bottom: 6px; }

/* Hộp chi tiết */
.ch-hop { position: fixed; inset: 0; z-index: 90; background: rgba(40, 15, 30, .5); display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.ch-hop-the { background: #fff; border-radius: 22px; width: min(920px, 100%); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; padding: 24px; position: relative; }
.ch-hop .ch-dong { position: absolute; top: 10px; right: 12px; }
.ch-dong { border: 0; background: var(--olive-50); width: 36px; height: 36px; border-radius: 50%; font-size: 22px; line-height: 1; cursor: pointer; color: var(--ink); }
.ch-anh-lon { aspect-ratio: 1; max-width: 100%; border-radius: 16px; background: var(--olive-50); overflow: hidden; }
.ch-anh-lon img { width: 100%; height: 100%; object-fit: cover; }
.ch-anh-nho { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.ch-anh-nho button { width: 60px; height: 60px; border-radius: 10px; overflow: hidden; border: 2px solid transparent; padding: 0; cursor: pointer; background: none; }
.ch-anh-nho button[aria-pressed="true"] { border-color: var(--olive); }
.ch-anh-nho img { width: 100%; height: 100%; object-fit: cover; }
.ch-ct { display: grid; gap: 10px; align-content: start; }
.ch-ct h2 { font-family: var(--font-head); font-size: 24px; line-height: 1.2; margin: 0; padding-right: 30px; }
.ch-ct .ch-gia b { font-size: 26px; }
.ch-ct ul { margin: 0; padding-left: 20px; }
.ch-ct .mo-ta { white-space: pre-line; color: var(--ink); font-size: 15.5px; }
.ch-hop-ky { background: var(--olive-50); border-radius: 12px; padding: 10px 14px; font-size: 15px; }
.ch-sl { display: flex; align-items: center; gap: 10px; }
.ch-sl-o { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 99px; overflow: hidden; }
.ch-sl-o button { border: 0; background: none; width: 38px; height: 38px; font-size: 20px; cursor: pointer; color: var(--ink); }
.ch-sl-o span { min-width: 30px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Giỏ */
.ch-man { position: fixed; inset: 0; background: rgba(40, 15, 30, .45); z-index: 85; }
.ch-gio { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: #fff; z-index: 86; transform: translateX(105%); transition: transform .25s; display: grid; grid-template-rows: auto 1fr; box-shadow: -20px 0 40px -20px rgba(0,0,0,.4); }
.ch-gio.mo { transform: none; }
.ch-gio-dau { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.ch-gio-dau h2 { font-family: var(--font-head); font-size: 20px; margin: 0; }
.ch-gio-than { overflow-y: auto; padding: 14px 18px 24px; display: grid; gap: 12px; align-content: start; }
.ch-dong-gio { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 14px; }
.ch-dong-gio .a { width: 58px; height: 58px; border-radius: 10px; overflow: hidden; background: var(--olive-50); }
.ch-dong-gio .a img { width: 100%; height: 100%; object-fit: cover; }
.ch-dong-gio .sl { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.ch-dong-gio .sl button { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; cursor: pointer; font-size: 15px; line-height: 1; color: var(--ink); }
.ch-bo { border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.ch-tong { border-top: 1px solid var(--line); padding-top: 12px; display: grid; gap: 4px; font-size: 14.5px; }
.ch-tong div { display: flex; justify-content: space-between; }
.ch-tong .lon b { font-family: var(--font-head); font-size: 20px; color: #E0402C; }
.ch-them-mp { font-size: 13px; color: var(--olive-d); }
.ch-dat { display: grid; gap: 8px; }
.ch-dat label { font-size: 13.5px; font-weight: 600; }
.ch-dat input, .ch-dat textarea, .ch-dat select { width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 9px 12px; font: inherit; font-size: 15px; color: var(--ink); background: #fff; }
.ch-dat input:focus, .ch-dat textarea:focus { outline: 2px solid var(--olive); border-color: transparent; }
.ch-tt { display: grid; gap: 6px; }
.ch-tt label { display: flex; gap: 10px; align-items: flex-start; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; font-weight: 500; cursor: pointer; }
.ch-tt label:has(input:checked) { border-color: var(--olive); background: var(--olive-50); }
.ch-tt input { accent-color: var(--olive); margin-top: 4px; }
.ch-loi { color: #C0392B; font-size: 14px; min-height: 1.2em; }
.ch-xong { text-align: center; display: grid; gap: 10px; justify-items: center; padding-top: 10px; }
.ch-xong .ma { font-family: var(--font-head); font-size: 28px; color: var(--olive); letter-spacing: .04em; }
.ch-ck { background: #FFF4E2; border-radius: 12px; padding: 12px 14px; text-align: left; white-space: pre-line; font-size: 14.5px; width: 100%; }
.ch-nut-rong { width: 100%; }

.ch-tra { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 22px; display: grid; gap: 12px; }
.ch-tra p { margin: 0; color: var(--muted); }
.ch-f-tra { display: flex; flex-wrap: wrap; gap: 8px; }
.ch-f-tra input { flex: 1 1 180px; min-width: 0; border: 1.5px solid var(--line); border-radius: 99px; padding: 10px 16px; font: inherit; font-size: 15px; }
.ch-kq-tra:empty { display: none; }
.ch-kq-tra { background: var(--olive-50); border-radius: 14px; padding: 14px 16px; }
.ch-buoc { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.ch-buoc span { font-size: 13px; padding: 4px 10px; border-radius: 99px; background: #fff; color: var(--muted); }
.ch-buoc span.on { background: var(--olive); color: #fff; }

.ch-bao { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 99px; font-size: 14.5px; z-index: 95; box-shadow: var(--shadow-lg); }

@media (max-width: 1080px) { .ch-luoi { grid-template-columns: repeat(4, minmax(0, 1fr)); } .ch-dm { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .ch-banner { grid-template-columns: 1fr; } .ch-banner-ben { grid-template-columns: 1fr 1fr; }
  .ch-cam-ket { grid-template-columns: 1fr 1fr; } .ch-luoi { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ch-hop-the { grid-template-columns: 1fr; }
  .ch-tien { display: none; }
}
@media (max-width: 620px) {
  .ch-thanh .wrap { flex-wrap: wrap; gap: 8px; }
  .ch-ten { flex: 1; }
  .ch-tim { order: 3; flex-basis: 100%; }
  .ch-banner-lon { grid-template-columns: 1fr; padding: 22px; min-height: 0; }
  .ch-banner-hinh { display: none; }
  .ch-banner-ben { grid-template-columns: 1fr; }
  .ch-dm { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 14px; }
  .ch-luoi { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .ch-loc { width: 100%; } .ch-loc select { flex: 1; min-width: 0; }
  .ch-hop { padding: 0; place-items: end stretch; }
  .ch-hop-the { border-radius: 22px 22px 0 0; padding: 18px; max-height: 92vh; overflow-y: auto; }
}
@media (prefers-reduced-motion: reduce) { .ch-gio, .ch-dm .tron { transition: none; } }
