/* ================================================================
   AGAFIA — СПІЛЬНА ДИЗАЙН-СИСТЕМА
   Файл керує виглядом усіх публічних сторінок і адмінпанелі.
   ================================================================ */

/* --- 1. Кольори, розміри та інші змінні проєкту --- */
:root {
  --burgundy: #7e242a;
  --burgundy-dark: #5f1a20;
  --ivory: #f7f2eb;
  --canvas: #fcfaf6;
  --paper: #fffdfa;
  --leather: #4b2c22;
  --ink: #2c211d;
  --muted: #756962;
  --line: #ded4ca;
  --blue: #233544;
  --gold: #b69450;
  --success: #315d45;
  --error: #9d3039;
  --shadow: 0 18px 48px rgba(75, 44, 34, .09);
  --serif: Georgia, 'Times New Roman', serif;
  --sans: Inter, Arial, Helvetica, sans-serif;
  --container: 1320px;
  --header-height: 78px;
}

/* --- 2. Базове скидання та типографіка --- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
}
body.admin-page { background: #10161b; color: #edf1f3; }
img { width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
:focus-visible { outline: 2px solid var(--burgundy); outline-offset: 3px; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; line-height: 1.15; }
h1 { font-size: clamp(2.55rem, 5vw, 4.5rem); }
h2 { font-size: clamp(2rem, 3.3vw, 3.25rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.8rem); }
.eyebrow { margin-bottom: 12px; color: var(--burgundy); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.text-link { color: var(--burgundy); font-weight: 700; }
.text-link::after { content: ' →'; transition: margin .2s; }
.text-link:hover::after { margin-left: 4px; }

/* --- 3. Контейнери, секції та універсальні сітки --- */
.container { width: min(calc(100% - 128px), var(--container)); margin-inline: auto; }
.section { padding-block: 96px; }
.section--ivory { background: var(--ivory); }
.section--paper { background: var(--paper); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 38px; }
.section-head h2 { margin-bottom: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.divider { height: 1px; background: var(--line); }

/* --- 4. Кнопки та форми --- */
.btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border: 1px solid var(--burgundy);
  border-radius: 2px;
  background: transparent;
  color: var(--burgundy);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  transition: background .2s, color .2s, transform .2s;
}
.btn:hover { background: rgba(126, 36, 42, .06); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--burgundy); color: #fff; }
.btn--primary:hover { background: var(--burgundy-dark); }
.btn--dark { border-color: #fff; background: #fff; color: #172029; }
.btn--wide { width: 100%; }
.field { display: grid; gap: 7px; }
.field label { font-size: 12px; font-weight: 700; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 49px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255,255,255,.72);
  color: var(--ink);
}
.field textarea { min-height: 130px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
.choice { display: flex; align-items: center; gap: 9px; min-height: 42px; }
.choice input { accent-color: var(--burgundy); }

/* --- 5. Верхня панель та головна навігація --- */
.announcement { min-height: 30px; padding: 6px 20px; background: var(--burgundy-dark); color: #fff; text-align: center; font-size: 10px; letter-spacing: .08em; }
.site-header { position: sticky; top: 0; z-index: 50; height: var(--header-height); border-bottom: 1px solid rgba(126,36,42,.1); background: rgba(252,250,246,.96); backdrop-filter: blur(12px); }
.nav { height: 100%; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.nav__links, .nav__tools { display: flex; align-items: center; gap: 23px; }
.nav__links { gap: 30px; font-size: 13px; font-weight: 500; letter-spacing: .01em; }
.nav__links a { position: relative; padding: 12px 2px; transition: color .2s ease; }
.nav__links a::after { position: absolute; right: 2px; bottom: 6px; left: 2px; height: 1px; background: var(--burgundy); content: ''; opacity: 0; transform: scaleX(0); transition: opacity .2s ease, transform .2s ease; }
.nav__links a:hover, .nav__links a:focus-visible, .nav__links a.is-active, .nav__links a[aria-current='page'] { color: var(--burgundy); }
.nav__links a:hover::after, .nav__links a:focus-visible::after, .nav__links a.is-active::after, .nav__links a[aria-current='page']::after { opacity: 1; transform: scaleX(1); }
.nav__tools { justify-content: flex-end; gap: 14px; }
@media (min-width: 901px) {
  .nav__links {
    transform: translateY(14px);
  }
}
.logo { font-family: var(--serif); font-size: 28px; letter-spacing: -.04em; }
.logo,
.brand {
  display: block;
  width: 125px;
  height: 60px;
  overflow: hidden;
  background-image: url('../images/agafia-logo.png');
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  text-indent: -9999px;
  white-space: nowrap;
}
.site-footer .logo,
.brand--footer {
  width: 150px;
  height: 72px;
}
.icon-btn { width: 42px; height: 42px; display: inline-grid; place-items: center; border: 0; background: transparent; cursor: pointer; font-size: 17px; }
.header-icon { display: block; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.menu-toggle { display: none; }
.cart-count { width: 17px; height: 17px; display: inline-grid; place-items: center; margin-left: -10px; border-radius: 50%; background: var(--burgundy); color: #fff; font-size: 9px; }

/* --- 6. Hero головної сторінки --- */
.hero { position: relative; min-height: 690px; display: grid; align-items: center; background: var(--ivory); overflow: hidden; }
.hero__image { position: absolute; inset: 0; height: 100%; object-fit: cover; object-position: center; }
.hero__content { position: relative; z-index: 2; width: min(calc(100% - 128px), var(--container)); margin-inline: auto; animation: reveal .55s ease both; }
.hero__content h1 { max-width: 430px; margin-bottom: 18px; }
.hero__content p { max-width: 420px; font-size: 17px; }
.hero__actions { display: flex; gap: 14px; margin-top: 28px; }
@keyframes reveal { from { opacity: 0; transform: translateY(12px); } }

/* --- 7. Картки категорій, товарів і статей --- */
.category-card, .product-card, .article-card { min-width: 0; }
.category-card__image, .product-card__image, .article-card__image { position: relative; overflow: hidden; background: #eee7df; }
.category-card__image { aspect-ratio: 1 / .78; }
.product-card__image { aspect-ratio: 4 / 5; }
.article-card__image { aspect-ratio: 4 / 3; }
.category-card img, .product-card img, .article-card img { height: 100%; object-fit: cover; transition: transform .25s ease; }
.category-card:hover img, .product-card:hover img, .article-card:hover img { transform: scale(1.035); }
.category-card:nth-child(2) img { transform: scale(1.8); object-position: 84% 24% !important; }
.category-card:nth-child(3) img { transform: scale(1.9); object-position: 76% 82% !important; }
.category-card:nth-child(4) img { transform: scale(2); object-position: 49% 92% !important; }
.category-card:nth-child(2):hover img { transform: scale(1.86); }
.category-card:nth-child(3):hover img { transform: scale(1.96); }
.category-card:nth-child(4):hover img { transform: scale(2.06); }
.category-card h3 { margin: 15px 0 3px; font-size: 20px; }
.product-card__image img { object-position: var(--position, center); }
.product-card__info { display: flex; justify-content: space-between; gap: 14px; padding-top: 13px; }
.product-card__info h3 { margin-bottom: 4px; font-family: var(--sans); font-size: 13px; font-weight: 600; }
.product-card__price { white-space: nowrap; font-size: 13px; }
.wish { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255,255,255,.9); cursor: pointer; }
.wish.is-active { color: var(--burgundy); }
.article-card h3 { margin: 13px 0 7px; font-size: 23px; }
.article-card p { color: var(--muted); }

/* --- 8. Історія бренду, цінності та галерея --- */
.story { display: grid; grid-template-columns: 1.05fr .95fr; min-height: 520px; }
.story__media img { height: 100%; object-fit: cover; }
.story__copy { display: grid; align-content: center; padding: 64px 8vw; background: var(--ivory); }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-block: 1px solid var(--line); }
.trust-item { padding: 36px 26px; text-align: center; border-right: 1px solid var(--line); }
.trust-item:last-child { border-right: 0; }
.trust-item__icon { display: block; margin-bottom: 9px; color: var(--burgundy); font-family: var(--serif); font-size: 25px; }
.trust-item h3 { margin-bottom: 5px; font-size: 16px; }
.trust-item p { margin: 0; color: var(--muted); font-size: 12px; }
.gallery-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.gallery-strip img { aspect-ratio: 1; object-fit: cover; }

/* --- 9. Newsletter і підвал --- */
.newsletter { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 40px; padding: 58px 0; }
.newsletter h2 { margin-bottom: 6px; font-size: 28px; }
.newsletter__form { width: min(100%, 480px); display: flex; }
.newsletter__form input { flex: 1; min-width: 0; border: 0; border-bottom: 1px solid var(--ink); background: transparent; }
.form-message { min-height: 20px; margin: 8px 0 0; color: var(--success); font-size: 12px; }
.site-footer { padding: 54px 0 28px; border-top: 1px solid var(--line); background: var(--paper); }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(4, 1fr); gap: 45px; }
.footer-group h3 { font-family: var(--sans); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.footer-group a { display: block; margin: 8px 0; color: var(--muted); font-size: 12px; }
.footer-bottom { display: flex; justify-content: space-between; margin-top: 46px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 5px; }
.footer-links a { transition: color .2s ease; }
.footer-links a:hover, .footer-links a:focus-visible { color: var(--burgundy); }

/* --- 10. Внутрішні сторінки: заголовки й breadcrumbs --- */
.page-hero { padding: 70px 0 44px; }
.page-hero h1 { margin-bottom: 12px; font-size: clamp(2.7rem, 5vw, 4rem); }
.breadcrumbs { margin-bottom: 26px; color: var(--muted); font-size: 11px; }
.breadcrumbs span { margin: 0 7px; }

/* --- 11. Каталог: фільтри й сітка товарів --- */
.catalog { display: grid; grid-template-columns: 235px 1fr; gap: 52px; padding-bottom: 96px; }
.filters { border-top: 1px solid var(--line); }
.filter { padding: 20px 0; border-bottom: 1px solid var(--line); }
.filter h3 { font-family: var(--sans); font-size: 12px; font-weight: 700; }
.filter label { display: flex; gap: 8px; margin: 9px 0; color: var(--muted); font-size: 12px; }
.filter input { accent-color: var(--burgundy); }
.catalog__toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; font-size: 12px; }
.catalog__toolbar select { padding: 9px 30px 9px 10px; border: 1px solid var(--line); background: transparent; }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 38px 22px; }
.load-more { display: grid; place-items: center; margin-top: 46px; }

/* --- 12. Сторінка товару --- */
.product-layout { display: grid; grid-template-columns: 1.45fr .75fr; gap: 55px; padding: 42px 0 82px; }
.product-gallery { display: grid; grid-template-columns: 88px 1fr; gap: 16px; }
.product-thumbs { display: grid; align-content: start; gap: 10px; }
.product-thumbs button { padding: 0; border: 1px solid transparent; background: none; cursor: pointer; }
.product-thumbs button.is-active { border-color: var(--burgundy); }
.product-thumbs img { aspect-ratio: 1; object-fit: cover; }
.product-main-image { min-height: 670px; object-fit: cover; background: var(--ivory); }
.product-info { position: sticky; top: 110px; align-self: start; }
.product-info h1 { margin-bottom: 9px; font-size: 44px; }
.product-price { margin: 18px 0 26px; font-family: var(--serif); font-size: 22px; }
.swatches { display: flex; gap: 9px; margin: 12px 0 24px; }
.swatch { width: 28px; height: 28px; border: 3px solid var(--canvas); border-radius: 50%; box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.swatch.is-active { box-shadow: 0 0 0 2px var(--burgundy); }
.buy-row { display: grid; grid-template-columns: 82px 1fr; gap: 12px; margin: 22px 0; }
.qty { display: flex; border: 1px solid var(--line); }
.qty button { width: 30px; border: 0; background: transparent; cursor: pointer; }
.qty input { width: 28px; border: 0; background: transparent; text-align: center; }
.accordion { border-top: 1px solid var(--line); }
.accordion__button { width: 100%; display: flex; justify-content: space-between; padding: 18px 0; border: 0; border-bottom: 1px solid var(--line); background: none; cursor: pointer; text-align: left; font-weight: 700; }
.accordion__panel { display: none; padding: 16px 0; color: var(--muted); font-size: 13px; }
.accordion__button[aria-expanded='true'] + .accordion__panel { display: block; }

/* --- 13. Кошик і оформлення замовлення --- */
.cart-layout, .checkout-layout { display: grid; grid-template-columns: 1fr 360px; gap: 70px; padding-bottom: 92px; }
.cart-item { display: grid; grid-template-columns: 120px 1fr auto; gap: 22px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.cart-item img { height: 145px; object-fit: cover; }
.cart-item h3 { margin-bottom: 6px; font-size: 18px; }
.cart-item__actions { display: flex; align-items: center; gap: 20px; margin-top: 18px; }
.remove { border: 0; background: none; color: var(--muted); cursor: pointer; text-decoration: underline; }
.summary { align-self: start; padding: 28px; background: var(--ivory); }
.summary h2 { font-size: 26px; }
.summary-row { display: flex; justify-content: space-between; gap: 20px; margin: 12px 0; }
.summary-row.total { margin-top: 21px; padding-top: 18px; border-top: 1px solid var(--line); font-weight: 700; }
.checkout-section { padding: 25px 0; border-top: 1px solid var(--line); }
.checkout-section h2 { font-size: 24px; }
.checkout-shipping-notice { padding: 22px; border-left: 3px solid var(--burgundy); background: var(--ivory); }
.checkout-shipping-notice strong { display: block; margin-bottom: 7px; }
.checkout-shipping-notice p { margin-bottom: 0; }
.mini-product { display: grid; grid-template-columns: 58px 1fr auto; gap: 12px; align-items: center; margin: 15px 0; }
.mini-product img { height: 64px; object-fit: cover; }

/* --- 14. Акаунт --- */
.account-layout { display: grid; grid-template-columns: 190px 1fr; gap: 54px; padding-bottom: 90px; }
.account-nav a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.account-nav a.is-active { color: var(--burgundy); font-weight: 700; }
.order-table { width: 100%; border-collapse: collapse; }
.order-table th, .order-table td { padding: 15px 12px; border-bottom: 1px solid var(--line); text-align: left; font-size: 12px; }
.order-table th { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.status { color: var(--success); }

/* --- 15. About, Care Guide і Contact --- */
.about-hero { min-height: 480px; display: grid; align-items: center; color: #fff; background: linear-gradient(90deg, rgba(43,20,17,.72), rgba(43,20,17,.18)), url('../images/craftsmanship.png') center/cover; }
.about-hero h1 { max-width: 600px; }
.manifesto { max-width: 820px; margin: auto; text-align: center; }
.wide-image { height: min(60vw, 620px); object-fit: cover; }
.care-page-hero { padding-bottom: 64px; }
.care-page-hero h1 { max-width: 760px; }
.care-page-hero__intro { max-width: 670px; margin-bottom: 0; font-size: 18px; }
.care-feature { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(360px, .8fr); min-height: 610px; margin-bottom: 96px; background: var(--ivory); }
.care-feature__media img { height: 100%; object-fit: cover; object-position: center; }
.care-feature__copy { display: grid; align-content: center; padding: 64px 58px; }
.care-feature__copy > p:not(.eyebrow) { color: var(--muted); }
.care-checklist { display: grid; gap: 13px; padding: 0; margin: 25px 0 0; list-style: none; }
.care-checklist li { position: relative; padding-left: 25px; }
.care-checklist li::before { position: absolute; left: 0; color: var(--burgundy); content: '—'; }
.care-section-head > p { max-width: 470px; margin-bottom: 4px; }
.care-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-block: 1px solid var(--line); }
.care-card { padding: 36px 34px; border-right: 1px solid var(--line); }
.care-card:last-child { border-right: 0; }
.care-card__number { display: block; margin-bottom: 42px; color: var(--burgundy); font-family: var(--serif); font-size: 18px; }
.care-card h3 { margin-bottom: 10px; }
.care-card p { margin-bottom: 0; color: var(--muted); }
.care-routine { display: grid; grid-template-columns: minmax(260px, .7fr) minmax(0, 1.3fr); gap: 9vw; }
.care-routine__intro { position: sticky; top: 118px; align-self: start; }
.care-steps { padding: 0; margin: 0; list-style: none; }
.care-steps li { display: grid; grid-template-columns: 52px 1fr; gap: 20px; padding: 26px 0; border-top: 1px solid var(--line); }
.care-steps li:last-child { border-bottom: 1px solid var(--line); }
.care-steps li > span { color: var(--burgundy); font-family: var(--serif); }
.care-steps h3 { margin-bottom: 8px; font-size: 22px; }
.care-steps p { max-width: 620px; margin-bottom: 0; color: var(--muted); }
.care-situation-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.care-situation { padding: 30px; border: 1px solid var(--line); background: var(--canvas); }
.care-situation h3 { font-size: 22px; }
.care-situation p { margin-bottom: 0; color: var(--muted); }
.care-warning { display: grid; grid-template-columns: 180px 1fr; gap: 26px; margin-top: 28px; padding: 28px 30px; border-left: 3px solid var(--burgundy); background: var(--ivory); }
.care-warning p { margin-bottom: 0; }
.care-faq { display: grid; grid-template-columns: minmax(220px, .55fr) minmax(0, 1.45fr); gap: 8vw; }
.care-faq .accordion__button { font-family: var(--serif); font-size: 20px; font-weight: 400; }
.care-faq .accordion__button span { color: var(--burgundy); font-family: var(--sans); }
.care-faq .accordion__panel { max-width: 760px; padding: 18px 0 24px; font-size: 14px; }
.care-contact { display: flex; align-items: center; justify-content: space-between; gap: 42px; padding-block: 66px; }
.care-contact h2 { margin-bottom: 10px; }
.care-contact p { max-width: 680px; margin-bottom: 0; }
.care-contact .btn { flex: 0 0 auto; }
.contact-intro { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 0 0 52px; }
.contact-method { padding: 24px; border: 1px solid var(--line); }
.contact-method h3 { font-size: 17px; }
.contact-method h3 a { overflow-wrap: anywhere; }
.contact-layout { display: grid; grid-template-columns: .85fr 1.15fr; gap: 44px; padding-bottom: 96px; }
.contact-form { padding: 38px; background: var(--ivory); }
.contact-page-hero > p:last-child { max-width: 680px; }
.contact-panel { padding: 42px; background: var(--ivory); }
.contact-panel > p { max-width: 620px; }
.contact-action-list { display: grid; gap: 12px; margin-top: 32px; }
.contact-action-list a { display: flex; justify-content: space-between; gap: 20px; padding: 18px 0; border-top: 1px solid var(--line); }
.contact-action-list a:last-child { border-bottom: 1px solid var(--line); }
.contact-action-list span { color: var(--muted); }
.contact-action-list strong { color: var(--burgundy); font-size: 13px; }
.contact-location { min-height: 520px; display: flex; align-items: flex-start; justify-content: space-between; flex-direction: column; gap: 42px; padding: 52px; border: 1px solid var(--line); background: linear-gradient(145deg, rgba(255,253,250,.94), rgba(238,228,217,.9)), url('../images/craftsmanship.png') center/cover; }
.contact-location h2 { max-width: 520px; margin-bottom: 15px; }
.contact-location p:not(.eyebrow) { max-width: 560px; }
.contact-location .btn { background: var(--paper); }

/* --- 16. Адмінпанель --- */
.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 230px 1fr; }
.admin-sidebar { position: sticky; top: 0; height: 100vh; padding: 28px 18px; border-right: 1px solid #29343d; background: #121a21; }
.admin-brand { margin: 0 10px 32px; font-family: var(--serif); font-size: 25px; }
.admin-user { margin: 0 10px 28px; color: #88949d; font-size: 11px; }
.admin-nav a { display: flex; gap: 10px; align-items: center; padding: 11px 12px; border-radius: 5px; color: #9ba7af; font-size: 12px; }
.admin-nav a.is-active, .admin-nav a:hover { background: #1d2932; color: #fff; }
.admin-main { padding: 30px 36px 56px; overflow: hidden; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.admin-topbar h1 { margin: 0; color: #fff; font-family: var(--sans); font-size: 24px; font-weight: 600; }
.admin-card { padding: 22px; border: 1px solid #2a3540; border-radius: 8px; background: #172129; box-shadow: 0 14px 30px rgba(0,0,0,.12); }
.admin-card h2 { color: #fff; font-family: var(--sans); font-size: 14px; font-weight: 600; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.metric .label { color: #84919a; font-size: 11px; }
.metric strong { display: block; margin-top: 9px; font-family: var(--serif); font-size: 28px; font-weight: 400; }
.metric .trend { color: #74b88f; font-size: 10px; }
.admin-content-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; margin-top: 16px; }
.chart { height: 270px; display: flex; align-items: end; gap: 8px; padding-top: 35px; border-bottom: 1px solid #34414b; }
.chart span { flex: 1; min-height: 15%; border-radius: 4px 4px 0 0; background: linear-gradient(#9e3540, #5f1a20); }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: 12px 8px; border-bottom: 1px solid #2b3740; color: #a7b0b7; text-align: left; font-size: 11px; }
.admin-table th { color: #697680; text-transform: uppercase; }
.pill { padding: 4px 8px; border-radius: 20px; background: rgba(49,93,69,.3); color: #7bc49a; }

/* --- 17. Toast-повідомлення та mobile menu --- */
.toast { position: fixed; z-index: 100; top: 22px; right: 22px; max-width: 320px; padding: 14px 18px; border-radius: 4px; background: var(--success); color: #fff; box-shadow: var(--shadow); transform: translateY(-20px); opacity: 0; pointer-events: none; transition: .25s; }
.toast.is-visible { transform: none; opacity: 1; }

/* --- 18. Адаптивність планшетів --- */
@media (max-width: 1024px) {
  .container { width: min(calc(100% - 64px), var(--container)); }
  .section { padding-block: 70px; }
  .nav__links { gap: 18px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .hero { min-height: 580px; }
  .hero__content { width: 48%; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .product-layout { grid-template-columns: 1.2fr .8fr; gap: 34px; }
  .product-main-image { min-height: 560px; }
  .cart-layout, .checkout-layout { gap: 36px; }
  .care-feature { grid-template-columns: 1fr 1fr; }
  .care-feature__copy { padding: 48px 38px; }
  .care-card { padding-inline: 24px; }
  .footer-grid { grid-template-columns: 1.5fr repeat(2, 1fr); }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
}

/* --- 19. Шапка для планшетів і мобільних пристроїв --- */
@media (max-width: 900px) {
  :root { --header-height: 64px; }
  .nav { grid-template-columns: 1fr auto 1fr; }
  .menu-toggle { display: grid; justify-self: start; }
  .nav__links { position: fixed; inset: 94px 0 auto; display: none; gap: 2px; padding: 25px 20px 35px; background: var(--canvas); box-shadow: var(--shadow); font-size: 16px; }
  .nav__links a { padding: 13px 4px; }
  .nav__links.is-open { display: grid; }
  .nav__tools .hide-mobile { display: none; }
}

/* --- 20. Адаптивність мобільних пристроїв --- */
@media (max-width: 767px) {
  .container { width: calc(100% - 40px); }
  .section { padding-block: 50px; }
  .grid-2, .grid-3, .form-grid { grid-template-columns: 1fr; }
  .grid-4 { gap: 20px 10px; }
  .section-head { align-items: start; }
  .announcement { font-size: 9px; }
  .hero { min-height: 710px; align-items: start; }
  .hero__image { object-position: 63% center; }
  .hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(247,242,235,.95) 0, rgba(247,242,235,.7) 35%, transparent 63%); }
  .hero__content { width: calc(100% - 40px); margin-inline: auto; padding-top: 62px; }
  .hero__content p { font-size: 15px; }
  .hero__actions { flex-wrap: wrap; }
  .story { grid-template-columns: 1fr; }
  .story__media { min-height: 350px; }
  .story__copy { padding: 50px 20px; }
  .trust-grid { grid-template-columns: 1fr 1fr; }
  .trust-item:nth-child(2) { border-right: 0; }
  .trust-item:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .gallery-strip { grid-template-columns: repeat(2, 1fr); }
  .newsletter { grid-template-columns: 1fr; gap: 22px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  .footer-bottom { display: grid; gap: 8px; }
  .page-hero { padding-top: 45px; }
  .catalog { grid-template-columns: 1fr; gap: 22px; }
  .filters { display: none; }
  .product-layout, .cart-layout, .checkout-layout, .account-layout, .contact-layout { grid-template-columns: 1fr; }
  .product-gallery { grid-template-columns: 1fr; }
  .product-thumbs { grid-row: 2; grid-template-columns: repeat(4, 1fr); }
  .product-main-image { min-height: 440px; }
  .product-info { position: static; }
  .cart-item { grid-template-columns: 90px 1fr; }
  .cart-item > :last-child { grid-column: 2; }
  .order-table { display: block; overflow-x: auto; }
  .about-hero { min-height: 420px; }
  .care-page-hero { padding-bottom: 44px; }
  .care-page-hero__intro { font-size: 16px; }
  .care-feature { grid-template-columns: 1fr; min-height: auto; margin-bottom: 50px; }
  .care-feature__media img { min-height: 360px; }
  .care-feature__copy { padding: 42px 24px; }
  .care-card-grid, .care-situation-grid { grid-template-columns: 1fr; }
  .care-card { border-right: 0; border-bottom: 1px solid var(--line); }
  .care-card:last-child { border-bottom: 0; }
  .care-card__number { margin-bottom: 24px; }
  .care-routine, .care-faq { grid-template-columns: 1fr; gap: 36px; }
  .care-routine__intro { position: static; }
  .care-warning { grid-template-columns: 1fr; gap: 8px; }
  .care-contact { align-items: flex-start; flex-direction: column; }
  .contact-intro { grid-template-columns: 1fr; }
  .contact-form { padding: 25px 20px; }
  .contact-panel { padding: 32px 24px; }
  .contact-action-list a { align-items: flex-start; flex-direction: column; gap: 5px; }
  .contact-location { min-height: 420px; padding: 34px 24px; }
  .admin-shell { grid-template-columns: 68px 1fr; }
  .admin-sidebar { padding-inline: 8px; }
  .admin-brand { font-size: 18px; }
  .admin-user, .admin-nav span { display: none; }
  .admin-nav a { justify-content: center; font-size: 18px; }
  .admin-main { padding: 24px 16px; }
  .admin-content-grid { grid-template-columns: 1fr; }
}

/* --- 20. Доступність: користувачі без анімацій --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* --- Site privacy, storage and terms notice --- */
body.site-notice-open { overflow: hidden; }
.site-notice {
  position: fixed;
  z-index: 1200;
  inset: 0;
  display: grid;
  align-items: end;
  padding: 24px;
  background: rgba(35, 24, 20, .54);
  backdrop-filter: blur(3px);
}
.site-notice__dialog {
  width: min(720px, 100%);
  margin-inline: auto;
  padding: 32px 34px;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 24px 70px rgba(44, 33, 29, .24);
}
.site-notice__dialog h2 {
  margin-bottom: 16px;
  font-size: clamp(2rem, 4vw, 2.8rem);
}
.site-notice__copy {
  max-width: 620px;
  color: var(--muted);
}
.site-notice__copy p { margin-bottom: 14px; }
.site-notice__copy a {
  color: var(--burgundy);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.site-notice__accept { margin-top: 8px; }

@media (max-width: 767px) {
  .site-notice { padding: 0; }
  .site-notice__dialog {
    max-height: 92vh;
    padding: 26px 20px max(22px, env(safe-area-inset-bottom));
    overflow-y: auto;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
  }
  .site-notice__accept { width: 100%; }
}
