/* ==========================================================================
   BUI Mill Parts — v13 design layer (loaded after store.css)
   Hero banner, refined cards, motion and polish. Remove this file to roll
   back to the v12 look.
   ========================================================================== */
:root {
  --ink-950: #0a1b2e;
  --ink-900: #0f2740;
  --ink-800: #16345a;
  --saffron: #f26b1d;
  --saffron-2: #e8590c;
  --ease: cubic-bezier(.22, .8, .24, 1);
}

/* --------------------------------------------------------------- hero (hx) */
.hx { position: relative; overflow: hidden; color: #e7eef7; isolation: isolate;
  background: radial-gradient(70% 90% at 78% 30%, #1d4673 0%, var(--ink-900) 46%, var(--ink-950) 100%); }
.hx-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hx-bg::before { content: ""; position: absolute; width: 620px; height: 620px; right: -120px; top: -220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(242,107,29,.32), rgba(242,107,29,0) 66%); filter: blur(10px); }
.hx-bg::after { content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 48px 48px; mask-image: linear-gradient(180deg, #000 0%, transparent 92%); -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 92%); }
.hx-field { position: absolute; inset: 0; width: 100%; height: 100%; color: rgba(255,255,255,.07); }
.hx-viewport { display: grid; position: relative; }
.hx-slide { grid-area: 1 / 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(28px, 4vw, 64px);
  align-items: center; padding: clamp(36px, 4.6vw, 64px) 0 clamp(26px, 3vw, 38px); opacity: 0; visibility: hidden;
  transition: opacity .7s var(--ease), visibility 0s linear .7s; }
.hx-slide.is-active { opacity: 1; visibility: visible; transition: opacity .7s var(--ease), visibility 0s; }
.hx-eyebrow { display: inline-flex; align-items: center; gap: 9px; padding: 7px 14px 7px 11px; border-radius: 999px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); font-size: 12px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: #ffd2b3; backdrop-filter: blur(6px); }
.hx-pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--saffron); box-shadow: 0 0 0 0 rgba(242,107,29,.6); animation: hxPulse 2.2s infinite; }
@keyframes hxPulse { 0% { box-shadow: 0 0 0 0 rgba(242,107,29,.55); } 70% { box-shadow: 0 0 0 10px rgba(242,107,29,0); } 100% { box-shadow: 0 0 0 0 rgba(242,107,29,0); } }
.hx-title { font-family: var(--serif); font-weight: 800; color: #fff; font-size: clamp(2.1rem, 4.1vw, 3.55rem); line-height: 1.04;
  letter-spacing: -.03em; margin: 20px 0 18px; text-wrap: balance; }
.hx-lede { font-size: clamp(15px, 1.25vw, 17.5px); line-height: 1.7; color: #b9c7d8; max-width: 540px; margin: 0 0 28px; }
.hx-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hx .btn-primary { background: linear-gradient(180deg, #ff7a2e, var(--saffron-2)); border-color: transparent; box-shadow: 0 14px 30px -12px rgba(242,107,29,.75); }
.hx .btn-primary:hover { filter: brightness(1.05); transform: translateY(-1px); }
.hx-ghost { background: rgba(255,255,255,.06); color: #fff; border: 1px solid rgba(255,255,255,.22); }
.hx-ghost:hover { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.35); }
.hx-ghost .icon { color: #ffd2b3; }
.hx-proof { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 26px 0 0; margin: 28px 0 0; border-top: 1px solid rgba(255,255,255,.12); font-size: 13px; color: #9fb1c7; }
.hx-proof strong { color: #fff; font-weight: 700; }

/* staggered entrance */
.hx-slide .hx-copy > * { transform: translateY(14px); opacity: 0; transition: transform .7s var(--ease), opacity .7s var(--ease); }
.hx-slide.is-active .hx-copy > * { transform: none; opacity: 1; }
.hx-slide.is-active .hx-copy > *:nth-child(2) { transition-delay: .06s; }
.hx-slide.is-active .hx-copy > *:nth-child(3) { transition-delay: .12s; }
.hx-slide.is-active .hx-copy > *:nth-child(4) { transition-delay: .18s; }
.hx-slide.is-active .hx-copy > *:nth-child(5) { transition-delay: .24s; }

/* product stage: one hero card + two companions */
.hx-stage { position: relative; display: grid; grid-template-columns: 1.25fr 1fr; grid-template-rows: 1fr 1fr; gap: 16px; min-height: 410px; }
.hx-card { position: relative; display: flex; flex-direction: column; background: #fff; color: var(--ink); border-radius: 22px; overflow: hidden;
  box-shadow: 0 30px 60px -28px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.08); text-decoration: none;
  transform: translateY(24px) scale(.98); opacity: 0; transition: transform .8s var(--ease), opacity .8s var(--ease), box-shadow .3s; }
.hx-slide.is-active .hx-card { transform: none; opacity: 1; }
.hx-slide.is-active .hx-card-1 { transition-delay: .1s; }
.hx-slide.is-active .hx-card-2 { transition-delay: .2s; }
.hx-card:hover { box-shadow: 0 36px 70px -26px rgba(0,0,0,.7), 0 0 0 2px rgba(242,107,29,.7); color: var(--ink); }
.hx-card-0 { grid-row: 1 / span 2; }
.hx-card-solo { grid-column: 1 / -1; }
.hx-card-media { flex: 1 1 auto; display: grid; place-items: center; padding: 18px; background: radial-gradient(80% 80% at 50% 40%, #fff 0%, #f1f4f8 100%); min-height: 0; }
.hx-card-media img { width: 100%; height: 100%; max-height: 300px; object-fit: contain; mix-blend-mode: multiply; transition: transform .6s var(--ease); }
.hx-card-0 .hx-card-media img { max-height: 340px; }
.hx-card-1 .hx-card-media img, .hx-card-2 .hx-card-media img { max-height: 118px; }
.hx-card:hover .hx-card-media img { transform: scale(1.05); }
.hx-card-body { display: grid; gap: 3px; padding: 14px 16px 15px; border-top: 1px solid #eef1f5; }
.hx-card-cat { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--saffron-2); }
.hx-card-name { font-weight: 600; font-size: 14px; line-height: 1.35; color: var(--navy); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hx-card-1 .hx-card-name, .hx-card-2 .hx-card-name { font-size: 13px; -webkit-line-clamp: 1; }
.hx-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.hx-card-foot b { font-size: 15px; color: var(--ink); }
.hx-stock { font-style: normal; font-size: 11px; font-weight: 600; color: var(--green); background: var(--green-soft); padding: 3px 8px; border-radius: 999px; white-space: nowrap; }

/* tabs + arrows */
.hx-nav { display: flex; align-items: center; gap: 20px; padding-bottom: 26px; }
.hx-tabs { flex: 1; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; min-width: 0; }
.hx-tab { appearance: none; background: none; border: 0; color: #8ea2ba; text-align: left; cursor: pointer; padding: 10px 2px 0; display: grid; grid-template-columns: auto 1fr; column-gap: 8px; row-gap: 10px; font: inherit; min-width: 0; }
.hx-tab-n { font-size: 11px; font-weight: 700; color: #5f7590; font-variant-numeric: tabular-nums; }
.hx-tab-l { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hx-tab-bar { grid-column: 1 / -1; order: -1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.14); overflow: hidden; }
.hx-tab-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ffb37f, var(--saffron)); border-radius: inherit; }
.hx-tab:hover { color: #dbe5f0; }
.hx-tab.is-active { color: #fff; }
.hx-tab.is-active .hx-tab-n { color: var(--saffron); }
.hx-tab.is-done .hx-tab-bar span { width: 100%; background: rgba(255,255,255,.4); }
.hx-tab.is-active .hx-tab-bar span { animation: hxFill var(--hx-dur, 6.5s) linear forwards; }
.hx.is-paused .hx-tab.is-active .hx-tab-bar span { animation-play-state: paused; }
.hx.is-static .hx-tab.is-active .hx-tab-bar span { animation: none; width: 100%; }
@keyframes hxFill { from { width: 0; } to { width: 100%; } }
.hx-arrows { display: flex; gap: 8px; flex: 0 0 auto; }
.hx-arrow { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: #fff;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.18); transition: background .2s, transform .2s; }
.hx-arrow:hover { background: var(--saffron-2); border-color: var(--saffron-2); }
.hx-arrow:active { transform: scale(.94); }
.hx-arrow .icon { width: 18px; height: 18px; }
.hx-left { transform: rotate(90deg); }
.hx-right { transform: rotate(-90deg); }
.hx-ico-play { display: none; fill: currentColor; stroke: none; }
.hx.is-paused .hx-ico-pause { display: none; }
.hx.is-paused .hx-ico-play { display: inline; }
.hx :focus-visible { outline: 2px solid #ffb37f; outline-offset: 3px; }

@media (max-width: 1080px) {
  .hx-stage { min-height: 380px; }
  .hx-tab-l { font-size: 12px; }
}
@media (max-width: 860px) {
  .hx-slide { grid-template-columns: 1fr; padding-top: 36px; gap: 26px; }
  .hx-stage { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: auto; min-height: 0; gap: 10px; }
  .hx-card-0 { grid-row: auto; }
  .hx-card-media { padding: 10px; aspect-ratio: 1; }
  .hx-card-media img, .hx-card-0 .hx-card-media img, .hx-card-1 .hx-card-media img, .hx-card-2 .hx-card-media img { max-height: none; }
  .hx-card-body { padding: 9px 10px 10px; }
  .hx-card-name, .hx-card-0 .hx-card-name { font-size: 12px; -webkit-line-clamp: 2; }
  .hx-card-foot { flex-direction: column; align-items: flex-start; gap: 4px; }
  .hx-card-foot b { font-size: 13px; }
  .hx-stock { display: none; }
  .hx-tab-l, .hx-tab-n { display: none; }
  .hx-tab { padding-top: 4px; }
  .hx-nav { padding-bottom: 20px; }
}
@media (max-width: 520px) {
  .hx-title { font-size: 2.05rem; margin-top: 16px; }
  .hx-actions .btn { flex: 1 1 100%; justify-content: center; }
  .hx-proof { font-size: 12px; gap: 6px 14px; margin-top: 22px; padding-top: 18px; }
  .hx-card-cat { display: none; }
  .hx-arrow { width: 40px; height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .hx-slide, .hx-slide .hx-copy > *, .hx-card { transition: none !important; }
  .hx-pulse { animation: none; }
}

/* --------------------------------------------------------------- reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* --------------------------------------------------------------- image fallback */
img.img-fallback { object-fit: contain !important; padding: 18%; background: #f4f6f8; }

/* --------------------------------------------------------------- recently viewed */
.recent { padding: 46px 0 10px; }
.recent-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.recent-head h2 { font-size: clamp(1.25rem, 2vw, 1.6rem); margin: 6px 0 0; }
.recent-clear { background: none; border: 0; color: var(--muted); font-size: 13px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.recent-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.recent-card { display: grid; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 16px; background: #fff; color: var(--ink); text-decoration: none; transition: box-shadow .25s, transform .25s, border-color .25s; }
.recent-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #d6dde6; color: var(--ink); }
.recent-media { aspect-ratio: 1; display: grid; place-items: center; background: #f6f8fa; border-radius: 11px; overflow: hidden; }
.recent-media img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.recent-name { font-size: 12.5px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.recent-price { font-size: 12.5px; color: var(--copper); font-weight: 700; }
@media (max-width: 900px) { .recent-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .recent-grid { grid-auto-flow: column; grid-auto-columns: 42%; grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; } .recent-card { scroll-snap-align: start; } }

/* --------------------------------------------------------------- header (single top bar) */
.announce { background: var(--ink-950); }
.announce-inner { min-height: 36px; }
.announce-links { align-items: center; gap: 20px; }
.announce-links a { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.announce-links .icon { width: 14px; height: 14px; color: #ffb37f; }
.announce .country-switch select { background: rgba(255,255,255,.08); color: #e6edf5; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; padding: 3px 26px 3px 10px; font: inherit; font-size: 12px; cursor: pointer; }
.announce .country-switch select option { color: #111; }
.site-header { box-shadow: 0 1px 0 var(--line); backdrop-filter: saturate(1.4) blur(10px); }
@media (max-width: 991px) { .announce-links .a-phone, .announce-links a[href*="contact"] { display: none; } }

/* --------------------------------------------------------------- section rhythm */
.section-head h2 { letter-spacing: -.025em; text-wrap: balance; }
.section-head .eyebrow { display: inline-flex; align-items: center; gap: 8px; }
.section-head .eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: var(--copper); }
.link-arrow { padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; transition: border-color .2s, box-shadow .2s, color .2s; }
.link-arrow:hover { border-color: var(--copper); box-shadow: 0 6px 18px -10px rgba(232,89,12,.6); }

/* --------------------------------------------------------------- category bento */
.cat-grid-dept { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 230px; gap: 16px; }
.cat-grid-dept .cat-tile { min-height: 0; border-radius: 20px; background: #fff; }
.cat-grid-dept .cat-tile-wide { grid-column: span 2; grid-row: span 2; }
.cat-grid-dept .cat-tile:nth-child(2):nth-last-child(3) { grid-column: span 2; }
.cat-grid-dept .cat-tile img { object-fit: contain; padding: 18px 18px 70px; background: radial-gradient(90% 90% at 50% 35%, #fff 0%, #eef2f6 100%); mix-blend-mode: normal; }
.cat-grid-dept .cat-tile-wide img { object-fit: cover; padding: 0; }
.cat-grid-dept .cat-tile::after { background: linear-gradient(180deg, rgba(10,27,46,0) 45%, rgba(10,27,46,.86) 100%); }
.cat-tile-link { opacity: 1; transform: none; color: #ffd2b3; }
.cat-tile h3 { font-size: 1.2rem; letter-spacing: -.01em; }
.cat-grid-dept .cat-tile-wide h3 { font-size: 1.7rem; }
@media (max-width: 991px) {
  .cat-grid-dept { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 200px; }
  .cat-grid-dept .cat-tile-wide { grid-column: span 2; grid-row: span 1; }
  .cat-grid-dept .cat-tile:nth-child(2):nth-last-child(3) { grid-column: span 1; }
  .cat-grid-dept .cat-tile:last-child:nth-child(even) { grid-column: span 2; }
}
@media (max-width: 479px) {
  .cat-grid-dept { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; grid-auto-rows: 170px; gap: 10px; }
  .cat-grid-dept .cat-tile-wide { grid-column: span 2 !important; }
  .cat-tile-body { padding: 14px; }
  .cat-tile h3 { font-size: 1rem; }
}

/* --------------------------------------------------------------- product cards */
.p-card { border-radius: 18px; border-color: #e6eaf0; }
.p-card:hover { transform: translateY(-4px); box-shadow: 0 24px 44px -26px rgba(16,42,67,.45); border-color: #d6dde6; }
.p-media { background: radial-gradient(90% 90% at 50% 40%, #fff 0%, #f3f5f8 100%); }
.p-media img { object-fit: contain; padding: 8%; mix-blend-mode: multiply; }
.p-card:hover .p-media img { transform: scale(1.06); }
.p-media .badge { border-radius: 999px; font-size: 10px; letter-spacing: .06em; }
.p-body { gap: 0; }
.p-cat { font-size: 10.5px; letter-spacing: .09em; }
.p-body h3 { font-weight: 600; }
.p-price { font-size: 1.05rem; font-weight: 800; letter-spacing: -.01em; }
.p-card .p-actions .btn { border-radius: 10px; min-height: 40px; }
.p-card .p-actions .btn-primary { background: var(--navy); border-color: var(--navy); box-shadow: none; }
.p-card .p-actions .btn-primary:hover { background: var(--copper); border-color: var(--copper); }

/* department spotlights: keep a true 2 x 2 grid beside the promo */
.dept-grid .product-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.dept-promo { border-radius: 22px; min-height: 520px; }
.dept-promo img { object-fit: cover; }
@media (max-width: 991px) { .dept-promo { min-height: 300px; } }
@media (max-width: 479px) { .dept-grid .product-grid-2 { gap: 10px; } .section-dept .p-body { padding: 10px 11px 12px; } }

/* --------------------------------------------------------------- trust strip */
.trust-strip { background: #fff; border-bottom: 1px solid var(--line); }
.trust-item .icon { width: 40px; height: 40px; padding: 9px; border-radius: 12px; background: var(--copper-soft); color: var(--copper); flex: 0 0 auto; }

/* --------------------------------------------------------------- footer accent */
.site-footer { position: relative; }
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--bui-red), var(--saffron), #ffb37f); }

/* arrows built from the shared chevron icon */
.gallery-prev .icon { transform: rotate(90deg); }
.gallery-next .icon { transform: rotate(-90deg); }
