/* ==========================================================================
   Rivolt LLC - static storefront
   style.css: design tokens, base elements, layout, header, navigation,
   mobile drawer, footer and global UI (toasts, modal, back-to-top).
   Breakpoint overrides live in responsive.css.
   ========================================================================== */

/* Krub (SIL Open Font License) - self-hosted, latin subset */
@font-face { font-family: "Krub"; font-style: normal; font-weight: 300; font-display: swap; src: url("../fonts/krub-300.woff2") format("woff2"); }
@font-face { font-family: "Krub"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/krub-400.woff2") format("woff2"); }
@font-face { font-family: "Krub"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/krub-500.woff2") format("woff2"); }
@font-face { font-family: "Krub"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/krub-600.woff2") format("woff2"); }
@font-face { font-family: "Krub"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/krub-700.woff2") format("woff2"); }

:root {
  /* brand */
  --primary: #EF233C;          /* Rivolt red (decorative, large surfaces) */
  --primary-strong: #D81D33;   /* AA-contrast red for text & buttons */
  --primary-hover: #B91628;
  --primary-light: #FFF4F6;

  /* neutrals */
  --text: #212529;
  --text-muted: #6C757D;
  --text-light: #ADB5BD;
  --border: #E9ECEF;
  --border-dark: #DEE2E6;
  --form-border: #CED4DA;
  --bg: #FFFFFF;
  --bg-soft: #F1F3F5;
  --bg-footer: #F6F7F9;

  /* states */
  --success: #12B886;
  --success-strong: #087F5B;
  --success-light: #E6FCF5;
  --danger: #F03E3E;
  --danger-strong: #C92A2A;
  --danger-light: #FFF5F5;
  --warning: #FD7E14;
  --warning-light: #FFF4E6;
  --info-light: #E7F5FF;
  --review: #FCC419;

  /* shape */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-btn: 10px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow-xs: 0 1px 3px 0 rgba(33, 37, 41, .1);
  --shadow-sm: 1px 2px 5px rgba(134, 142, 150, .12);
  --shadow: 0 20px 25px -5px rgba(33, 37, 41, .1), 0 10px 10px -5px rgba(33, 37, 41, .04);
  --shadow-lg: 0 25px 50px -12px rgba(33, 37, 41, .25);

  /* layout */
  --container: 1280px;
  --gutter: 15px;
  --header-desktop-h: 179px;
  --header-mobile-h: 60px;

  --font: "Krub", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.28, .12, .22, 1);
  --ease-out: cubic-bezier(.17, .62, .44, .99);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: .9375rem;
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: -.03px;
  color: var(--text);
  background: var(--bg);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--primary-strong); }
p { margin: 0 0 1rem; }
h1, h2, h3, h4, h5, h6 { margin: 0 0 .75rem; font-weight: 600; line-height: 1.25; color: var(--text); letter-spacing: -.01em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.0625rem; }
h5 { font-size: .9375rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.25rem; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; }
table { border-collapse: collapse; width: 100%; }
del { color: var(--text-muted); }
ins { text-decoration: none; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }
[hidden] { display: none !important; }
::selection { background: var(--primary); color: #fff; }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--primary-strong); outline-offset: 2px; border-radius: 4px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: -100px; left: 16px; z-index: 3000;
  padding: .75rem 1.25rem; border-radius: var(--radius-btn);
  background: var(--text); color: #fff; font-weight: 600;
}
.skip-link:focus { top: 16px; color: #fff; }

.icon { width: 1.25em; height: 1.25em; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.icon.is-filled { fill: currentColor; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.site-main { display: block; min-height: 50vh; }
.section { margin-top: 2.5rem; }
.section-lg { margin-top: 3.75rem; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  height: 42px; padding: 0 1.25rem;
  font-family: var(--font); font-size: .875rem; font-weight: 600; line-height: 1; white-space: nowrap;
  border: 1px solid transparent; border-radius: var(--radius-btn);
  background: var(--bg-soft); color: var(--text);
  cursor: pointer; user-select: none;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease), transform .1s;
}
.btn:hover { background: var(--border-dark); color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn .icon { width: 1.1em; height: 1.1em; }
.btn-primary { background: var(--primary-strong); border-color: var(--primary-strong); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }
.btn-dark { background: var(--text); border-color: var(--text); color: #fff; }
.btn-dark:hover { background: #000; color: #fff; }
.btn-outline { background: #fff; border-color: var(--form-border); color: var(--text); }
.btn-outline:hover { background: #fff; border-color: var(--text); color: var(--text); }
.btn-success { background: var(--success-strong); border-color: var(--success-strong); color: #fff; }
.btn-success:hover { background: #066649; color: #fff; }
.btn-link { height: auto; padding: 0; border: 0; background: none; font-size: .8125rem; font-weight: 600; color: var(--text); }
.btn-link:hover { background: none; color: var(--primary-strong); }
.btn-link .icon { width: 1em; height: 1em; transition: transform .2s var(--ease); }
.btn-link:hover .icon { transform: translateX(3px); }
.btn-lg { height: 50px; padding: 0 1.75rem; font-size: .9375rem; }
.btn-sm { height: 34px; padding: 0 .875rem; font-size: .8125rem; border-radius: var(--radius-sm); }
.btn-block { display: flex; width: 100%; }
.btn-icon { width: 42px; padding: 0; }
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading::after {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Forms ---------- */
.form-control, .form-select {
  display: block; width: 100%; height: 42px; padding: 0 .9375rem;
  font-family: var(--font); font-size: .9375rem; font-weight: 500; color: var(--text);
  background: #fff; border: 1px solid var(--form-border); border-radius: var(--radius-btn);
  box-shadow: none; transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
  -webkit-appearance: none; appearance: none;
}
textarea.form-control { height: auto; min-height: 140px; padding: .75rem .9375rem; resize: vertical; line-height: 1.5; }
.form-select {
  padding-right: 2.25rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23212529' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .75rem center; background-size: 14px;
}
.form-control::placeholder { color: var(--text-light); font-weight: 400; }
.form-control:focus, .form-select:focus { border-color: var(--text); box-shadow: 0 0 0 3px #EBEDF0; outline: none; }
.form-control[aria-invalid="true"] { border-color: var(--danger-strong); box-shadow: 0 0 0 3px var(--danger-light); }
.form-label { display: block; margin-bottom: .375rem; font-size: .8125rem; font-weight: 600; }
.form-label .req { color: var(--primary-strong); }
.form-group { margin-bottom: 1.125rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.25rem; }
.form-hint { margin-top: .375rem; font-size: .75rem; color: var(--text-muted); }
.field-error { margin-top: .375rem; font-size: .75rem; font-weight: 500; color: var(--danger-strong); }
.form-check { display: flex; align-items: flex-start; gap: .5rem; font-size: .875rem; cursor: pointer; }
.form-check input { width: 16px; height: 16px; margin-top: .2rem; accent-color: var(--primary-strong); flex-shrink: 0; }

/* Notices */
.notice {
  display: flex; align-items: flex-start; gap: .75rem;
  padding: 1rem 1.25rem; margin-bottom: 1.5rem;
  font-size: .875rem; line-height: 1.5;
  border-radius: var(--radius); border: 1px solid var(--border-dark); background: var(--bg-soft);
}
.notice .icon { width: 20px; height: 20px; margin-top: 1px; }
.notice p:last-child { margin-bottom: 0; }
.notice-info { background: var(--info-light); border-color: #A5D8FF; color: #1864AB; }
.notice-success { background: var(--success-light); border-color: #96F2D7; color: #0B6E4F; }
.notice-warning { background: var(--warning-light); border-color: #FFD8A8; color: #A3440B; }
.notice-error { background: var(--danger-light); border-color: #FFC9C9; color: var(--danger-strong); }
.notice a { font-weight: 600; text-decoration: underline; }

.demo-pill {
  display: inline-flex; align-items: center; gap: .375rem;
  padding: .25rem .625rem; border-radius: 30px;
  font-size: .6875rem; font-weight: 600; letter-spacing: .02em; text-transform: uppercase;
  background: var(--warning-light); color: #A3440B;
}

/* ==========================================================================
   Header
   ========================================================================== */
#site-header { min-height: var(--header-desktop-h); }
.site-header { position: relative; z-index: 100; background: #fff; }

/* Top bar */
.header-topbar { font-size: .75rem; border-bottom: 1px solid var(--border); }
.header-topbar .container { display: flex; align-items: center; justify-content: space-between; height: 42px; }
.topbar-menu { display: flex; align-items: center; margin: 0; padding: 0; list-style: none; }
.topbar-menu > li > a, .topbar-menu > li > button { display: inline-flex; align-items: center; height: 42px; padding: 0 .625rem; font-weight: 500; background: none; border: 0; font-size: .75rem; }
.topbar-menu > li:first-child > a { padding-left: 0; }
.topbar-right { display: flex; align-items: center; gap: 1rem; }
.header-notice { margin: 0; }
.header-notice span { color: var(--text-muted); }
.header-notice a { font-weight: 600; }

/* generic small dropdown (language / currency / account) */
.dropdown { position: relative; }
.dropdown-toggle { display: inline-flex; align-items: center; gap: .25rem; }
.dropdown-toggle .icon { width: .9em; height: .9em; transition: transform .2s var(--ease); }
.dropdown-menu {
  position: absolute; top: 100%; right: 0; z-index: 30;
  min-width: 140px; margin: 0; padding: .5rem 0; list-style: none;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .15s var(--ease-out), transform .15s var(--ease-out), visibility .15s;
}
.dropdown-menu a, .dropdown-menu button {
  display: flex; width: 100%; align-items: center; justify-content: space-between; gap: .5rem;
  padding: .4375rem 1rem; font-size: .8125rem; font-weight: 500; text-align: left;
  background: none; border: 0; color: var(--text);
}
.dropdown-menu a:hover, .dropdown-menu button:hover { color: var(--primary-strong); background: var(--bg-soft); }
.dropdown-menu [aria-checked="true"]::after { content: "✓"; color: var(--primary-strong); }
.dropdown.is-open > .dropdown-menu,
.dropdown:hover > .dropdown-menu,
.dropdown:focus-within > .dropdown-menu { opacity: 1; visibility: visible; transform: none; }
.dropdown.is-open > .dropdown-toggle .icon { transform: rotate(180deg); }

/* Main header row */
.header-main { position: relative; z-index: 9; background: #fff; }
.header-main .container { display: flex; align-items: center; gap: 2.25rem; padding-top: 20px; padding-bottom: 20px; }
.site-brand { flex-shrink: 0; display: inline-flex; }
.site-brand img { height: 40px; width: auto; }
.header-search { flex: 1; max-width: 720px; position: relative; }
.search-form { position: relative; }
.search-form .form-control { height: 50px; padding-left: 1.125rem; padding-right: 3.875rem; border-radius: var(--radius); }
.search-form .search-submit {
  position: absolute; top: 0; right: 0; width: 3.875rem; height: 50px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: none; color: var(--text);
}
.search-form .search-submit:hover { color: var(--primary-strong); }
.search-form .search-submit .icon { width: 22px; height: 22px; }

/* live search suggestions */
.search-suggest {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 40;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.search-suggest ul { margin: 0; padding: .375rem 0; list-style: none; }
.search-suggest li a { display: flex; align-items: center; gap: .875rem; padding: .5rem 1rem; }
.search-suggest li a:hover, .search-suggest li a[aria-selected="true"] { background: var(--bg-soft); color: var(--text); }
.search-suggest img { width: 46px; height: 46px; object-fit: contain; border: 1px solid var(--border); border-radius: var(--radius-xs); background: #fff; }
.search-suggest .s-name { font-size: .8125rem; font-weight: 600; line-height: 1.35; }
.search-suggest .s-price { font-size: .8125rem; color: var(--primary-strong); font-weight: 600; }
.search-suggest .s-price del { font-weight: 400; margin-right: .25rem; }
.search-suggest .s-all { display: block; padding: .75rem 1rem; font-size: .8125rem; font-weight: 600; border-top: 1px solid var(--border); background: #FAFBFC; }
.search-suggest .s-empty { padding: 1rem; font-size: .8125rem; color: var(--text-muted); }
.search-suggest mark { background: none; color: var(--primary-strong); }

.header-actions { display: flex; align-items: center; gap: 1.5rem; flex-shrink: 0; }
.quick-button { position: relative; display: flex; align-items: center; height: 42px; }
.quick-button > a, .quick-button > button { display: flex; align-items: center; gap: .625rem; height: 100%; padding: 0; background: none; border: 0; color: var(--text); }
.quick-icon { position: relative; display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; }
.quick-icon .icon { width: 26px; height: 26px; stroke-width: 1.5; }
.quick-text { display: flex; flex-direction: column; line-height: 1.2; text-align: left; }
.quick-text .primary-text { font-size: .875rem; font-weight: 600; }
.quick-text .sub-text { font-size: .75rem; color: var(--text-muted); }
.quick-text .cart-price { font-size: .9375rem; font-weight: 600; }
.count-badge {
  position: absolute; top: 2px; right: 0;
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  font-size: .625rem; font-weight: 700; line-height: 1;
  color: #fff; background: var(--primary-strong); border-radius: 30px; border: 2px solid #fff;
}
.count-badge.bump { animation: bump .35s var(--ease-out); }
@keyframes bump { 50% { transform: scale(1.3); } }
.account-button .chev { width: 14px; height: 14px; margin-left: .25rem; }

/* account dropdown */
.login-dropdown, .cart-dropdown {
  position: absolute; top: calc(100% + 12px); right: -10px; z-index: 50;
  width: 280px; padding: 1.25rem;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .15s var(--ease-out), transform .15s var(--ease-out), visibility .15s;
}
.login-dropdown::before, .cart-dropdown::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.quick-button:hover > .login-dropdown, .quick-button:focus-within > .login-dropdown, .quick-button.is-open > .login-dropdown,
.quick-button:hover > .cart-dropdown, .quick-button:focus-within > .cart-dropdown, .quick-button.is-open > .cart-dropdown { opacity: 1; visibility: visible; transform: none; }
.login-dropdown p { font-size: .8125rem; color: var(--text-muted); margin-bottom: 1rem; text-align: center; }
.login-dropdown .new-customer { margin-top: .875rem; font-size: .8125rem; text-align: center; color: var(--text-muted); }
.login-dropdown .new-customer a { color: var(--primary-strong); font-weight: 600; }

/* mini cart */
.cart-dropdown { width: 340px; padding: 0; }
.mini-cart-empty { display: flex; flex-direction: column; align-items: center; gap: .75rem; padding: 2rem 1.25rem; font-size: .875rem; color: var(--text-muted); text-align: center; }
.mini-cart-empty .icon { width: 44px; height: 44px; color: var(--text-light); stroke-width: 1.25; }
.mini-cart-list { max-height: 300px; margin: 0; padding: .5rem 1.25rem; list-style: none; overflow-y: auto; }
.mini-cart-list li { display: flex; gap: .75rem; align-items: flex-start; padding: .75rem 0; border-bottom: 1px solid var(--border); }
.mini-cart-list li:last-child { border-bottom: 0; }
.mini-cart-list img { width: 56px; height: 56px; object-fit: contain; border: 1px solid var(--border); border-radius: var(--radius-xs); background: #fff; flex-shrink: 0; }
.mini-cart-list .mc-info { flex: 1; min-width: 0; }
.mini-cart-list .mc-name { display: block; font-size: .8125rem; font-weight: 600; line-height: 1.35; margin-bottom: .25rem; }
.mini-cart-list .mc-qty { font-size: .75rem; color: var(--text-muted); }
.mini-cart-list .mc-qty strong { color: var(--primary-strong); }
.mini-cart-list .mc-remove { width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 50%; background: #fff; color: var(--text-muted); flex-shrink: 0; }
.mini-cart-list .mc-remove:hover { color: var(--danger-strong); border-color: var(--danger-strong); }
.mini-cart-list .mc-remove .icon { width: 14px; height: 14px; }
.mini-cart-footer { padding: 1rem 1.25rem 1.25rem; border-top: 1px solid var(--border); background: #FAFBFC; border-radius: 0 0 var(--radius) var(--radius); }
.mini-cart-total { display: flex; justify-content: space-between; margin-bottom: .875rem; font-size: .9375rem; }
.mini-cart-total strong { font-size: 1.0625rem; }
.mini-cart-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: .625rem; }

/* Navigation row */
.header-nav { position: relative; z-index: 8; background: #fff; }
.header-nav .container { display: flex; align-items: stretch; height: 48px; }
.cat-dropdown { position: relative; flex: 0 0 300px; margin-right: 1.25rem; }
.cat-toggle {
  display: flex; align-items: center; width: 100%; height: 48px; padding: 0 1.25rem;
  font-size: .9375rem; font-weight: 500; color: #fff;
  background: var(--primary-strong); border: 0; border-radius: 14px 14px 0 0;
}
.cat-toggle .icon:first-child { width: 20px; height: 20px; margin-right: .75rem; }
.cat-toggle .caret { margin-left: auto; width: 14px; height: 14px; transition: transform .2s var(--ease); }
.cat-dropdown.is-open .cat-toggle .caret { transform: rotate(180deg); }
.cat-menu {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 60;
  margin: 0; padding: .625rem 0; list-style: none;
  background: #fff; border: 1px solid var(--border); border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius); box-shadow: var(--shadow-sm);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .15s var(--ease-out), transform .15s var(--ease-out), visibility .15s;
}
.cat-dropdown.is-open .cat-menu { opacity: 1; visibility: visible; transform: none; }
.cat-menu a { display: flex; align-items: center; gap: .875rem; padding: .5625rem 1.25rem; font-size: .8125rem; font-weight: 500; }
.cat-menu a .icon { width: 18px; height: 18px; color: var(--text-muted); stroke-width: 1.5; }
.cat-menu a:hover .icon, .cat-menu a[aria-current="page"] .icon { color: var(--primary-strong); }
.cat-menu a[aria-current="page"] { color: var(--primary-strong); }
.cat-menu .count { margin-left: auto; font-size: .6875rem; color: var(--text-light); }

.primary-menu { display: flex; align-items: stretch; margin: 0; padding: 0; list-style: none; }
.primary-menu > li > a { display: inline-flex; align-items: center; height: 100%; padding: 0 .9375rem; font-size: .9375rem; font-weight: 500; }
.primary-menu > li > a[aria-current="page"] { color: var(--primary-strong); }

.mega-item { position: static; display: flex; }
.mega-toggle { display: inline-flex; align-items: center; gap: .5rem; height: 100%; padding: 0 .9375rem; font-size: .9375rem; font-weight: 500; background: none; border: 0; }
.mega-toggle .icon { width: 18px; height: 18px; }
.mega-toggle .chev { width: 12px; height: 12px; transition: transform .2s var(--ease); }
.mega-toggle:hover, .mega-item.is-open .mega-toggle { color: var(--primary-strong); }
.mega-item.is-open .mega-toggle .chev { transform: rotate(180deg); }
.mega-panel {
  position: absolute; top: 100%; left: var(--gutter); right: var(--gutter); z-index: 55;
  padding: 1.875rem; background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .15s var(--ease-out), transform .15s var(--ease-out), visibility .15s;
}
.mega-item:hover .mega-panel, .mega-item:focus-within .mega-panel, .mega-item.is-open .mega-panel { opacity: 1; visibility: visible; transform: none; }
.mega-head { text-align: center; margin-bottom: 1.5rem; }
.mega-head h2 { font-size: 1.375rem; margin-bottom: .25rem; }
.mega-head p { margin: 0; color: var(--text-muted); font-size: .875rem; }
.mega-products { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.875rem; }
.mini-product { display: flex; flex-direction: column; gap: .625rem; }
.mini-product .mp-thumb { display: block; aspect-ratio: 1; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #fff; }
.mini-product .mp-thumb img { width: 100%; height: 100%; object-fit: contain; transition: transform .35s var(--ease); }
.mini-product:hover .mp-thumb img { transform: scale(1.05); }
.mini-product .mp-title { font-size: .875rem; font-weight: 600; line-height: 1.3; margin: 0; }

.header-help { margin-left: auto; display: inline-flex; align-items: center; gap: .5rem; font-size: .875rem; font-weight: 500; }
.header-help .icon { width: 20px; height: 20px; color: var(--primary-strong); }

/* Sticky desktop header row */
.site-header.is-sticky .header-main {
  position: fixed; top: 0; left: 0; right: 0;
  box-shadow: 0 4px 18px rgba(33, 37, 41, .08);
  animation: slideDown .3s var(--ease-out);
}
.site-header.is-sticky .header-main .container { padding-top: 12px; padding-bottom: 12px; }
@keyframes slideDown { from { transform: translateY(-100%); } to { transform: none; } }

/* Mobile header (shown < 1200px, see responsive.css) */
.header-mobile { display: none; background: #fff; border-bottom: 1px solid var(--border); }
.header-mobile .container { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: var(--header-mobile-h); }
.header-mobile .site-brand { justify-self: center; }
.header-mobile .site-brand img { height: 32px; }
.header-mobile .m-left, .header-mobile .m-right { display: flex; align-items: center; gap: .25rem; }
.header-mobile .m-right { justify-content: flex-end; }
.icon-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0; border: 0; background: none; color: var(--text); border-radius: 50%;
}
.icon-btn:hover { background: var(--bg-soft); color: var(--text); }
.icon-btn .icon { width: 24px; height: 24px; stroke-width: 1.6; }
.icon-btn .count-badge { top: 3px; right: 1px; }
.mobile-search { display: none; padding: .75rem 0; border-bottom: 1px solid var(--border); background: #fff; }
.mobile-search.is-open { display: block; animation: fadeDown .2s var(--ease-out); }
.mobile-search .search-form .form-control { height: 46px; }
.mobile-search .search-form .search-submit { height: 46px; }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   Drawer (mobile navigation)
   ========================================================================== */
.site-mask {
  position: fixed; inset: 0; z-index: 900; background: rgba(33, 37, 41, .5);
  opacity: 0; visibility: hidden; transition: opacity .3s var(--ease), visibility .3s;
}
.site-mask.is-visible { opacity: 1; visibility: visible; }
.drawer {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 1000;
  display: flex; flex-direction: column;
  width: min(360px, 88vw); background: #fff; box-shadow: var(--shadow-lg);
  transform: translateX(-102%); visibility: hidden;
  transition: transform .35s cubic-bezier(.4, 0, .2, 1), visibility .35s;
}
.drawer.is-open { transform: none; visibility: visible; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: .75rem 1rem .75rem 1.25rem; border-bottom: 1px solid var(--border); }
.drawer-head img { height: 30px; width: auto; }
.drawer-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 1.25rem; }
.drawer-section + .drawer-section { margin-top: 1.5rem; }
.drawer-title { margin: 0 0 .625rem; font-size: .6875rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.drawer-menu { margin: 0; padding: 0; list-style: none; }
.drawer-menu a, .drawer-menu button {
  display: flex; align-items: center; gap: .75rem; width: 100%;
  min-height: 46px; padding: .5rem 0; border: 0; border-bottom: 1px solid var(--border);
  font-size: .9375rem; font-weight: 500; text-align: left; background: none;
}
.drawer-menu a[aria-current="page"] { color: var(--primary-strong); }
.drawer-menu .icon { width: 20px; height: 20px; color: var(--text-muted); stroke-width: 1.5; }
.drawer-menu .count { margin-left: auto; font-size: .75rem; color: var(--text-light); }
.drawer-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: .375rem; padding: .25rem; margin-bottom: 1.25rem; background: var(--bg-soft); border-radius: var(--radius-btn); }
.drawer-tabs button { height: 38px; border: 0; border-radius: var(--radius-sm); background: none; font-size: .8125rem; font-weight: 600; color: var(--text-muted); }
.drawer-tabs button[aria-selected="true"] { background: #fff; color: var(--text); box-shadow: var(--shadow-xs); }
.drawer-contact { font-size: .875rem; line-height: 1.8; }
.drawer-contact a { display: flex; align-items: center; gap: .5rem; font-weight: 600; }
.drawer-contact .icon { width: 18px; height: 18px; color: var(--primary-strong); }
.drawer-switchers { display: grid; grid-template-columns: 1fr 1fr; gap: .625rem; }
.drawer-switchers .form-select { height: 40px; font-size: .8125rem; }

/* Mobile bottom bar */
.mobile-bottom-menu {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 800;
  display: none; padding: .375rem .5rem calc(.375rem + env(safe-area-inset-bottom));
  background: #fff; border-top: 1px solid var(--border-dark);
  box-shadow: 0 -4px 12px rgba(33, 37, 41, .05);
}
.mobile-bottom-menu ul { display: flex; margin: 0; padding: 0; list-style: none; }
.mobile-bottom-menu li { flex: 1; }
.mobile-bottom-menu a, .mobile-bottom-menu button {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  width: 100%; min-height: 48px; padding: 0; border: 0; background: none;
  font-size: .625rem; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--text-muted);
}
.mobile-bottom-menu a[aria-current="page"] { color: var(--primary-strong); }
.mobile-bottom-menu .icon { width: 22px; height: 22px; stroke-width: 1.6; }
.mobile-bottom-menu .count-badge { top: 0; right: calc(50% - 22px); }

/* ==========================================================================
   Breadcrumb & page header
   ========================================================================== */
.breadcrumb { margin: 1.25rem 0 1rem; }
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; margin: 0; padding: 0; list-style: none; font-size: .75rem; }
.breadcrumb li { display: inline-flex; align-items: center; min-width: 0; }
.breadcrumb li + li::before { content: "/"; margin: 0 .5rem; color: var(--text-light); }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary-strong); }
.breadcrumb [aria-current="page"] { color: var(--text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60vw; }

.page-header { padding: .25rem 0 1.5rem; }
.page-header h1 { margin: 0; font-size: 2rem; }
.page-header p { margin: .5rem 0 0; color: var(--text-muted); max-width: 720px; }

/* ==========================================================================
   Footer
   ========================================================================== */
#site-footer { min-height: 400px; }
.site-footer { margin-top: 3.75rem; background: var(--bg-footer); color: var(--text); }
.footer-newsletter { background: #fff; }
.footer-newsletter .container > .inner { display: flex; align-items: center; gap: 2.5rem; padding: 3.125rem 0; border-top: 1px solid var(--border-dark); }
.newsletter-text { display: flex; align-items: flex-start; gap: 1.875rem; flex: 1; }
.newsletter-text .text-icon { color: var(--text-light); }
.newsletter-text .text-icon .icon { width: 56px; height: 56px; stroke-width: 1.2; }
.newsletter-text .subtitle { margin: 0 0 .375rem; font-size: .9375rem; font-weight: 500; color: var(--primary-strong); }
.newsletter-text h2 { margin: 0 0 .375rem; font-size: 1.375rem; line-height: 1.35; }
.newsletter-text p { margin: 0; font-size: .8125rem; color: var(--text-muted); }
.newsletter-form { flex: 0 0 440px; }
.newsletter-form form { position: relative; display: flex; gap: .5rem; }
.newsletter-form .form-control { height: 50px; border-radius: var(--radius); }
.newsletter-form .btn { height: 50px; flex-shrink: 0; }
.newsletter-form .form-hint { margin-top: .5rem; }

.footer-widgets { border-top: 1px solid rgba(0, 0, 0, .06); }
.footer-widgets .container > .inner { display: flex; padding: 4.375rem 0; }
.footer-about { flex: 0 0 360px; max-width: 360px; padding-right: 2.5rem; border-right: 1px solid rgba(0, 0, 0, .08); }
.footer-about .f-logo img { height: 36px; width: auto; margin-bottom: 1.25rem; }
.footer-about p { font-size: .875rem; color: var(--text-muted); line-height: 1.7; }
.footer-contact { margin: 1.25rem 0 0; padding: 0; list-style: none; font-size: .875rem; }
.footer-contact li { display: flex; gap: .75rem; margin-bottom: .75rem; line-height: 1.5; }
.footer-contact .icon { width: 18px; height: 18px; margin-top: 2px; color: var(--primary-strong); }
.footer-contact .company-phone { font-size: 1.25rem; font-weight: 600; }
.footer-contact a:hover { color: var(--primary-strong); }
.footer-columns { flex: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.875rem; padding-left: 4rem; }
.footer-col h2 { margin: 0 0 1.125rem; font-size: 1rem; font-weight: 600; }
.footer-col ul { margin: 0; padding: 0; list-style: none; }
.footer-col li { margin-bottom: .5625rem; }
.footer-col a { font-size: .875rem; color: var(--text-muted); }
.footer-col a:hover { color: var(--primary-strong); }
.footer-col .hours { font-size: .8125rem; color: var(--text-muted); }

.social-links { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.25rem 0 0; padding: 0; list-style: none; }
.social-links a, .social-links button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border-dark); background: #fff; color: var(--text);
  transition: all .2s var(--ease);
}
.social-links a:hover, .social-links button:hover { background: var(--primary-strong); border-color: var(--primary-strong); color: #fff; }
.social-links .icon { width: 17px; height: 17px; }

.subfooter { border-top: 1px solid rgba(0, 0, 0, .06); }
.sub-banners { display: flex; justify-content: center; flex-wrap: wrap; margin: 0; padding: .875rem 0; list-style: none; text-align: center; }
.sub-banners li { display: inline-flex; align-items: center; gap: .5rem; padding: .25rem 1.875rem; font-size: .875rem; font-weight: 600; }
.sub-banners li + li { border-left: 1px solid rgba(0, 0, 0, .1); }
.sub-banners .icon { width: 18px; height: 18px; color: var(--primary-strong); }
.sub-banners a { color: var(--primary-strong); text-decoration: underline; text-underline-offset: 3px; }

.footer-copyright { border-top: 1px solid rgba(0, 0, 0, .06); }
.footer-copyright .container > .inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 2.25rem 0; }
.footer-copyright p { margin: 0; font-size: .8125rem; color: var(--text-muted); }
.footer-copyright .credit-cards { height: 26px; width: auto; }

/* ==========================================================================
   Global UI: toast, modal, back to top
   ========================================================================== */
.toast-region {
  position: fixed; left: 50%; bottom: 24px; z-index: 2000;
  display: flex; flex-direction: column; align-items: center; gap: .625rem;
  width: max-content; max-width: calc(100vw - 32px);
  transform: translateX(-50%); pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: .75rem;
  max-width: 460px; padding: .75rem .75rem .75rem 1rem;
  color: #fff; background: #212529; border-radius: var(--radius);
  box-shadow: var(--shadow-lg); font-size: .875rem; line-height: 1.4;
  pointer-events: auto; animation: toastIn .3s var(--ease-out);
}
.toast.is-leaving { animation: toastOut .25s var(--ease) forwards; }
.toast .t-icon { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--success); color: #fff; flex-shrink: 0; }
.toast.is-info .t-icon { background: #339AF0; }
.toast.is-warning .t-icon { background: var(--warning); }
.toast.is-error .t-icon { background: var(--danger); }
.toast .t-icon .icon { width: 15px; height: 15px; stroke-width: 2.5; }
.toast .t-msg { flex: 1; }
.toast .t-action { flex-shrink: 0; padding: .375rem .75rem; border-radius: var(--radius-sm); background: rgba(255, 255, 255, .12); color: #fff; font-weight: 600; font-size: .8125rem; white-space: nowrap; }
.toast .t-action:hover { background: rgba(255, 255, 255, .22); color: #fff; }
.toast .t-close { display: inline-flex; padding: .25rem; border: 0; background: none; color: rgba(255, 255, 255, .6); }
.toast .t-close:hover { color: #fff; }
.toast .t-close .icon { width: 16px; height: 16px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }

.modal {
  position: fixed; inset: 0; z-index: 1500;
  display: flex; align-items: center; justify-content: center; padding: 1rem;
  background: rgba(33, 37, 41, .55);
  opacity: 0; visibility: hidden; transition: opacity .25s var(--ease), visibility .25s;
}
.modal.is-open { opacity: 1; visibility: visible; }
.modal-dialog {
  position: relative; width: 100%; max-width: 920px; max-height: calc(100vh - 2rem); overflow-y: auto;
  background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  transform: translateY(16px) scale(.98); transition: transform .25s var(--ease-out);
}
.modal.is-open .modal-dialog { transform: none; }
.modal-dialog.is-small { max-width: 460px; }
.modal-close { position: absolute; top: .75rem; right: .75rem; z-index: 2; }
.modal-body { padding: 2rem; }
.modal-message { text-align: center; }
.modal-message .m-icon { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; margin-bottom: 1rem; border-radius: 50%; background: var(--warning-light); color: var(--warning); }
.modal-message .m-icon .icon { width: 30px; height: 30px; }
.modal-message h2 { font-size: 1.25rem; }
.modal-message p { color: var(--text-muted); }
body.has-overlay { overflow: hidden; }

.back-to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 700;
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 50%;
  background: #fff; color: var(--text); border: 1px solid var(--border-dark); box-shadow: var(--shadow-xs);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s, background-color .2s;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover { background: var(--primary-strong); border-color: var(--primary-strong); color: #fff; }
.back-to-top .icon { width: 20px; height: 20px; }

/* Empty / status states */
.empty-state { padding: 3.5rem 1.5rem; text-align: center; border: 1px dashed var(--border-dark); border-radius: var(--radius-lg); background: #FCFCFD; }
.empty-state .es-icon { display: inline-flex; align-items: center; justify-content: center; width: 84px; height: 84px; margin-bottom: 1.25rem; border-radius: 50%; background: var(--bg-soft); color: var(--text-muted); }
.empty-state .es-icon .icon { width: 38px; height: 38px; stroke-width: 1.3; }
.empty-state h2 { font-size: 1.375rem; margin-bottom: .5rem; }
.empty-state p { max-width: 460px; margin: 0 auto 1.5rem; color: var(--text-muted); }

noscript .notice { margin: 1rem; }
