/* PARSHWA FASHION — V3 Customer Commerce styles (STAGING/LOCAL ONLY)
 * Mobile-first. CSP-compliant: no inline styles anywhere; components toggle
 * classes only. Uses the Concept A brand palette as CSS variables.
 */
:root {
  --pf-pink: #FF3F72;
  --pf-orange: #FF7433;
  --pf-yellow: #FFD32A;
  --pf-green: #42B86B;
  --pf-blue: #1B76FF;
  --pf-purple: #7544DB;
  --pf-ink: #1d1b22;
  --pf-ink2: #3a3742;
  --pf-mut: #8e8b98;
  --pf-paper: #f6f4ef;
  --pf-card: #ffffff;
  --pf-line: #ece7da;
  --pf-wa: #25D366;
  --pf-danger: #c62828;
  --pf-r: 16px;
}

.pf3-wrap { max-width: 560px; margin: 0 auto; padding: 16px; color: var(--pf-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.pf3-title { font-size: 22px; font-weight: 800; margin: 0 0 6px; letter-spacing: -0.3px; }
.pf3-desc { font-size: 14px; color: var(--pf-ink2); margin: 0 0 16px; line-height: 1.5; }
.pf3-note { font-size: 12px; color: var(--pf-mut); margin-top: 12px; line-height: 1.5; }

.pf3-card { background: var(--pf-card); border: 1px solid var(--pf-line);
  border-radius: var(--pf-r); padding: 14px; margin-bottom: 12px;
  box-shadow: 0 1px 6px rgba(29,27,34,.06); }
.pf3-empty { text-align: center; padding: 36px 16px; color: var(--pf-mut); }
.pf3-empty .pf3-empty-t { font-size: 17px; font-weight: 700; color: var(--pf-ink2); margin-bottom: 6px; }
.pf3-empty .pf3-empty-d { font-size: 14px; line-height: 1.5; }

.pf3-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.pf3-item { position: relative; border: 1px solid var(--pf-line); border-radius: 12px;
  overflow: hidden; background: #fff; }
.pf3-item img { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; background: var(--pf-paper); }
.pf3-item .pf3-item-b { padding: 8px 10px; }
.pf3-item .pf3-item-n { font-size: 13px; font-weight: 700; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.pf3-item .pf3-item-d { font-size: 11px; color: var(--pf-mut); margin-top: 2px; }
.pf3-rm { position: absolute; top: 6px; right: 6px; width: 44px; height: 44px;
  border-radius: 50%; border: none; background: rgba(0,0,0,.55); color: #fff;
  font-size: 15px; cursor: pointer; display: flex; align-items: center;
  justify-content: center; }

.pf3-field { margin-bottom: 12px; }
.pf3-field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.pf3-field .pf3-opt { font-weight: 400; color: var(--pf-mut); font-size: 12px; }
.pf3-input, .pf3-select, .pf3-textarea { width: 100%; box-sizing: border-box;
  border: 1px solid var(--pf-line); border-radius: 12px; padding: 12px;
  font-size: 16px; background: #fff; color: var(--pf-ink); }
/* font-size 16px prevents iOS Safari auto-zoom on focus */
.pf3-textarea { min-height: 84px; resize: vertical; }
.pf3-input:focus, .pf3-select:focus, .pf3-textarea:focus { outline: 2px solid var(--pf-pink); outline-offset: 1px; }
.pf3-err { font-size: 12px; color: var(--pf-danger); margin-top: 4px; display: none; }
.pf3-field.invalid .pf3-err { display: block; }
.pf3-field.invalid .pf3-input, .pf3-field.invalid .pf3-select { border-color: var(--pf-danger); }

.pf3-check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px;
  line-height: 1.5; cursor: pointer; min-height: 44px; }
/* min-height 44px: whole label row is the touch target (iOS HIG) */
.pf3-check input { width: 20px; height: 20px; margin-top: 2px; flex-shrink: 0; accent-color: var(--pf-pink); }

.pf3-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 999px; padding: 14px 22px; font-size: 16px; font-weight: 700;
  cursor: pointer; text-decoration: none; box-sizing: border-box;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.pf3-btn-primary { background: linear-gradient(135deg, var(--pf-pink), var(--pf-orange)); color: #fff; width: 100%; }
.pf3-btn-wa { background: var(--pf-wa); color: #fff; width: 100%; }
.pf3-btn-ghost { background: #fff; color: var(--pf-ink); border: 1px solid var(--pf-line); }
.pf3-btn-danger-ghost { background: #fff; color: var(--pf-danger); border: 1px solid #f3c1c1; }
.pf3-btn:disabled { opacity: .5; cursor: not-allowed; }
.pf3-btn-row { display: flex; gap: 10px; margin-top: 12px; }
.pf3-btn-row .pf3-btn { flex: 1; width: auto; min-width: 0; }
/* min-width:0 lets flex items shrink below content size - prevents
   horizontal overflow at 320px when two buttons sit side by side */

.pf3-toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%) translateY(20px);
  background: var(--pf-ink); color: #fff; font-size: 14px; padding: 12px 18px;
  border-radius: 999px; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
  z-index: 9999; max-width: calc(100vw - 40px); text-align: center; }
.pf3-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.pf3-modal-ov { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 9000;
  display: none; align-items: center; justify-content: center;
  padding: calc(20px + env(safe-area-inset-top, 0px)) 20px calc(20px + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box; }
.pf3-modal-ov.show { display: flex; }
.pf3-modal { background: #fff; border-radius: 20px; max-width: 480px; width: 100%;
  max-height: 88vh; overflow: auto; padding: 20px; box-sizing: border-box; position: relative; }
.pf3-modal-x { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px;
  border-radius: 50%; border: none; background: rgba(0,0,0,.55); color: #fff;
  font-size: 16px; cursor: pointer; display: flex; align-items: center;
  justify-content: center; }
.pf3-review-msg { white-space: pre-wrap; background: var(--pf-paper); border: 1px solid var(--pf-line);
  border-radius: 12px; padding: 12px; font-size: 14px; line-height: 1.55; margin: 12px 0; }

.pf3-alert-row { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--pf-line); font-size: 14px; }
.pf3-alert-row:last-child { border-bottom: none; }
.pf3-linkbtn { background: none; border: none; color: var(--pf-danger); font-size: 13px;
  cursor: pointer; padding: 6px 0; min-height: 44px; display: inline-flex;
  align-items: center; -webkit-tap-highlight-color: transparent; }
/* min-height 44px meets iOS HIG touch target */
.pf3-alert-row > span { min-width: 0; overflow-wrap: break-word; }
.pf3-alert-row .pf3-linkbtn { flex-shrink: 0; }

.pf3-preview-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.pf3-preview { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--pf-line); }
.pf3-preview img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.pf3-preview button { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px;
  border-radius: 50%; border: none; background: rgba(0,0,0,.6); color: #fff;
  font-size: 12px; cursor: pointer; }
/* Expand touch target to 44px while keeping 24px visual (iOS HIG) */
.pf3-preview button::after { content: ""; position: absolute; top: -10px; right: -10px;
  bottom: -10px; left: -10px; }

.pf3-badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 10px;
  border-radius: 999px; background: var(--pf-paper); color: var(--pf-ink2); margin-top: 4px; }
.pf3-badge.warn { background: #fff4d6; color: #8a6d00; }

.pf3-hidden { display: none !important; }

@media (min-width: 640px) {
  .pf3-grid { grid-template-columns: repeat(3, 1fr); }
  .pf3-title { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* Filter Toolbar - CSP-compliant external styles (fixes CSP-blocked inline styles) */
#filter-toolbar {
  background: #fff;
  border-bottom: 2px solid #e91e63;
  padding: 12px 16px;
}
#filter-toolbar-btn {
  display: block;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #ddd;
  border-radius: 12px;
  background: #f8f8f8;
  font-size: 15px;
  cursor: pointer;
  min-height: 48px;
  font-weight: 600;
  box-sizing: border-box;
  margin: 0;
  text-align: center;
  color: #333;
  /* Prevent overflow with long HI/GU translations at 320px */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#filter-toolbar-btn:hover {
  background: #f0f0f0;
}
#active-filters {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin-top: 8px;
}
#active-filters:empty {
  display: none;
}

/* === CSP MIGRATION: Critical inline styles moved from HTML (2026-10-17) === */
/* CSP style-src 'self' blocks all inline styles - these must be in external CSS */

/* Header menu button (was line 2459) */
#pf-menu-btn {
  order: -1;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  background: none;
  font-size: 22px;
  cursor: pointer;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
}

/* Verification image previews (were lines 788, 792) */
/* Overrides main .vfypreview{display:block} - hidden until src is set by JS */
img.vfypreview {
  display: none;
  max-width: 200px;
  margin-top: 8px;
  border-radius: 8px;
}
img.vfypreview[src]:not([src=""]) {
  display: block;
}

/* Wishlist/Cart badge counters (were lines 2474-2475) */
/* Note: main stylesheet has .hbtn .bdg{display:flex} - we override with higher specificity */
.hbtn .bdg {
  display: none;
}
.hbtn .bdg.show {
  display: flex;
}

/* Status div (was line 2512) */
#status {
  display: none;
}
#status.show {
  display: block;
}

/* Product detail header flex layout (was line 1693) */
.detail > div.detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* File input hidden (was line 791) */
#vfyshopphoto {
  display: none;
  margin-top: 6px;
}
#vfyshopphoto.show {
  display: block;
}

/* Verify browse button (was line 771) */
.vfybtn {
  display: block;
  text-decoration: none;
  text-align: center;
}

/* ===== CSP migration batch 2: remaining inline styles (2026-10-17) ===== */
/* NOTE: main stylesheet (css/) loads AFTER v3-styles.css, so override
   selectors use higher specificity where the main stylesheet sets values. */

/* Verify form rows */
.vfy-row{margin:6px 0}
.vfy-row-mt{margin-top:6px}
.vfy-label{font-weight:400}
#vfymaps{margin-top:6px}

/* Admin SW status */
#pf-sw-status{margin-top:8px;padding:8px;background:#f5f5f5;border-radius:6px;font-size:12px}

/* Master switch description */
#msdesc{font-size:13px;opacity:.9}

/* Staging build version note */
.pf-buildver{font-size:11px;color:#888;margin:-8px 0 12px}

/* Consent card */
.consentcard{background:#f0f7ff;border:1px solid #c8e0ff;border-radius:12px;padding:12px;margin:10px 0}
.consent-sub{font-size:13px;opacity:.85}
#consenttoggle{margin-top:8px}

/* Admin analytics small text */
.adm-small{display:block;font-size:11px;opacity:.7}
.adminnote.note-sm{font-size:11px}
.adm-cap{font-size:11px;opacity:.7}
.adm-actions{display:block;margin-top:4px}
.chipbtn.btn-xs{padding:4px 10px;font-size:12px}

/* Share fallback spacing */
.empty-spaced{margin:14px 0}

/* NEW badge override (.pno has brand bg in main stylesheet) */
.pno.is-new{background:var(--green)}

/* Section dots (.secttl h3 .dot in main stylesheet has no background) */
.secttl h3 .dot.dot-green{background:var(--green)}
.secttl h3 .dot.dot-purple{background:var(--purple)}
.secttl h3 .dot.dot-pink{background:var(--pink)}

/* Product detail title */
.pdetail-title{margin-top:8px}

/* Product notes box */
.pnotes{background:#fff8e1;border:1px solid #ffe082;border-radius:8px;padding:10px 12px;margin:10px 0;font-size:14px}

/* Cart item meta */
.ci-meta.gap-top{margin-top:6px}

/* Cart PDF button */
#cartpdfbtn{margin-top:10px}

/* Device note */
.device-note.gap-bottom{margin-bottom:12px}

/* Wishlist add-all */
#wishaddall{margin-bottom:10px}

/* Collection title */
.coll-title{margin:8px 0 4px}

/* Collection add-all wrapper + button */
.coll-add-wrap{margin:10px 0}
.card-add.capped{max-width:280px}

/* Sort label flush */
.sel-label.flush{margin-top:0}

/* Hero PDF button wrapper */
.hero-pdf{margin-top:12px}

/* Section title spacing */
.secttl.spaced{margin-top:26px}

/* Dead FAB (also has hidden attribute; kept for safety) */
#fab{display:none !important}

/* ===== pf-drawer.js CSP migration (2026-10-18) ===== */
/* Replaces inline style="" in innerHTML (blocked by style-src 'self') */
.pfd-dtitle{font-weight:700;font-size:16px}
.pfd-ficon{font-size:20px;margin-right:12px;flex-shrink:0}
.pfd-cstitle{margin:0 0 12px;font-size:18px}
.pfd-cstext{color:#666;margin:0 0 16px}

/* ===== Small-screen compaction (<=380px) ===== */
@media (max-width: 380px) {
  .pf3-btn{padding:14px 12px;font-size:15px}
  .pf3-wrap{padding:12px}
  .pf3-grid{gap:8px}
}

/* ============================================================
   Migrated from build_site_v2.py inline <style> (2026-10-18 CSP hardening).
   Header responsive wrap — was blocked by style-src 'self'.
   ============================================================ */
@media (max-width: 480px) {
  .hdr-in { flex-wrap: wrap; }
  .hdr-in .searchwrap { order: 10; flex: 1 1 100%; margin-top: 8px; }
}
