/* Side cart drawer: header, tools (order note / shipping estimate), checkout button with free-shipping
   progress, editable lines, suggestions carousel and editorial banner. */
.drawer-overlay { position: fixed; inset: 0; z-index: 300; background: rgba(15, 23, 42, .45); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 310; width: min(460px, 100vw);
  display: flex; flex-direction: column; background: #fff; box-shadow: -8px 0 30px rgba(0, 0, 0, .14);
  transform: translateX(100%); transition: transform .3s ease; visibility: hidden;
}
.drawer-open { overflow: hidden; }
.drawer-open .drawer-overlay { opacity: 1; visibility: visible; }
.drawer-open .drawer { transform: none; visibility: visible; }
.drawer button { font: inherit; }
.drawer svg { display: block; flex: none; }
.drawer del { color: #8a8a8a; font-weight: 400; }
.drawer a:focus-visible, .drawer button:focus-visible, .drawer input:focus-visible, .drawer select:focus-visible, .drawer textarea:focus-visible { outline: 3px solid var(--c-primary-aa); outline-offset: 2px; }

/* Head. */
.drawer__head { display: flex; align-items: center; gap: 18px; padding: 18px 22px; border-bottom: 1px solid var(--c-border-light); }
.drawer__title { flex: 1; margin: 0; font-size: 24px; font-weight: 700; color: var(--c-heading-dark); }
.drawer__view { font-size: 15px; color: var(--c-heading-dark); text-decoration: underline; text-underline-offset: 3px; }
.drawer__close { display: grid; place-items: center; width: 40px; height: 40px; margin-right: -8px; border: 0; background: none; color: #333; cursor: pointer; }
.drawer__close svg { width: 22px; height: 22px; }
.drawer__scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; }

/* Tools. */
.drawer__tools { padding: 16px 22px 0; }
.drawer[data-empty="1"] .drawer__tools { display: none; }
.drawer__tool-links { display: flex; justify-content: space-between; gap: 12px; }
.drawer__tool { padding: 4px 0; border: 0; background: none; color: var(--c-heading-dark); font-size: 15px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.drawer__tool[aria-expanded="true"] { color: var(--c-primary-aa); }
.drawer__panel { margin: 12px 0 0; padding: 14px; border-radius: 8px; background: #f6f6f7; }
.drawer__panel[hidden] { display: none; }
.drawer__panel label { display: block; font-size: 13px; font-weight: 600; color: var(--c-text); }
.drawer__panel textarea, .drawer__panel input, .drawer__panel select { width: 100%; margin-top: 6px; padding: 10px 12px; border: 1px solid var(--c-border); border-radius: 6px; background: #fff; font-size: 15px; }
.drawer__panel input, .drawer__panel select { height: 44px; padding-top: 0; padding-bottom: 0; }
.drawer__ship-fields { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; }
.drawer__panel-actions { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.drawer__panel-actions .btn { padding: 11px 20px; border-radius: 6px; font-family: var(--f-system); font-size: 14px; }
.drawer__panel-status { margin: 0; font-size: 13px; color: var(--c-text); }
.drawer__rates ul { margin: 10px 0 0; padding: 0; list-style: none; }
.drawer__rates li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--c-border-light); font-size: 14px; }
.drawer__rates:not(:has(ul)) { margin-top: 8px; font-size: 13px; color: var(--c-text); }

/* Checkout button + free-shipping progress. */
.drawer__summary:not(:empty) { padding: 16px 22px 0; }
.drawer__checkout { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 20px; border-radius: 28px; background: var(--c-primary-bright-aa); color: #fff; font-size: 17px; font-weight: 700; text-decoration: none; transition: background-color var(--t-fast); }
.drawer__checkout:hover { background: var(--c-heading-dark); color: #fff; }
.drawer__checkout svg { width: 22px; height: 22px; }
.drawer__checkout .amount { color: inherit; }
.drawer__progress { margin: 16px -22px 0; padding: 16px 22px 18px; background: #f3f3f4; text-align: center; }
.drawer__progress p { margin: 0 0 10px; font-size: 15px; font-weight: 600; color: var(--c-heading-dark); }
.drawer__bar { height: 8px; border-radius: 4px; background: #dfe1e5; overflow: hidden; }
.drawer__bar span { display: block; height: 100%; border-radius: 4px; background: var(--c-primary); transition: width .4s ease; }
.drawer__progress.is-complete .drawer__bar span { background: var(--c-heading-dark); }

/* Lines. */
.drawer__items { padding: 6px 22px 0; }
.dlines { margin: 0; padding: 0; list-style: none; }
.dline { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--c-border-light); transition: opacity .15s; }
.dline.is-updating { opacity: .45; pointer-events: none; }
.dline__media img { width: 84px; height: 100px; border-radius: 6px; object-fit: cover; background: var(--c-card-bg); }
.dline__title { display: block; font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--c-heading-dark); }
.dline .variation { display: flex; flex-wrap: wrap; gap: 0 4px; margin: 4px 0 0; font-size: 13px; color: #6b7280; }
.dline .variation dt, .dline .variation dd, .dline .variation p { display: inline; float: none; margin: 0; padding: 0; }
.dline__unit { margin: 6px 0 0; font-size: 14px; font-weight: 600; color: var(--c-heading-dark); }
.dline__controls { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.qty-stepper { display: inline-flex; align-items: center; height: 40px; border: 1.5px solid #d5d9de; border-radius: 20px; }
.qty-stepper button { display: grid; place-items: center; width: 36px; height: 100%; border: 0; background: none; color: var(--c-heading-dark); cursor: pointer; }
.qty-stepper button:disabled { color: #c3c7cd; cursor: not-allowed; }
.qty-stepper button svg { width: 16px; height: 16px; }
.qty-stepper input { width: 34px; height: 100%; padding: 0; border: 0; background: none; font-size: 15px; text-align: center; -moz-appearance: textfield; }
.qty-stepper input::-webkit-outer-spin-button, .qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.dline__remove { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: none; color: #6b7280; cursor: pointer; }
.dline__remove:hover { background: #fdecec; color: #b81c23; }
.dline__remove svg { width: 19px; height: 19px; }
.dline__single { font-size: 14px; color: var(--c-text); }
.dline__total { text-align: right; white-space: nowrap; }
.dline__total strong { display: block; font-size: 16px; color: var(--c-heading-dark); }
.dline__total del { display: block; margin-top: 2px; font-size: 13px; }
.drawer__empty { display: grid; justify-items: center; gap: 14px; padding: 36px 0 26px; text-align: center; color: var(--c-text); }
.drawer__empty svg { width: 46px; height: 46px; color: #c3c7cd; }
.drawer__empty p { margin: 0; font-size: 15px; }
.drawer__empty .btn { padding: 13px 26px; border-radius: 24px; font-family: var(--f-system); font-size: 15px; }

/* Suggestions. */
.drawer__suggest:not(:empty) { padding: 24px 22px 0; }
.dsug__head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 12px; }
.dsug__title { margin: 0; font-size: 19px; font-weight: 700; color: var(--c-heading-dark); }
.dsug__nav { display: flex; gap: 4px; }
.dsug__nav button { display: grid; place-items: center; width: 34px; height: 34px; border: 0; background: none; color: var(--c-heading-dark); cursor: pointer; }
.dsug__nav button:disabled { color: #c3c7cd; cursor: default; }
.dsug__nav svg { width: 20px; height: 20px; }
.dsug__track { display: flex; gap: 12px; margin: 0; padding: 0; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; list-style: none; }
.dsug__track::-webkit-scrollbar { display: none; }
.dsug { flex: 0 0 100%; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; padding: 14px; border-radius: 8px; background: #f3f3f4; scroll-snap-align: start; }
.dsug__media img { width: 96px; height: 96px; border-radius: 6px; object-fit: cover; background: #fff; }
.dsug__body { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.dsug__name { font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--c-heading-dark); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.dsug__price { margin: 0; font-size: 15px; font-weight: 700; color: var(--c-heading-dark); }
.dsug__price del { font-size: 13px; }
.dsug__price ins { text-decoration: none; }
.dsug__price .price__suffix { display: none; }
.dsug__add { display: inline-flex; align-items: center; margin-top: 4px; padding: 8px 18px; border: 1.5px solid var(--c-heading-dark); border-radius: 20px; background: #fff; color: var(--c-heading-dark); font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; transition: background-color var(--t-fast), color var(--t-fast); }
.dsug__add:hover { background: var(--c-heading-dark); color: #fff; }
.dsug__add.loading { opacity: .6; }

/* Banner. */
.drawer__banner { position: relative; display: block; margin: 24px 22px 24px; border-radius: 8px; overflow: hidden; color: #fff; text-decoration: none; }
.drawer__banner img { width: 100%; height: 220px; object-fit: cover; transition: transform .4s ease; }
.drawer__banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, .1)); }
.drawer__banner:hover img { transform: scale(1.04); }
.drawer__banner-copy { position: absolute; inset: auto 24px 24px 24px; z-index: 1; display: grid; justify-items: start; gap: 14px; }
.drawer__banner-title { font-size: 26px; font-weight: 700; line-height: 1.15; }
.drawer__banner-cta { padding: 11px 24px; border-radius: 22px; background: #fff; color: var(--c-heading-dark); font-size: 15px; font-weight: 700; }

@media (max-width: 559px) {
  .drawer__head { padding: 14px 16px; }
  .drawer__title { font-size: 21px; }
  .drawer__tools, .drawer__summary:not(:empty), .drawer__items, .drawer__suggest:not(:empty) { padding-left: 16px; padding-right: 16px; }
  .drawer__progress { margin-left: -16px; margin-right: -16px; }
  .drawer__banner { margin-left: 16px; margin-right: 16px; }
  .dline { grid-template-columns: 70px minmax(0, 1fr); }
  .dline__media img { width: 70px; height: 84px; }
  .dline__total { grid-column: 2; grid-row: 2; text-align: left; }
  .dline__total strong, .dline__total del { display: inline; margin-right: 6px; }
}
@media (prefers-reduced-motion: reduce) { .drawer, .drawer-overlay, .drawer__bar span, .drawer__banner img { transition: none; } }
