/**
 * YesitosShop — Responsive CSS
 * Breakpoints adaptados de Modaz: 1366, 1199, 991, 767, 479px
 * @package YesitosShop
 */

@media only screen and (max-width: 1366px) {
    .yshop-container {
        max-width: 1140px;
    }
}

@media only screen and (max-width: 1199px) {
    .yshop-container {
        max-width: 960px;
    }

    .yshop-footer__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .yshop-filters.active {
        grid-template-columns: repeat(2, 1fr);
    }

    .yshop-shop-col-4 ul.products {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media only screen and (max-width: 991px) {

    /* Nav oculta en mobile — mostrar toggle */
    .yshop-nav {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100%;
        background: #fff;
        z-index: 99999;
        flex-direction: column;
        box-shadow: 5px 0 20px rgba(0, 0, 0, .1);
        overflow-y: auto;
        padding: 60px 0 30px;
    }

    .yshop-nav.active {
        display: flex;
    }

    .yshop-nav__menu {
        flex-direction: column;
        width: 100%;
    }

    .yshop-nav__menu>li>a {
        padding: 12px 25px;
        border-bottom: 1px solid var(--yshop-color-border-light);
    }

    .yshop-nav__menu .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding: 0;
        display: none;
    }

    .yshop-nav__menu .sub-menu.open {
        display: block;
    }

    .yshop-nav__menu .sub-menu li a {
        padding: 8px 40px;
    }

    .yshop-nav__menu .sub-menu .sub-menu {
        padding-left: 15px;
    }

    .yshop-mobile-toggle {
        display: block;
    }

    /* Grid ajuste */
    .yshop-shop-col-4 ul.products,
    .yshop-shop-col-3 ul.products {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Single product */
    .yshop-single-product {
        flex-direction: column;
    }

    .yshop-single-product__gallery,
    .yshop-single-product__summary {
        width: 100%;
    }

    .yshop-single-product__summary {
        margin-top: 30px;
    }

    /* Topbar ocultar */
    .yshop-topbar {
        display: none;
    }

    /* Newsletter */
    .yshop-newsletter__inner {
        flex-direction: column;
        text-align: center;
    }

    .yshop-newsletter__form {
        max-width: 100%;
    }

    .yshop-newsletter__social {
        justify-content: center;
    }

    /* Footer */
    .yshop-footer__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Filters */
    .yshop-filters.active {
        grid-template-columns: 1fr 1fr;
    }

    /* Related products */
    .related.products ul.products {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Cart */
    .cart_totals {
        width: 100%;
    }

    /* Section spacing */
    .yshop-section {
        padding: 35px 0;
    }

    /* Quick view */
    .yshop-quickview__content {
        flex-direction: column;
    }

    .yshop-quickview__image,
    .yshop-quickview__info {
        width: 100%;
    }

    /* Tabs vertical */
    .woocommerce-tabs ul.tabs {
        flex-direction: column;
        border-bottom: none;
    }

    .woocommerce-tabs ul.tabs li a {
        border: 1px solid var(--yshop-color-border);
        margin-bottom: 5px;
        border-bottom-width: 1px;
    }

    .woocommerce-tabs ul.tabs li.active a {
        border-bottom-color: var(--yshop-color-border);
    }
}

@media only screen and (max-width: 767px) {

    /* Todo a 1 columna */
    .yshop-shop-col-2 ul.products,
    .yshop-shop-col-3 ul.products,
    .yshop-shop-col-4 ul.products {
        grid-template-columns: 1fr;
    }

    .related.products ul.products {
        grid-template-columns: 1fr;
    }

    /* Footer a 1 columna */
    .yshop-footer__grid {
        grid-template-columns: 1fr;
    }

    /* Filters a 1 columna */
    .yshop-filters.active {
        grid-template-columns: 1fr;
    }

    /* Page title */
    .yshop-page-title__heading {
        font-size: 24px;
        letter-spacing: 1px;
    }

    /* Header */
    .yshop-header-extras {
        gap: 12px;
    }

    /* Cart table */
    .shop_table.cart td,
    .shop_table.cart th {
        padding: 10px;
        font-size: 13px;
    }

    .shop_table.cart .product-thumbnail {
        display: none;
    }

    /* Checkout */
    .woocommerce-checkout form .form-row-first,
    .woocommerce-checkout form .form-row-last {
        float: none;
        width: 100%;
    }

    /* List view revert */
    .yshop-products--list .yshop-product-card {
        flex-direction: column;
    }

    .yshop-products--list .yshop-product-card__thumb {
        width: 100%;
    }

    /* Search overlay */
    .yshop-search-overlay__input {
        font-size: 24px !important;
    }

    .yshop-search-overlay__form {
        width: 85%;
    }
}

@media only screen and (max-width: 479px) {
    h1 {
        font-size: 28px;
    }

    h2 {
        font-size: 20px;
    }

    h3 {
        font-size: 18px;
    }

    .yshop-page-title {
        padding: 30px 0;
    }

    .yshop-page-title__heading {
        font-size: 20px;
    }

    .yshop-header__inner {
        padding: 15px 0;
    }

    .yshop-logo img {
        max-height: 30px;
    }

    .yshop-logo__text {
        font-size: 18px;
    }

    .yshop-single-product__title {
        font-size: 22px;
    }

    .yshop-single-product__price {
        font-size: 22px;
    }

    .yshop-single-product .cart {
        flex-wrap: wrap;
    }

    /* Mini cart full width on mobile */
    .yshop-minicart {
        width: 100vw;
        right: -15px;
    }

    .yshop-go-top {
        bottom: 15px;
        right: 15px;
        width: 35px;
        height: 35px;
    }
}