/**
 * Atelier — T10 PDP type-states (configurable/bundle/grouped/downloadable/
 * virtual/out-of-stock/on-sale + gift message). These are STATES of the T10
 * template, not separate design pages (design/store-theme/theme-page-catalog.md
 * row "PDP type-states"). Configurable state itself already ships via the
 * swatches/size UI in _pdp.css -- this file covers the remaining states.
 */

.atl-pdp-state-section { border-top: 1px solid var(--atl-border); padding: 48px 40px 0; }
.atl-pdp-state-label { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--atl-accent); margin: 0 0 20px; }

/* Bundle — "Customize" panel */
.atl-pdp-bundle { display: flex; flex-direction: column; gap: 18px; }
.atl-pdp-bundle-option-title { font-size: 13px; font-weight: 600; }
.atl-pdp-bundle-choice { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--atl-border); font-size: 13.5px; }
.atl-pdp-bundle-choice:last-child { border-bottom: none; }
.atl-pdp-bundle-choice-label { display: flex; gap: 10px; align-items: center; }
.atl-pdp-bundle-choice-price { color: var(--atl-text-muted); }
.atl-pdp-bundle-total { display: flex; justify-content: space-between; font-size: 16px; font-weight: 600; border-top: 1px solid var(--atl-border-strong); padding-top: 12px; }

/* Grouped — qty table */
.atl-pdp-grouped-row { display: grid; grid-template-columns: 1fr 90px 70px; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--atl-border); font-size: 13.5px; }
.atl-pdp-grouped-row:last-child { border-bottom: none; }
.atl-pdp-grouped-price { color: var(--atl-text-muted); }
.atl-pdp-grouped-qty { width: 60px; padding: 8px 10px; }

/* Core grouped table / downloadable links rendered in the buybox (BUG-17) */
.atl-pdp-type-options { display: flex; flex-direction: column; gap: 8px; color: var(--atl-text); font-size: 13.5px; }
.atl-pdp-type-options .table-wrapper.grouped { margin: 0; overflow: visible; border: none; }
.atl-pdp-type-options #super-product-table { display: table; width: 100%; border-collapse: collapse; margin: 0; background: none; }
.atl-pdp-type-options #super-product-table thead { display: table-header-group; }
.atl-pdp-type-options #super-product-table tbody { display: table-row-group; }
.atl-pdp-type-options #super-product-table tr { display: table-row; }
.atl-pdp-type-options #super-product-table th,
.atl-pdp-type-options #super-product-table td { display: table-cell; }
.atl-pdp-type-options #super-product-table .table-caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.atl-pdp-type-options #super-product-table thead th { padding: 0 0 10px; border-bottom: 1px solid var(--atl-border-strong); font-size: 11.5px; font-weight: 400; letter-spacing: 0.14em; text-transform: uppercase; color: var(--atl-text-muted); text-align: left; }
.atl-pdp-type-options #super-product-table thead th.qty { text-align: right; }
.atl-pdp-type-options #super-product-table tbody td { padding: 12px 0; border-top: none; border-bottom: 1px solid var(--atl-border); vertical-align: middle; background: none; }
.atl-pdp-type-options #super-product-table tbody td.qty { text-align: right; width: 90px; }
.atl-pdp-type-options #super-product-table tbody td::before { content: none; display: none; }
.atl-pdp-type-options #super-product-table .product-item-name { display: block; font-weight: 400; color: var(--atl-text); }
.atl-pdp-type-options #super-product-table .price-box { margin: 2px 0 0; }
.atl-pdp-type-options #super-product-table .price { font-size: 13px; font-weight: 400; color: var(--atl-text-muted); }
.atl-pdp-type-options input.qty { width: 64px; height: 44px; padding: 8px 10px; border: 1px solid var(--atl-border-strong); border-radius: 0; background: var(--atl-surface); color: var(--atl-text); font: inherit; text-align: center; }
.atl-pdp-type-options input.qty:focus-visible,
.atl-pdp-type-options input.checkbox:focus-visible { outline: 2px solid var(--atl-focus-ring); outline-offset: 2px; }
.atl-pdp-type-options > .links-title,
.atl-pdp-type-options > br { display: none; }
.atl-pdp-type-options .field.downloads > .label { font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--atl-text-muted); }
.atl-pdp-type-options #downloadable-links-list { display: flex; flex-direction: column; margin-top: 8px; }
.atl-pdp-type-options #downloadable-links-list .field.choice { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 0; border-bottom: 1px solid var(--atl-border); }
.atl-pdp-type-options #downloadable-links-list .field.choice:last-child { border-bottom: none; }
.atl-pdp-type-options #downloadable-links-list input.checkbox { margin: 0; accent-color: var(--atl-accent); }
.atl-pdp-type-options #downloadable-links-list .label { color: var(--atl-text); font-weight: 400; }
.atl-pdp-type-options #downloadable-links-list .price-notice { color: var(--atl-text-muted); }
.atl-pdp-type-options .mage-error,
.atl-pdp-type-options #validation-message-box .mage-error { color: var(--atl-error); font-size: 12.5px; }

/* Downloadable — sample + purchasable links */
.atl-pdp-downloadable-links { display: flex; flex-direction: column; gap: 4px; }
.atl-pdp-downloadable-link { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--atl-border); font-size: 13.5px; }
.atl-pdp-downloadable-link:last-child { border-bottom: none; }
.atl-pdp-downloadable-link a { color: var(--atl-accent); text-decoration: none; }
.atl-pdp-downloadable-sample { font-size: 12.5px; color: var(--atl-text-subtle); }

/* Virtual — no shipping */
.atl-pdp-virtual-note { font-size: 13px; color: var(--atl-text-muted); border: 1px solid var(--atl-border); padding: 12px 16px; }

/* Out of stock */
.atl-pdp-oos-badge { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--atl-error); border: 1px solid var(--atl-error); padding: 4px 10px; width: fit-content; }
.atl-pdp-oos-notify { display: flex; gap: 10px; margin-top: 6px; }
.atl-pdp-oos-notify input { flex: 1; }
.atl-pdp-oos-alert-link { font-size: 13px; color: var(--atl-accent); text-decoration: none; margin-top: 4px; }

/* On sale — old/new price + countdown (countdown widget itself lives in
   components/_countdown.css -- use .atl-countdown.atl-countdown--boxed) */
.atl-pdp-sale-price-row { display: flex; gap: 10px; align-items: baseline; }
.atl-pdp-sale-price-old { font-size: 16px; text-decoration: line-through; color: var(--atl-text-subtle); }
.atl-pdp-sale-price-new { font-size: 26px; color: var(--atl-error); }
.atl-pdp-sale-badge { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; background: var(--atl-error); color: var(--atl-band-text); padding: 4px 10px; }
.atl-pdp-countdown { margin-top: 10px; }

/* Gift message */
.atl-pdp-gift { display: flex; flex-direction: column; gap: 8px; }
.atl-pdp-gift-toggle { display: flex; gap: 8px; align-items: center; font-size: 13.5px; }
.atl-pdp-gift-toggle input { accent-color: var(--atl-accent); }

@media (max-width: 767px) {
  .atl-pdp-state-section { padding: 32px 20px 0; }
  .atl-pdp-grouped-row { grid-template-columns: 1fr 70px 60px; gap: 8px; }
  .atl-pdp-countdown { flex-wrap: wrap; }
}

/* IV-173a: the struck-through original rendered beside the live price in the
   PDP / 3-col / quick-view / sticky-bar price slots. The colour + line-through
   already come from .atl-pdp-sale-price-old above; this only spaces it. */
.atl-pdp-price .atl-pdp-sale-price-old,
.atl-pdp3-price .atl-pdp-sale-price-old,
.atl-qv-price .atl-pdp-sale-price-old,
.atl-lf-stickybar-price .atl-pdp-sale-price-old { margin-left: 10px; }
