:root {
    --bg: #fffaf8;
    --surface: #ffffff;
    --surface-2: #f7eeeb;
    --surface-3: #fcf4f1;
    --line: #ead9d3;
    --text: #2b1a18;
    --muted: #7c645d;
    --primary: #8f4c61;
    --primary-dark: #72384d;
    --accent: #d7b2bb;
    --success: #2f7d57;
    --danger: #b0404f;
    --warning: #9b6b2f;
    --info: #35658f;
    --shadow: 0 18px 40px rgba(76, 45, 45, 0.08);
    --radius: 22px;
    --radius-sm: 14px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

button,
input,
select,
textarea {
    font: inherit;
}

.container {
    width: min(var(--container), calc(100% - 2rem));
    margin: 0 auto;
}

.section {
    padding: 4.5rem 0;
}

.section-soft {
    background: linear-gradient(180deg, rgba(247, 238, 235, 0.7), rgba(255, 250, 248, 1));
}

.eyebrow {
    display: inline-block;
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

h1,
h2,
h3,
h4,
.brand strong,
.admin-brand strong {
    font-family: 'Cormorant Garamond', serif;
    line-height: 1.05;
    margin: 0 0 0.75rem;
}

h1 {
    font-size: clamp(2.2rem, 6vw, 4.5rem);
}

h2 {
    font-size: clamp(1.8rem, 4vw, 3rem);
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-top: 0;
    color: var(--muted);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    backdrop-filter: blur(14px);
    background: rgba(255, 250, 248, 0.9);
    border-bottom: 1px solid rgba(234, 217, 211, 0.8);
}

.topbar {
    background: var(--text);
    color: #fff;
    font-size: 0.88rem;
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 0;
}

.topbar a {
    color: #fff;
    font-weight: 600;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
}

.brand,
.admin-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
}

.brand img,
.admin-brand img {
    width: 52px;
    height: 52px;
}

.brand small,
.admin-brand small {
    display: block;
    color: var(--muted);
}

.nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav a {
    font-weight: 600;
    color: var(--text);
}

.cart-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-link span {
    display: inline-grid;
    place-items: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font-size: 0.82rem;
}

.menu-toggle {
    display: none;
    border: 1px solid var(--line);
    background: var(--surface);
    padding: 0.6rem 0.85rem;
    border-radius: 999px;
}

.hero {
    padding: 4rem 0 2rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 2rem;
    align-items: center;
}

.hero-actions,
.form-actions,
.cart-actions,
.section-head,
.admin-card-head,
.footer-bottom,
.table-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.hero-actions,
.form-actions,
.cart-actions,
.table-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
}

.hero-card,
.card-panel,
.admin-card,
.login-card,
.stat-card,
.benefit-card,
.category-card,
.product-card,
.contact-cta,
.summary-product,
.preview-box {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero-card {
    padding: 1.25rem;
}

.stats-grid,
.benefit-grid,
.category-grid,
.product-grid,
.footer-grid,
.stats-cards,
.split-grid,
.about-grid,
.contact-grid,
.checkout-layout,
.cart-layout,
.product-detail-grid,
.catalog-layout,
.order-detail-grid {
    display: grid;
    gap: 1.5rem;
}

.stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 2rem;
}

.stats-grid div {
    background: rgba(255, 255, 255, 0.7);
    padding: 1rem 1.2rem;
    border-radius: 18px;
    border: 1px solid var(--line);
}

.stats-grid strong {
    display: block;
    font-size: 1.4rem;
    margin-bottom: 0.2rem;
}

.section-head {
    margin-bottom: 1.5rem;
}

.text-link {
    color: var(--primary);
    font-weight: 700;
}

.category-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.category-card {
    padding: 1.4rem;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.category-card span {
    color: var(--primary);
    font-weight: 700;
}

.product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.product-card {
    overflow: hidden;
}

.product-media {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: linear-gradient(180deg, #fff8f6, #f4e3df);
}

.product-media img,
.thumb,
.product-detail-media img,
.summary-product img,
.cart-row img,
.preview-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-body {
    padding: 1.25rem;
}

.product-category {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.benefit-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.benefit-card {
    padding: 1.5rem;
}

.page-banner {
    padding: 3rem 0 1rem;
}

.card-panel,
.admin-card,
.login-card {
    padding: 1.5rem;
}

.catalog-layout {
    grid-template-columns: 300px minmax(0, 1fr);
    align-items: start;
}

.filter-form,
.admin-form,
.checkout-form,
.login-card form {
    display: grid;
    gap: 1rem;
}

input,
select,
textarea {
    width: 100%;
    margin-top: 0.5rem;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text);
    border-radius: 14px;
    padding: 0.95rem 1rem;
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(143, 76, 97, 0.08);
}

textarea {
    resize: vertical;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.95rem 1.35rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-outline {
    background: #fff;
    border-color: var(--line);
    color: var(--text);
}

.btn-sm {
    padding: 0.65rem 1rem;
    font-size: 0.92rem;
}

.btn-block {
    width: 100%;
}

.product-detail-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
}

.product-detail-media {
    min-height: 540px;
}

.product-detail-content {
    padding: 1.2rem 0.5rem;
}

.price-stack {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin: 1rem 0;
}

.price-stack del {
    color: var(--muted);
}

.price-stack strong {
    font-size: 1.8rem;
    color: var(--primary);
}

.lead {
    font-size: 1.05rem;
}

.wysiwyg {
    color: var(--muted);
    margin-bottom: 1.5rem;
}

.add-cart-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: end;
}

.add-cart-form label {
    min-width: 140px;
}

.cart-layout,
.checkout-layout {
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: start;
}

.cart-table {
    display: grid;
    gap: 1rem;
}

.cart-row,
.summary-product {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr) 120px 140px;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 18px;
}

.cart-row img,
.summary-product img {
    border-radius: 16px;
    height: 90px;
}

.order-summary {
    position: sticky;
    top: 110px;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 0;
    border-bottom: 1px dashed var(--line);
}

.summary-line.total {
    font-size: 1.1rem;
    border-bottom: 0;
}

.summary-product {
    grid-template-columns: 72px minmax(0, 1fr) auto;
    background: var(--surface-3);
    box-shadow: none;
    margin-bottom: 0.9rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.full-width {
    grid-column: 1 / -1;
}

.about-grid,
.contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
}

.check-list {
    padding-left: 1.2rem;
    margin: 0;
}

.check-list li {
    margin-bottom: 0.5rem;
}

.contact-list > div {
    margin-bottom: 1rem;
}

.site-footer {
    padding: 2rem 0;
    background: #2c1d1c;
    color: #fff5f2;
}

.footer-grid {
    grid-template-columns: 1.2fr 0.8fr 1fr;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.site-footer p,
.site-footer li,
.site-footer a,
.site-footer small {
    color: rgba(255, 245, 242, 0.78);
}

.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-footer li {
    margin-bottom: 0.5rem;
}

.footer-bottom {
    padding-top: 1rem;
}

.whatsapp-float {
    background: rgba(255, 255, 255, 0.08);
    padding: 0.75rem 1rem;
    border-radius: 999px;
    font-weight: 700;
}

.flash-wrapper {
    padding-top: 1rem;
}

.flash {
    padding: 1rem 1.1rem;
    border-radius: 16px;
    font-weight: 600;
}

.flash-success {
    background: rgba(47, 125, 87, 0.12);
    color: var(--success);
    border: 1px solid rgba(47, 125, 87, 0.18);
}

.flash-error {
    background: rgba(176, 64, 79, 0.08);
    color: var(--danger);
    border: 1px solid rgba(176, 64, 79, 0.18);
}

.empty-state {
    padding: 3rem;
    text-align: center;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px dashed var(--line);
}

.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at top left, #f7e0e6, #fffaf8 45%, #f4eae7);
    padding: 1.5rem;
}

.login-card {
    width: min(100%, 460px);
    text-align: center;
}

.login-card img {
    width: 72px;
    height: 72px;
    margin: 0 auto 1rem;
}

.login-helper {
    display: grid;
    gap: 0.35rem;
    padding: 1rem 0;
    color: var(--muted);
}

.center {
    text-align: center;
}

.admin-body {
    background: #f8f3f1;
}

.admin-shell {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    min-height: 100vh;
}

.admin-sidebar {
    background: #281919;
    color: #fff8f5;
    padding: 1.5rem;
    position: sticky;
    top: 0;
    align-self: start;
    min-height: 100vh;
}

.admin-nav {
    display: grid;
    gap: 0.35rem;
    margin-top: 2rem;
}

.admin-nav a {
    padding: 0.9rem 1rem;
    border-radius: 14px;
    color: rgba(255, 248, 245, 0.84);
    font-weight: 600;
}

.admin-nav a.is-active,
.admin-nav a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.admin-content {
    padding: 1.5rem;
}

.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stats-cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 1.5rem;
}

.stat-card {
    padding: 1.4rem;
}

.stat-card span {
    display: block;
    color: var(--muted);
    margin-bottom: 0.65rem;
}

.stat-card strong {
    font-size: 2rem;
    color: var(--primary);
}

.table-wrap {
    overflow: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 1rem 0.8rem;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.admin-table th {
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.thumb {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    border: 1px solid var(--line);
}

.link-danger,
button.link-danger {
    color: var(--danger);
    background: none;
    border: 0;
    cursor: pointer;
    padding: 0;
    font-weight: 700;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 700;
}

.badge-muted {
    background: rgba(124, 100, 93, 0.1);
    color: var(--muted);
}

.badge-info {
    background: rgba(53, 101, 143, 0.1);
    color: var(--info);
}

.badge-warning {
    background: rgba(155, 107, 47, 0.11);
    color: var(--warning);
}

.badge-primary {
    background: rgba(143, 76, 97, 0.11);
    color: var(--primary);
}

.badge-success {
    background: rgba(47, 125, 87, 0.11);
    color: var(--success);
}

.badge-danger {
    background: rgba(176, 64, 79, 0.11);
    color: var(--danger);
}

.split-grid {
    grid-template-columns: 1.2fr 0.8fr;
}

.preview-box {
    padding: 1rem;
}

.preview-box span {
    display: block;
    margin-bottom: 0.8rem;
    color: var(--muted);
}

.preview-box img {
    aspect-ratio: 4 / 3;
    border-radius: 16px;
    border: 1px solid var(--line);
}

.checkbox-inline {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.checkbox-inline input {
    width: auto;
    margin-top: 0;
}

.detail-list {
    display: grid;
    gap: 0.8rem;
}

@media (max-width: 1024px) {
    .hero-grid,
    .product-detail-grid,
    .cart-layout,
    .checkout-layout,
    .about-grid,
    .contact-grid,
    .catalog-layout,
    .split-grid,
    .admin-shell {
        grid-template-columns: 1fr;
    }

    .category-grid,
    .product-grid,
    .benefit-grid,
    .stats-cards,
    .footer-grid,
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-sidebar {
        position: relative;
        min-height: auto;
    }
}

@media (max-width: 768px) {
    .topbar-inner,
    .navbar,
    .hero-actions,
    .section-head,
    .admin-topbar,
    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        padding-top: 1rem;
    }

    .nav.is-open {
        display: flex;
    }

    .category-grid,
    .product-grid,
    .benefit-grid,
    .stats-cards,
    .footer-grid,
    .stats-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .cart-row {
        grid-template-columns: 72px 1fr;
    }

    .cart-row label,
    .cart-row strong {
        grid-column: 2;
    }

    .summary-product {
        grid-template-columns: 60px 1fr;
    }

    .summary-product strong:last-child {
        grid-column: 2;
    }

    .section,
    .hero {
        padding: 3.5rem 0;
    }
}