:root {
    --bg: #f6efeb;
    --paper: #fffaf7;
    --surface: #ffffff;
    --line: rgba(80, 52, 41, 0.12);
    --line-strong: rgba(80, 52, 41, 0.24);
    --text: #2c211d;
    --muted: #7b675d;
    --primary: #8c6a5b;
    --primary-dark: #6c4f43;
    --accent: #d7b8a7;
    --shadow: 0 15px 40px rgba(69, 42, 30, 0.08);
    --radius: 18px;
    --radius-lg: 28px;
    --container: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: Inter, Arial, Helvetica, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(215,184,167,.28), transparent 24%),
        linear-gradient(180deg, #f9f3f0 0%, #f6efeb 40%, #f8f5f2 100%);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: min(var(--container), calc(100% - 32px)); margin: 0 auto; }
.muted { color: var(--muted); }
.center { text-align: center; }

.site-header {
    position: sticky; top: 0; z-index: 30;
    backdrop-filter: blur(16px);
    background: rgba(251, 245, 241, 0.82);
    border-bottom: 1px solid var(--line);
}
.header-inner {
    display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 0;
}
.brand {
    display: flex; align-items: center; gap: 14px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; font-size: 14px;
}
.brand-mark {
    width: 42px; height: 42px; border-radius: 50%;
    background: linear-gradient(135deg, #3b2920, #9d7a69 60%, #f0d4c5);
    box-shadow: inset 0 0 0 2px rgba(255,255,255,.28);
}
.nav {
    display: flex; align-items: center; gap: 22px; font-size: 14px;
}
.nav a { color: var(--muted); }
.nav a:hover, .nav a.active { color: var(--text); }
.header-actions { display: flex; gap: 12px; align-items: center; }
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 12px 20px; border-radius: 999px; border: 1px solid var(--line-strong);
    background: var(--surface); color: var(--text); font-weight: 600; cursor: pointer; transition: .22s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; border-color: transparent; box-shadow: 0 12px 24px rgba(108,79,67,.24); }
.btn-soft { background: #f4e9e3; border-color: transparent; }
.btn-danger { background: #8b3f3f; border-color: transparent; color: white; }

.hero {
    padding: 46px 0 24px;
}
.hero-grid {
    display: grid; grid-template-columns: 1.2fr .9fr; gap: 24px; align-items: stretch;
}
.hero-panel,
.hero-card,
.card,
.auth-card,
.admin-card,
.table-wrap,
.sidebar,
.stat-card,
.dashboard-card,
.editor-card,
.product-detail,
.footer-panel { background: rgba(255,255,255,.74); border: 1px solid rgba(255,255,255,.65); box-shadow: var(--shadow); }
.hero-panel {
    padding: 52px; border-radius: 34px;
    background:
        linear-gradient(135deg, rgba(255,255,255,.84), rgba(255,245,240,.68)),
        radial-gradient(circle at right, rgba(215,184,167,.5), transparent 30%);
    border: 1px solid rgba(147, 112, 93, 0.14);
}
.hero-panel .eyebrow {
    font-size: 13px; text-transform: uppercase; letter-spacing: .2em; color: var(--primary); font-weight: 700;
}
.hero h1 { font-size: clamp(34px, 5vw, 62px); line-height: 1.04; margin: 18px 0 18px; font-family: Georgia, 'Times New Roman', serif; font-weight: 600; }
.hero p { color: var(--muted); font-size: 17px; line-height: 1.8; max-width: 90%; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.hero-stats { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }
.hero-stat { background: rgba(255,255,255,.7); border: 1px solid var(--line); border-radius: 18px; padding: 14px 18px; min-width: 140px; }
.hero-stat strong { display:block; font-size: 24px; margin-bottom: 6px; }

.hero-card {
    border-radius: 34px; overflow: hidden; min-height: 100%; position: relative;
    background: linear-gradient(180deg, rgba(55,33,27,.15), rgba(55,33,27,.05));
}
.hero-card img { width: 100%; height: 100%; object-fit: cover; min-height: 100%; }
.hero-card-overlay {
    position: absolute; inset: auto 24px 24px 24px; padding: 22px; border-radius: 22px;
    background: rgba(46,33,29,.74); color: white;
}
.section { padding: 26px 0 18px; }
.section-header { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 18px; }
.section-header h2 { margin: 0; font-family: Georgia, serif; font-size: 34px; font-weight: 600; }
.section-header p { margin: 6px 0 0; color: var(--muted); }
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.card {
    border-radius: 24px; overflow: hidden; transition: .25s ease; border: 1px solid rgba(140,106,91,.12);
}
.card:hover { transform: translateY(-4px); }
.card-media { aspect-ratio: 4 / 4.6; overflow: hidden; background: #efe2da; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: .4s ease; }
.card:hover .card-media img { transform: scale(1.04); }
.card-body { padding: 18px 18px 20px; }
.badge { display: inline-flex; padding: 7px 12px; font-size: 12px; border-radius: 999px; background: #f6ebe4; color: var(--primary); font-weight: 700; }
.card-title { font-size: 18px; line-height: 1.5; margin: 12px 0 8px; min-height: 54px; }
.price { font-size: 22px; font-weight: 700; }
.card-meta { display:flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin-top: 12px; }

.product-detail-wrap { padding: 26px 0 42px; }
.product-detail {
    display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding: 28px; border-radius: 28px;
}
.product-gallery {
    border-radius: 24px; overflow: hidden; background: linear-gradient(180deg, #f0dfd4, #fff7f3); min-height: 620px;
}
.product-gallery img { width: 100%; height: 100%; object-fit: cover; }
.product-copy h1 { font-size: clamp(30px, 4vw, 46px); line-height: 1.16; font-family: Georgia, serif; margin: 12px 0 12px; }
.product-copy p, .product-copy li { color: var(--muted); line-height: 1.8; }
.product-copy .price { font-size: 34px; margin: 18px 0 14px; }
.info-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; margin: 22px 0; }
.info-item { border: 1px solid var(--line); border-radius: 18px; padding: 16px; background: rgba(255,255,255,.65); }
.info-item strong { display:block; margin-bottom: 6px; }
.rich-text { color: var(--text); }
.rich-text ul { padding-left: 20px; }

.page-wrap { padding: 34px 0 50px; }
.auth-layout, .portal-layout, .admin-layout { display:grid; gap: 24px; }
.auth-layout { grid-template-columns: 1.06fr .94fr; align-items: stretch; }
.auth-card, .sidebar, .admin-card, .table-wrap, .editor-card, .dashboard-card, .stat-card { border-radius: 24px; padding: 26px; }
.auth-visual {
    border-radius: 24px; overflow:hidden; background: linear-gradient(135deg, #3c2c24, #d8b2a0); color: white; padding: 38px; display:flex; flex-direction:column; justify-content:flex-end;
}
.auth-visual h2 { font-family: Georgia, serif; font-size: 42px; margin-bottom: 12px; }
.form-row { margin-bottom: 16px; }
label { display:block; margin-bottom: 8px; font-weight: 600; font-size: 14px; }
input[type="text"], input[type="email"], input[type="password"], textarea, select {
    width: 100%; padding: 13px 14px; border-radius: 14px; border: 1px solid var(--line-strong); background: rgba(255,255,255,.88); outline: none;
}
textarea { min-height: 130px; resize: vertical; }
.form-actions { display:flex; gap: 12px; flex-wrap: wrap; align-items:center; }
.alert { padding: 14px 16px; border-radius: 14px; margin-bottom: 16px; }
.alert-success { background: #e8f5ee; color: #245c3a; }
.alert-error { background: #fbeaea; color: #7a3030; }
.small { font-size: 13px; color: var(--muted); }

.portal-layout, .admin-layout { grid-template-columns: 280px 1fr; align-items: start; }
.sidebar { position: sticky; top: 96px; }
.sidebar h3 { margin-top: 0; font-size: 20px; }
.sidebar-nav { display:grid; gap: 10px; }
.sidebar-nav a {
    padding: 12px 14px; border-radius: 14px; color: var(--muted); border: 1px solid transparent;
}
.sidebar-nav a.active, .sidebar-nav a:hover { background: #f4e8e1; color: var(--text); border-color: rgba(140,106,91,.18); }
.stats-grid { display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 18px; }
.stat-card strong { font-size: 32px; display:block; margin-top: 10px; font-family: Georgia, serif; }
.dashboard-card + .dashboard-card, .table-wrap + .table-wrap, .editor-card + .table-wrap { margin-top: 22px; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; min-width: 720px; }
.table th, .table td { padding: 14px 10px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--muted); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.action-links { display:flex; gap: 10px; flex-wrap: wrap; }
.inline-form { display:inline; }
.panel-title { margin: 0 0 6px; font-size: 28px; font-family: Georgia, serif; }
.panel-subtitle { color: var(--muted); margin: 0 0 20px; }
.kpi-strip { display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.kpi { padding: 18px; border-radius: 18px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255,255,255,.86), rgba(247,236,231,.65)); }
.kpi strong { display:block; margin-top: 8px; font-size: 30px; font-family: Georgia, serif; }
.footer { padding: 32px 0 42px; }
.footer-panel { border-radius: 26px; padding: 26px; display:flex; justify-content: space-between; gap: 16px; align-items:center; }

.notice-list { display:grid; gap: 12px; }
.notice-item { padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.68); }

@media (max-width: 1180px) {
    .product-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
    .stats-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 920px) {
    .nav { display:none; }
    .hero-grid, .product-detail, .auth-layout, .portal-layout, .admin-layout { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .hero-panel, .auth-card, .dashboard-card, .admin-card, .table-wrap, .editor-card, .sidebar { padding: 22px; }
    .product-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .kpi-strip { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .container { width: min(var(--container), calc(100% - 20px)); }
    .header-inner { gap: 10px; }
    .brand span:last-child { display:none; }
    .hero-panel { padding: 28px; }
    .product-grid, .stats-grid { grid-template-columns: 1fr; }
    .footer-panel { flex-direction: column; align-items: flex-start; }
    .product-detail { padding: 18px; gap: 18px; }
    .product-gallery { min-height: 360px; }
}
