:root {
    --store-ink: #20231f;
    --store-muted: #6e746c;
    --store-accent: #8c7258;
    --store-soft: #f5f2ed;
    --store-line: #e4ded5;
    --store-white: #fff;
}

/* =========================================================
   BASE
   ========================================================= */

.store-page,
.product-page {
    background: #fbfaf8;
    color: var(--store-ink);
    min-height: 70vh;
}

.store-shell {
    width: min(1240px, calc(100% - 48px));
    margin: auto;
}

/* =========================================================
   HERO TIENDA
   ========================================================= */

.store-hero {
    padding: 170px 0 88px;
    background: linear-gradient(135deg, #efe9e0, #faf8f4);
}

.store-hero .store-shell {
    max-width: 850px;
    margin-left: max(24px, calc((100% - 1240px) / 2));
}

.store-eyebrow,
.section-heading span {
    font: 500 0.76rem/1.2 Jost, sans-serif;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--store-accent);
}

.store-hero h1 {
    font: 500 clamp(3rem, 7vw, 6.4rem) / 0.94 'Cormorant Garamond', serif;
    margin: 16px 0 20px;
    max-width: 900px;
}

.store-hero p {
    max-width: 650px;
    font: 300 1.08rem/1.8 Jost, sans-serif;
    color: var(--store-muted);
}

/* =========================================================
   CATÁLOGO
   ========================================================= */

.store-catalog {
    display: grid;
    grid-template-columns: 235px 1fr;
    gap: 58px;
    padding: 74px 0 110px;
}

.store-filters {
    border-right: 1px solid var(--store-line);
    padding-right: 30px;
}

.store-filter-block {
    position: sticky;
    top: 120px;
}

.store-filter-block h2 {
    font: 500 1.45rem 'Cormorant Garamond', serif;
    margin: 0 0 22px;
}

.store-category-list {
    display: grid;
    gap: 6px;
}

.store-category {
    border: 0;
    background: transparent;
    text-align: left;
    padding: 11px 12px;
    font: 400 0.93rem Jost, sans-serif;
    color: var(--store-muted);
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
}

.store-category:hover,
.store-category.active {
    background: var(--store-soft);
    color: var(--store-ink);
}

.store-category span {
    font-size: 0.76rem;
}

.store-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 32px;
}

.store-search {
    width: min(430px, 100%);
    height: 48px;
    display: flex;
    border-bottom: 1px solid var(--store-ink);
}

.store-search input {
    flex: 1;
    border: 0;
    background: transparent;
    outline: 0;
    font: 400 0.95rem Jost, sans-serif;
}

.store-search button {
    border: 0;
    background: transparent;
    width: 42px;
    cursor: pointer;
}

.store-search svg {
    width: 21px;
}

.store-count {
    font: 400 0.82rem Jost, sans-serif;
    color: var(--store-muted);
}

.store-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px 22px;
}

/* =========================================================
   TARJETAS DE PRODUCTOS
   ========================================================= */

.product-card {
    background: var(--store-white);
    border: 1px solid #eee9e2;
    transition: 0.25s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 45px rgba(44, 38, 29, 0.08);
}

.product-card__image {
    display: block;
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--store-soft);
}

.product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-card__image img {
    transform: scale(1.035);
}

.product-card__badges,
.product-badges {
    position: absolute;
    top: 14px;
    left: 14px;
    display: flex;
    gap: 7px;
}

.badge {
    padding: 6px 9px;
    border-radius: 99px;
    font: 500 0.66rem Jost, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.badge-new {
    background: #e5eee8;
    color: #3e6550;
}

.badge-sale {
    background: #332c26;
    color: #fff;
}

.product-card__body {
    padding: 20px;
}

.product-card__category,
.product-category {
    font: 500 0.68rem Jost, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--store-accent);
    min-height: 1em;
}

.product-card h2 {
    font: 500 1.55rem/1.05 'Cormorant Garamond', serif;
    margin: 9px 0;
}

.product-card h2 a {
    color: inherit;
    text-decoration: none;
}

.product-card__excerpt {
    font: 300 0.85rem/1.55 Jost, sans-serif;
    color: var(--store-muted);
    height: 2.7em;
    overflow: hidden;
}

.product-card__footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--store-line);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-card__price,
.product-price {
    display: flex;
    gap: 10px;
    align-items: baseline;
    font: 500 1rem Jost, sans-serif;
}

.product-card__price del,
.product-price del {
    font-size: 0.8rem;
    color: #999;
}

.price-sale {
    color: #8c4f39;
}

.product-card__arrow {
    font-size: 1.4rem;
    text-decoration: none;
    color: var(--store-ink);
}

/* =========================================================
   ESTADOS
   ========================================================= */

.store-loading,
.store-empty {
    padding: 70px 20px;
    text-align: center;
    font-family: Jost, sans-serif;
}

.store-loading span {
    display: block;
    width: 32px;
    height: 32px;
    border: 2px solid #ddd;
    border-top-color: var(--store-accent);
    border-radius: 50%;
    margin: 0 auto 15px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.store-empty h2 {
    font: 500 2rem 'Cormorant Garamond', serif;
}

/* =========================================================
   PÁGINA DE PRODUCTO
   ========================================================= */

.product-page {
    padding: 135px 0 100px;
}

.store-breadcrumb {
    display: flex;
    gap: 9px;
    margin: 12px 0 36px;
    font: 400 0.76rem Jost, sans-serif;
    color: var(--store-muted);
}

.store-breadcrumb a {
    color: inherit;
    text-decoration: none;
}

.product-detail {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(350px, 0.92fr);
    gap: 70px;
    align-items: start;
}

.product-main-image {
    aspect-ratio: 1 / 1;
    background: var(--store-soft);
    overflow: hidden;
}

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

.product-thumbs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-top: 12px;
}

.product-thumb {
    border: 1px solid transparent;
    padding: 0;
    background: var(--store-soft);
    aspect-ratio: 1;
    cursor: pointer;
}

.product-thumb.active {
    border-color: var(--store-accent);
}

.product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    position: sticky;
    top: 125px;
}

.product-info h1 {
    font: 500 clamp(2.8rem, 5vw, 5.1rem) / 0.95 'Cormorant Garamond', serif;
    margin: 13px 0 18px;
}

.product-info .product-badges {
    position: static;
    margin-bottom: 20px;
}

.product-price {
    font-size: 1.55rem;
    margin: 18px 0;
}

.product-price del {
    font-size: 1rem;
}

.product-excerpt {
    font: 300 1rem/1.75 Jost, sans-serif;
    color: var(--store-muted);
}

.product-availability {
    display: flex;
    gap: 9px;
    align-items: center;
    margin: 24px 0;
    font: 500 0.82rem Jost, sans-serif;
}

.availability-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #5d8d6e;
}

.availability-dot.off {
    background: #b76458;
}

.product-buy-row {
    display: flex;
    gap: 12px;
    margin-top: 28px;
}

.product-quantity {
    width: 100px;
    font: 500 0.7rem Jost, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.product-quantity input {
    width: 100%;
    height: 48px;
    margin-top: 7px;
    border: 1px solid var(--store-line);
    padding: 0 13px;
    background: #fff;
}

.store-primary-btn {
    min-height: 48px;
    border: 0;
    background: #282723;
    color: #fff;
    padding: 13px 28px;
    font: 500 0.82rem Jost, sans-serif;
    letter-spacing: 0.04em;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.store-primary-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.product-cart-message {
    min-height: 24px;
    color: #4c745b;
    font: 500 0.82rem Jost, sans-serif;
}

/* =========================================================
   DESCRIPCIÓN Y ESPECIFICACIONES
   ========================================================= */

.product-body {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(380px, 0.85fr);
    gap: 70px;
    margin: 100px 0;
    border-top: 1px solid var(--store-line);
    padding-top: 55px;
}

.product-body h2,
.related-products h2 {
    font: 500 2.35rem 'Cormorant Garamond', serif;
}

.product-description {
    font: 300 1rem/1.8 Jost, sans-serif;
    color: #4f554e;
}

.product-specs {
    margin: 0;
}

.product-specs > div {
    display: grid;
    grid-template-columns: minmax(180px, 38%) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    padding: 15px 0;
    border-bottom: 1px solid var(--store-line);
    font-family: 'Jost', sans-serif;
}

.product-specs > div:first-child {
    border-top: 1px solid var(--store-line);
}

.product-specs dt {
    margin: 0;
    color: var(--store-ink);
    font-size: 0.83rem;
    font-weight: 500;
    line-height: 1.55;
}

.product-specs dd {
    margin: 0;
    color: var(--store-muted);
    font-size: 0.83rem;
    font-weight: 300;
    line-height: 1.55;
    text-align: left;
    overflow-wrap: anywhere;
}

/* =========================================================
   PRODUCTOS RELACIONADOS
   ========================================================= */

.related-products {
    margin-top: 80px;
}

.section-heading {
    margin-bottom: 28px;
}

.product-not-found {
    padding: 150px 20px;
}

.product-not-found h1 {
    font: 500 3rem 'Cormorant Garamond', serif;
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 980px) {
    .store-catalog {
        grid-template-columns: 1fr;
    }

    .store-filters {
        border: 0;
        padding: 0;
    }

    .store-filter-block {
        position: static;
    }

    .store-category-list {
        display: flex;
        overflow: auto;
        padding-bottom: 8px;
    }

    .store-category {
        white-space: nowrap;
    }

    .store-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-detail {
        grid-template-columns: 1fr;
        gap: 38px;
    }

    .product-info {
        position: static;
    }

    .product-body {
        grid-template-columns: 1fr;
        gap: 35px;
    }
}

/* =========================================================
   MÓVIL
   ========================================================= */

@media (max-width: 620px) {
    .store-shell {
        width: min(100% - 28px, 1240px);
    }

    .store-hero {
        padding: 135px 0 65px;
    }

    .store-catalog {
        padding-top: 42px;
    }

    .store-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

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

    .product-page {
        padding-top: 105px;
    }

    .product-info h1 {
        font-size: 3rem;
    }

    .product-buy-row {
        flex-direction: column;
    }

    .product-quantity {
        width: 100%;
    }

    .product-body {
        margin: 70px 0;
    }

    .product-specs > div {
        grid-template-columns: 1fr;
        gap: 4px;
        padding: 13px 0;
    }

    .product-specs dt {
        font-weight: 500;
    }
}