/* ============================================================
   MODULE 7 - Product Upload (Admin / Seller dashboard)
   Scoped under .sh-up*.
   ============================================================ */
.sh-up{max-width:880px;margin:0 auto}
.sh-up__mode{display:flex;align-items:center;gap:10px;padding:12px 16px;border-radius:12px;margin-bottom:18px;font-weight:700;font-size:14px}
.sh-up__mode--admin{background:rgba(225,6,0,.08);border:1px solid rgba(225,6,0,.3);color:#b00500}
.sh-up__mode--seller{background:var(--sh-bg-soft);border:1px solid var(--sh-line);color:var(--sh-navy)}
.sh-up__mode .sh-mall{margin:0}

.sh-up__sec{background:#fff;border:1px solid var(--sh-line);border-radius:14px;padding:18px 18px 6px;margin-bottom:18px}
.sh-up__sec h3{margin:0 0 4px;font-size:16px;color:var(--sh-navy)}
.sh-up__sec p.hint{margin:0 0 14px;font-size:12.5px;color:var(--sh-muted)}

.sh-up__row{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}
.sh-up__row--3{grid-template-columns:repeat(3,1fr)}
.sh-fld{margin-bottom:14px}
.sh-fld label{display:block;font-size:13px;font-weight:700;margin-bottom:5px}
.sh-fld label .req{color:var(--sh-red)}
.sh-fld input,.sh-fld select,.sh-fld textarea{width:100%;border:1px solid var(--sh-line);border-radius:10px;
  padding:10px 12px;font-size:14px;font-family:inherit;background:#fff;outline:0}
.sh-fld input:focus,.sh-fld select:focus,.sh-fld textarea:focus{border-color:var(--sh-navy);box-shadow:0 0 0 3px rgba(15,27,61,.08)}
.sh-fld textarea{resize:vertical;min-height:96px}

/* ------------------------------------------------------------------
   RICH TEXT EDITOR (product description)
   The textarea is still the field the form submits; it is hidden while
   the visual editor is showing and revealed by the HTML toggle. Both are
   full width so switching between them does not move the page.
   ------------------------------------------------------------------ */
.sh-rte{border:1px solid var(--sh-line);border-radius:10px;overflow:hidden;background:#fff}
.sh-rte:focus-within{border-color:var(--sh-navy);box-shadow:0 0 0 3px rgba(15,27,61,.08)}
.sh-rte__bar{display:flex;flex-wrap:wrap;align-items:center;gap:3px;padding:6px 7px;
  background:#f7f9fc;border-bottom:1px solid var(--sh-line)}
.sh-rte__b{border:1px solid transparent;background:transparent;border-radius:7px;cursor:pointer;
  padding:5px 9px;font-size:13px;line-height:1;color:#33415c;font-family:inherit}
.sh-rte__b:hover{background:#e8eef7;border-color:#d7deea}
.sh-rte__b:active{background:#dce5f2}
.sh-rte__b:focus-visible{outline:2px solid var(--sh-navy);outline-offset:1px}
.sh-rte__src{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px}
.sh-rte__sep{width:1px;align-self:stretch;margin:2px 4px;background:#dde3ec}
.sh-rte__area{min-height:150px;max-height:460px;overflow-y:auto;padding:12px 14px;
  font-size:14px;line-height:1.65;color:#333;outline:none}
/* contenteditable has no placeholder attribute; is-empty is set by the editor */
.sh-rte__area.is-empty::before{content:attr(data-ph);color:#9aa4b5;pointer-events:none}
/* The description field's textarea is the HTML source view: hidden until the
   toggle asks for it, and monospaced because that is what it now contains. */
#sh-up-desc{display:none;margin-top:8px;min-height:190px;
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12.5px;line-height:1.6}

/* Formatting shown inside the editor. Mirrors the storefront's .sh-rt so what
   the seller composes is what the buyer gets - if these drift, the editor
   becomes a preview of a page that does not exist. */
.sh-rte__area>*:first-child{margin-top:0}
.sh-rte__area>*:last-child{margin-bottom:0}
.sh-rte__area p{margin:0 0 1rem}
.sh-rte__area h1,.sh-rte__area h2,.sh-rte__area h3,
.sh-rte__area h4,.sh-rte__area h5,.sh-rte__area h6{
  margin:1.4rem 0 .5rem;line-height:1.3;color:var(--sh-navy);font-weight:700}
.sh-rte__area h1,.sh-rte__area h2{font-size:18px}
.sh-rte__area h3{font-size:16px}
.sh-rte__area h4,.sh-rte__area h5,.sh-rte__area h6{font-size:14.5px}
.sh-rte__area ul,.sh-rte__area ol{margin:0 0 1rem;padding-left:22px}
.sh-rte__area ul{list-style-type:disc}
.sh-rte__area ol{list-style-type:decimal}
.sh-rte__area li{margin:.28rem 0}
.sh-rte__area strong,.sh-rte__area b{font-weight:700;color:var(--sh-navy)}
.sh-rte__area a{color:#1f5fb5;text-decoration:underline}
.sh-rte__area hr{border:0;border-top:1px solid var(--sh-line);margin:1.2rem 0}
.sh-rte__area blockquote{margin:0 0 1rem;padding:.35rem 0 .35rem 14px;
  border-left:3px solid #dfe4ee;color:#4a5568}
.sh-rte__area code{background:#f2f5f9;border-radius:4px;padding:1px 5px;font-size:.92em}
.sh-rte__area .sh-rt-table{overflow-x:auto;margin:0 0 1rem}
.sh-rte__area table{border-collapse:collapse;width:100%;font-size:13.5px}
.sh-rte__area th,.sh-rte__area td{border:1px solid var(--sh-line);padding:7px 9px;text-align:left}
.sh-rte__area th{background:#f7f9fc;font-weight:700;color:var(--sh-navy)}
.sh-rte__area img{max-width:100%;height:auto;border-radius:8px}
.sh-fld .count{float:right;font-size:11.5px;color:var(--sh-muted);font-weight:600}

/* image grid (9 × 1:1) */
.sh-up__imgs{display:grid;grid-template-columns:repeat(5,1fr);gap:10px}
@media(max-width:640px){.sh-up__imgs{grid-template-columns:repeat(3,1fr)}.sh-up__row,.sh-up__row--3{grid-template-columns:1fr}}
.sh-up__img{position:relative;aspect-ratio:1/1;border:1.5px dashed var(--sh-line);border-radius:10px;
  display:flex;flex-direction:column;align-items:center;justify-content:center;cursor:pointer;color:var(--sh-muted);
  font-size:11px;text-align:center;background:var(--sh-bg-soft);overflow:hidden}
.sh-up__img:hover{border-color:var(--sh-navy);color:var(--sh-navy)}
.sh-up__img.filled{border-style:solid;border-color:var(--sh-navy)}
.sh-up__img img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.sh-up__img .plus{font-size:22px;line-height:1}
.sh-up__img input{display:none}
.sh-up__img .first{position:absolute;top:4px;left:4px;background:var(--sh-navy);color:#fff;font-size:9px;font-weight:700;padding:1px 5px;border-radius:4px}

/* video */
.sh-up__video{display:flex;align-items:center;gap:12px;border:1.5px dashed var(--sh-line);border-radius:10px;padding:14px;background:var(--sh-bg-soft);cursor:pointer}
.sh-up__video:hover{border-color:var(--sh-navy)}
.sh-up__video input{display:none}
.sh-up__video .ic{font-size:26px}
.sh-up__vmsg{font-size:12.5px;margin-top:6px}
.sh-up__vmsg.err{color:var(--sh-red)}
.sh-up__vmsg.ok{color:var(--sh-green)}

/* "what Google will see" hint under the product name - advisory, not an error:
   the listing still publishes, the feed just sends the trimmed title. */
.sh-up__gmc{margin-top:6px;padding:8px 10px;border-radius:8px;font-size:12px;line-height:1.5;
  background:#fff8e6;border:1px solid #f0d9a0;color:#6b4e00}
.sh-up__gmc b{display:block;font-weight:600}
.sh-up__gmc i{font-style:normal;background:#ffe9b0;border-radius:3px;padding:0 4px}
.sh-up__gmc span{display:block;margin-top:3px;opacity:.85}
.sh-up__gmc[hidden]{display:none}

/* tick options (Local / Worldwide) */
.sh-ticks{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.sh-tick{display:flex;gap:10px;align-items:flex-start;border:1.5px solid var(--sh-line);border-radius:12px;padding:12px 14px;cursor:pointer}
.sh-tick input{margin-top:3px;accent-color:var(--sh-navy);width:16px;height:16px;flex:0 0 auto}
.sh-tick.sel{border-color:var(--sh-navy);background:rgba(15,27,61,.04)}
.sh-tick b{display:block;font-size:14px}
.sh-tick small{color:var(--sh-muted);font-size:12px}

/* variation list table */
.sh-var__opts{display:flex;flex-wrap:wrap;gap:7px;margin-top:8px}
.sh-var__chip{background:var(--sh-bg-soft);border:1px solid var(--sh-line);border-radius:20px;padding:4px 10px;font-size:12.5px;display:flex;align-items:center;gap:6px}
.sh-var__chip button{border:0;background:transparent;cursor:pointer;color:var(--sh-muted);font-size:13px}
.sh-var__table{width:100%;border-collapse:collapse;margin-top:10px;font-size:13px}
.sh-var__table th,.sh-var__table td{border:1px solid var(--sh-line);padding:8px;text-align:left}
.sh-var__table th{background:var(--sh-bg-soft);font-size:12px}
.sh-var__table input{width:100%;border:0;outline:0;font-size:13px;font-family:inherit}

.sh-up__err{color:var(--sh-red);font-size:13px;margin:6px 0;display:none}
.sh-up__err.show{display:block}
.sh-up__actions{display:flex;justify-content:flex-end;gap:10px;margin:6px 0 30px}

/* success */
.sh-up__done{display:none;text-align:center;background:#fff;border:1px solid var(--sh-line);border-radius:16px;padding:34px;max-width:560px;margin:0 auto}
.sh-up__done.show{display:block}
.sh-up__done .ic{width:66px;height:66px;border-radius:50%;background:rgba(31,170,89,.12);color:var(--sh-green);
  display:flex;align-items:center;justify-content:center;font-size:34px;margin:0 auto 14px}
