/* =================== TOKENS =================== */
:root {
  --background: #F7F7F5;
  --surface: #FFFFFF;
  --text: #171717;
  --muted: #737373;
  --border: #E5E5E5;
  --primary: #1F2937;
  --primary-hover: #111827;
  --accent: #C97749;
  --accent-hover: #B5643A;
  --danger: #C0392B;
  --success: #2E7D4F;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04), 0 1px 6px rgba(0,0,0,.03);
  --shadow-md: 0 8px 24px rgba(0,0,0,.08);
  --shadow-lg: 0 20px 60px rgba(0,0,0,.16);
  --font-body: 'Manrope', 'Inter', sans-serif;
  --header-h: 72px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; }
p { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }
input, select, textarea { font-family: inherit; font-size: 14px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 800px; }

/* =================== SHIRT PHOTO MOCKUP =================== */
/* Real garment photo, background removed, tinted via a masked color layer
   plus multiply/screen passes so fabric shading and highlights stay intact. */
.shirt-photo { position: relative; width: 100%; height: 100%; min-height: inherit; }
.shirt-photo.mirrored { transform: scaleX(-1); }
.shirt-photo-fallback,
.shirt-photo-color,
.shirt-photo-shade,
.shirt-photo-highlight {
  position: absolute; inset: 0; width: 100%; height: 100%;
}
/* Base fallback: plain garment photo, always visible even if
   mask-image / mix-blend-mode are unsupported or blocked. */
.shirt-photo-fallback { object-fit: contain; }
.shirt-photo-color {
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
}
.shirt-photo-shade { object-fit: contain; mix-blend-mode: multiply; }
.shirt-photo-highlight { object-fit: contain; mix-blend-mode: screen; opacity: .16; }

/* =================== BUTTONS =================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 12px 22px; font-weight: 600; font-size: 14.5px;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .1s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn-outline:hover { border-color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #a5342a; }
.btn-lg { padding: 15px 28px; font-size: 15.5px; }
.btn-sm { padding: 9px 16px; font-size: 13.5px; }
.btn-block { width: 100%; }
.link-btn { background: none; border: none; color: var(--accent); font-weight: 600; font-size: 13.5px; padding: 4px; }
.link-btn:hover { text-decoration: underline; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 999px; border: none;
  background: transparent; color: var(--text); transition: background .15s ease;
}
.icon-btn:hover { background: rgba(0,0,0,.06); }
.icon-btn.sm { width: 32px; height: 32px; }
.icon-btn.danger:hover { background: rgba(192,57,43,.1); color: var(--danger); }

.toggle-btn {
  width: 36px; height: 36px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface);
}
.toggle-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.select-input {
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface);
  padding: 9px 12px; color: var(--text); font-size: 13.5px; min-height: 44px;
}

/* =================== HEADER =================== */
.site-header {
  position: sticky; top: 0; z-index: 500; background: rgba(247,247,245,.88);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.logo { font-size: 21px; font-weight: 800; letter-spacing: -0.03em; }
.logo-dot { color: var(--accent); }
.main-nav { display: flex; gap: 28px; margin: 0 auto; }
.main-nav a { font-size: 14.5px; font-weight: 600; color: var(--muted); transition: color .15s; }
.main-nav a:hover { color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 4px; }
.cart-btn { position: relative; }
.cart-count {
  position: absolute; top: 2px; right: 2px; background: var(--accent); color: #fff;
  font-size: 10.5px; font-weight: 700; min-width: 17px; height: 17px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
.mobile-menu-btn { display: none; background: none; border: none; width: 40px; height: 40px; color: var(--text); }

.search-overlay {
  position: fixed; inset: 0; background: rgba(23,23,23,.4); z-index: 600;
  display: flex; align-items: flex-start; justify-content: center; padding-top: 120px;
  animation: fadeIn .15s ease;
}
.search-box {
  background: var(--surface); border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 10px; padding: 14px 18px; width: 90%; max-width: 560px; color: var(--muted);
}
.search-box input { flex: 1; border: none; outline: none; font-size: 15px; color: var(--text); }

/* =================== HERO =================== */
.hero { padding: 72px 0 96px; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-block; font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
}
.hero h1 { font-size: clamp(36px, 5vw, 58px); font-weight: 800; }
.hero-sub { margin-top: 18px; font-size: 17px; color: var(--muted); max-width: 480px; }
.hero-cta { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }
.hero-upload-link {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; background: none; border: none;
  color: var(--muted); font-size: 13.5px; font-weight: 600; padding: 6px 2px; min-height: 44px;
}
.hero-upload-link:hover { color: var(--accent); }
.hero-highlights { display: flex; flex-wrap: wrap; gap: 18px 26px; margin-top: 36px; }
.hero-highlights li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.hero-highlights svg { color: var(--accent); flex-shrink: 0; }

.hero-visual { position: relative; display: flex; justify-content: center; width: 100%; min-width: 0; }
.hero-shirt-card {
  width: 100%; max-width: 420px; aspect-ratio: 1/1.05; background: var(--surface);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-md); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; padding: 40px;
  min-height: 320px;
}
.hero-shirt-mock { width: 100%; height: 100%; min-height: 240px; }
.hero-shirt-mock .shirt-photo { width: 100%; height: 100%; }
.hero-badge {
  position: absolute; background: var(--surface); border-radius: var(--radius-md);
  box-shadow: var(--shadow-md); padding: 12px 16px; font-weight: 700; font-size: 14px;
  display: flex; flex-direction: column; border: 1px solid var(--border);
}
.hero-badge span { font-weight: 500; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.hero-badge-1 { top: 8%; left: -6%; }
.hero-badge-2 { bottom: 10%; right: -4%; color: var(--accent); }

/* =================== FEATURE STRIP =================== */
.feature-strip { padding: 40px 0 96px; }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.feature-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 28px 22px; transition: box-shadow .2s ease, transform .2s ease;
}
.feature-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.feature-icon {
  width: 44px; height: 44px; border-radius: 12px; background: rgba(201,119,73,.1); color: var(--accent);
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.feature-card h3 { font-size: 16.5px; margin-bottom: 8px; }
.feature-card p { color: var(--muted); font-size: 14px; }

/* =================== SECTION HEAD =================== */
.section-head { text-align: center; max-width: 620px; margin: 0 auto 44px; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; margin-bottom: 10px; }
.section-head p { color: var(--muted); font-size: 15.5px; }

/* =================== CATALOG =================== */
.catalog { padding: 96px 0; }
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.product-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  overflow: hidden; transition: box-shadow .2s ease, transform .2s ease; display: flex; flex-direction: column;
}
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.product-thumb {
  aspect-ratio: 1/1; background: linear-gradient(180deg, #fafaf9, #f0efec);
  display: flex; align-items: center; justify-content: center; padding: 24px; position: relative;
}
.product-thumb .shirt-photo { width: 74%; height: 74%; }
.product-rating {
  position: absolute; top: 12px; right: 12px; background: rgba(255,255,255,.92); border-radius: 999px;
  padding: 4px 9px; font-size: 12px; font-weight: 700; display: flex; align-items: center; gap: 4px;
}
.product-rating svg { color: #E8A33D; }
.product-body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-body h3 { font-size: 16.5px; }
.product-material { color: var(--muted); font-size: 13px; }
.product-price { font-weight: 800; font-size: 17px; margin-top: 2px; }
.product-swatches { display: flex; gap: 6px; margin-top: 4px; }
.mini-swatch { width: 17px; height: 17px; border-radius: 999px; border: 1px solid var(--border); }
.product-body .btn { margin-top: 10px; }

/* =================== HOW IT WORKS =================== */
.how-it-works { padding: 96px 0; background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.step-card { position: relative; padding-top: 8px; }
.step-num { font-size: 34px; font-weight: 800; color: var(--border); display: block; margin-bottom: 10px; }
.step-card h3 { font-size: 17px; margin-bottom: 8px; }
.step-card p { color: var(--muted); font-size: 14px; }

/* =================== GALLERY =================== */
.gallery { padding: 96px 0; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.gallery-item {
  aspect-ratio: 4/5; border-radius: var(--radius-md); overflow: hidden; position: relative;
  background: linear-gradient(160deg, #eceae6, #dcd8d1); display: flex; align-items: center; justify-content: center;
}
.gallery-item .shirt-photo { width: 52%; height: 52%; opacity: .85; }
.gallery-tag {
  position: absolute; bottom: 14px; left: 14px; background: rgba(255,255,255,.92); border-radius: 999px;
  padding: 5px 12px; font-size: 12px; font-weight: 700;
}

/* =================== WHY US =================== */
.why-us { padding: 96px 0; background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.why-card { padding: 24px; border-radius: var(--radius-md); border: 1px solid var(--border); }
.why-card h3 { font-size: 16px; margin-bottom: 8px; }
.why-card p { color: var(--muted); font-size: 14px; }

/* =================== FAQ =================== */
.faq { padding: 96px 0; }
.accordion-item { border-bottom: 1px solid var(--border); }
.accordion-trigger {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 4px; background: none; border: none; text-align: left; font-size: 15.5px; font-weight: 700;
}
.accordion-trigger svg { flex-shrink: 0; transition: transform .2s ease; color: var(--muted); }
.accordion-item.open .accordion-trigger svg { transform: rotate(45deg); }
.accordion-panel { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.accordion-item.open .accordion-panel { max-height: 240px; }
.accordion-panel p { padding: 0 4px 20px; color: var(--muted); font-size: 14.5px; }

/* =================== CTA BANNER =================== */
.cta-banner { padding: 80px 0 100px; }
.cta-banner-inner {
  background: var(--primary); color: #fff; border-radius: var(--radius-lg);
  padding: 56px 40px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.cta-banner-inner h2 { font-size: clamp(24px, 3vw, 32px); }
.cta-banner-inner p { color: #cbd2db; margin-bottom: 10px; }
.cta-banner-inner .btn-primary { background: var(--accent); }
.cta-banner-inner .btn-primary:hover { background: var(--accent-hover); }

/* =================== FOOTER =================== */
.site-footer { background: var(--primary); color: #d7dbe1; padding: 64px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand .logo { color: #fff; }
.footer-brand p { margin-top: 10px; font-size: 14px; color: #9aa2ad; }
.footer-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: #9aa2ad; margin-bottom: 14px; }
.footer-col a { display: block; padding: 6px 0; font-size: 14.5px; color: #d7dbe1; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 40px; padding-top: 20px; }
.footer-bottom p { font-size: 13px; color: #8b929c; }

/* =================== TOAST =================== */
.toast-container { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 2000; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; }
.toast {
  background: var(--primary); color: #fff; padding: 13px 20px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 8px;
  animation: toastIn .25s ease;
}
.toast svg { color: #7CD992; flex-shrink: 0; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.toast.hide { animation: toastOut .2s ease forwards; }
@keyframes toastOut { to { opacity: 0; transform: translateY(6px); } }

/* =================== MODALS =================== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(23,23,23,.45); z-index: 900;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: fadeIn .18s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  width: 100%; max-height: 90vh; display: flex; flex-direction: column; overflow: hidden;
  animation: modalIn .22s cubic-bezier(.2,.8,.3,1.1);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.modal-sm { max-width: 380px; }
.modal-md { max-width: 520px; }
.modal-lg { max-width: 760px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-size: 18px; }
.modal-body { padding: 24px; overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.modal-foot { display: flex; justify-content: flex-end; gap: 12px; padding: 18px 24px; border-top: 1px solid var(--border); }
.modal-foot.center { justify-content: center; }

.size-table { width: 100%; border-collapse: collapse; }
.size-table th, .size-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; }
.size-table th { color: var(--muted); font-weight: 700; font-size: 12.5px; text-transform: uppercase; }

.preview-modal-body { display: flex; flex-direction: column; gap: 16px; align-items: center; }
.preview-stage {
  width: 100%; max-width: 420px; aspect-ratio: 3/4; max-height: 56vh; background: linear-gradient(180deg,#fafaf9,#efeeeb);
  border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; padding: 24px; position: relative;
}
.preview-stage .shirt-photo { width: 100%; height: 100%; }
.preview-elements-layer { position: absolute; }

.order-success-body { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 40px 24px 16px; }
.success-icon { width: 72px; height: 72px; border-radius: 999px; background: rgba(46,125,79,.1); color: var(--success); display: flex; align-items: center; justify-content: center; }
.order-success-body h3 { font-size: 20px; max-width: 320px; }
.order-ids { display: flex; gap: 24px; margin-top: 6px; }
.order-ids div { display: flex; flex-direction: column; gap: 4px; }
.order-ids span { font-size: 12px; color: var(--muted); }
.order-ids strong { font-size: 15px; }
.status-pill { background: rgba(201,119,73,.12); color: var(--accent); font-weight: 700; font-size: 12.5px; padding: 7px 16px; border-radius: 999px; margin-top: 6px; }

.tracking-lookup { display: flex; gap: 10px; margin-bottom: 20px; }
.tracking-lookup input { flex: 1; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 11px 14px; min-height: 44px; }
.tracking-order-id { display: flex; flex-direction: column; margin-bottom: 6px; }
.tracking-order-id span { font-size: 12px; color: var(--muted); }
.tracking-order-id strong { font-size: 17px; }
.tracking-desc { color: var(--muted); font-size: 14px; margin: 10px 0 22px; }
.tracking-empty { color: var(--muted); text-align: center; padding: 20px 0; }

.timeline { position: relative; padding-left: 28px; }
.timeline li { position: relative; padding-bottom: 26px; font-size: 14.5px; font-weight: 600; color: var(--muted); }
.timeline li::before {
  content: ''; position: absolute; left: -28px; top: 2px; width: 14px; height: 14px; border-radius: 999px;
  background: var(--surface); border: 2px solid var(--border);
}
.timeline li::after {
  content: ''; position: absolute; left: -22px; top: 16px; width: 2px; height: calc(100% - 10px); background: var(--border);
}
.timeline li:last-child::after { display: none; }
.timeline li.done { color: var(--text); }
.timeline li.done::before { background: var(--success); border-color: var(--success); }
.timeline li.active { color: var(--accent); }
.timeline li.active::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px rgba(201,119,73,.18); }

.contact-line { margin-bottom: 16px; font-size: 14.5px; }
.contact-line strong { display: block; margin-bottom: 2px; }

/* =================== FORMS =================== */
.field-label { display: block; font-size: 12.5px; font-weight: 700; color: var(--muted); margin: 12px 0 6px; }
.checkout-form input[type=text], .checkout-form input[type=email], .checkout-form input[type=tel], .checkout-form textarea,
.props-panel textarea, .props-panel input[type=text], .props-panel input[type=number] {
  width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; min-height: 44px; background: var(--surface); color: var(--text);
}
.checkout-form textarea, .props-panel textarea { min-height: unset; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
fieldset { border: none; padding: 0; margin: 0 0 22px; }
legend { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--text); margin-bottom: 4px; padding: 0; }
.checkout-summary { background: var(--background); border-radius: var(--radius-md); padding: 16px; margin-bottom: 22px; font-size: 14px; }
.checkout-summary .row { display: flex; justify-content: space-between; padding: 4px 0; color: var(--muted); }
.checkout-summary .row.total { color: var(--text); font-weight: 800; border-top: 1px solid var(--border); margin-top: 8px; padding-top: 10px; }
.payment-options { display: flex; flex-direction: column; gap: 10px; }
.payment-option {
  display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 14px; font-size: 14.5px; font-weight: 600; cursor: pointer; min-height: 44px;
}
.payment-option:has(input:checked) { border-color: var(--accent); background: rgba(201,119,73,.05); }

/* =================== DRAWER (CART) =================== */
.drawer-overlay {
  position: fixed; inset: 0; background: rgba(23,23,23,.4); z-index: 800; display: flex; justify-content: flex-end;
  animation: fadeIn .18s ease;
}
.drawer {
  width: 100%; max-width: 420px; height: 100%; background: var(--surface); display: flex; flex-direction: column;
  animation: drawerIn .25s cubic-bezier(.2,.8,.3,1.1);
}
@keyframes drawerIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 22px; border-bottom: 1px solid var(--border); }
.drawer-head h3 { font-size: 18px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 22px; display: flex; flex-direction: column; gap: 14px; }
.drawer-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--muted); text-align: center; padding: 40px; }
.drawer-foot { padding: 18px 22px; border-top: 1px solid var(--border); }
.cart-total-row { display: flex; justify-content: space-between; font-size: 16px; font-weight: 800; margin-bottom: 14px; }

.cart-item { display: flex; gap: 12px; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 12px; }
.cart-item-thumb { width: 72px; height: 72px; border-radius: var(--radius-sm); background: var(--background); flex-shrink: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.cart-item-thumb .shirt-photo { width: 80%; height: 80%; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-info h4 { font-size: 14px; margin-bottom: 3px; }
.cart-item-meta { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 8px; margin-bottom: 6px; }
.cart-item-price { font-weight: 800; font-size: 14px; }
.cart-item-actions { display: flex; gap: 12px; margin-top: 6px; }
.cart-item-actions button { background: none; border: none; font-size: 12.5px; font-weight: 700; color: var(--muted); padding: 0; }
.cart-item-actions button:hover { color: var(--text); }
.cart-item-actions button.remove-btn:hover { color: var(--danger); }

/* =================== CUSTOMIZER =================== */
.customizer { position: fixed; inset: 0; z-index: 700; background: var(--background); display: flex; flex-direction: column; }
.customizer-header { height: 64px; flex-shrink: 0; display: flex; align-items: center; gap: 16px; padding: 0 20px; border-bottom: 1px solid var(--border); background: var(--surface); }
.customizer-title { display: flex; flex-direction: column; margin-right: auto; }
.customizer-title strong { font-size: 15px; }
.customizer-title span { font-size: 12.5px; color: var(--muted); }
.customizer-header-actions .select-input { min-width: 200px; }
.customizer-header .cart-btn { margin-left: 6px; }

.customizer-body { flex: 1; display: grid; grid-template-columns: 84px 1fr 300px; min-height: 0; }

.tools-sidebar { border-right: 1px solid var(--border); background: var(--surface); display: flex; flex-direction: column; align-items: center; padding: 18px 0; gap: 6px; overflow-y: auto; }
.tool-btn {
  width: 64px; height: 60px; border: none; background: none; border-radius: var(--radius-sm); color: var(--text);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; font-size: 11px; font-weight: 600;
  position: relative;
}
.tool-btn:hover { background: rgba(0,0,0,.05); }
.tool-btn:disabled { opacity: .35; cursor: default; }
.tool-btn:disabled:hover { background: none; }
.tool-divider { width: 44px; height: 1px; background: var(--border); margin: 8px 0; }
.tool-shape-group { position: relative; }
.shape-popover {
  display: none; position: fixed; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-md); z-index: 500; overflow: hidden; width: 140px;
}
.shape-popover.open { display: block; }
.shape-popover button { display: block; width: 100%; text-align: left; padding: 11px 14px; background: none; border: none; font-size: 13.5px; font-weight: 600; color: var(--text); }
.shape-popover button:hover { background: var(--background); }

.canvas-wrap { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow-y: auto; border-right: 1px solid var(--border); background: var(--background); }
.canvas-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; border-bottom: 1px solid var(--border); background: var(--surface); flex-wrap: wrap; gap: 10px; flex-shrink: 0; }
.product-controls { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.color-swatches { display: flex; flex-wrap: wrap; gap: 8px; max-width: 360px; }
.color-swatch { width: 26px; height: 26px; border-radius: 999px; border: 2px solid transparent; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); position: relative; }
.color-swatch.active { border-color: var(--accent); }
.zoom-controls { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--muted); }

.canvas-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; overflow: auto; padding: 20px; }
.canvas-mockup { position: relative; width: 380px; height: 460px; transition: transform .15s ease; }
.shirt-render { position: absolute; inset: 0; }
.shirt-render .shirt-photo { width: 100%; height: 100%; }

.printable-area { position: absolute; }
.printable-border-fx {
  position: absolute; inset: 0; pointer-events: none; opacity: 0;
  border: 1.5px dashed #fff; mix-blend-mode: difference;
}
.printable-area.editing .printable-border-fx { opacity: 1; }
.printable-label {
  position: absolute; top: -24px; left: 0; font-size: 11px; font-weight: 700; color: var(--muted);
  white-space: nowrap; opacity: 0; transition: opacity .15s;
}
.printable-area.editing .printable-label { opacity: 1; }
.elements-layer { position: absolute; inset: 0; overflow: visible; }

.guide { position: absolute; background: var(--accent); z-index: 40; pointer-events: none; }
.guide-v { width: 1px; top: -1000px; bottom: -1000px; left: 50%; }
.guide-h { height: 1px; left: -1000px; right: -1000px; top: 50%; }

.design-element {
  position: absolute; cursor: grab; user-select: none; touch-action: none;
  display: flex; align-items: center; justify-content: center; box-sizing: border-box;
}
.design-element.dragging { cursor: grabbing; }
.design-element-image { overflow: hidden; }
.design-element img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; transform-origin: center; }
.design-element.selected { outline: 1.5px solid var(--accent); }
.design-element .el-text { width: 100%; height: 100%; display: flex; align-items: center; white-space: pre-wrap; word-break: break-word; pointer-events: none; }
.design-element .el-shape { width: 100%; height: 100%; pointer-events: none; }
.image-label {
  position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%);
  max-width: calc(100% - 8px); padding: 2px 6px; border-radius: 999px;
  background: rgba(23,23,23,.72); color: #fff; font-size: 10px; font-weight: 700;
  line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  pointer-events: none;
}

.selection-box { position: absolute; inset: 0; pointer-events: none; }
.resize-handle {
  position: absolute; width: 12px; height: 12px; background: #fff; border: 1.5px solid var(--accent); border-radius: 3px;
  pointer-events: all; z-index: 10;
}
.resize-handle.tl { top: -6px; left: -6px; cursor: nwse-resize; }
.resize-handle.tr { top: -6px; right: -6px; cursor: nesw-resize; }
.resize-handle.bl { bottom: -6px; left: -6px; cursor: nesw-resize; }
.resize-handle.br { bottom: -6px; right: -6px; cursor: nwse-resize; }
.rotate-handle {
  position: absolute; top: -32px; left: 50%; transform: translateX(-50%); width: 20px; height: 20px; border-radius: 999px;
  background: #fff; border: 1.5px solid var(--accent); cursor: grab; pointer-events: all; z-index: 10;
  display: flex; align-items: center; justify-content: center; color: var(--accent);
}
.rotate-handle::after { content: ''; position: absolute; top: 18px; left: 50%; width: 1px; height: 12px; background: var(--accent); }

.oob-warning {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); background: #FEF3EE; color: #9A4A26;
  border: 1px solid #F3D3BE; padding: 9px 16px; border-radius: 999px; font-size: 12.5px; font-weight: 600; max-width: 90%; text-align: center;
}

/* Floating Edit button (mobile): muncul saat sablon terseleksi, sheet tertutup */
.edit-props-fab { display: none; }

.view-tabs { display: flex; gap: 4px; padding: 10px 20px; border-top: 1px solid var(--border); background: var(--surface); overflow-x: auto; flex-shrink: 0; }
.view-tabs button {
  padding: 9px 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 13px; font-weight: 700;
  color: var(--muted); white-space: nowrap; min-height: 40px;
}
.view-tabs button.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.price-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-top: 1px solid var(--border); background: var(--surface); gap: 16px; flex-wrap: wrap; flex-shrink: 0; }
.price-info { display: flex; flex-direction: column; }
.price-label { font-size: 11.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.price-value { font-size: 22px; font-weight: 800; }
.price-sub { font-size: 12px; color: var(--muted); }
.price-actions { display: flex; gap: 10px; }
.qty-stepper { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: 999px; padding: 4px 6px; font-weight: 700; }
.qty-stepper span { min-width: 20px; text-align: center; }

.switch-row { display: flex; align-items: center; justify-content: space-between; font-weight: 700; font-size: 14.5px; margin-bottom: 18px; }
.switch-row input[type=checkbox] { width: 20px; height: 20px; }
.multi-size-table { display: flex; flex-direction: column; gap: 10px; }
.multi-size-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.multi-size-row span { font-weight: 700; width: 40px; }
.multi-size-row input { width: 100px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 9px 12px; min-height: 44px; text-align: center; }
.multi-size-table.disabled { opacity: .4; pointer-events: none; }
.multi-size-total { margin-top: 16px; font-size: 14px; color: var(--muted); }

.properties-sidebar { background: var(--surface); overflow-y: auto; position: relative; }
.props-sheet-topbar { display: none; }
.props-sheet-pill { display: none; }
.props-sheet-x { display: none; }
.props-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; padding: 40px 24px; text-align: center; color: var(--muted); gap: 14px; }
.props-panel { padding: 20px; }
.props-section { padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--border); }
.props-section:last-child { border-bottom: none; }
.props-section h4 { font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 12px; }
.props-actions-row { display: flex; gap: 8px; }
.props-panel input[type=range] { width: 100%; min-width: 0; }
.props-panel input[type=color] { width: 100%; min-width: 0; height: 40px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 2px; background: var(--surface); }
.props-panel .select-input { width: 100%; min-width: 0; }
.field-row > div { min-width: 0; }
/* Stepper ramping khusus sidebar agar digit tidak kepotong di kolom 1fr 1fr */
.props-panel .number-stepper,
.props-panel .range-stepper {
  display: grid; grid-template-columns: 28px minmax(0, 1fr) 28px; align-items: center; gap: 4px;
}
.props-panel .number-stepper button,
.props-panel .range-stepper button {
  width: 28px; height: 36px; flex-shrink: 0; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font-size: 15px; font-weight: 800; line-height: 1;
}
.props-panel .number-stepper button:hover,
.props-panel .range-stepper button:hover { border-color: var(--accent); color: var(--accent); }
.number-stepper input[type=number] { min-width: 0; text-align: center; }
.props-panel .number-stepper input[type=number] { padding: 8px 2px; }
/* Hilangkan spinner bawaan number input yang makan lebar */
.props-panel input[type=number]::-webkit-outer-spin-button,
.props-panel input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.props-panel input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.range-stepper input[type=range] { min-width: 0; }
/* Baris B / I / Align: 3 kolom sejajar */
.field-row-3 { display: grid; grid-template-columns: 40px 40px minmax(0, 1fr); gap: 8px; align-items: center; }
.field-row-3 .toggle-btn { width: 40px; }

.layers-panel { position: absolute; inset: 0; background: var(--surface); display: flex; flex-direction: column; z-index: 20; }
.layers-panel-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.layers-panel-head h4 { font-size: 14.5px; }
.layers-list { padding: 10px; overflow-y: auto; flex: 1; }
.layer-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 10px; border-radius: var(--radius-sm); margin-bottom: 4px;
}
.layer-item:hover { background: var(--background); }
.layer-item.active { background: rgba(201,119,73,.1); }
.layer-item-icon { width: 30px; height: 30px; border-radius: 6px; background: var(--background); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--muted); }
.layer-item-name { flex: 1; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.layer-item-actions { display: flex; gap: 2px; }
.layer-item-actions button { width: 26px; height: 26px; border: none; background: none; color: var(--muted); border-radius: 6px; display: flex; align-items: center; justify-content: center; }
.layer-item-actions button:hover { background: rgba(0,0,0,.08); color: var(--text); }
.layers-empty { text-align: center; color: var(--muted); font-size: 13.5px; padding: 30px; }

.mobile-toolbar { display: none; }

/* =================== EMPTY / LOADING =================== */
.skeleton { background: linear-gradient(90deg, #eee, #f5f5f5, #eee); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--radius-sm); }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* =================== RESPONSIVE =================== */
@media (max-width: 1080px) {
  .hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .hero-visual { order: -1; width: 100%; max-width: 420px; margin: 0 auto; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .customizer-body { grid-template-columns: 76px 1fr 260px; }
  .props-panel { padding: 16px; }
  .field-row { gap: 8px; }
}

@media (max-width: 860px) {
  .main-nav { display: none; }
  .mobile-menu-btn { display: flex; align-items: center; justify-content: center; }
  .customizer { height: 100dvh; min-height: 100svh; }
  .customizer-header {
    height: auto; min-height: 56px; padding: 8px 12px; gap: 10px;
    align-items: center;
  }
  .customizer-title { min-width: 0; }
  .customizer-title strong,
  .customizer-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 54vw; }
  .customizer-body { grid-template-columns: 1fr; grid-template-rows: 1fr; }
  .tools-sidebar { display: none; }
  .properties-sidebar {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto;
    height: min(76dvh, 620px); max-height: calc(100dvh - 72px);
    border-radius: 20px 20px 0 0; box-shadow: var(--shadow-lg); z-index: 60;
    transform: translateY(100%); transition: transform .25s ease;
    overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  }
  .properties-sidebar.open { transform: translateY(0); }
  .props-sheet-topbar {
    display: flex; position: sticky; top: 0; z-index: 3; width: 100%;
    align-items: center; justify-content: center; background: var(--surface);
    border-radius: 20px 20px 0 0; padding: 8px 12px 4px;
  }
  .props-sheet-pill { display: block; width: 44px; height: 5px; border-radius: 999px; background: #D5D5D5; }
  .props-sheet-x {
    display: inline-flex; position: absolute; right: 10px; top: 8px;
    width: 32px; height: 32px; align-items: center; justify-content: center;
    border-radius: 999px; border: none; background: rgba(0,0,0,.06); color: var(--text);
  }
  .props-sheet-x:hover { background: rgba(0,0,0,.1); }
  .props-panel { padding: 0 16px 22px; }
  .props-empty { height: auto; min-height: 220px; padding: 28px 20px 36px; }
  .props-actions-row { justify-content: space-between; }
  .props-actions-row .icon-btn { width: 44px; height: 44px; }
  .number-stepper,
  .range-stepper { grid-template-columns: 40px minmax(0, 1fr) 40px; gap: 8px; }
  .number-stepper button,
  .range-stepper button { width: 40px; height: 40px; font-size: 18px; }
  .props-panel .number-stepper,
  .props-panel .range-stepper { grid-template-columns: 40px minmax(0, 1fr) 40px; gap: 8px; }
  .props-panel .number-stepper button,
  .props-panel .range-stepper button { width: 40px; height: 40px; }
  .layers-panel { border-radius: 20px 20px 0 0; overflow: hidden; }
  .mobile-toolbar {
    display: flex; position: absolute; bottom: 0; left: 0; right: 0; background: var(--surface);
    border-top: 1px solid var(--border); padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    justify-content: space-around; z-index: 30;
  }
  .mobile-toolbar button {
    display: flex; flex-direction: column; align-items: center; gap: 3px; background: none; border: none;
    color: var(--text); font-size: 10.5px; font-weight: 700; padding: 6px 8px;
    min-width: 56px; min-height: 48px; border-radius: var(--radius-sm);
  }
  .mobile-toolbar button:active { background: rgba(0,0,0,.06); }
  .customizer-body { padding-bottom: calc(66px + env(safe-area-inset-bottom)); min-height: 0; }
  .canvas-wrap { border-right: none; overflow: hidden; min-height: 0; }
  .canvas-toolbar {
    align-items: stretch; padding: 8px 12px; gap: 8px;
  }
  .product-controls { width: 100%; gap: 8px; align-items: center; }
  .product-controls .select-input { min-height: 40px; flex: 0 0 auto; }
  .color-swatches {
    flex: 1 1 100%; max-width: none; flex-wrap: nowrap; overflow-x: auto;
    padding: 2px 2px 7px; scrollbar-width: none;
  }
  .color-swatches::-webkit-scrollbar { display: none; }
  .color-swatch { width: 30px; height: 30px; flex: 0 0 30px; }
  .zoom-controls { margin-left: auto; min-height: 40px; }
  .canvas-stage { flex: 1 1 auto; min-height: 0; padding: 26px 12px 12px; overflow: auto; }
  .edit-props-fab {
    display: inline-flex; position: absolute; left: 50%; bottom: 54px; transform: translateX(-50%);
    align-items: center; gap: 6px; z-index: 45;
    background: var(--primary); color: #fff; border: none; border-radius: 999px;
    padding: 10px 18px; font-size: 13.5px; font-weight: 700; box-shadow: var(--shadow-md);
    white-space: nowrap;
  }
  .edit-props-fab:active { transform: translateX(-50%) scale(.97); }
  .edit-props-fab[hidden] { display: none; }
  .canvas-mockup { width: min(78vw, 340px); height: auto; aspect-ratio: 380 / 460; }
  .view-tabs { padding: 8px 12px; gap: 6px; scrollbar-width: none; }
  .view-tabs::-webkit-scrollbar { display: none; }
  .view-tabs button { min-height: 38px; padding: 8px 13px; }
  .price-bar { padding: 10px 12px; gap: 10px; }
  .price-value { font-size: 19px; }
  .price-actions { margin-left: auto; }
}

@media (max-width: 640px) {
  .header-inner { gap: 10px; }
  .header-actions .btn-sm { display: none; }
  .hero { padding: 40px 0 56px; }
  .hero-visual { max-width: 340px; }
  .hero-shirt-card { padding: 28px; min-height: 300px; }
  .hero-shirt-mock { min-height: 240px; }
  .feature-grid, .product-grid, .steps-grid, .gallery-grid, .why-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .section-head { margin-bottom: 30px; }
  .catalog, .how-it-works, .gallery, .why-us, .faq { padding: 56px 0; }
  .price-bar { display: grid; grid-template-columns: 1fr auto; align-items: center; }
  .qty-stepper { justify-self: end; }
  .price-actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; margin-left: 0; }
  .price-actions .btn { padding: 10px 12px; min-width: 0; white-space: normal; text-align: center; }
  .canvas-toolbar { flex-direction: column; align-items: stretch; }
  .customizer-header-actions { display: none; }
  .field-row { grid-template-columns: 1fr; }
  .hero-badge { display: none; }
  .customizer-title strong { font-size: 14px; }
  .customizer-title span { font-size: 11.5px; max-width: 48vw; }
  .canvas-mockup { width: min(82vw, 304px); height: auto; }
  .canvas-stage { padding-top: 24px; }
  .printable-label { font-size: 10px; top: -20px; }
  /* Preview modal di HP: padding ramping, tab bisa swipe, tombol tidak kepotong */
  .modal-overlay { padding: 12px; }
  .modal-body { padding: 16px; }
  .modal-foot { flex-wrap: wrap; padding: 14px 16px; }
  .modal-foot .btn { min-width: 0; white-space: normal; text-align: center; }
  .preview-modal-body { gap: 12px; }
  .preview-stage { padding: 12px; max-height: 50vh; }
  #previewViewTabs { width: 100%; justify-content: flex-start; }
  .preview-modal .modal-foot { display: grid; grid-template-columns: 1fr 1fr; }
  .preview-modal .modal-foot > button:first-child { grid-column: 1 / -1; }
}

@media (max-width: 380px) {
  .customizer-header { gap: 6px; }
  .customizer-title span { display: none; }
  .mobile-toolbar button { min-width: 50px; padding-inline: 5px; }
  .price-value { font-size: 17px; }
  .price-actions .btn { font-size: 12.5px; }
}
