:root {
    --bg: #ffffff;
    --bg-alt: #faf8f3;
    --surface: #ffffff;
    --text: #1f1e1b;
    --text-muted: #5f5b50;
    --border: #ede8db;
    --primary: #d4a52e;
    --primary-hover: #b8861b;
    --primary-contrast: #1f1e1b;
    --tint: #fbf3d9;
    --accent: #22304a;
    --danger: #b3261e;
    --success: #2e7d32;
    --shadow: 0 12px 30px rgba(31, 30, 27, 0.08);
    --header-bg: rgba(255, 255, 255, 0.92);
    --radius: 14px;
    --header-h: 68px;
    --max: 1180px;
    --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-serif: Georgia, "Times New Roman", serif;
}

:root[data-theme="dark"] {
    --bg: #171613;
    --bg-alt: #1e1c18;
    --surface: #211f1b;
    --text: #f5f1e6;
    --text-muted: #b8b2a2;
    --border: #34312a;
    --primary: #e0b84f;
    --primary-hover: #c99e33;
    --primary-contrast: #171613;
    --tint: #332c1b;
    --accent: #9fb4e0;
    --danger: #ff8a80;
    --success: #7bd88f;
    --shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    --header-bg: rgba(23, 22, 19, 0.92);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

h1,
h2,
h3,
h4 {
    margin: 0 0 0.5em;
    font-family: var(--font-serif);
    line-height: 1.15;
    color: var(--text);
}

p {
    margin: 0 0 1em;
}

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

.container {
    width: min(var(--max), 100% - 2.5rem);
    margin-inline: auto;
}

.skip-link {
    position: absolute;
    top: -3rem;
    left: 1rem;
    z-index: 100;
    padding: 0.6rem 1rem;
    border-radius: 0.5rem;
    background: var(--primary);
    color: var(--primary-contrast);
    transition: top 0.15s ease;
}

.skip-link:focus {
    top: 1rem;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--border);
    background: var(--header-bg);
    backdrop-filter: blur(10px);
}

.header-inner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    min-height: var(--header-h);
}

.brand {
    font-family: var(--font-serif);
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 1.4rem;
}

.main-nav a {
    position: relative;
    padding: 0.4rem 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
    color: var(--text);
}

.main-nav a[aria-current="page"]::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -2px;
    left: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--primary);
}

.main-nav .theme-toggle {
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    width: 34px;
    height: 34px;
    margin-left: 0.15rem;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface);
    color: var(--text-muted);
    cursor: pointer;
}

.main-nav .theme-toggle svg {
    width: 18px;
    height: 18px;
}

.main-nav .theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.nav-toggle {
    padding: 0.45rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

.nav-toggle:hover {
    border-color: var(--accent);
}

.nav-toggle {
    display: none;
}

.hero {
    border-bottom: 1px solid var(--border);
    background:
        radial-gradient(1100px 500px at 85% -10%, rgba(34, 48, 74, 0.08), transparent 60%),
        linear-gradient(135deg, var(--bg-alt), var(--surface));
}

.hero-inner {
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    padding: 5rem 0;
}

.hero-inner > div {
    max-width: 760px;
}

.hero-kicker {
    display: inline-block;
    margin-bottom: 1rem;
    padding: 0.3rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.hero h1 {
    font-size: clamp(2.4rem, 5vw, 4rem);
    letter-spacing: -0.03em;
}

.hero p {
    max-width: 48ch;
    font-size: 1.08rem;
    color: var(--text-muted);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 1.5rem;
}

.section {
    padding: 4.5rem 0;
}

.section-alt {
    border-block: 1px solid var(--border);
    background: var(--bg-alt);
}

.section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
}

.section-head h1,
.section-head h2 {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.section-head p {
    margin: 0.4rem 0 0;
    color: var(--text-muted);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.4rem;
    border: 1px solid var(--primary);
    border-radius: 999px;
    background: var(--primary);
    color: var(--primary-contrast);
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.15s ease, opacity 0.15s ease;
}

.button:hover {
    transform: translateY(-1px);
    border-color: var(--primary-hover);
    background: var(--primary-hover);
}

.button-ghost {
    border-color: var(--accent);
    background: transparent;
    color: var(--accent);
}

.button-ghost:hover {
    opacity: 0.78;
}

.button.is-disabled {
    pointer-events: none;
    opacity: 0.55;
}

.button-small {
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}

.category-card {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.category-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    box-shadow: var(--shadow);
}

.category-card h3 {
    margin: 0;
    font-size: 1.05rem;
}

.category-card span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 1.25rem;
}

.product-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.product-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    box-shadow: var(--shadow);
}

.product-card-media {
    display: block;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: var(--bg-alt);
}

.product-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-card-media img {
    transform: scale(1.04);
}

.product-placeholder {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    background: repeating-linear-gradient(45deg, var(--bg-alt), var(--bg-alt) 10px, var(--surface) 10px, var(--surface) 20px);
    font-family: var(--font-serif);
    font-size: 3rem;
    color: var(--accent);
}

.product-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem;
}

.product-category {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.product-card h3 {
    margin: 0.1rem 0;
    font-size: 1.05rem;
}

.product-price {
    margin: 0;
    font-weight: 700;
}

.catalog-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 2rem;
    align-items: start;
}

.catalog-layout:not(.filters-open) {
    grid-template-columns: 1fr;
}

.catalog-layout:not(.filters-open) .filters {
    display: none;
}

.filters {
    position: sticky;
    top: calc(var(--header-h) + 1rem);
    display: grid;
    gap: 1rem;
    padding: 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.field {
    display: grid;
    gap: 0.35rem;
}

.field label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-muted);
}

.field input,
.field select {
    width: 100%;
    padding: 0.6rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: 0.6rem;
    background: var(--bg);
    color: var(--text);
}

.field input:focus,
.field select:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(34, 48, 74, 0.18);
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.results-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.results-bar p {
    margin: 0;
}

.results-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.icon-button {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
}

.icon-button svg {
    width: 18px;
    height: 18px;
}

.icon-button:hover,
.icon-button[aria-expanded="true"] {
    border-color: var(--accent);
    color: var(--accent);
}

.search-wrap {
    display: flex;
    align-items: center;
}

.search-wrap[hidden] {
    display: none;
}

.search-wrap input {
    width: min(260px, 45vw);
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 2rem;
}

.pagination button {
    padding: 0.5rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
}

.pagination button[aria-current="page"] {
    border-color: var(--primary);
    background: var(--primary);
    color: var(--primary-contrast);
}

.pagination button:disabled {
    cursor: not-allowed;
    opacity: 0.4;
}

.product-detail {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 3rem;
    align-items: start;
}

.gallery-main {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-alt);
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    display: grid;
    width: 38px;
    height: 38px;
    padding: 0;
    place-items: center;
    transform: translateY(-50%);
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #ffffff;
    font-size: 1.2rem;
    cursor: pointer;
}

.gallery-nav:hover {
    background: rgba(0, 0, 0, 0.78);
}

.gallery-prev {
    left: 10px;
}

.gallery-next {
    right: 10px;
}

.gallery-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.8rem;
}

.gallery-thumbs button {
    width: 70px;
    height: 70px;
    padding: 0;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 0.6rem;
    background: var(--bg-alt);
    cursor: pointer;
}

.gallery-thumbs button.is-active {
    border-color: var(--primary);
}

.gallery-thumbs img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info h1 {
    font-size: clamp(2rem, 4vw, 2.8rem);
}

.product-info .price {
    margin: 0.5rem 0 1rem;
    font-size: 1.6rem;
    font-weight: 800;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--tint);
    color: var(--text);
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-new {
    border-color: var(--accent);
    background: var(--accent);
    color: #ffffff;
}

.badge-available {
    border-color: transparent;
    background: rgba(46, 125, 50, 0.14);
    color: var(--success);
}

.badge-out {
    border-color: transparent;
    background: rgba(179, 38, 30, 0.14);
    color: var(--danger);
}

.sizes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.5rem 0 1.5rem;
}

.size-chip {
    padding: 0.45rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--surface);
    font-weight: 600;
    cursor: pointer;
}

.size-chip.is-active {
    border-color: var(--primary);
    background: var(--tint);
}

.size-chip:disabled {
    cursor: not-allowed;
    opacity: 0.45;
    text-decoration: line-through;
}

.meta-list {
    display: grid;
    gap: 0.5rem;
    margin: 1.5rem 0;
    padding: 0;
    list-style: none;
}

.meta-list li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed var(--border);
    font-size: 0.92rem;
}

.meta-list span:first-child {
    color: var(--text-muted);
}

.prose {
    max-width: 70ch;
    color: var(--text-muted);
}

.prose h1,
.prose h2 {
    color: var(--text);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.info-card {
    padding: 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.info-card h3 {
    margin-bottom: 0.4rem;
    font-size: 1rem;
}

.info-card p,
.info-card a {
    margin: 0;
    color: var(--text-muted);
}

.info-card a:hover {
    color: var(--text);
    text-decoration: underline;
}

.site-footer {
    margin-top: 3rem;
    padding: 3rem 0 1.5rem;
    border-top: 1px solid var(--border);
    background: var(--bg-alt);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 2rem;
}

.footer-grid h3 {
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
}

.footer-grid ul {
    display: grid;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-grid a {
    color: var(--text-muted);
}

.footer-grid a:hover {
    color: var(--text);
}

.footer-bottom {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.whatsapp-float {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 60;
    display: inline-grid;
    place-items: center;
    width: 52px;
    height: 52px;
    padding: 0;
    border-radius: 50%;
    background: #25d366;
    color: #ffffff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.whatsapp-float svg {
    width: 27px;
    height: 27px;
}

.whatsapp-float:hover {
    filter: brightness(1.05);
}

.state {
    padding: 3rem 1rem;
    text-align: center;
    color: var(--text-muted);
}

.state-error {
    color: var(--danger);
}

.skeleton {
    min-height: 260px;
    border-radius: var(--radius);
    background: linear-gradient(90deg, var(--bg-alt), var(--surface), var(--bg-alt));
    background-size: 200% 100%;
    animation: shimmer 1.2s infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

@media (max-width: 900px) {
    .hero-inner {
        padding: 3.5rem 0;
    }

    .catalog-layout,
    .product-detail {
        grid-template-columns: 1fr;
    }

    .filters {
        position: static;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 680px) {
    .nav-toggle {
        display: inline-flex;
    }

    .main-nav {
        position: absolute;
        top: var(--header-h);
        right: 0;
        left: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
        padding: 1rem;
        border-bottom: 1px solid var(--border);
        background: var(--surface);
    }

    .main-nav.is-open {
        display: flex;
    }

    .main-nav a {
        padding: 0.7rem 0.5rem;
    }

    .main-nav .theme-toggle {
        align-self: flex-start;
        margin-top: 0.35rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .section {
        padding: 3rem 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
    }
}
