/* ============================================================
   PTO Spiritwear Shoppe — shirt builder, gift cards, coupon book
   Used by shop.html, giftcards.html and couponbook.html
   (markup there, behavior in js/spiritwear-shop.js).
   ============================================================ */

/* PTO spirit wear builder */
#sw-builder { padding-bottom: 8px; }
.sw-layout { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 28px; align-items: start; }
.sw-step { margin-bottom: 26px; }
.sw-step h3 { font-size: 16px; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.sw-step h3 span { width: 26px; height: 26px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; }
.sw-step h3 em { font-style: normal; font-weight: 500; color: var(--text-light); font-size: 13px; }
.sw-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.sw-grid-shirts { grid-template-columns: repeat(6, minmax(0,1fr)); gap: 10px; }
.sw-opt { background: var(--white); border: 2px solid var(--border); border-radius: var(--radius-lg); padding: 10px 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; transition: border-color var(--transition), box-shadow var(--transition); }
.sw-opt img { width: 100%; max-width: 90px; aspect-ratio: 2 / 3; object-fit: contain; }
.sw-opt:hover, .sw-design:hover, .sw-place:hover, .sw-logo:not(:disabled):hover { border-color: var(--primary-light); }
.sw-opt.is-on, .sw-size.is-on, .sw-swatch.is-on, .sw-design.is-on, .sw-place.is-on, .sw-logo.is-on, .sw-tab.is-on { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(96,178,86,0.25); }
.sw-design-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.sw-tabs, .sw-side-tabs { display: flex; gap: 6px; }
.sw-tab { padding: 6px 14px; background: var(--white); border: 2px solid var(--border); border-radius: 99px; font-size: 13px; font-weight: 700; color: var(--text); }
.sw-tab.is-on { background: var(--primary); color: #fff; }
#sw-design-search { flex: 1; min-width: 180px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 99px; font: inherit; font-size: 14px; }
.sw-designs { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; max-height: 560px; overflow-y: auto; padding: 4px; margin: -4px; }
.sw-design { background: var(--white); border: 2px solid var(--border); border-radius: var(--radius); padding: 6px; display: flex; flex-direction: column; gap: 2px; text-align: left; }
.sw-design-img { background: var(--sw-tile, #1c1c1c); border-radius: 6px; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; padding: 8px; margin-bottom: 4px; }
.sw-design-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.sw-design-num { font-size: 11px; font-weight: 700; color: var(--primary); }
.sw-design-name { font-size: 12px; font-weight: 600; color: var(--text); line-height: 1.25; }
.sw-places, .sw-logos { display: flex; gap: 12px; flex-wrap: wrap; }
.sw-place, .sw-logo { background: var(--white); border: 2px solid var(--border); border-radius: var(--radius-lg); padding: 8px 14px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: var(--text); min-width: 110px; }
.sw-logo img { height: 48px; width: auto; object-fit: contain; }
.sw-logo-none { height: 48px; display: flex; align-items: center; font-size: 22px; color: var(--text-light); }
.sw-logo-warn { margin-top: 12px; padding: 12px 14px; background: #fffbeb; border: 1px solid #f6c56b; border-left: 4px solid var(--warning); border-radius: var(--radius); font-size: 14px; line-height: 1.5; }
.sw-logo-warn.is-note { font-size: 13px; }
.sw-warn-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.sw-warn-actions .btn { padding: 7px 14px; font-size: 13px; }
.sw-mock { position: relative; aspect-ratio: 2 / 3; }
.sw-mock .sw-blank { width: 100%; height: 100%; object-fit: contain; }
.sw-mock .sw-art { position: absolute; object-fit: contain; object-position: center top; }
.sw-mock-xs { width: 64px; }
.sw-mock-sm { width: 56px; flex-shrink: 0; background: var(--light-bg); border-radius: 6px; }
.sw-mock-lg { width: 100%; max-width: 280px; margin: 0 auto; }
.sw-side-tabs { justify-content: center; margin-bottom: 10px; }
.sw-opt-name { font-size: 13px; font-weight: 700; color: var(--text); line-height: 1.3; }
.sw-opt-price { font-size: 13px; color: var(--primary); font-weight: 700; }
.sw-size-group { margin-bottom: 10px; }
.sw-size-group-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-light); margin-bottom: 6px; }
.sw-size-row { display: flex; flex-wrap: wrap; gap: 8px; }
.sw-size { min-width: 52px; padding: 8px 10px; background: var(--white); border: 2px solid var(--border); border-radius: var(--radius); font-weight: 700; font-size: 14px; color: var(--text); display: flex; flex-direction: column; align-items: center; line-height: 1.2; }
.sw-size small { font-size: 10px; color: var(--text-light); font-weight: 600; }
.sw-swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.sw-swatch { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; background: var(--white); border: 2px solid var(--border); border-radius: 99px; font-size: 13px; font-weight: 600; color: var(--text); }
.sw-swatch span { width: 24px; height: 24px; border-radius: 50%; border: 1px solid rgba(0,0,0,0.2); }
.sw-side { position: sticky; top: calc(var(--nav-height) + 16px); display: flex; flex-direction: column; gap: 16px; }
.sw-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; }
.sw-preview { background: var(--light-bg); border-radius: var(--radius); padding: 10px; }
.sw-summary { font-size: 14px; margin: 12px 0; line-height: 1.5; }
.sw-add-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.sw-qty-label { font-size: 13px; font-weight: 700; }
#sw-qty { width: 64px; padding: 7px 8px; border: 1px solid var(--border); border-radius: var(--radius); font: inherit; }
.sw-price { margin-left: auto; font-size: 22px; font-weight: 800; color: var(--primary-dark); }
.sw-wide { width: 100%; justify-content: center; }
.sw-wide:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.sw-added { margin-top: 8px; font-size: 13px; font-weight: 700; color: var(--success); text-align: center; }
.sw-cart-title { font-size: 16px; margin-bottom: 10px; }
.sw-empty { font-size: 13px; color: var(--text-light); }
.sw-cart-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--light-bg); }
.sw-cart-info { flex: 1; min-width: 0; }
.sw-cart-name { font-size: 14px; font-weight: 700; }
.sw-cart-meta { font-size: 12px; color: var(--text-light); }
.sw-cart-qty { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 13px; }
.sw-cart-qty button { width: 24px; height: 24px; border: 1px solid var(--border); background: var(--white); border-radius: 6px; line-height: 1; }
.sw-cart-qty .sw-remove { width: auto; border: none; color: var(--error); font-size: 12px; padding: 0 4px; }
.sw-cart-price { font-weight: 700; font-size: 14px; }
.sw-total { display: flex; justify-content: space-between; font-size: 16px; margin: 12px 0; }
.sw-checkout-note { font-size: 12px; color: var(--text-light); text-align: center; margin-top: 6px; }
.sw-checkout-note.is-error { color: var(--error); font-weight: 600; }
.sw-thanks { background: var(--success-light); color: #22543d; border-radius: var(--radius); padding: 12px 16px; font-weight: 600; font-size: 14px; margin-bottom: 18px; }
.sw-gc-hero { width: 100%; max-width: 560px; height: auto; border-radius: var(--radius-lg); margin-bottom: 22px; box-shadow: var(--shadow); }
.sw-gc-amount { min-width: 72px; font-size: 16px; padding: 10px 14px; }
.sw-gc-kinds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.sw-gc-kind { background: var(--white); border: 2px solid var(--border); border-radius: var(--radius-lg); padding: 14px 16px; text-align: left; display: flex; flex-direction: column; gap: 4px; color: var(--text); }
.sw-gc-kind strong { font-size: 15px; }
.sw-gc-kind span { font-size: 13px; color: var(--text-light); }
.sw-gc-kind.is-on { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(96,178,86,0.25); }
.sw-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.sw-fields[hidden] { display: none; }
.sw-fields label { display: block; font-size: 13px; font-weight: 700; }
.sw-fields em { font-style: normal; font-weight: 500; color: var(--text-light); }
.sw-fields input, .sw-fields textarea { display: block; width: 100%; margin-top: 4px; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius); font: inherit; font-size: 14px; font-weight: 400; resize: vertical; }
.sw-field-wide { grid-column: 1 / -1; }
.sw-hint { font-size: 13px; color: var(--text-light); margin: 10px 0 12px; }
.sw-delivery-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sw-school-fields { margin-bottom: 12px; }
.sw-fields select { display: block; width: 100%; margin-top: 4px; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius); font: inherit; font-size: 14px; font-weight: 400; background: var(--white); }
.sw-cart-cb { width: 56px; height: 40px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 26px; background: var(--light-bg); border-radius: 6px; align-self: center; }
.sw-gc-add-row { display: flex; align-items: center; gap: 16px; }
.sw-gc-add-row .sw-price { margin-left: 0; }
.sw-gc-error { margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--error); }
.sw-cart-gc { width: 56px; height: auto; flex-shrink: 0; border-radius: 4px; align-self: center; }
@media (max-width: 900px) {
  .sw-layout { grid-template-columns: 1fr; }
  .sw-side { position: static; }
}
@media (max-width: 560px) {
  .sw-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .sw-grid-shirts { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .sw-designs { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); max-height: 480px; }
  .sw-gc-kinds, .sw-fields { grid-template-columns: 1fr; }
}

.sw-side-link { text-align: center; font-size: 14px; font-weight: 700; }

/* Gift card ad in the left sidebar (shop page) */
.sidenav-gc-ad { display: flex; flex-direction: column; gap: 4px; margin: 4px 8px 14px; padding: 10px; border-radius: var(--radius-lg); background: linear-gradient(160deg, #1a3d24, #295c38); color: #fff; text-decoration: none; box-shadow: var(--shadow); transition: transform var(--transition); }
.sidenav-gc-ad:hover { transform: translateY(-2px); color: #fff; }
.sidenav-gc-ad img { width: 100%; height: auto; border-radius: 8px; margin-bottom: 4px; }
.sidenav-gc-ad strong { font-size: 14px; line-height: 1.25; }
.sidenav-gc-ad span { font-size: 12px; line-height: 1.35; color: rgba(255,255,255,0.85); }
.sidenav-gc-ad em { font-style: normal; font-weight: 800; font-size: 13px; color: var(--secondary); margin-top: 2px; }

/* Gift card + coupon book pages */
.sw-page-intro { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px; align-items: center; margin-bottom: 28px; }
.sw-page-intro img { width: 100%; height: auto; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.sw-page-intro h2 { font-size: 26px; margin-bottom: 10px; }
.sw-page-intro p { font-size: 15px; margin-bottom: 10px; }
.sw-callout { background: #fffbeb; border-left: 4px solid var(--secondary-dark); border-radius: var(--radius); padding: 12px 16px; font-size: 15px; font-weight: 600; color: var(--primary-dark); }
.sw-cb-hero { background: linear-gradient(135deg, #1a3d24 0%, #295c38 60%, #60b256 100%); color: #fff; border-radius: var(--radius-xl); padding: 28px; }
.sw-cb-hero h2 { color: #fff; }
.sw-cb-hero p { color: rgba(255,255,255,0.9); }
.sw-cb-stats { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.sw-cb-stat { background: rgba(255,255,255,0.14); border-radius: var(--radius); padding: 10px 14px; }
.sw-cb-stat strong { display: block; font-size: 24px; line-height: 1.1; color: var(--secondary); }
.sw-cb-stat span { font-size: 12px; color: rgba(255,255,255,0.85); }
.sw-cb-offers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 26px; }
.sw-cb-offer { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; font-size: 14px; }
.sw-cb-offer strong { display: block; color: var(--primary-dark); }
.sw-cb-offer span { color: var(--text-light); font-size: 13px; }
.sw-cb-add-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.sw-cb-add-row .sw-price { margin-left: 0; }
@media (max-width: 900px) {
  .sw-page-intro { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .sw-delivery-opts, .sw-cb-offers { grid-template-columns: 1fr; }
}
