:root{
  --bg:#f7f5ef;--surface:#fff;--surface-2:#f0ede4;--ink:#223238;--muted:#6c797c;--line:#dedbd2;
  --primary:#557b73;--primary-dark:#31564f;--navy:#233a4d;--sage:#dfe9e2;--cream:#f4efe3;
  --success:#3f7657;--warning:#a97932;--danger:#9b5252;--shadow:0 12px 35px rgba(35,58,77,.08);
  --radius:18px;--radius-sm:12px;--max:1240px;
}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:var(--bg);color:var(--ink);line-height:1.45}button,input,select,textarea{font:inherit}button{cursor:pointer}a{color:inherit}img{max-width:100%;display:block}.hidden{display:none!important}
.topbar{position:sticky;top:0;z-index:50;background:rgba(247,245,239,.94);backdrop-filter:blur(12px);border-bottom:1px solid var(--line)}
.topbar-inner{max-width:var(--max);margin:auto;display:flex;align-items:center;justify-content:space-between;padding:12px 20px;gap:16px}.brand{display:flex;align-items:center;gap:12px;text-decoration:none}.brand-mark{width:44px;height:44px;border-radius:14px;background:var(--navy);color:#fff;display:grid;place-items:center;font-weight:800;font-size:20px;box-shadow:var(--shadow)}.brand-copy strong{display:block;font-size:13px;letter-spacing:.09em;text-transform:uppercase}.brand-copy span{display:block;font-size:20px;font-weight:800;line-height:1.05}.tagline{font-size:12px;color:var(--muted);margin-top:2px}.top-actions{display:flex;align-items:center;gap:8px}.lang-toggle{display:flex;background:var(--surface-2);padding:3px;border-radius:999px}.lang-toggle button{border:0;background:transparent;padding:7px 10px;border-radius:999px;color:var(--muted);font-weight:700}.lang-toggle button.active{background:var(--surface);color:var(--navy);box-shadow:0 1px 5px rgba(0,0,0,.08)}
.container{max-width:var(--max);margin:0 auto;padding:24px 20px 90px}.hero{display:grid;grid-template-columns:1.15fr .85fr;gap:34px;align-items:center;min-height:74vh;padding:34px 0}.eyebrow{display:inline-flex;align-items:center;gap:8px;background:var(--sage);color:var(--primary-dark);padding:7px 11px;border-radius:999px;font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.08em}.hero h1{font-size:clamp(44px,7vw,84px);line-height:.94;margin:18px 0 18px;letter-spacing:-.045em}.hero h1 span{color:var(--primary)}.hero p{font-size:clamp(17px,2vw,22px);color:var(--muted);max-width:680px}.hero-card{background:var(--surface);border:1px solid var(--line);border-radius:28px;padding:28px;box-shadow:var(--shadow)}.box-visual{aspect-ratio:1.25;border-radius:24px;background:linear-gradient(145deg,var(--cream),#e8e2d4);display:grid;place-items:center;position:relative;overflow:hidden}.box-visual:before{content:"Arma Tu Caja";font-size:clamp(42px,7vw,72px);font-weight:900;color:var(--navy);transform:rotate(-4deg)}.box-visual:after{content:"18 × 18 × 28";position:absolute;bottom:22px;background:#fff;padding:8px 12px;border-radius:999px;font-weight:800;color:var(--primary-dark)}.hero-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:24px}
.btn{border:0;border-radius:12px;padding:11px 16px;font-weight:800;min-height:44px;display:inline-flex;align-items:center;justify-content:center;gap:8px;text-decoration:none}.btn-primary{background:var(--primary-dark);color:#fff}.btn-primary:hover{background:#284941}.btn-secondary{background:var(--surface-2);color:var(--navy);border:1px solid var(--line)}.btn-danger{background:#f4e5e5;color:var(--danger)}.btn-success{background:#e3efe7;color:var(--success)}.btn-dark{background:var(--navy);color:#fff}.btn:disabled{opacity:.55;cursor:not-allowed}.btn-sm{padding:8px 11px;min-height:36px;font-size:13px}.btn-block{width:100%}
.grid{display:grid;gap:18px}.grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:20px;box-shadow:0 5px 18px rgba(35,58,77,.04)}.card h2,.card h3{margin-top:0}.muted{color:var(--muted)}.small{font-size:13px}.tiny{font-size:11px}.strong{font-weight:800}.money{font-variant-numeric:tabular-nums}.section-title{display:flex;justify-content:space-between;align-items:end;gap:16px;margin:10px 0 18px}.section-title h1,.section-title h2{margin:0}.section-title p{margin:3px 0 0;color:var(--muted)}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.field{display:flex;flex-direction:column;gap:6px}.field.full{grid-column:1/-1}.field label{font-weight:750;font-size:13px;color:#425157}.field input,.field select,.field textarea{width:100%;border:1px solid #cfd3cf;background:#fff;border-radius:11px;padding:11px 12px;min-height:44px;color:var(--ink);outline:none}.field textarea{min-height:92px;resize:vertical}.field input:focus,.field select:focus,.field textarea:focus{border-color:var(--primary);box-shadow:0 0 0 3px rgba(85,123,115,.14)}.help{font-size:12px;color:var(--muted)}.error-text{color:var(--danger);font-weight:700}.success-text{color:var(--success);font-weight:700}.notice{padding:12px 14px;border-radius:12px;background:var(--cream);border:1px solid var(--line);font-size:14px}.notice.success{background:#e8f2eb;color:#305d44}.notice.warning{background:#f5ecd9;color:#765322}.notice.error{background:#f5e7e7;color:#7d4242}
.auth-shell{min-height:calc(100vh - 70px);display:grid;place-items:center;padding:32px 20px}.auth-card{width:min(560px,100%);background:var(--surface);border:1px solid var(--line);border-radius:24px;padding:28px;box-shadow:var(--shadow)}.tabs{display:flex;gap:6px;background:var(--surface-2);padding:5px;border-radius:13px;margin-bottom:20px}.tab-btn{flex:1;border:0;background:transparent;border-radius:9px;padding:10px;font-weight:800;color:var(--muted)}.tab-btn.active{background:#fff;color:var(--navy);box-shadow:0 2px 8px rgba(0,0,0,.06)}
.app-layout{display:grid;grid-template-columns:230px minmax(0,1fr);min-height:calc(100vh - 69px)}.sidebar{border-right:1px solid var(--line);padding:20px 14px;background:#f5f2eb;position:sticky;top:69px;height:calc(100vh - 69px)}.nav-list{display:flex;flex-direction:column;gap:6px}.nav-btn{border:0;background:transparent;text-align:left;border-radius:11px;padding:11px 12px;color:#526065;font-weight:750}.nav-btn.active{background:var(--surface);color:var(--navy);box-shadow:0 2px 9px rgba(0,0,0,.05)}.app-main{min-width:0;padding:24px 24px 100px}.view{display:none}.view.active{display:block}
.metric{padding:18px;background:var(--surface);border:1px solid var(--line);border-radius:16px}.metric-label{font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:.08em;font-weight:800}.metric-value{font-size:30px;font-weight:900;color:var(--navy);margin-top:4px}.metric-sub{font-size:12px;color:var(--muted);margin-top:3px}
.progress-wrap{height:14px;border-radius:999px;background:#e5e3dc;overflow:hidden}.progress-bar{height:100%;width:0;background:linear-gradient(90deg,var(--primary),var(--primary-dark));border-radius:inherit;transition:width .35s ease}.box-summary{position:sticky;top:85px}.box-summary .big{font-size:38px;font-weight:900;line-height:1}.box-summary-row{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px solid #eeece5}.box-summary-row:last-child{border-bottom:0}
.catalog-layout{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:20px}.filterbar{display:grid;grid-template-columns:2fr repeat(3,1fr);gap:10px;margin-bottom:16px}.product-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.product-card{background:var(--surface);border:1px solid var(--line);border-radius:16px;overflow:hidden;display:flex;flex-direction:column;min-width:0}.product-photo{aspect-ratio:4/5;background:var(--surface-2);overflow:hidden;position:relative}.product-photo img{width:100%;height:100%;object-fit:cover}.product-placeholder{height:100%;display:grid;place-items:center;color:#849094;font-weight:800}.product-body{padding:13px;display:flex;flex-direction:column;gap:7px;flex:1}.product-name{font-weight:850;line-height:1.2}.chips{display:flex;flex-wrap:wrap;gap:5px}.chip{font-size:11px;padding:5px 7px;border-radius:999px;background:var(--surface-2);color:#536166;font-weight:700}.chip.premium{background:#eee5c9;color:#6f5a22}.product-footer{margin-top:auto;display:flex;justify-content:space-between;align-items:center;gap:8px;padding-top:7px}.resale{font-size:12px;color:var(--muted)}
.list{display:flex;flex-direction:column;gap:10px}.list-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:12px;align-items:center;background:#fff;border:1px solid var(--line);border-radius:13px;padding:11px}.list-thumb{width:58px;height:70px;border-radius:9px;background:var(--surface-2);object-fit:cover}.status{display:inline-flex;align-items:center;padding:5px 8px;border-radius:999px;font-size:11px;font-weight:850;text-transform:capitalize}.status.available,.status.verified,.status.delivered{background:#e3f0e6;color:#356448}.status.pending,.status.submitted,.status.reserved{background:#f6ecd8;color:#795824}.status.rejected,.status.cancelled{background:#f4e1e1;color:#824545}.status.shipped,.status.packing,.status.approved{background:#e2eaf1;color:#35536b}.status.draft{background:#eceae5;color:#5d6668}
.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:14px;background:#fff}.table{width:100%;border-collapse:collapse;min-width:760px}.table th,.table td{padding:11px 12px;text-align:left;border-bottom:1px solid #ebe9e2;font-size:13px;vertical-align:middle}.table th{font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);background:#faf9f6;position:sticky;top:0}.table tr:last-child td{border-bottom:0}
.dropzone{border:2px dashed #b8c1bc;border-radius:16px;padding:20px;text-align:center;background:#faf9f6;transition:.2s}.dropzone.drag{border-color:var(--primary);background:var(--sage)}.preview-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin-top:12px}.preview{aspect-ratio:4/5;border-radius:10px;overflow:hidden;background:#fff;position:relative;border:1px solid var(--line)}.preview img{width:100%;height:100%;object-fit:contain;background:#fff}.preview span{position:absolute;bottom:4px;left:4px;background:rgba(0,0,0,.65);color:white;font-size:10px;padding:3px 5px;border-radius:5px}.analysis-box{background:#eef3ef;border:1px solid #d1ded5;border-radius:14px;padding:14px;margin-top:12px}.analysis-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.analysis-value{background:#fff;border-radius:10px;padding:10px}.analysis-value b{display:block;font-size:18px;color:var(--navy)}.analysis-value span{font-size:10px;color:var(--muted);text-transform:uppercase;letter-spacing:.06em}
.modal-backdrop{position:fixed;inset:0;background:rgba(24,38,42,.45);z-index:100;display:grid;place-items:center;padding:20px}.modal{width:min(620px,100%);max-height:90vh;overflow:auto;background:#fff;border-radius:20px;padding:22px;box-shadow:0 25px 80px rgba(0,0,0,.2)}
.mobile-nav{display:none}.toast-stack{position:fixed;right:18px;bottom:18px;z-index:200;display:flex;flex-direction:column;gap:8px}.toast{background:var(--navy);color:#fff;padding:11px 14px;border-radius:11px;box-shadow:var(--shadow);max-width:360px}.toast.error{background:#7d4242}.toast.success{background:#356448}
.hero-points{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:24px}.hero-point{background:rgba(255,255,255,.62);border:1px solid var(--line);border-radius:14px;padding:14px}.hero-point strong{display:block;color:var(--navy);margin-bottom:3px}.profit-positive{color:var(--success);font-weight:900}.profit-negative{color:var(--danger);font-weight:900}.empty{padding:34px;text-align:center;border:1px dashed var(--line);border-radius:16px;color:var(--muted)}
@media(max-width:1050px){.product-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.catalog-layout{grid-template-columns:minmax(0,1fr) 300px}.grid-4{grid-template-columns:repeat(2,1fr)}}
@media(max-width:820px){.hero{grid-template-columns:1fr;min-height:auto}.hero-card{order:-1}.app-layout{display:block}.sidebar{display:none}.app-main{padding:18px 14px 90px}.mobile-nav{display:grid;grid-template-columns:repeat(5,1fr);position:fixed;bottom:0;left:0;right:0;z-index:60;background:rgba(255,255,255,.97);border-top:1px solid var(--line);padding:6px 5px max(6px,env(safe-area-inset-bottom))}.mobile-nav button{border:0;background:transparent;font-size:10px;font-weight:800;color:var(--muted);padding:8px 2px}.mobile-nav button.active{color:var(--primary-dark)}.catalog-layout{display:block}.box-summary{position:static;margin-top:18px}.filterbar{grid-template-columns:1fr 1fr}.filterbar .search{grid-column:1/-1}.preview-grid{grid-template-columns:repeat(4,1fr)}.analysis-grid{grid-template-columns:repeat(2,1fr)}.topbar-inner{padding:10px 14px}.tagline{display:none}.brand-copy strong{font-size:10px}.brand-copy span{font-size:17px}.container{padding-left:14px;padding-right:14px}}
@media(max-width:560px){.grid-2,.grid-3,.grid-4,.form-grid{grid-template-columns:1fr}.field.full{grid-column:auto}.product-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.product-body{padding:10px}.product-name{font-size:13px}.hero-points{grid-template-columns:1fr}.preview-grid{grid-template-columns:repeat(3,1fr)}.top-actions .btn{display:none}.hero h1{font-size:52px}.hero-card{padding:17px}.filterbar{grid-template-columns:1fr}.filterbar .search{grid-column:auto}.section-title{align-items:start;flex-direction:column}.auth-card{padding:20px}.table{min-width:650px}}
/* Audited release additions */
.summary-head,.modal-head{display:flex;justify-content:space-between;align-items:center;gap:12px}.summary-head{margin-bottom:8px}.soft-rule{border:0;border-top:1px solid var(--line);margin:18px 0}.modal-wide{width:min(900px,100%)}
.product-photo.product-detail-trigger{border:0;padding:0;width:100%;cursor:pointer}.product-name-button{border:0;background:transparent;padding:0;text-align:left;color:inherit;font:inherit;font-weight:850;cursor:pointer}.product-name-button:hover{text-decoration:underline}.product-detail-layout{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(260px,.8fr);gap:20px}.gallery-main{aspect-ratio:4/5;background:var(--surface-2);border-radius:16px;overflow:hidden}.gallery-main img{width:100%;height:100%;object-fit:contain}.gallery-thumbs{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;margin-top:8px}.gallery-thumbs button{border:1px solid var(--line);border-radius:9px;padding:0;overflow:hidden;background:#fff;aspect-ratio:1/1;cursor:pointer}.gallery-thumbs img{width:100%;height:100%;object-fit:cover}
.inline-field{display:flex;align-items:center;gap:7px;margin-top:7px}.inline-field input{width:96px;min-height:36px;padding:6px 8px}.priority-bar{width:10px;height:42px;border-radius:8px;background:var(--sage)}.priority-bar.high{background:var(--warning)}.address-dot{width:12px;height:42px;border-radius:8px;background:var(--primary)}
.inline-actions{display:flex;gap:5px;margin-top:6px;flex-wrap:wrap}.compact-input{width:100px;min-height:36px;border:1px solid var(--line);border-radius:8px;padding:6px}.compact-input.small-width{width:66px}.diagnostic-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.diagnostic-grid>div{background:var(--surface-2);border:1px solid var(--line);border-radius:10px;padding:10px}.status.arrived{background:#e7e4f3;color:#564c7b}.status.sold{background:#dfeeea;color:#2e655a}.status.archived{background:#eceae5;color:#5d6668}.status.received{background:#f6ecd8;color:#795824}.status:disabled{opacity:.7}
@media(max-width:820px){.product-detail-layout{grid-template-columns:1fr}.diagnostic-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.gallery-thumbs{grid-template-columns:repeat(4,1fr)}.diagnostic-grid{grid-template-columns:1fr}.modal-backdrop{padding:8px}.modal{padding:16px;max-height:96vh}}


/* v1.2.1 inventory photo processing */
.inventory-form-actions{display:grid;grid-template-columns:minmax(150px,.34fr) minmax(240px,1fr);gap:10px;align-items:center}.inventory-form-actions .btn{min-height:44px}.preview.processing{background:#fff}.preview.processing::after{content:'';position:absolute;inset:0;background:rgba(255,255,255,.72);pointer-events:none}.preview.processing::before{content:'';position:absolute;z-index:2;width:28px;height:28px;border:3px solid #d8ddd9;border-top-color:var(--primary);border-radius:50%;left:50%;top:50%;transform:translate(-50%,-50%);animation:sp-spin .8s linear infinite}.preview.processed{box-shadow:inset 0 0 0 2px #d6e7dc}.background-removal-note{margin-top:10px;padding:9px 11px;border-radius:10px;background:#fff;border:1px solid #e2e5df;text-align:left}.processing-status{font-weight:700;color:var(--primary-dark)}@keyframes sp-spin{to{transform:translate(-50%,-50%) rotate(360deg)}}
@media(max-width:560px){.inventory-form-actions{grid-template-columns:1fr}.inventory-form-actions .btn{width:100%}}

/* Selecciones Premium v1.3.0 — branded high-contrast black, gold and pink UI */
:root {
  --bg:#120e13;--surface:#20181f;--surface-2:#2c202a;--ink:#fff4eb;
  --muted:#cbb8c0;--line:#76563c;--primary:#ef4e94;--primary-dark:#b91464;
  --navy:#ffd98d;--sage:#3c2234;--cream:#322321;
  --success:#89e5b5;--warning:#f6c16f;--danger:#ff9aab;
  --shadow:0 14px 42px rgba(0,0,0,.32);
}
body {background: radial-gradient(ellipse at top right, #311421 0%, #120e13 46%) fixed;color:var(--ink)}
.topbar {background:rgba(18,12,18,.97);border-bottom:1px solid #9f7039}
.brand-logo {width:58px;height:58px;object-fit:contain;flex-shrink:0;border-radius:50%;filter:drop-shadow(0 2px 7px #ee59912f)}
.brand-copy strong {color:#ffda95;letter-spacing:.075em}
.brand-copy span {color:#f58cb8}
.tagline {color:#e0bad1}
.hero h1 span {color:#ffcf81}
.hero-card,.card,.metric,.product-card,.auth-card {background:var(--surface);border-color:var(--line)}
.hero-point {background:#231820;border-color:var(--line)}
.hero-point strong,.metric-value,.analysis-value b,.box-summary .big {color:#ffdf9a}
.box-visual {background:linear-gradient(145deg,#31222c,#603247);border:1px solid #b47b4a}
.box-visual:before {content:'Arma Tu Caja';color:#ffe0a8;text-shadow:0 2px 6px #000}
.box-visual:after {background:#37252c;color:#ffdfa4}
.eyebrow {background:#3a2030;color:#ffd28b;border:1px solid #9a583b}
.btn-primary {background:linear-gradient(120deg,#b81361,#fa4086 58%,#f676a4);border:1px solid #f3be77;color:#fff;box-shadow:0 4px 12px #fc41811f}
.btn-primary:hover {background:linear-gradient(120deg,#a10f56,#ed2b79 58%,#eb5794)}
.btn-secondary {background:#30212b;color:#ffe2ac;border:1px solid #9b724b}
.btn-secondary:hover {border-color:#ffc481;background:#3c2635}
.btn-danger {background:#60213c;color:#fff0e8}
.btn-dark {background:#31212a;color:#fff2e7}
.tab-btn.active,.lang-toggle button.active {background:#48273b;color:#ffe0a4}
.field label {color:#f4cfb1}
.field input,.field select,.field textarea,input.compact-input {border-color:#806244;background:#211922;color:#fff3ec}
.field input::placeholder,.field textarea::placeholder {color:#a996a2}
.field input:focus,.field select:focus,.field textarea:focus {border-color:#f175a5;box-shadow:0 0 0 3px #ee599133}
.field input:read-only {background:#382732;color:#ffd995}
.field option,.field select option {background:#211922;color:#fef4ec}
.sidebar {background:#160f17;border-right-color:#855437}
.nav-btn {color:#dbbecb}.nav-btn.active {color:#ffe0aa;background:#662342;border:1px solid #f06498}
.metric-label {color:#d6b5c1}
.list-row,.table-wrap,.dropzone,.analysis-box,.analysis-value,.modal,.gallery-thumbs button,.preview,.diagnostic-grid>div {background:var(--surface);border-color:var(--line)}
.table th {background:#31222c;color:#ffddaf}.table th,.table td {border-color:#624634}
.chip {background:#442c36;color:#fddcaf}.chip.premium {background:#53362d;color:#ffe1ad}
.dropzone {background:#1a131a;border:2px dashed #bc845e}
.dropzone.drag {background:#382435;border-color:#ff80ad}
.preview {cursor:pointer;padding:0;background:#281d24;min-width:0}
.preview img {background:#f9f7f2;object-fit:contain}
.preview.active {outline:3px solid #fb659f;outline-offset:1px}
.preview:focus-visible,.btn:focus-visible,.nav-btn:focus-visible {outline:3px solid #ffe5a4;outline-offset:2px}
.product-photo img,.list-thumb,.gallery-thumbs img {object-fit:contain;background:#fbfaf7}
.product-photo,.gallery-main {background:#f9f8f4}
.notice {background:#322330}.notice.success {background:#173b30;color:#b5f0cb}.notice.warning {background:#4c3021;color:#ffe2a0}.notice.error {background:#4b1f31;color:#ffced9}
.modal-backdrop {background:rgba(5,4,7,.76)}
.box-summary-row {border-color:#735038}
.mobile-nav {background:#1d151e;border-color:#95633b}
.mobile-nav button {color:#d8afc0}.mobile-nav button.active {color:#ffce80}
.progress-wrap {background:#4b3442}.progress-bar {background:linear-gradient(90deg,#e93d89,#ffcc82)}
.inline-field input,.compact-input {background:var(--surface-2);color:var(--ink)}
.gallery-main img {object-fit:contain}
.login-brand {display:flex;justify-content:center;align-items:center;gap:14px;text-align:left;margin:0 0 20px}
.login-brand img {width:88px;height:88px;object-fit:contain;border-radius:50%}
.login-brand strong {display:block;color:#ffdea2;font-family:Georgia,serif;font-size:23px}
.login-brand span {display:block;color:#fb91bb;font-family:Georgia,serif;font-style:italic;font-size:19px}
.password-visibility {margin-top:5px;align-self:flex-start;min-height:32px}
.bot-check {padding:8px;min-height:36px;border:1px solid #85613e;border-radius:12px;color:var(--muted);display:flex;align-items:center}
.photo-workflow {margin-top:18px;text-align:left}
.photo-workflow>label {display:block;font-weight:800;color:#ffe2ac;margin-bottom:7px}
.photo-workflow select {width:100%;padding:11px;border:1px solid #bd885f;border-radius:10px;background:#2d202b;color:var(--ink)}
.photo-workflow p {margin:9px 0 0}
.selected-photo-layout {margin:16px auto 0;display:grid;grid-template-columns:minmax(220px,1fr) minmax(170px,.7fr);align-items:center;gap:16px;text-align:left}
.photo-stage {max-width:440px;margin:auto;width:100%}
#selectedInventoryImage {display:block;aspect-ratio:4/5;max-height:390px;object-fit:contain;background:#f8f7f3;border:1px solid #c6a06b;border-radius:12px;width:100%}
.photo-stage p {text-align:center}
.photo-stage .btn {margin:7px auto 0;display:flex}
.photo-removal {display:flex;align-items:center;flex-wrap:wrap;gap:8px;font-weight:700;color:#ffe6be}
.photo-removal input {accent-color:#eb398b;width:18px;height:18px}
.size-pair {display:grid;grid-template-columns:1fr 1.25fr;gap:8px}
.item-number-display {padding:14px;border:1px solid #a8784c;border-radius:13px;background:#2e2029}
.item-number-display>label {color:#ffe0aa}
.item-number-display small {color:var(--muted);line-height:1.4}
.number-row {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:10px 0}
.number-row>div {background:#1a1319;border:1px solid #755039;border-radius:9px;padding:10px}
.number-row span {display:block;color:#d9afbd;font-size:11px}
.number-row strong {display:block;color:#ffdd9f;font-size:19px;letter-spacing:.03em}
.details-panel {border:1px solid #79513f;background:#2b1e29;border-radius:12px;margin-top:5px;overflow:visible}
.details-panel summary {padding:15px;font-size:16px;font-weight:800;color:#ffe0ab;cursor:pointer}
.details-panel summary span {color:#dbaabd;font-size:13px;font-weight:400}
.details-panel #optionalFields {padding:14px;border-top:1px solid #79513f}
.details-panel .analysis-box {margin-top:0;grid-column:1/-1;background:#362334}
.details-panel .analysis-value {background:#1f1720}
#productFormCard {border:1px solid #b38651}
#productFormCard h2 {font-family:Georgia,serif;color:#ffe1a4}
@media(max-width:820px) {.mobile-nav {background:#1d151e}.selected-photo-layout {grid-template-columns:1fr}.photo-stage {max-width:350px}}
@media(max-width:560px) {.brand-logo {width:48px;height:48px}.number-row {gap:5px}.number-row strong {font-size:15px}.number-row>div {padding:8px}.size-pair {grid-template-columns:1fr}.preview-grid {grid-template-columns:repeat(3,minmax(0,1fr))}}

/* Checkbox controls use natural dimensions, rather than full-width text-input styles. */
.field input[type=checkbox] {width:18px;min-height:18px;height:18px;accent-color:#eb3789;vertical-align:middle;margin:0 7px 0 0}
#optionalFields>.analysis-box {grid-column:1/-1}

/* Inventory controls stay together beneath the Additional Information section. */
#productForm .inventory-form-actions {grid-template-columns:minmax(185px,1.2fr) minmax(110px,.7fr) minmax(95px,.6fr) minmax(145px,1fr);align-items:center;gap:9px}
#productForm .inventory-form-actions .photo-removal {min-height:44px;align-items:center}
@media(max-width:900px) {#productForm .inventory-form-actions {grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px) {#productForm .inventory-form-actions {grid-template-columns:1fr}}

/* 1.3.1 visibility, logo clarity, photo controls and hero alignment */
.brand-logo{width:82px;height:82px;min-width:82px;object-fit:contain;image-rendering:auto;filter:none;box-shadow:0 2px 16px #0008;border-radius:50%}
.hero-heading{display:flex;align-items:center;gap:24px}
.hero-heading h1{margin:10px 0 18px;min-width:0;font-size:clamp(36px,5.5vw,72px)}
.hero-logo{width:clamp(110px,14vw,164px);height:auto;aspect-ratio:1;flex:none;object-fit:contain;filter:drop-shadow(0 5px 16px #000a)}
.box-visual:before{position:absolute;left:0;right:0;top:50%;text-align:center;transform:translateY(-50%);font-size:clamp(30px,5.2vw,64px);padding:0 15px;line-height:1.15}
.setting-switch{display:flex;align-items:center;gap:10px;cursor:pointer;padding:6px 0}
.setting-switch input{width:18px;height:18px;accent-color:#ec4c91;flex-shrink:0}
.edit-photo-gallery{grid-template-columns:repeat(auto-fit,minmax(135px,1fr))}
.edit-photo-tile{aspect-ratio:auto;overflow:visible;padding:6px}
.edit-photo-tile img{display:block;aspect-ratio:4/5;width:100%;object-fit:contain}
.edit-photo-tile button{margin-top:7px;width:100%}
.inventory-row-actions{display:flex;gap:6px;flex-wrap:wrap}
@media(max-width:820px){.brand-logo{width:65px;height:65px;min-width:65px}.hero-heading{gap:14px}.hero-heading h1{font-size:clamp(29px,6.6vw,56px)}}
@media(max-width:560px){.brand-logo{width:56px;height:56px;min-width:56px}.hero-heading{align-items:flex-start}.hero-logo{width:94px}.hero-heading h1{font-size:clamp(27px,7vw,38px);line-height:1.04}}


/* v1.3.2 — homepage hierarchy and photo-edit action layout */
/* The homepage emblem is ABOVE the headline, scaled smoothly for each viewport. */
.hero-heading {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: clamp(10px, 2vw, 22px);
  min-width: 0;
}
.hero-heading .hero-logo {
  display: block;
  align-self: center;
  width: clamp(112px, 21vw, 246px);
  max-width: min(72%, 246px);
  height: auto;
  aspect-ratio: 1;
  flex: none;
  object-fit: contain;
  filter: drop-shadow(0 7px 15px #0009);
}
.hero-heading h1 {
  margin: 0 0 18px;
  font-size: clamp(35px, 5.5vw, 72px);
  line-height: 1.04;
  overflow-wrap: break-word;
}
/* Restore v1.3.0's bold, slightly rotated Arma Tu Caja lettering.
   Center its bounds rather than dropping the rotation. */
.box-visual:before {
  position: relative;
  inset: auto;
  display: block;
  width: max-content;
  max-width: calc(100% - 28px);
  margin: 0 auto;
  padding: 0;
  text-align: center;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: clamp(27px, 4.35vw, 72px);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -.045em;
  transform: rotate(-4deg);
  white-space: normal;
}
/* Remove the generic thumbnail class from Edit Inventory photo cards: its
   absolute positioning/height:100% caused buttons to overlap Save Changes. */
#editProductModal .edit-photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 185px), 1fr));
  align-items: start;
  gap: 16px;
  margin-top: 12px;
}
#editProductModal .edit-photo-tile {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
  min-height: 0;
  height: auto;
  aspect-ratio: auto;
  overflow: visible;
  position: static;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}
#editProductModal .edit-photo-tile > a {
  display: block;
  height: auto;
  width: 100%;
  min-width: 0;
  flex: 0 0 auto;
  border-radius: 9px;
  overflow: hidden;
  background: #fff;
}
#editProductModal .edit-photo-tile img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: contain;
  background: #fff;
}
#editProductModal .edit-photo-number {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.3;
}
#editProductModal .edit-photo-tile button {
  display: inline-flex;
  position: static;
  inset: auto;
  flex: 0 0 auto;
  align-self: stretch;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 10px 8px;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.3;
  z-index: auto;
}
#editProductModal .edit-save-row {
  display: block;
  clear: both;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
@media (max-width: 820px) {
  .hero-card { order: initial; }
  .hero-heading { align-items: stretch; gap: 12px; }
  .hero-heading .hero-logo { width: clamp(130px, 27vw, 200px); }
  .hero-heading h1 { font-size: clamp(34px, 6vw, 56px); }
  .box-visual:before { font-size: clamp(26px, 6.8vw, 66px); }
}
@media (max-width: 560px) {
  .hero-heading .hero-logo { width: clamp(112px, 34vw, 170px); }
  .hero-heading h1 { font-size: clamp(29px, 8vw, 42px); }
  .box-visual:before { font-size: clamp(24px, 8vw, 45px); }
  #editProductModal .edit-photo-gallery { grid-template-columns: repeat(auto-fit, minmax(min(100%, 145px), 1fr)); gap: 12px; }
}


/* v1.3.3: place the homepage inventory badge immediately BELOW the large emblem.
   Keep logo / tagline centered in the left hero column and headline as before. */
.hero-heading > .eyebrow {
  align-self: center;
  justify-content: center;
  max-width: 100%;
  margin-top: -8px;
  margin-bottom: 2px;
  text-align: center;
  white-space: normal;
  font-size: clamp(10px, 1.1vw, 12px);
  line-height: 1.4;
}
@media (max-width: 560px) {
  .hero-heading > .eyebrow {
    margin-top: -3px;
    font-size: 10px;
    letter-spacing: .06em;
  }
}

/* v1.3.4 — Fill more of the Arma Tu Caja artwork on tablet and mobile.
   Keep desktop untouched; retain centered alignment and the existing -4deg tilt. */
@media (min-width: 561px) and (max-width: 820px) {
  .hero-card .box-visual::before {
    font-size: clamp(55px, 11vw, 92px);
    max-width: calc(100% - 42px);
    line-height: 1.08;
    text-wrap: balance;
  }
}
@media (max-width: 560px) {
  .hero-card .box-visual::before {
    content: "Arma Tu\A Caja";
    white-space: pre-line;
    font-size: clamp(46px, 14vw, 70px);
    max-width: calc(100% - 36px);
    line-height: 1.06;
    text-wrap: balance;
    transform: translateY(-12px) rotate(-4deg);
  }
}
