/* Solie Print Orders — storefront (shop grid, product modal, cart drawer)
   Scoped under .spo-shop so nothing leaks into the host theme. */
.spo-shop {
	--spo-ink: #0E1A2B; --spo-sea: #16283F; --spo-line: #E7DFCD;
	--spo-gold: #E8A317; --spo-amber: #F2C14E; --spo-sand: #FBF6EC;
	--spo-text: #1B2432; --spo-slate: #6C7B8F; --spo-green: #1FB37A; --spo-red: #E5604D;
	--spo-radius: 16px;
	--spo-display: "Fraunces", Georgia, serif;
	--spo-body: "Manrope", system-ui, -apple-system, sans-serif;
	--spo-mono: "Space Grotesk", monospace;

	font-family: var(--spo-body); color: var(--spo-text); position: relative;
	max-width: 1160px; margin: 0 auto;
}
.spo-shop *, .spo-shop *::before, .spo-shop *::after { box-sizing: border-box; }
.spo-shop img { display: block; max-width: 100%; }
.spo-shop .spo-product-price, .spo-shop .spo-modal-price, .spo-shop b, .spo-shop [id$="-total"] { font-variant-numeric: tabular-nums; }

/* Head + cart button */
.spo-shop-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.spo-eyebrow { font-family: var(--spo-mono); text-transform: uppercase; letter-spacing: .24em; font-size: 12px; font-weight: 600; color: var(--spo-gold); margin: 0 0 6px; }
.spo-shop-title { font-family: var(--spo-display); font-weight: 600; font-size: clamp(26px, 4vw, 40px); line-height: 1.08; color: var(--spo-ink); margin: 0; }
.spo-cart-btn { position: relative; flex: none; cursor: pointer; background: var(--spo-ink); color: #fff; border: 0; width: 52px; height: 52px; border-radius: 14px; font-size: 22px; transition: transform .12s, background .15s; }
.spo-cart-btn:hover { background: var(--spo-sea); transform: translateY(-1px); }
.spo-cart-count { position: absolute; top: -8px; right: -8px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--spo-gold); color: #2B1E00; font-family: var(--spo-mono); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.spo-cart-count:not(.has) { opacity: .5; }

/* Grid */
.spo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 22px; }
.spo-product { background: #fff; border: 1px solid var(--spo-line); border-radius: var(--spo-radius); overflow: hidden; cursor: pointer; display: flex; flex-direction: column; transition: transform .16s, box-shadow .16s, border-color .16s; }
.spo-product:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(14,26,43,.12); border-color: var(--spo-amber); }
.spo-product-media { position: relative; aspect-ratio: 1/1; background: var(--spo-sand); overflow: hidden; }
.spo-product-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.spo-product:hover .spo-product-media img { transform: scale(1.04); }
.spo-product-noimg { width: 100%; height: 100%; display: grid; place-items: center; font-size: 54px; color: var(--spo-amber); }
.spo-badge { position: absolute; left: 12px; top: 12px; background: rgba(14,26,43,.85); color: var(--spo-amber); font-size: 11px; font-weight: 700; letter-spacing: .03em; padding: 5px 10px; border-radius: 999px; backdrop-filter: blur(4px); }
.spo-product-body { padding: 16px 16px 18px; display: flex; flex-direction: column; flex: 1; }
.spo-product-name { font-family: var(--spo-display); font-weight: 600; font-size: 19px; color: var(--spo-ink); margin: 0 0 6px; }
.spo-product-desc { font-size: 13.5px; color: var(--spo-slate); margin: 0 0 14px; line-height: 1.5; }
.spo-product-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.spo-product-price { font-weight: 800; font-size: 17px; color: var(--spo-ink); }
.spo-add { cursor: pointer; border: 0; background: var(--spo-ink); color: #fff; font-family: inherit; font-weight: 700; font-size: 13px; padding: 9px 14px; border-radius: 10px; transition: background .15s; }
.spo-add:hover { background: var(--spo-gold); color: #2B1E00; }
.spo-add.is-added { background: var(--spo-green); color: #fff; }

/* Modal */
.spo-modal { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 24px; }
.spo-modal[hidden] { display: none; }
.spo-modal-back { position: absolute; inset: 0; background: rgba(9,16,28,.62); backdrop-filter: blur(3px); }
.spo-modal-card { position: relative; z-index: 1; background: #fff; border-radius: 20px; max-width: 860px; width: 100%; max-height: 90vh; overflow: auto; box-shadow: 0 40px 90px rgba(0,0,0,.4); }
.spo-modal-x { position: absolute; top: 14px; right: 16px; z-index: 2; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255,255,255,.85); font-size: 26px; line-height: 1; cursor: pointer; color: var(--spo-ink); }
.spo-modal-x:hover { background: var(--spo-sand); }
.spo-modal-grid { display: grid; grid-template-columns: 1fr 1fr; }
.spo-modal-media { background: var(--spo-sand); min-height: 320px; }
.spo-modal-media img { width: 100%; height: 100%; object-fit: cover; }
.spo-modal-noimg { display: grid; place-items: center; height: 100%; font-size: 80px; color: var(--spo-amber); }
.spo-modal-info { padding: 30px 28px; }
.spo-modal-info h3 { font-family: var(--spo-display); font-weight: 600; font-size: 27px; color: var(--spo-ink); margin: 0 0 6px; }
.spo-modal-price { font-family: var(--spo-mono); font-weight: 700; font-size: 22px; color: var(--spo-gold); margin-bottom: 14px; }
.spo-modal-desc { color: var(--spo-slate); font-size: 14.5px; line-height: 1.6; margin-bottom: 18px; }
.spo-lbl { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #4A5A72; margin-bottom: 8px; }

.spo-variant-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.spo-chip { cursor: pointer; border: 1.5px solid var(--spo-line); background: #fff; color: var(--spo-ink); font-family: inherit; font-weight: 700; font-size: 13px; padding: 8px 14px; border-radius: 999px; transition: border-color .15s, background .15s; }
.spo-chip:hover { border-color: var(--spo-amber); }
.spo-chip.is-on { border-color: var(--spo-gold); background: #FFF9EC; box-shadow: 0 0 0 3px rgba(232,163,23,.14); }

.spo-modal-upload { margin-bottom: 18px; }
.spo-drop { display: block; position: relative; cursor: pointer; border: 2px dashed var(--spo-line); border-radius: 12px; background: var(--spo-sand); padding: 20px; text-align: center; transition: border-color .15s; }
.spo-drop:hover { border-color: var(--spo-gold); }
.spo-drop.has-file { border-style: solid; border-color: var(--spo-green); background: #F4FBF8; }
.spo-drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.spo-drop-icon { font-size: 24px; color: var(--spo-gold); }
.spo-drop-text { display: block; font-weight: 700; color: var(--spo-ink); margin-top: 4px; word-break: break-all; }
.spo-drop-hint { display: block; font-size: 12px; color: var(--spo-slate); }
.spo-preview { max-height: 140px; margin: 12px auto 0; border-radius: 8px; }

.spo-qty-row { margin-bottom: 18px; }
.spo-stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--spo-line); border-radius: 10px; overflow: hidden; }
.spo-stepper button { width: 38px; height: 40px; border: 0; background: var(--spo-sand); font-size: 18px; cursor: pointer; color: var(--spo-ink); }
.spo-stepper button:hover { background: #F2E9D6; }
.spo-stepper input { width: 52px; height: 40px; border: 0; text-align: center; font-family: var(--spo-mono); font-weight: 700; font-size: 15px; -moz-appearance: textfield; }
.spo-stepper input::-webkit-outer-spin-button, .spo-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.spo-stepper-sm button { width: 30px; height: 32px; font-size: 15px; }
.spo-stepper-sm input { width: 40px; height: 32px; font-size: 13px; }

.spo-add-btn { display: block; width: 100%; cursor: pointer; border: 0; background: linear-gradient(180deg, var(--spo-amber), var(--spo-gold)); color: #2B1E00; font-family: inherit; font-weight: 800; font-size: 16px; padding: 14px; border-radius: 999px; box-shadow: 0 12px 26px rgba(232,163,23,.3); transition: transform .12s; }
.spo-add-btn:hover:not(:disabled) { transform: translateY(-1px); }
.spo-add-btn:disabled { opacity: .5; cursor: default; }
.spo-modal-msg { font-size: 13px; margin: 10px 0 0; min-height: 16px; }
.spo-modal-msg.is-ok { color: var(--spo-green); }
.spo-modal-msg.is-err { color: var(--spo-red); }

/* Cart drawer */
.spo-cart { position: fixed; inset: 0; z-index: 100000; }
.spo-cart[hidden] { display: none; }
.spo-cart-back { position: absolute; inset: 0; background: rgba(9,16,28,.55); }
.spo-cart-panel { position: absolute; top: 0; right: 0; height: 100%; width: min(440px, 100%); background: var(--spo-sand); box-shadow: -20px 0 60px rgba(0,0,0,.3); display: flex; flex-direction: column; animation: spo-slide .22s ease; }
@keyframes spo-slide { from { transform: translateX(100%); } to { transform: translateX(0); } }
.spo-cart-top { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--spo-line); }
.spo-cart-top h3 { font-family: var(--spo-display); font-weight: 600; font-size: 22px; margin: 0; color: var(--spo-ink); }
.spo-cart-x { border: 0; background: none; font-size: 28px; line-height: 1; cursor: pointer; color: var(--spo-slate); }
.spo-cart-items { flex: 1; overflow: auto; padding: 14px 22px; }
.spo-cart-empty { color: var(--spo-slate); text-align: center; padding: 40px 0; }
.spo-citem { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--spo-line); align-items: center; }
.spo-citem-media img, .spo-citem-noimg { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; }
.spo-citem-noimg { display: grid; place-items: center; background: #fff; color: var(--spo-amber); font-size: 26px; }
.spo-citem-name { font-weight: 700; color: var(--spo-ink); font-size: 14px; }
.spo-citem-file { font-size: 11px; color: var(--spo-green); margin-top: 2px; }
.spo-citem-price { font-family: var(--spo-mono); color: var(--spo-slate); font-size: 13px; margin-top: 2px; }
.spo-citem-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.spo-citem-rm { border: 0; background: none; color: var(--spo-slate); font-size: 12px; cursor: pointer; text-decoration: underline; }
.spo-citem-rm:hover { color: var(--spo-red); }
.spo-cart-foot { padding: 18px 22px 22px; border-top: 1px solid var(--spo-line); background: #fff; }
.spo-cart-sub { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
.spo-cart-sub b { font-size: 22px; font-weight: 800; color: var(--spo-ink); }

/* Checkout fields */
.spo-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.spo-field { display: flex; flex-direction: column; gap: 5px; }
.spo-field.spo-col-2 { grid-column: 1 / -1; }
.spo-field span { font-size: 12px; font-weight: 700; color: #4A5A72; }
.spo-field input, .spo-field textarea { font-family: inherit; font-size: 15px; border: 1.5px solid var(--spo-line); border-radius: 10px; padding: 10px 12px; background: #fff; width: 100%; }
.spo-field input:focus, .spo-field textarea:focus { outline: none; border-color: var(--spo-gold); box-shadow: 0 0 0 3px rgba(232,163,23,.14); }
.spo-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.spo-submit { display: block; width: 100%; cursor: pointer; border: 0; background: linear-gradient(180deg, var(--spo-amber), var(--spo-gold)); color: #2B1E00; font-family: inherit; font-weight: 800; font-size: 16px; padding: 14px; border-radius: 999px; box-shadow: 0 12px 26px rgba(232,163,23,.3); }
.spo-submit:hover:not(:disabled) { transform: translateY(-1px); }
.spo-submit:disabled { opacity: .6; }
.spo-lead { text-align: center; color: var(--spo-slate); font-size: 12px; margin: 10px 0 0; }
.spo-result { margin-top: 16px; padding: 14px 16px; border-radius: 12px; font-weight: 600; font-size: 14px; }
.spo-result[hidden] { display: none; }
.spo-result.is-ok { background: #F4FBF8; border: 1px solid rgba(31,179,122,.4); color: #147a54; }
.spo-result.is-err { background: #FDF3F1; border: 1px solid rgba(229,96,77,.4); color: #b03a2b; }

@media (max-width: 640px) {
	.spo-modal-grid { grid-template-columns: 1fr; }
	.spo-modal-media { min-height: 200px; max-height: 260px; }
	.spo-fields { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
	.spo-product, .spo-add-btn, .spo-submit, .spo-cart-btn { transition: none; }
	.spo-cart-panel { animation: none; }
	.spo-product:hover .spo-product-media img { transform: none; }
}

/* ---------- language switcher (EN · FR · KR) ---------- */
.spo-shop .spo-shop-lang { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.spo-shop .spo-lang { display: inline-flex; align-items: center; gap: 2px; background: #fff; border: 1px solid var(--spo-line); border-radius: 999px; padding: 3px; }
.spo-shop .spo-lang-btn { font-family: var(--spo-mono); font-size: 12px; font-weight: 700; letter-spacing: .05em; color: var(--spo-slate); padding: 5px 10px; border-radius: 999px; text-decoration: none; line-height: 1; transition: color .15s, background .15s; }
.spo-shop .spo-lang-btn:hover { color: var(--spo-ink); }
.spo-shop .spo-lang-btn.is-on { background: linear-gradient(180deg, var(--spo-amber), var(--spo-gold)); color: #3A2B00; }
