/* Shared DUOTEX customer experience: catalogue, account, cart and checkout. */
:root {
  --duotex-ink: #1d293a;
  --duotex-muted: #687384;
  --duotex-paper: #fffdf8;
  --duotex-line: #e8e5df;
  --duotex-pink: #f181ad;
  --duotex-purple: #ac7bdb;
  --duotex-mint: #88dbc4;
}

button, a, input, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid #92c7ef;
  outline-offset: 3px;
}

/* A clearer colour-finding sequence: scope first, optional group filters second. */
.colour-browser {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px 24px;
  margin: 12px 0 14px;
  padding: 18px 22px;
  border: 1px solid var(--duotex-line);
  border-radius: 22px;
  background: linear-gradient(115deg, #fff 0%, #fffafc 55%, #fffdf8 100%);
}
.colour-browser-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.colour-browser-heading .eyebrow { margin: 0 0 3px; color: #bd7191; font-size: 10px; }
.colour-browser-heading h2 { margin: 0; color: var(--duotex-ink); font: 600 clamp(20px, 2.4vw, 25px)/1.1 Fredoka, Manrope, sans-serif; }
.colour-browser-heading > p { max-width: 390px; margin: 0; color: var(--duotex-muted); font-size: 12px; line-height: 1.5; }
.colour-browser .colour-scope { grid-column: 2; grid-row: 1; justify-content: flex-end; margin: 0; padding: 4px; border-color: #eee9e3; background: #f8f6f2; }
.colour-browser .colour-scope > button { min-height: 40px; padding: 9px 14px; color: #455166; font-size: 12px; }
.colour-browser .colour-scope > button[aria-pressed="true"] { border-color: #e8e5df; background: #fff; color: var(--duotex-ink); box-shadow: 0 3px 10px #1d293a12; }
.controls { position: relative; }
.controls input[type="search"] { min-height: 50px; border-color: var(--duotex-line); background: #fff; box-shadow: 0 4px 14px #1d293a08; }
.controls input[type="search"]:focus { border-color: #b88ad7; box-shadow: 0 0 0 4px #ac7bdb24; }
.group-filter { border-radius: 20px; background: #fffdf8; }
.group-filter legend { color: var(--duotex-ink); font-weight: 800; }
.group-filter-option { transition: transform .16s ease, background .16s ease, border-color .16s ease; }
.group-filter-option:hover { transform: translateY(-1px); }
.catalog-sidebar { min-width: 0; }
.catalog { scrollbar-color: #d5c0e5 #f7f5f1; scrollbar-width: thin; }
.color-choice { transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.color-choice:hover { transform: translateY(-1px); }
.color-choice[aria-pressed="true"], .color-choice.is-selected { box-shadow: 0 0 0 2px #ac7bdb24, 0 5px 14px #1d293a0c; }

/* Shared drawer styling keeps product images, quantities and totals easy to scan. */
.cart-panel, .favorites-panel { width: min(560px, 100%); background: var(--duotex-paper); }
.cart-head, .favorites-panel .cart-head { position: sticky; z-index: 4; top: -24px; padding: 20px 0 16px; background: var(--duotex-paper); }
.cart-head h2 { color: var(--duotex-ink); font: 600 clamp(26px, 5vw, 34px)/1.05 Fredoka, sans-serif; }
.cart-intro { font-size: 14px; }
.cart-line { grid-template-columns: 64px minmax(0, 1fr) 76px auto; gap: 12px; padding: 13px; border-radius: 17px; box-shadow: 0 3px 12px #1d293a08; }
.cart-product-image { width: 64px; height: 64px; border: 1px solid #f0eee9; }
.cart-line strong { font-size: 16px; }
.cart-summary { margin-top: 16px; border-radius: 17px; }
.cart-summary dt { letter-spacing: .04em; }
.cart-money-total { padding: 15px 17px; border-radius: 16px; font-size: 14px; }
.cart-message { color: var(--duotex-muted); }
.cart-actions { position: sticky; z-index: 3; bottom: -24px; margin: 12px -24px -24px; padding: 14px 24px 24px; background: linear-gradient(180deg, #fffdf800 0%, #fffdf8 24%); }
.cart-actions button { min-height: 46px; transition: transform .16s ease, background .16s ease, box-shadow .16s ease; }
.cart-actions button:hover { transform: translateY(-1px); box-shadow: 0 6px 14px #1d293a1a; }
.cart-actions .secondary-button:hover { background: #fff7fa; border-color: #edc4d5; }

/* Account pages use the same centred wordmark and pill navigation as the catalogue. */
.duotex-portal header { min-height: 82px; }
.duotex-portal header > a.portal-brand {
  display: inline-flex; flex-direction: column; align-items: center; gap: 5px;
  color: var(--duotex-ink); text-align: center; text-decoration: none;
}
.duotex-portal .portal-brand span { font: 700 28px/.82 Fredoka, sans-serif; letter-spacing: -.07em; }
.duotex-portal .portal-brand small { padding-left: 4px; font: 800 8px/1 Manrope, sans-serif; letter-spacing: 4px; }
.duotex-portal main { border-color: var(--duotex-line); }
.duotex-portal .login h2 { font: 600 24px/1.1 Fredoka, sans-serif; }
.duotex-portal .login form > button { min-height: 44px; }
.duotex-portal .orders h2 { font: 600 clamp(22px, 3vw, 28px)/1.1 Fredoka, sans-serif; }
.duotex-portal .orders > form:not(.switch-account) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.duotex-portal .orders > form:not(.switch-account) > button { justify-self: start; align-self: end; margin: 12px 0; }
.duotex-portal .orders > form:not(.switch-account) > input[type="hidden"] { display: none; }

/* Checkout uses the same ink, cream and blush palette as the cart and account. */
body.checkout-page { background: radial-gradient(circle at 50% 0, #fff 0, transparent 48%), var(--duotex-paper); color: var(--duotex-ink); }
.checkout-header { position: relative; height: auto; min-height: 82px; padding: 12px max(18px, calc((100vw - 1240px)/2)); background: transparent; color: var(--duotex-ink); }
.checkout-header .brand { position: absolute; left: 50%; top: 50%; display: inline-flex; flex-direction: column; align-items: center; gap: 5px; transform: translate(-50%, -50%); color: var(--duotex-ink); }
.checkout-header .brand span { font: 700 28px/.82 Fredoka, sans-serif; letter-spacing: -.07em; }
.checkout-header .brand small { padding-left: 4px; font: 800 8px/1 Manrope, sans-serif; letter-spacing: 4px; }
.checkout-header > a:last-child { padding: 10px 15px; border: 1px solid var(--duotex-line); border-radius: 999px; background: #fff; color: var(--duotex-ink); font-size: 12px; text-decoration: none; }
.checkout-header > a:last-child:hover { border-color: #edc4d5; background: #fff7fa; }
.checkout-main { margin-top: 26px; }
.checkout-main > .eyebrow { color: #bd7191; }
.checkout-card { border-color: var(--duotex-line); background: linear-gradient(180deg, #fff 0%, #fffdfb 100%); box-shadow: 0 10px 28px #1d293a08; }
.checkout-card h2 { color: var(--duotex-ink); }
.shipping-option { transition: border-color .16s ease, background .16s ease, transform .16s ease; }
.shipping-option:hover { transform: translateY(-1px); border-color: #d8c0e6; }
.checkout-actions button { transition: transform .16s ease, box-shadow .16s ease; }
.checkout-actions button:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 7px 16px #1d293a20; }

/* Finish the shared visual system across catalogue, account, cart and checkout. */
.duotex-portal header {
  width: min(1280px, 100%);
  min-height: 88px;
  margin: 0 auto;
  padding: 16px 24px;
}
.duotex-portal header > a.portal-brand { gap: 6px; }
.duotex-portal .portal-brand span { font-size: 31px; }
.duotex-portal .portal-brand small { letter-spacing: 4.5px; }
.duotex-portal nav { gap: 8px; }
.duotex-portal nav a { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; }
.duotex-portal main { border-color: #f0ede7; box-shadow: 0 16px 42px #1d293a0b; }
.duotex-portal .login, .duotex-portal .orders,
.duotex-portal .admin-grid section { box-shadow: 0 8px 24px #1d293a08; }
.duotex-portal .orders h2, .duotex-portal .admin-grid h2 { margin-top: 0; }
.duotex-portal input:not([type="checkbox"]):not([type="radio"]),
.duotex-portal select { min-height: 46px; border-radius: 13px; }
.duotex-portal button, .duotex-portal .portal-logout-button { min-height: 42px; }

.site-header .cart-toggle, .site-header .favorites-toggle,
.checkout-header > a:last-child, .duotex-portal nav a {
  transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.site-header .cart-toggle:hover, .site-header .favorites-toggle:hover,
.checkout-header > a:last-child:hover, .duotex-portal nav a:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 13px #1d293a10;
}
.cart-freight-choices {
  margin: 14px 0;
  padding: 13px;
  border: 1px solid var(--duotex-line);
  border-radius: 17px;
  background: linear-gradient(120deg, #fff 0%, #fff8fb 100%);
}
.cart-freight-choices > span { color: var(--duotex-ink); font-weight: 800; }
.cart-freight-choices button[aria-pressed="true"] { border-color: var(--duotex-purple); background: #f5edfb; color: var(--duotex-ink); box-shadow: inset 0 0 0 1px #ac7bdb40; }
.cart-summary div { background: linear-gradient(180deg, #fff 0%, #fffdf8 100%); }
.cart-summary dd { color: var(--duotex-ink); }
.cart-money-total { border: 1px solid #d5eee5; background: #f0faf6; color: #216b59; font-weight: 800; }
.cart-message:empty { display: none; }
.cart-line:focus-within { border-color: #d3b7e8; box-shadow: 0 0 0 3px #ac7bdb1c; }
.cart-line input:focus-visible { outline-color: #ac7bdb; }
.color-browser .colour-scope { box-shadow: inset 0 1px 2px #1d293a08; }
.colour-browser .colour-scope > button { border-radius: 999px; }
.colour-browser .colour-scope > button[aria-pressed="true"] { box-shadow: 0 3px 9px #1d293a12; }
.group-filter-option:focus-within, .favorite-filter-button:focus-visible,
.color-choice-wrap .favorite-button:focus-visible { outline: 3px solid #92c7ef; outline-offset: 2px; }

@media (max-width: 760px) {
  .duotex-portal header { min-height: 72px; padding: 12px 16px; }
  .duotex-portal .portal-brand span { font-size: 27px; }
  .duotex-portal nav a { min-height: 38px; padding: 8px 11px; }
  .colour-browser { border-radius: 18px; }
  .cart-freight-choices { padding: 11px; }
}
@media (max-width: 600px) {
  .duotex-portal header { gap: 8px; }
  .duotex-portal nav { position: static; justify-content: center; transform: none; }
  .duotex-portal nav a { font-size: 11px; }
  .duotex-portal main { width: calc(100% - 20px); margin: 8px auto 24px; padding: 21px 16px; border-radius: 22px; }
  .cart-line { gap: 9px; padding: 10px; }
  .cart-summary dt { font-size: 9px; }
  .cart-actions { flex-wrap: wrap; }
  .cart-actions button { min-width: calc(50% - 6px); }
  .cart-actions #cart-checkout { flex-basis: 100%; }
}

@media (max-width: 760px) {
  .colour-browser { grid-template-columns: 1fr; gap: 12px; padding: 16px; }
  .colour-browser-heading { align-items: flex-start; flex-direction: column; gap: 6px; }
  .colour-browser-heading > p { max-width: none; }
  .colour-browser .colour-scope { grid-column: 1; grid-row: auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
  .colour-browser .colour-scope > button { min-width: 0; padding: 9px 6px; white-space: normal; }
  .cart-head, .favorites-panel .cart-head { top: -18px; }
  .cart-actions { bottom: -18px; margin: 12px -18px -18px; padding: 12px 18px 18px; }
}
@media (max-width: 600px) {
  .duotex-portal header { gap: 10px; }
  .duotex-portal header > a.portal-brand { position: static; transform: none; }
  .duotex-portal .orders > form:not(.switch-account) { grid-template-columns: 1fr; }
  .cart-line { grid-template-columns: 54px minmax(0, 1fr) 64px; }
  .cart-product-image { width: 54px; height: 54px; }
}
