/**
 * YesitosShop — Estilos WooCommerce
 * Adaptados del template Modaz para tienda de moda.
 * @package YesitosShop
 */

/* ─── Shop page / Archive ─── */
.yshop-shop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--yshop-color-border);
}

.woocommerce-result-count {
    margin: 0;
    font-size: 14px;
    font-family: var(--yshop-font-primary);
    color: var(--yshop-color-text);
}

.woocommerce-ordering select {
    border: 0;
    font-family: var(--yshop-font-primary);
    text-transform: uppercase;
    color: var(--yshop-color-text-light);
    background-color: var(--yshop-color-border-light);
    padding: 6px 20px;
    cursor: pointer;
    font-size: 13px;
}

.woocommerce-ordering select:focus {
    outline: 0;
}

/* ─── Vista Grid / List toggle ─── */
.yshop-view-toggle {
    display: flex;
    gap: 8px;
    margin-left: 15px;
}

.yshop-view-toggle__btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--yshop-color-border-light);
    border: none;
    cursor: pointer;
    color: var(--yshop-color-text-light);
    font-size: 16px;
    transition: var(--yshop-transition);
    padding: 0;
}

.yshop-view-toggle__btn.active,
.yshop-view-toggle__btn:hover {
    background: var(--yshop-color-primary);
    color: #fff;
}

/* ─── Product Grid ─── */
.yshop-products {
    display: grid;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.yshop-shop-col-2 .yshop-products {
    grid-template-columns: repeat(2, 1fr);
}

.yshop-shop-col-3 .yshop-products {
    grid-template-columns: repeat(3, 1fr);
}

.yshop-shop-col-4 .yshop-products {
    grid-template-columns: repeat(4, 1fr);
}

ul.products {
    display: grid;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.yshop-shop-col-2 ul.products {
    grid-template-columns: repeat(2, 1fr);
}

.yshop-shop-col-3 ul.products {
    grid-template-columns: repeat(3, 1fr);
}

.yshop-shop-col-4 ul.products {
    grid-template-columns: repeat(4, 1fr);
}

/* ─── Product Card ─── */
.yshop-product-card {
    position: relative;
    background: #fff;
    overflow: hidden;
}

.yshop-product-card__thumb {
    position: relative;
    overflow: hidden;
}

.yshop-product-card__thumb img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.yshop-product-card:hover .yshop-product-card__thumb img {
    transform: scale(1.05);
}

/* Badges */
.yshop-product-card__badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
}

.yshop-product-card__badge span {
    display: inline-block;
    font-family: var(--yshop-font-primary);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 12px;
    color: #fff;
    margin-bottom: 4px;
}

.yshop-badge--new {
    background-color: var(--yshop-color-text-dark);
}

.yshop-badge--sale {
    background-color: var(--yshop-color-accent);
}

.yshop-badge--hot {
    background-color: #ff9800;
}

/* Acciones hover */
.yshop-product-card__actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    opacity: 0;
    transform: translateY(10px);
    transition: var(--yshop-transition);
    z-index: 10;
}

.yshop-product-card:hover .yshop-product-card__actions {
    opacity: 1;
    transform: translateY(0);
}

.yshop-product-card__action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #fff;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: var(--yshop-color-text-dark);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .1);
    transition: var(--yshop-transition);
    padding: 0;
}

.yshop-product-card__action-btn:hover {
    background: var(--yshop-color-accent);
    color: #fff;
}

/* Add to cart overlay */
.yshop-product-card__add-to-cart {
    position: absolute;
    bottom: -40px;
    left: 0;
    right: 0;
    opacity: 0;
    background: rgba(220, 220, 220, .95);
    text-align: center;
    transition: var(--yshop-transition);
    z-index: 5;
}

.yshop-product-card:hover .yshop-product-card__add-to-cart {
    bottom: 0;
    opacity: 1;
}

.yshop-product-card__add-to-cart a {
    display: block;
    font-family: var(--yshop-font-primary);
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--yshop-color-text-dark);
    padding: 10px;
    transition: var(--yshop-transition);
}

.yshop-product-card__add-to-cart a:hover {
    background: var(--yshop-color-secondary);
    color: #fff;
}

/* Info */
.yshop-product-card__info {
    text-align: center;
    padding: 18px 10px;
}

.yshop-product-card__title {
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    margin-bottom: 6px;
    transition: var(--yshop-transition);
}

.yshop-product-card__title a {
    color: var(--yshop-color-text-dark);
}

.yshop-product-card__title a:hover {
    color: var(--yshop-color-secondary);
}

.yshop-product-card__price {
    font-size: 18px;
    font-family: var(--yshop-font-primary);
    color: var(--yshop-color-secondary);
    margin: 0;
    font-weight: 500;
}

.yshop-product-card__price del {
    color: #b7b7b7;
    font-size: 15px;
    padding-right: 6px;
}

.yshop-product-card__price ins {
    text-decoration: none;
    background: none;
}

/* Botón Me encanta */
.yshop-love-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    color: var(--yshop-color-text-light);
    transition: var(--yshop-transition);
    padding: 0;
}

.yshop-love-btn:hover,
.yshop-love-btn.loved {
    color: var(--yshop-color-accent);
    background: #fff;
}

.yshop-love-btn.loved {
    animation: yshopHeartBeat .4s ease;
}

@keyframes yshopHeartBeat {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }
}

.yshop-love-btn__count {
    font-size: 10px;
    position: absolute;
    bottom: -2px;
    right: -4px;
    background: var(--yshop-color-primary);
    color: #fff;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    border-radius: 8px;
    padding: 0 3px;
}

/* Color swatches */
.yshop-color-swatches {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 8px;
    list-style: none;
    padding: 0;
}

.yshop-color-swatches li a {
    display: block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid var(--yshop-color-border);
    transition: var(--yshop-transition);
}

.yshop-color-swatches li a:hover {
    transform: scale(1.3);
}

.yshop-color-swatches .swatch-red {
    background: #e74c3c;
}

.yshop-color-swatches .swatch-blue {
    background: #3498db;
}

.yshop-color-swatches .swatch-black {
    background: #333;
}

.yshop-color-swatches .swatch-white {
    background: #fff;
}

.yshop-color-swatches .swatch-pink {
    background: #e91e63;
}

.yshop-color-swatches .swatch-green {
    background: #27ae60;
}

/* ─── List view ─── */
.yshop-products--list {
    grid-template-columns: 1fr !important;
}

.yshop-products--list .yshop-product-card {
    display: flex;
    gap: 30px;
}

.yshop-products--list .yshop-product-card__thumb {
    width: 280px;
    flex-shrink: 0;
}

.yshop-products--list .yshop-product-card__info {
    text-align: left;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ─── Shop filters panel ─── */
.yshop-filters {
    display: none;
    background: var(--yshop-color-border-light);
    padding: 30px;
    margin-bottom: 30px;
}

.yshop-filters.active {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.yshop-filters__close {
    text-align: right;
    grid-column: 1 / -1;
}

.yshop-filters__close a {
    font-size: 18px;
    color: var(--yshop-color-text-light);
}

.yshop-filters .yshop-widget__title {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.yshop-filters ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.yshop-filters ul li {
    padding: 4px 0;
}

.yshop-filters ul li a {
    font-size: 13px;
    color: var(--yshop-color-text);
}

.yshop-filters ul li a:hover,
.yshop-filters ul li a.active {
    color: var(--yshop-color-accent);
}

/* ─── Single Product ─── */
.yshop-single-product {
    display: flex;
    gap: 40px;
    padding: 40px 0;
}

.yshop-single-product__gallery {
    width: 50%;
    position: relative;
}

.yshop-single-product__gallery img {
    width: 100%;
    height: auto;
}

.yshop-single-product__summary {
    width: 50%;
}

.yshop-single-product__title {
    font-size: 28px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.yshop-single-product__price {
    font-size: 26px;
    font-family: var(--yshop-font-primary);
    color: var(--yshop-color-secondary);
    padding-bottom: 22px;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--yshop-color-border);
}

.yshop-single-product__price del {
    font-size: 22px;
    color: #b7b7b7;
    padding-right: 5px;
}

.yshop-single-product__price ins {
    text-decoration: none;
    background: none;
}

.yshop-single-product__meta {
    padding-top: 17px;
    margin-top: 25px;
    border-top: 1px solid var(--yshop-color-border);
}

.yshop-single-product__meta>span {
    font-family: var(--yshop-font-primary);
    font-size: 13px;
    color: var(--yshop-color-text-light);
    text-transform: uppercase;
    display: inline-block;
    margin-right: 20px;
}

.yshop-single-product__meta a {
    color: var(--yshop-color-text-dark);
}

.yshop-single-product__meta a:hover {
    text-decoration: underline;
}

/* Add to cart form */
.yshop-single-product .cart {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 25px;
}

.yshop-single-product .quantity input {
    border: 1px solid var(--yshop-color-border);
    width: 60px;
    text-align: center;
    background: #fff;
    padding: 10px;
    height: 48px;
}

.yshop-single-product .single_add_to_cart_button {
    padding: 14px 50px;
    font-size: 14px;
    background: var(--yshop-color-primary);
}

.yshop-single-product .single_add_to_cart_button:hover {
    background: var(--yshop-color-secondary);
}

/* Tabs */
.yshop-product-tabs {
    clear: both;
    padding-top: 60px;
}

.woocommerce-tabs ul.tabs {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    border-bottom: 2px solid var(--yshop-color-border);
}

.woocommerce-tabs ul.tabs li {
    margin: 0;
}

.woocommerce-tabs ul.tabs li a {
    display: block;
    font-family: var(--yshop-font-primary);
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 25px;
    color: var(--yshop-color-text-light);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: var(--yshop-transition);
}

.woocommerce-tabs ul.tabs li.active a {
    color: var(--yshop-color-text-dark);
    border-bottom-color: var(--yshop-color-accent);
}

.woocommerce-tabs .panel {
    padding: 30px 0;
}

/* Related products */
.related.products,
.upsells.products {
    padding-top: 40px;
    margin-top: 40px;
    border-top: 1px solid var(--yshop-color-border);
}

.related.products>h2,
.upsells.products>h2 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    padding-bottom: 12px;
    margin-bottom: 25px;
}

.related.products>h2::after,
.upsells.products>h2::after {
    content: '';
    width: 50px;
    height: 2px;
    background: var(--yshop-color-border);
    position: absolute;
    left: 0;
    bottom: 0;
}

/* ─── Cart Page ─── */
.shop_table.cart th {
    font-family: var(--yshop-font-primary);
    color: var(--yshop-color-text-dark);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 13px;
}

.shop_table.cart td,
.shop_table.cart th {
    padding: 20px;
    vertical-align: middle;
}

.shop_table.cart .product-name a {
    font-family: var(--yshop-font-primary);
    color: var(--yshop-color-text-dark);
}

.shop_table.cart .product-name a:hover {
    color: var(--yshop-color-secondary);
}

.shop_table.cart .product-remove a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--yshop-color-border-light);
    color: var(--yshop-color-text-light) !important;
    font-size: 14px;
    transition: var(--yshop-transition);
}

.shop_table.cart .product-remove a:hover {
    color: var(--yshop-color-accent) !important;
}

.shop_table.cart .product-thumbnail img {
    width: 80px;
}

.shop_table.cart .quantity input[type="number"] {
    width: 60px;
    height: 48px;
    text-align: center;
}

.shop_table.cart .coupon #coupon_code {
    background: var(--yshop-color-border-light);
    border: 0;
    width: 200px;
    padding: 8px 12px;
}

.cart_totals {
    width: 60%;
    margin-top: 40px;
}

.cart_totals>h2 {
    font-size: 20px;
    margin-bottom: 20px;
}

.cart_totals .shop_table {
    border: 2px solid #e4e4e4;
    margin-bottom: 20px;
}

.cart_totals .shop_table th,
.cart_totals .shop_table td {
    padding: 12px 25px;
    border-color: #e4e4e4;
}

.wc-proceed-to-checkout .button {
    font-size: 16px;
    letter-spacing: 1px;
    background: var(--yshop-color-secondary);
    padding: 14px 30px;
    width: 100%;
}

.wc-proceed-to-checkout .button:hover {
    background: var(--yshop-color-primary);
}

/* ─── Checkout ─── */
.woocommerce-checkout form .form-row {
    margin: 0 0 20px;
}

.woocommerce-checkout form .form-row-first,
.woocommerce-checkout form .form-row-last {
    float: left;
    width: 48%;
}

.woocommerce-checkout form .form-row-last {
    float: right;
}

.woocommerce-checkout form .form-row input.input-text,
.woocommerce-checkout form .form-row textarea {
    background: #fafafa;
    border: 1px solid #dcdcdc;
    width: 100%;
}

.woocommerce-checkout form .form-row label {
    display: block;
    font-family: var(--yshop-font-primary);
    font-size: 13px;
    font-weight: 500;
}

.woocommerce-billing-fields h3,
.woocommerce-shipping-fields h3,
#order_review_heading {
    font-size: 20px;
    padding-top: 20px;
}

.woocommerce-checkout-review-order table th {
    background: var(--yshop-color-border-light);
    font-family: var(--yshop-font-primary);
    padding: 10px 25px;
}

.woocommerce-checkout-review-order table td {
    padding: 10px 25px;
}

#payment #place_order {
    font-size: 16px;
    width: 100%;
    max-width: 400px;
    background: var(--yshop-color-secondary);
    padding: 16px 0;
    margin-top: 20px;
}

#payment #place_order:hover {
    background: var(--yshop-color-primary);
}

/* ─── Messages ─── */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    font-family: var(--yshop-font-primary);
    font-size: 14px;
    padding: 12px 20px;
    background: #fbf0c8;
    margin: 0 0 20px;
    list-style: none;
    border-left: 3px solid var(--yshop-color-secondary);
}

.woocommerce-error {
    border-left-color: var(--yshop-color-accent);
}

/* ─── Widgets WooCommerce ─── */
.yshop-widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.yshop-widget .product_list_widget li {
    padding: 15px 0;
    border-top: 1px solid var(--yshop-color-border);
}

.yshop-widget .product_list_widget li:first-child {
    border-top: none;
    padding-top: 0;
}

.yshop-widget .product_list_widget li img {
    float: left;
    width: 70px;
    margin-right: 15px;
}

.yshop-widget .product-title {
    font-family: var(--yshop-font-primary);
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    display: block;
    color: var(--yshop-color-text-dark);
    margin-bottom: 4px;
}

.yshop-widget .product-title:hover {
    color: var(--yshop-color-secondary);
}

.yshop-widget .amount {
    font-family: var(--yshop-font-primary);
    font-size: 15px;
    color: var(--yshop-color-secondary);
}

/* Widget price filter */
.widget_price_filter .price_slider {
    height: 4px;
    margin: 40px 0 25px;
    background: #aeaeae;
    position: relative;
}

.widget_price_filter .price_slider_amount .button {
    font-family: var(--yshop-font-primary);
    font-size: 13px;
    float: left;
    background: #aeaeae;
    color: #fff;
    padding: 0 25px;
    height: 36px;
    line-height: 36px;
}

.widget_price_filter .price_slider_amount .button:hover {
    background: var(--yshop-color-secondary);
}

.widget_price_filter .ui-slider .ui-slider-handle {
    background: #fff;
    top: -4px;
    position: absolute;
    z-index: 2;
    width: 12px;
    height: 12px;
    border: 2px solid var(--yshop-color-secondary);
    border-radius: 50%;
    cursor: pointer;
}

/* Widget categories */
.widget_product_categories ul li {
    font-family: var(--yshop-font-primary);
    position: relative;
    text-transform: uppercase;
    padding: 10px 0;
    border-top: 1px solid var(--yshop-color-border);
    font-size: 13px;
}

.widget_product_categories ul li:first-child {
    border-top: 0;
    padding-top: 0;
}

.widget_product_categories ul li a {
    color: var(--yshop-color-text);
}

.widget_product_categories ul li a:hover {
    color: var(--yshop-color-secondary);
}

/* ─── Star Rating ─── */
.star-rating {
    display: inline-flex;
    font-size: 14px;
    color: #ffb400;
}

.star-rating::before {
    content: '★★★★★';
    letter-spacing: 2px;
    color: #ddd;
}

.star-rating span {
    overflow: hidden;
    position: absolute;
}

/* ─── Sale badge (WooCommerce default) ─── */
.onsale {
    font-family: var(--yshop-font-primary);
    position: absolute;
    right: 10px;
    top: 10px;
    z-index: 10;
    font-size: 12px;
    letter-spacing: 0.5px;
    line-height: 25px;
    padding: 0 16px;
    color: #fff;
    text-transform: uppercase;
    background: var(--yshop-color-accent);
    display: inline-block;
}

/* ─── Quick view modal ─── */
.yshop-quickview-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .7);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
}

.yshop-quickview-modal.active {
    display: flex;
}

.yshop-quickview__content {
    background: #fff;
    max-width: 900px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    display: flex;
    position: relative;
}

.yshop-quickview__close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    padding: 0;
    color: var(--yshop-color-text-dark);
}

.yshop-quickview__close:hover {
    color: var(--yshop-color-accent);
    background: none;
}

.yshop-quickview__image {
    width: 50%;
}

.yshop-quickview__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.yshop-quickview__info {
    width: 50%;
    padding: 40px;
}

/* ─── Pagination ─── */
.yshop-pagination {
    text-align: center;
    padding: 30px 0;
}

.yshop-pagination ul {
    display: flex;
    justify-content: center;
    gap: 5px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.yshop-pagination li a,
.yshop-pagination li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-family: var(--yshop-font-primary);
    font-size: 14px;
    color: var(--yshop-color-text);
    border: 1px solid var(--yshop-color-border);
    transition: var(--yshop-transition);
}

.yshop-pagination li span.current,
.yshop-pagination li a:hover {
    background: var(--yshop-color-primary);
    color: #fff;
    border-color: var(--yshop-color-primary);
}

.woocommerce-pagination {
    text-align: center;
    padding: 30px 0;
}

.woocommerce-pagination ul.page-numbers {
    display: flex;
    justify-content: center;
    gap: 5px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.woocommerce-pagination .page-numbers li a,
.woocommerce-pagination .page-numbers li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-size: 14px;
    border: 1px solid var(--yshop-color-border);
    transition: var(--yshop-transition);
}

.woocommerce-pagination .page-numbers li span.current,
.woocommerce-pagination .page-numbers li a:hover {
    background: var(--yshop-color-primary);
    color: #fff;
    border-color: var(--yshop-color-primary);
}