/* =========================================================
   TIENDA DEL GREMIO DE GARDENIA
   ========================================================= */


/* =========================================================
   CABECERA
   ========================================================= */

.store-hero {
    min-height: 270px;
}

.store-hero .hero-content {
    min-height: 270px;
}

.store-kicker {
    margin: 0 0 4px;
}

.store-hero .guild-title h1 {
    font-size: clamp(3rem, 5vw, 5rem);
    line-height: 1;
}

.store-notice {
    min-height: 210px;
    justify-content: flex-start;
}

.back-to-portal {
    position: relative;
    z-index: 2;

    display: inline-block;
    margin-top: 18px;

    color: var(--navy-700);

    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
}

.back-to-portal:hover {
    color: var(--gold-700);
    text-decoration: underline;
}


/* =========================================================
   CONTENIDO
   ========================================================= */

.store-content {
    min-height: 620px;

    padding: 28px;

    background:
        radial-gradient(
            circle at top center,
            rgba(205, 224, 244, 0.18),
            transparent 36%
        ),
        linear-gradient(
            180deg,
            rgba(255, 253, 248, 0.99),
            rgba(246, 241, 231, 0.99)
        );
}


/* =========================================================
   ENCABEZADO DEL CATÁLOGO
   ========================================================= */

.store-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 24px;

    margin-bottom: 22px;
    padding-bottom: 18px;

    border-bottom:
        1px solid rgba(173, 125, 49, 0.28);
}

.store-eyebrow {
    display: block;

    margin-bottom: 3px;

    color: var(--gold-700);

    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.store-heading h2 {
    margin: 0;

    color: var(--navy-900);

    font-family:
        "Marcellus",
        Georgia,
        serif;

    font-size: 2rem;
    font-weight: 400;
}

.store-heading p {
    margin-top: 4px;

    color: var(--text-soft);

    font-size: 0.82rem;
}


/* =========================================================
   CONTADOR
   ========================================================= */

.store-count {
    min-width: 150px;

    padding: 12px 16px;

    text-align: center;

    border:
        1px solid var(--border-gold);

    border-radius: 14px;

    background:
        rgba(255, 255, 255, 0.64);

    box-shadow:
        0 8px 20px
        rgba(18, 42, 72, 0.07);
}

.store-count strong {
    display: block;

    color: var(--navy-900);

    font-family:
        "Marcellus",
        Georgia,
        serif;

    font-size: 1.6rem;

    line-height: 1;
}

.store-count span {
    display: block;

    margin-top: 4px;

    color: var(--text-soft);

    font-size: 0.66rem;
}


/* =========================================================
   BUSCADOR Y FILTRO
   ========================================================= */

.store-controls {
    display: grid;

    grid-template-columns:
        minmax(280px, 1fr)
        220px;

    gap: 16px;

    margin-bottom: 18px;
    padding: 18px;

    border:
        1px solid var(--border-gold);

    border-radius:
        var(--radius-medium);

    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.92),
            rgba(247, 241, 228, 0.92)
        );

    box-shadow:
        var(--shadow-soft);
}

.store-search,
.store-category {
    display: flex;
    flex-direction: column;

    gap: 6px;
}

.store-controls label {
    color: var(--navy-900);

    font-size: 0.69rem;
    font-weight: 700;
    letter-spacing: 0.05em;

    text-transform: uppercase;
}

.store-controls input,
.store-controls select {
    width: 100%;
    height: 42px;

    padding: 0 13px;

    color: var(--text-main);

    border:
        1px solid rgba(173, 125, 49, 0.36);

    border-radius: 10px;

    background:
        rgba(255, 253, 248, 0.96);

    font-family:
        "Lato",
        Arial,
        sans-serif;

    font-size: 0.79rem;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.store-controls input:focus,
.store-controls select:focus {
    border-color: var(--gold-500);

    box-shadow:
        0 0 0 3px
        rgba(201, 155, 70, 0.12);
}


/* =========================================================
   TABLA / LISTA
   ========================================================= */

.store-table-wrapper {
    overflow: hidden;

    border:
        1px solid var(--border-gold);

    border-radius: 16px;

    background:
        rgba(255, 253, 248, 0.96);

    box-shadow:
        var(--shadow-soft);
}


/* Cabecera */

.store-table-header {
    display: grid;

    grid-template-columns:
        minmax(220px, 1.25fr)
        minmax(360px, 2.2fr)
        120px
        145px
        120px;

    gap: 16px;

    align-items: center;

    padding: 14px 18px;

    color: #f4d68e;

    border-bottom:
        1px solid var(--gold-600);

    background:
        linear-gradient(
            180deg,
            var(--navy-700),
            var(--navy-950)
        );

    font-family:
        "Marcellus",
        Georgia,
        serif;

    font-size: 0.7rem;

    letter-spacing: 0.05em;

    text-transform: uppercase;
}


/* =========================================================
   LISTA DE FILAS
   ========================================================= */

.store-list {
    display: flex;
    flex-direction: column;
}


/* =========================================================
   FILA DE PRODUCTO
   ========================================================= */

.store-row {
    display: grid;

    grid-template-columns:
        minmax(220px, 1.25fr)
        minmax(360px, 2.2fr)
        120px
        145px
        120px;

    gap: 16px;

    align-items: center;

    min-height: 90px;

    padding: 16px 18px;

    border-bottom:
        1px solid rgba(173, 125, 49, 0.17);

    background:
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.86),
            rgba(248, 243, 232, 0.86)
        );

    transition:
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.store-row:last-child {
    border-bottom: none;
}

.store-row:hover {
    background:
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 1),
            rgba(244, 236, 219, 0.96)
        );

    box-shadow:
        inset 4px 0 0 var(--gold-500);
}


/* =========================================================
   NOMBRE Y CATEGORÍA
   ========================================================= */

.store-item-name {
    display: flex;
    flex-direction: column;

    gap: 6px;

    min-width: 0;
}

.store-item-name strong {
    color: var(--navy-900);

    font-family:
        "Marcellus",
        Georgia,
        serif;

    font-size: 1rem;
    font-weight: 400;

    line-height: 1.3;
}

.store-category-badge {
    display: inline-flex;

    width: fit-content;

    padding: 4px 8px;

    border-radius: 999px;

    font-size: 0.58rem;
    font-weight: 700;

    letter-spacing: 0.06em;

    text-transform: uppercase;
}


/* Categorías */

.store-category-shop {
    color: #7b5a1f;

    border:
        1px solid rgba(177, 130, 45, 0.32);

    background:
        rgba(222, 183, 100, 0.12);
}

.store-category-market {
    color: #31547a;

    border:
        1px solid rgba(58, 104, 151, 0.26);

    background:
        rgba(71, 125, 181, 0.09);
}

.store-category-service {
    color: #4f674f;

    border:
        1px solid rgba(75, 112, 79, 0.26);

    background:
        rgba(92, 138, 98, 0.09);
}


/* =========================================================
   DESCRIPCIÓN
   ========================================================= */

.store-item-description {
    color: var(--text-soft);

    font-size: 0.73rem;

    line-height: 1.55;
}


/* =========================================================
   PRECIO
   ========================================================= */

.store-item-price {
    color: var(--navy-900);

    font-family:
        "Marcellus",
        Georgia,
        serif;

    font-size: 0.88rem;

    text-align: right;
}


/* =========================================================
   DISPONIBILIDAD
   ========================================================= */

.store-item-stock {
    display: flex;
    justify-content: flex-end;
}

.store-stock-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 84px;

    padding: 6px 10px;

    color: var(--navy-800);

    border:
        1px solid rgba(28, 65, 101, 0.18);

    border-radius: 999px;

    background:
        rgba(45, 91, 139, 0.06);

    font-size: 0.62rem;
    font-weight: 700;
}


/* =========================================================
   BOTÓN DE COMPRA
   ========================================================= */

.store-buy-cell {
    display: flex;
    justify-content: flex-end;
}

.store-buy-button {
    min-width: 100px;

    padding: 9px 14px;

    color: #f6d995;

    border:
        1px solid var(--gold-600);

    border-radius: 9px;

    background:
        linear-gradient(
            180deg,
            var(--navy-700),
            var(--navy-950)
        );

    cursor: pointer;

    font-family:
        "Marcellus",
        Georgia,
        serif;

    font-size: 0.7rem;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.store-buy-button:hover {
    transform:
        translateY(-2px);

    box-shadow:
        0 7px 16px
        rgba(6, 24, 45, 0.22);
}

.store-buy-button:disabled {
    opacity: 0.45;

    cursor: not-allowed;

    transform: none;
    box-shadow: none;
}


/* =========================================================
   NO DISPONIBLE
   ========================================================= */

.store-row.is-unavailable {
    opacity: 0.62;
}

.store-row.is-unavailable
.store-stock-badge {
    color: #7a3b35;

    border-color:
        rgba(150, 66, 56, 0.2);

    background:
        rgba(150, 66, 56, 0.07);
}


/* =========================================================
   SIN RESULTADOS
   ========================================================= */

.store-empty {
    padding: 54px 20px;

    text-align: center;
}

.store-empty h3 {
    margin: 0;

    color: var(--navy-900);

    font-family:
        "Marcellus",
        Georgia,
        serif;

    font-size: 1.3rem;
    font-weight: 400;
}

.store-empty p {
    margin-top: 7px;

    color: var(--text-soft);

    font-size: 0.78rem;
}


/* =========================================================
   FOOTER
   ========================================================= */

.store-footer {
    grid-template-columns:
        auto 1fr;
}

.store-footer-link {
    color: var(--gold-300);

    font-family:
        "Marcellus",
        Georgia,
        serif;

    font-size: 0.76rem;

    text-decoration: none;
}

.store-footer-link:hover {
    color: white;
}

.store-footer p {
    text-align: center;

    font-size: 0.68rem;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1100px) {

    .store-table-header,
    .store-row {
        grid-template-columns:
            minmax(190px, 1.15fr)
            minmax(280px, 1.8fr)
            105px
            125px
            105px;
    }

}


/* =========================================================
   TABLET PEQUEÑA
   ========================================================= */

@media (max-width: 850px) {

    .store-controls {
        grid-template-columns:
            1fr;
    }

    .store-table-header {
        display: none;
    }

    .store-row {
        grid-template-columns:
            1fr
            auto;

        gap: 12px 18px;

        padding: 18px;
    }

    .store-item-name {
        grid-column: 1;
    }

    .store-item-price {
        grid-column: 2;
        grid-row: 1;

        text-align: right;
    }

    .store-item-description {
        grid-column:
            1 / -1;
    }

    .store-item-stock {
        grid-column: 1;

        justify-content:
            flex-start;
    }

    .store-buy-cell {
        grid-column: 2;

        justify-content:
            flex-end;
    }

}


/* =========================================================
   MÓVIL
   ========================================================= */

@media (max-width: 600px) {

    .store-content {
        padding: 18px;
    }

    .store-heading {
        align-items: flex-start;

        flex-direction: column;
    }

    .store-count {
        width: 100%;
    }

    .store-row {
        grid-template-columns:
            1fr;
    }

    .store-item-name,
    .store-item-price,
    .store-item-description,
    .store-item-stock,
    .store-buy-cell {
        grid-column: 1;
    }

    .store-item-price {
        grid-row: auto;

        text-align: left;
    }

    .store-item-stock,
    .store-buy-cell {
        justify-content:
            flex-start;
    }

}