/* Light Theme */
:root {
  --bg: #f2f3f5;           /* light gray background */
  --panel: #ffffff;        /* white panels */
  --panel-2: #f5f6f8;      /* subtle panel */
  --text: #1a1a1a;         /* near-black text */
  --muted: #6b7280;        /* gray-500 */
  --border: #e5e7eb;       /* gray-200 */
  --accent: #111827;       /* near-black for primary */
  --accent-2: #374151;     /* gray-700 */
  --success: #16a34a;
  --warn: #d97706;
  --danger: #dc2626;
  --shadow: 0 10px 24px rgba(0,0,0,.08);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  letter-spacing: .1px;
}
  .site-header { padding:.75rem 0; background: #000; border-bottom:1px solid #000; position: sticky; top:0; z-index: 1000; box-shadow: 0 4px 16px rgba(0,0,0,.12); }
  .header-inner { display:flex; align-items:center; justify-content:space-between; }
  .site-header a { text-decoration:none; color: #fff; }
/* Typography */
h1, h2, h3, h4, h5 { font-family: "Cinzel", Georgia, serif; letter-spacing:.5px; color: var(--text); margin: 0 0 .5rem; }
p { color: var(--text); }
  nav { display:flex; align-items:center; }
  nav a { margin-left: 1rem; opacity:.9; }
  nav a:hover { opacity:1; color: #d1d5db; }
.price { font-weight:700; }

/* Header/Nav */
.site-header { display:flex; align-items:center; justify-content:space-between; padding:.75rem 0; background: #000; border-bottom:1px solid #000; position: sticky; top:0; z-index: 1000; box-shadow: 0 4px 16px rgba(0,0,0,.12); }
.site-header a { text-decoration:none; color: #fff; }
  input, select, textarea { width:100%; max-width: 360px; padding:.55rem .65rem; border:1px solid var(--border); border-radius:.45rem; background:#ffffff; color: var(--text); box-shadow: inset 0 1px 0 rgba(0,0,0,.02); }
.container-lg { max-width: 1080px; margin: 0 auto; padding: 0 1rem; }
  .badge { display:inline-block; padding:.22rem .55rem; border-radius: 999px; font-size:.8rem; border:1px solid var(--border); background:#f8fafc; color:#1f2937; }
.brand { display:flex; align-items:center; gap:.75rem; }
  .product-card { background:var(--panel); border:1px solid var(--border); border-radius:.75rem; overflow:hidden; box-shadow: var(--shadow); }
.logo { height:40px; width:auto; border-radius:4px; display:block; }
  .product-card .media { width:100%; aspect-ratio: 1/1; background:#f3f4f6; display:block; overflow:hidden; border:1px dashed rgba(0,0,0,.1); border-radius:.6rem; }
nav a { margin-left: 1rem; opacity:.9; }
  .modal-backdrop { position:absolute; inset:0; background: rgba(0,0,0,.45); backdrop-filter: blur(2px); }
nav a:hover { opacity:1; color: var(--accent-2); }
  .modal-dialog { position: relative; z-index: 1; width: min(720px, 92vw); margin: 8vh auto; background: var(--panel); border:1px solid var(--border); border-radius:.8rem; box-shadow: var(--shadow); overflow: hidden; }

  .modal-header, .modal-footer { display:flex; justify-content: space-between; align-items:center; padding: 1rem; background: var(--panel-2); border-bottom: 1px solid var(--border); }
.container { max-width: 980px; margin: 2rem auto; padding: 0 1rem; }

/* Buttons - consistent sizing */
.btn, .btn:visited { display:inline-flex; align-items:center; justify-content:center; gap:.35rem; background: var(--accent); color:#fff; padding:.5rem .9rem; border-radius:.5rem; text-decoration:none; border:1px solid #5b1620; cursor: pointer; font-weight:600; font-size:.95rem; line-height:1.1; min-height: 36px; transition: transform .05s ease, background .15s ease, box-shadow .15s ease; box-shadow: 0 2px 0 rgba(0,0,0,.4); }
.btn:hover { background:#8e2432; }
.btn:active { transform: translateY(1px); box-shadow: 0 1px 0 rgba(0,0,0,.4); }
.btn.secondary { background: transparent; color: var(--text); border-color: var(--border); box-shadow:none; }
.btn.secondary:hover { background: rgba(255,255,255,.04); }
.btn.danger { background: var(--danger); border-color: #7f261f; }
.btn.danger:hover { background:#d64536; }
.btn.small { padding:.35rem .65rem; font-size:.85rem; min-height: 30px; }
.inline .btn + .btn, .actions .btn + .btn { margin-left:.4rem; }

/* Footer */
.site-footer { text-align:center; color:var(--muted); padding:2rem 1rem; border-top: 1px solid var(--border); background: #f5f6f8; }

/* Cards / Tables */
.card { background:var(--panel); border:1px solid var(--border); border-radius:.8rem; padding:1rem; margin: 1rem 0; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 .75rem; }
.kpis { display:grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .75rem; }
.kpi { background:var(--panel); border:1px solid var(--border); padding: .9rem 1rem; border-radius: .6rem; box-shadow: var(--shadow); }
.kpi .label { color:var(--muted); font-size:.85rem; }
.kpi .value { font-weight:700; font-size:1.25rem; }
.table { width:100%; border-collapse: collapse; background:var(--panel); border:1px solid var(--border); border-radius:.6rem; overflow:hidden; }
.table th, .table td { border-bottom:1px solid #272732; padding:.65rem .7rem; text-align:left; vertical-align: middle; }
.table thead th { background: #e5e7eb; font-weight:700; color:#111827; border-bottom:1px solid #d1d5db; }
.table .num { text-align:right; font-variant-numeric: tabular-nums; }
.table .actions { white-space:nowrap; text-align:right; }
.table tr:last-child td { border-bottom: none; }
.table.compact th, .table.compact td { padding:.45rem .55rem; }

.list { list-style: none; padding:0; margin:0; }
.list li { padding:.55rem 0; border-bottom:1px dashed #2a2a33; }

.flex { display:flex; gap:.75rem; align-items:center; }
.between { justify-content: space-between; }
.muted { color: var(--muted); }
.inline > * { margin-right:.5rem; }
.toolbar { display:flex; justify-content: space-between; align-items:center; margin: .5rem 0 1rem; }

/* Forms */
label { display:block; margin:.5rem 0; }
input, select, textarea { width:100%; max-width: 360px; padding:.55rem .65rem; border:1px solid var(--border); border-radius:.45rem; background:#ffffff; color: var(--text); box-shadow: inset 0 1px 0 rgba(0,0,0,.02); }
select { appearance: none; }
input::placeholder, textarea::placeholder { color:#8a8890; }
input:focus, select:focus, textarea:focus { outline:2px solid rgba(179,139,89,.35); border-color: var(--accent-2); }
.form-grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .75rem; align-items: end; }
.row { display:grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .75rem; align-items: end; }
.stack { display:flex; flex-direction: column; gap: .75rem; }

/* Badges */
.badge { display:inline-block; padding:.22rem .55rem; border-radius: 999px; font-size:.8rem; border:1px solid var(--border); background:#f8fafc; color:#1f2937; }
.badge.success { color:#14532d; border-color:#bbf7d0; background:#dcfce7; }
.badge.warn { color:#7c2d12; border-color:#fde68a; background:#fef3c7; }
.badge.info { color:#0f172a; border-color:#93c5fd; background:#dbeafe; }
.badge.gray { color:#374151; background:#f3f4f6; border-color:#e5e7eb; }

/* Emphasis links in summary */
.summary-links a.badge { text-decoration: none; margin-right:.35rem; margin-bottom:.35rem; display:inline-block; }
.summary-links a.badge.info { border-color: #93c5fd; background: #dbeafe; color:#0f172a; }

/* Product grid */
.product-grid { list-style:none; padding:0; display:grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.product-card { background:var(--panel); border:1px solid var(--border); border-radius:.75rem; overflow:hidden; box-shadow: var(--shadow); }
.product-card img { width:100%; height:160px; object-fit:cover; background:#f3f4f6; }
.product-info { padding: .75rem 1rem 1rem; }
.product-grid.shop { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.product-card .media { width:100%; aspect-ratio: 1/1; background:#f3f4f6; display:block; overflow:hidden; border:1px dashed rgba(0,0,0,.1); border-radius:.6rem; }
.product-card .media img { width:100%; height:100%; object-fit:cover; display:block; }
.product-card .title-row { display:flex; align-items:center; justify-content:space-between; margin-bottom:.25rem; }
.product-card .meta { display:flex; gap:.35rem; margin:.5rem 0 .75rem; }
.product-card .actions { display:flex; gap:.5rem; justify-content:flex-end; }

/* File input polish */
input[type="file"] { border:1px dashed var(--border); padding:.5rem; background:#ffffff; color:var(--muted); }
input[type="file"]::-webkit-file-upload-button { background: var(--panel-2); color: var(--text); border:1px solid var(--border); border-radius:.4rem; padding:.35rem .6rem; margin-right:.5rem; cursor:pointer; }

/* Modal */
.modal { position: fixed; inset: 0; display:none; z-index: 2000; }
.modal-backdrop { position:absolute; inset:0; background: rgba(0,0,0,.65); backdrop-filter: blur(2px); }
.modal-dialog { position: relative; z-index: 1; width: min(720px, 92vw); margin: 8vh auto; background: var(--panel); border:1px solid var(--border); border-radius:.8rem; box-shadow: var(--shadow); overflow: hidden; }
.modal-header, .modal-footer { display:flex; justify-content: space-between; align-items:center; padding: 1rem; background: var(--panel-2); border-bottom: 1px solid var(--border); }
.modal-footer { border-bottom: none; border-top: 1px solid var(--border); justify-content: flex-end; }
.modal-dialog form { padding: 1rem; }
.modal .stack img { width: 100%; height: 320px; object-fit: cover; }

/* Quick View two-column layout */
.modal-body-grid { display:grid; grid-template-columns: 1.1fr 1fr; gap: 1rem; padding: 1rem; }
.quick-left img { width: 100%; height: 360px; object-fit: contain; background: #0f0f12; border: 1px solid var(--border); border-radius: .5rem; }
.quick-right { display:flex; flex-direction: column; gap: .75rem; }

/* Pointer cursor on product images to signal click */
.product-card .media { cursor: pointer; }

/* helpers for widths */
.w-80 { max-width: 80px; }
.w-120 { max-width: 120px; }
.w-160 { max-width: 160px; }
