:root {
    --ink: #252336;
    --muted: #716d7b;
    --paper: #fbf9f5;
    --card: #ffffff;
    --line: #e8e2db;
    --accent: #e35c4e;
    --accent-dark: #b84036;
    --soft: #f2ebe4;
    --green: #17745f;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 15px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, .button { cursor: pointer; border: 0; border-radius: 999px; padding: 11px 18px; background: var(--ink); color: white; font-weight: 700; }
button:hover, .button:hover { background: var(--accent-dark); }
.button.secondary { background: var(--soft); color: var(--ink); }
.button.danger { background: #9d302d; }
.site-header { display: flex; align-items: center; justify-content: space-between; padding: 24px clamp(20px, 5vw, 72px); border-bottom: 1px solid var(--line); background: rgba(251,249,245,.94); }
.brand { font-size: 22px; font-weight: 900; letter-spacing: .13em; }
.brand span { color: var(--accent); }
.store-nav, .admin-nav { display: flex; gap: 20px; color: var(--muted); font-weight: 650; }
.store-nav a:hover, .admin-nav a:hover { color: var(--accent); }
.page-shell { max-width: 1200px; margin: 0 auto; padding: 48px 22px 72px; }
.hero { display: grid; gap: 18px; padding: 46px; border-radius: 28px; background: var(--ink); color: white; margin-bottom: 36px; }
.hero h1 { max-width: 660px; margin: 0; font-size: clamp(34px, 6vw, 68px); line-height: .98; letter-spacing: -.05em; }
.hero p { max-width: 580px; color: #d7d2d5; font-size: 17px; }
.toolbar { display: flex; gap: 12px; justify-content: space-between; align-items: center; flex-wrap: wrap; margin: 24px 0; }
.toolbar form { display: flex; gap: 8px; flex: 1; max-width: 560px; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; color: var(--ink); background: white; }
textarea { min-height: 100px; resize: vertical; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.product-card { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--card); }
.product-card img { display: block; width: 100%; aspect-ratio: 1/1.15; object-fit: cover; background: var(--soft); }
.product-card-content { padding: 18px; }
.product-card h3 { margin: 0 0 4px; font-size: 18px; }
.price { color: var(--accent-dark); font-weight: 800; }
.eyebrow { margin: 0 0 9px; color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.muted { color: var(--muted); }
.product-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, .85fr); gap: 42px; align-items: start; }
.product-detail img { width: 100%; max-height: 650px; object-fit: cover; border-radius: 22px; background: var(--soft); }
.form-card, .panel, .stat-card { border: 1px solid var(--line); border-radius: 18px; background: var(--card); padding: 22px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1/-1; }
label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 700; }
.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 16px; }
.notice { border-radius: 12px; padding: 12px 16px; margin-bottom: 18px; background: #e8f5ee; color: var(--green); }
.notice.error { background: #fbe8e6; color: #962f2a; }
.dashboard-body { background: #f5f2ee; }
.dashboard-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat-card strong { display: block; font-size: 30px; line-height: 1.1; }
.dashboard-columns { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr); gap: 20px; align-items: start; }
.panel h2, .panel h3 { margin-top: 0; }
.catalogue-panel { padding: clamp(18px, 3vw, 30px); }
.catalogue-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.catalogue-heading h2 { margin-bottom: 4px; }
.catalogue-heading p:last-child { margin: 0; }
.admin-product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(225px, 1fr)); gap: 20px; }
.admin-product-card { display: flex; min-width: 0; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--card); box-shadow: 0 8px 30px rgba(37, 35, 54, .06); }
.admin-product-card.is-hidden { opacity: .72; }
.admin-product-media { position: relative; overflow: hidden; aspect-ratio: 4/5; background: var(--soft); }
.admin-product-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.admin-product-card:hover .admin-product-media img { transform: scale(1.025); }
.product-card-status { position: absolute; top: 12px; right: 12px; box-shadow: 0 4px 14px rgba(37, 35, 54, .12); }
.admin-product-content { display: grid; min-width: 0; gap: 14px; flex: 1; padding: 17px; }
.admin-product-content h3 { margin: 0 0 4px; font-size: 17px; line-height: 1.3; }
.product-slug { overflow: hidden; margin: 0; text-overflow: ellipsis; white-space: nowrap; }
.product-card-price { color: var(--accent-dark); font-size: 17px; }
.product-card-actions { display: flex; width: 100%; flex-wrap: wrap; gap: 8px; align-self: end; }
.product-card-actions > button, .product-card-actions form { min-width: 0; flex: 1 1 120px; }
.product-card-actions form { margin: 0; }
.product-card-actions button { width: 100%; min-width: 0; padding-inline: 12px; }
.product-dialog { width: min(900px, calc(100vw - 32px)); max-height: min(90vh, 920px); overflow: hidden; border: 0; border-radius: 22px; padding: 0; color: var(--ink); background: var(--card); box-shadow: 0 24px 80px rgba(37, 35, 54, .24); }
.product-dialog::backdrop { background: rgba(25, 22, 31, .58); backdrop-filter: blur(3px); }
.product-dialog-shell { display: grid; max-height: min(90vh, 920px); grid-template-rows: auto minmax(0, 1fr); }
.product-dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 24px 26px 18px; border-bottom: 1px solid var(--line); }
.product-dialog-header h2 { margin: 0; }
.dialog-close { display: grid; width: 38px; height: 38px; place-items: center; flex: 0 0 auto; border-radius: 50%; padding: 0; background: var(--soft); color: var(--ink); font-size: 25px; font-weight: 400; line-height: 1; }
.product-dialog-form { overflow-y: auto; padding: 24px 26px 26px; }
.checkbox-field { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.checkbox-field input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.product-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 700px; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.status { display: inline-block; border-radius: 999px; padding: 4px 9px; background: var(--soft); font-size: 12px; font-weight: 750; }
.status.paid, .status.completed, .status.shipped { background: #e4f2eb; color: var(--green); }
.status.cancelled { background: #fbe8e6; color: #962f2a; }
.inline-form { display: grid; gap: 8px; min-width: 220px; }
.inline-form .form-actions { margin-top: 0; }
.cart-link { display: inline-flex; align-items: center; gap: 7px; }
.cart-link span { display: grid; min-width: 23px; height: 23px; place-items: center; border-radius: 999px; padding: 0 7px; color: white; background: var(--accent); font-size: 12px; }
.checkout-heading { max-width: 720px; margin-bottom: 28px; }
.checkout-heading h1 { margin: 0 0 8px; font-size: clamp(32px, 5vw, 52px); line-height: 1.05; letter-spacing: -.035em; }
.checkout-heading p:last-child { margin-bottom: 0; }
.compact-heading { margin-bottom: 20px; }
.cart-layout, .checkout-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(285px, .65fr); gap: 24px; align-items: start; }
.cart-items-panel { padding: 0; overflow: hidden; }
.cart-item { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 20px; border-bottom: 1px solid var(--line); }
.cart-item:last-child { border-bottom: 0; }
.cart-item img { display: block; width: 112px; aspect-ratio: 4/5; border-radius: 12px; object-fit: cover; background: var(--soft); }
.cart-item-copy { min-width: 0; }
.cart-item-copy h2 { margin: 0 0 5px; font-size: 18px; line-height: 1.3; }
.cart-item-copy p { margin: 0; }
.cart-quantity { width: 96px; margin-top: 14px; }
.cart-quantity input { padding: 8px 10px; }
.cart-item-end { display: grid; min-width: 105px; gap: 18px; justify-items: end; text-align: right; }
.cart-item-end strong { color: var(--accent-dark); font-size: 17px; }
.text-button { border-radius: 0; padding: 0; color: var(--muted); background: transparent; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.text-button:hover { color: var(--accent-dark); background: transparent; }
.order-summary-card { position: sticky; top: 20px; }
.order-summary-card h2 { margin-top: 0; }
.summary-row { display: flex; justify-content: space-between; gap: 20px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.summary-total { margin-top: 5px; border-bottom: 0; font-size: 19px; }
.checkout-security-note { margin: 16px 0; color: var(--muted); font-size: 13px; }
.checkout-button { display: block; width: 100%; text-align: center; }
.continue-link { display: block; margin-top: 13px; color: var(--muted); text-align: center; }
.checkout-form-card h2 { margin-top: 0; }
.checkout-form { display: grid; gap: 22px; }
.payment-option { display: flex; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: 15px; padding: 16px; background: var(--paper); }
.payment-option-mark { display: grid; width: 22px; height: 22px; place-items: center; flex: 0 0 auto; border: 2px solid var(--accent); border-radius: 50%; }
.payment-option-mark::after { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); content: ""; }
.payment-option span { display: grid; gap: 2px; }
.payment-option small { color: var(--muted); }
.checkout-summary-item { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.checkout-summary-item img { width: 58px; aspect-ratio: 4/5; border-radius: 8px; object-fit: cover; background: var(--soft); }
.checkout-summary-item div { display: grid; min-width: 0; }
.checkout-summary-item strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.checkout-summary-item span { color: var(--muted); font-size: 12px; }
.checkout-summary-item b { white-space: nowrap; }
.payment-redirect-card, .order-success-card { max-width: 680px; margin: 36px auto; text-align: center; }
.payment-redirect-card h1, .order-success-card h1 { margin: 0 0 12px; }
.site-footer { padding: 28px 22px 48px; color: var(--muted); text-align: center; }
.login-card { max-width: 430px; margin: 45px auto; }
.empty { padding: 40px; border: 1px dashed var(--line); border-radius: 18px; text-align: center; color: var(--muted); }
@media (max-width: 800px) { .product-detail, .dashboard-columns, .cart-layout, .checkout-layout { grid-template-columns: 1fr; } .dashboard-grid { grid-template-columns: repeat(2, 1fr); } .hero { padding: 30px 24px; } .catalogue-heading { align-items: stretch; flex-direction: column; } .catalogue-heading button { align-self: flex-start; } .order-summary-card { position: static; } }
@media (max-width: 500px) { .site-header { align-items: flex-start; gap: 18px; flex-direction: column; } .store-nav, .admin-nav { width: 100%; flex-wrap: wrap; gap: 12px 18px; } .form-grid { grid-template-columns: 1fr; } .dashboard-grid { grid-template-columns: 1fr 1fr; } .admin-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .admin-product-content { padding: 13px; } .product-card-actions { flex-direction: column; } .product-dialog-header, .product-dialog-form { padding-left: 18px; padding-right: 18px; } .cart-item { grid-template-columns: 82px minmax(0, 1fr); padding: 15px; } .cart-item img { width: 82px; } .cart-item-end { grid-column: 2; min-width: 0; grid-template-columns: 1fr auto; justify-items: start; width: 100%; text-align: left; } .cart-quantity { width: 80px; } }
