/* =========================================================
   Tienda — shop archive + single product
   ========================================================= */

.tshop-page {
    background: #FDFDFC;
    color: #14231C;
    padding-bottom: 96px;
}

.tshop-container {
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: 24px;
}

/* ─── Shop hero ──────────────────────────────────────────── */
/* Foto 16:9 recortada un 10% a lo alto (55.9vw seria la imagen completa).
   La composición deja el hueco libre arriba al centro: ahí va el texto. */
.tshop-hero {
    background: #DCEBF7 url(../img/tienda-hero-bg.webp) center / cover no-repeat;
    min-height: max(560px, 50.3vw);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 150px 0 40px;
    margin-bottom: 40px;
    text-align: center;
    position: relative;
    isolation: isolate;
}

/* Velo claro que levanta el cielo detrás del texto */
.tshop-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 62% 42% at 50% 27%,
        rgba(253, 253, 252, 0.9) 0%,
        rgba(253, 253, 252, 0.6) 45%,
        rgba(253, 253, 252, 0) 78%);
    z-index: -1;
}

.tshop-hero .tshop-container {
    width: 100%;
}

.tshop-hero__label {
    display: inline-block;
    font-family: var(--font-base);
    font-size: 12px;
    font-weight: 600;
    color: #2D6A4F;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.tshop-hero__title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 46px;
    line-height: 1.1;
    color: #14231C;
    margin: 0 0 14px;
}

@media (min-width: 1200px) {
    .tshop-hero__title { font-size: 56px; }
}

.tshop-hero__subtitle {
    font-size: 16px;
    color: rgba(20, 35, 28, 0.72);
    max-width: 520px;
    margin: 0 auto;
}

/* ─── Layout: sidebar de categorías + grilla ─────────────── */
.tshop-layout {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 48px;
    align-items: start;
}

/* Sin esto, el min-width:auto de los items de grid deja que la tira
   de filtros (scroll horizontal en móvil) desborde la página. */
.tshop-sidebar,
.tshop-main {
    min-width: 0;
}

.tshop-sidebar {
    position: sticky;
    top: 108px;
}

.tshop-sidebar__title {
    font-family: var(--font-base);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(20, 35, 28, 0.5);
    margin: 0 0 14px;
}

.tshop-filters {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tshop-filters__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(20, 35, 28, 0.75);
    border-radius: 10px;
    padding: 9px 12px;
    text-decoration: none;
    transition: all 0.15s ease;
}

.tshop-filters__item:hover {
    background: rgba(45, 106, 79, 0.07);
    color: #2D6A4F;
}

.tshop-filters__item.is-active {
    background: #2D6A4F;
    color: #ffffff;
    font-weight: 600;
}

.tshop-filters__count {
    font-size: 11.5px;
    font-weight: 600;
    opacity: 0.55;
}

/* ─── Product grid ───────────────────────────────────────── */
.tshop-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px 22px;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Relacionados (sin sidebar): 4 columnas */
.tshop-grid--related {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 960px) {
    .tshop-grid,
    .tshop-grid--related { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 700px) {
    .tshop-grid,
    .tshop-grid--related { grid-template-columns: repeat(2, 1fr); gap: 20px 14px; }
}

/* ─── Product card (sin borde: imagen redondeada + texto) ── */
.tshop-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.tshop-card__media {
    background: #F1F4EF;
    border-radius: 16px;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.tshop-card:hover .tshop-card__media {
    box-shadow: 0 14px 30px rgba(20, 35, 28, 0.10);
}

.tshop-card__img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    mix-blend-mode: multiply;
    transition: transform 0.25s ease;
}

.tshop-card:hover .tshop-card__img {
    transform: scale(1.04);
}

/* Placeholder "Sin foto" */
.tshop-noimg {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: rgba(20, 35, 28, 0.35);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tshop-noimg__icon {
    width: 44px;
    height: 44px;
}

.tshop-noimg--lg {
    height: 100%;
    min-height: 320px;
}

.tshop-noimg--lg .tshop-noimg__icon {
    width: 64px;
    height: 64px;
}

.tshop-card__body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 4px 0;
    flex: 1;
}

.tshop-card__cat {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #2D6A4F;
}

.tshop-card__title {
    font-family: var(--font-base);
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.35;
    margin: 0;
}

.tshop-card__meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    padding-top: 8px;
}

.tshop-card__size {
    font-size: 12.5px;
    color: rgba(20, 35, 28, 0.55);
}

.tshop-card__price {
    font-size: 16px;
    font-weight: 700;
    color: #14231C;
}

.tshop-card__price .woocommerce-Price-amount {
    font-weight: 700;
}

/* ─── Pagination ─────────────────────────────────────────── */
.woocommerce-pagination {
    margin-top: 48px;
    text-align: center;
}

.woocommerce-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.woocommerce-pagination .page-numbers li .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid rgba(20, 35, 28, 0.14);
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    color: rgba(20, 35, 28, 0.72);
    text-decoration: none;
    transition: all 0.18s ease;
}

.woocommerce-pagination .page-numbers li .page-numbers:hover {
    border-color: #2D6A4F;
    color: #2D6A4F;
}

.woocommerce-pagination .page-numbers li .page-numbers.current {
    background: #2D6A4F;
    border-color: #2D6A4F;
    color: #ffffff;
}

.tshop-empty {
    text-align: center;
    padding: 64px 0;
    color: rgba(20, 35, 28, 0.6);
}

/* Sidebar → fila horizontal deslizable en pantallas angostas */
@media (max-width: 860px) {
    .tshop-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .tshop-sidebar {
        position: static;
    }

    .tshop-sidebar__title {
        display: none;
    }

    .tshop-filters {
        flex-direction: row;
        overflow-x: auto;
        gap: 8px;
        margin-inline: -24px;
        padding-inline: 24px;
        padding-bottom: 8px;
        scrollbar-width: none;
    }

    .tshop-filters::-webkit-scrollbar {
        display: none;
    }

    .tshop-filters__item {
        flex-shrink: 0;
        border: 1px solid rgba(20, 35, 28, 0.16);
        border-radius: 100px;
        padding: 8px 16px;
        font-size: 13px;
        white-space: nowrap;
    }

    .tshop-filters__item.is-active {
        border-color: #2D6A4F;
    }
}

/* =========================================================
   Single product
   ========================================================= */

.tshop-single {
    padding-top: 120px;
}

.tshop-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(20, 35, 28, 0.5);
    margin-bottom: 32px;
}

.tshop-breadcrumb a {
    color: rgba(20, 35, 28, 0.6);
    text-decoration: none;
}

.tshop-breadcrumb a:hover {
    color: #2D6A4F;
}

.tshop-breadcrumb__current {
    color: #14231C;
    font-weight: 600;
}

.tshop-single__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 56px;
    align-items: start;
}

@media (max-width: 860px) {
    .tshop-single__layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

/* ─── Gallery ────────────────────────────────────────────── */
.tshop-gallery__main {
    background: #F1F4EF;
    border-radius: 20px;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    overflow: hidden;
}

.tshop-gallery__img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.tshop-gallery__thumbs {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.tshop-gallery__thumb {
    width: 72px;
    height: 72px;
    background: #F1F4EF;
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s ease;
}

.tshop-gallery__thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.tshop-gallery__thumb.is-active,
.tshop-gallery__thumb:hover {
    border-color: #2D6A4F;
}

/* ─── Info column ────────────────────────────────────────── */
.tshop-info__cat {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #2D6A4F;
    text-decoration: none;
    margin-bottom: 10px;
}

.tshop-info__title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 30px;
    line-height: 1.2;
    margin: 0 0 10px;
}

.tshop-info__size {
    font-size: 14px;
    color: rgba(20, 35, 28, 0.6);
    margin: 0 0 18px;
}

.tshop-info__price {
    display: flex;
    align-items: baseline;
    gap: 12px;
    font-size: 30px;
    font-weight: 700;
    color: #14231C;
    margin-bottom: 26px;
}

.tshop-info__tax {
    font-size: 12.5px;
    font-weight: 500;
    color: rgba(20, 35, 28, 0.5);
}

/* Add-to-cart form (markup de WooCommerce) */
.tshop-info__cart form.cart {
    display: flex;
    gap: 12px;
    align-items: stretch;
    margin-bottom: 30px;
}

.tshop-info__cart .quantity {
    display: flex;
}

.tshop-info__cart .quantity .qty {
    width: 74px;
    height: 52px;
    text-align: center;
    font-family: var(--font-base);
    font-size: 15px;
    font-weight: 600;
    color: #14231C;
    background: #ffffff;
    border: 1px solid rgba(20, 35, 28, 0.18);
    border-radius: 100px;
}

.tshop-info__cart .single_add_to_cart_button {
    flex: 1;
    height: 52px;
    background: #2D6A4F;
    color: #ffffff;
    font-family: var(--font-base);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    transition: background 0.18s ease;
}

.tshop-info__cart .single_add_to_cart_button:hover {
    background: #3a8562;
}

.tshop-info__desc {
    font-size: 15px;
    line-height: 1.7;
    color: rgba(20, 35, 28, 0.75);
    margin-bottom: 28px;
}

/* ─── Details list ───────────────────────────────────────── */
.tshop-details {
    border-top: 1px solid rgba(20, 35, 28, 0.1);
    padding-top: 22px;
}

.tshop-details__title {
    font-family: var(--font-base);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(20, 35, 28, 0.55);
    margin: 0 0 14px;
}

.tshop-details__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
}

.tshop-details__list > div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-size: 14px;
    padding: 8px 0;
    border-bottom: 1px dashed rgba(20, 35, 28, 0.08);
}

.tshop-details__list dt {
    color: rgba(20, 35, 28, 0.55);
}

.tshop-details__list dd {
    margin: 0;
    font-weight: 600;
    text-align: right;
}

/* ─── Related ────────────────────────────────────────────── */
.tshop-related {
    margin-top: 80px;
}

.tshop-related__title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 26px;
    margin: 0 0 28px;
}

/* ─── Avisos de WooCommerce (añadido al carrito, etc.) ───── */
.woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-notices-wrapper .woocommerce-info,
.woocommerce-notices-wrapper .woocommerce-error {
    list-style: none;
    background: #EFF6F1;
    border: 1px solid rgba(45, 106, 79, 0.25);
    border-radius: 12px;
    color: #14231C;
    font-size: 14px;
    padding: 14px 18px;
    margin-bottom: 24px;
}

.woocommerce-notices-wrapper .woocommerce-error {
    background: #FBF0EF;
    border-color: rgba(160, 60, 50, 0.3);
}

.woocommerce-notices-wrapper a.button {
    float: right;
    color: #2D6A4F;
    font-weight: 600;
    text-decoration: none;
}

/* ─── Carrito / Checkout (bloques de WooCommerce) ────────── */
.wc-block-components-button:not(.is-link) {
    background: #2D6A4F;
    color: #ffffff;
    border-radius: 100px;
    font-family: var(--font-base);
    font-weight: 600;
    letter-spacing: 0.04em;
    border: none;
}

.wc-block-components-button:not(.is-link):hover,
.wc-block-components-button:not(.is-link):focus {
    background: #3a8562;
    color: #ffffff;
}

.wp-block-woocommerce-cart a,
.wp-block-woocommerce-checkout a {
    color: #2D6A4F;
}

.wc-block-components-product-name {
    font-weight: 600;
    color: #14231C;
}

.wc-block-components-quantity-selector {
    border-radius: 100px;
}

/* ─── Móvil ──────────────────────────────────────────────── */
@media (max-width: 640px) {
    /* La foto recorta al centro: el hueco libre queda detrás del texto */
    .tshop-hero {
        min-height: 460px;
        padding: 100px 0 28px;
        margin-bottom: 28px;
    }

    .tshop-hero::before {
        background: radial-gradient(ellipse 90% 40% at 50% 30%,
            rgba(253, 253, 252, 0.94) 0%,
            rgba(253, 253, 252, 0.7) 50%,
            rgba(253, 253, 252, 0.1) 85%);
    }

    .tshop-hero__title {
        font-size: 32px;
    }

    .tshop-single {
        padding-top: 84px;
    }

    .tshop-info__title {
        font-size: 24px;
    }

    .tshop-info__price {
        font-size: 26px;
    }

    .tshop-card__body {
        padding: 10px 2px 0;
    }

    .tshop-card__title {
        font-size: 13px;
    }
}
