/* Estilos personalizados para El Corazon de San Miguel */

/* FIX: WooCommerce product grid - anular columns de texto */
ul.products.columns-4 {
    columns: unset !important;
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 1.5rem !important;
}

ul.products.columns-4 li.product {
    break-inside: unset !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

@media (max-width: 768px) {
    ul.products.columns-4 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
    }
}

/* Bordes artesanales */
.artisan-border {
    border: 2px solid #6c584c;
}

.artisan-border-thick {
    border: 4px solid #6c584c;
}

/* Sombras organicas */
.organic-shadow {
    box-shadow: 0 10px 15px -3px rgba(108, 88, 76, 0.1);
}

/* Ocultar scrollbar pero mantener funcionalidad */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Estilos para botones de WooCommerce */
.woocommerce .button,
.woocommerce button.button,
.woocommerce a.button,
.woocommerce input.button {
    background-color: #a98467 !important;
    color: white !important;
    padding: 0.75rem 2rem !important;
    border-radius: 9999px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    border: 2px solid #6c584c !important;
    transition: all 0.3s ease !important;
}

.woocommerce .button:hover,
.woocommerce button.button:hover,
.woocommerce a.button:hover,
.woocommerce input.button:hover {
    background-color: #6c584c !important;
}

/* Estilos para campos de formulario */
.woocommerce input[type="text"],
.woocommerce input[type="email"],
.woocommerce input[type="tel"],
.woocommerce input[type="password"],
.woocommerce input[type="number"],
.woocommerce textarea,
.woocommerce select,
.woocommerce-page input[type="text"],
.woocommerce-page input[type="email"],
.woocommerce-page input[type="tel"],
.woocommerce-page input[type="password"],
.woocommerce-page input[type="number"],
.woocommerce-page textarea,
.woocommerce-page select {
    width: 100%;
    background-color: rgba(221, 229, 182, 0.5);
    border: 2px solid #6c584c;
    border-radius: 9999px;
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
}

.woocommerce input:focus,
.woocommerce textarea:focus,
.woocommerce select:focus,
.woocommerce-page input:focus,
.woocommerce-page textarea:focus,
.woocommerce-page select:focus {
    outline: none;
    border-color: #a98467;
    box-shadow: 0 0 0 3px rgba(169, 132, 103, 0.1);
}

/* Badges personalizados */
.product-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background-color: #adc178;
    color: #6c584c;
    font-size: 10px;
    font-weight: 800;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    text-transform: uppercase;
    border: 1px solid #6c584c;
}

.product-badge.new {
    background-color: #adc178;
    top: 1rem;
    right: 1rem;
    left: auto;
}

.product-badge.bestseller {
    background-color: #adc178;
}

.product-badge.sale {
    background-color: #a98467;
    color: white;
}

/* Transiciones suaves para imagenes de productos */
.product-image-wrapper {
    overflow: hidden;
}

.product-image-wrapper img {
    transition: transform 0.3s ease;
}

.product-image-wrapper:hover img {
    transform: scale(1.1);
}

/* Precio del producto */
.woocommerce .price {
    color: #6c584c;
    font-weight: 800;
}

.woocommerce .price del {
    color: rgba(108, 88, 76, 0.5);
    font-weight: 600;
}

.woocommerce .price ins {
    text-decoration: none;
    color: #a98467;
}

/* Mensajes de WooCommerce */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    padding: 1rem 1.5rem !important;
    border-radius: 1rem !important;
    border: 2px solid #6c584c !important;
    background-color: #dde5b6 !important;
    color: #6c584c !important;
}

.woocommerce-message::before,
.woocommerce-info::before {
    color: #adc178 !important;
}

.woocommerce-error {
    background-color: #f8d7da !important;
    border-color: #721c24 !important;
    color: #721c24 !important;
}

/* Tabs de producto */
.woocommerce-tabs ul.tabs {
    border-bottom: 2px solid #6c584c !important;
}

.woocommerce-tabs ul.tabs li {
    border: 2px solid #6c584c !important;
    background-color: #dde5b6 !important;
    border-radius: 1rem 1rem 0 0 !important;
}

.woocommerce-tabs ul.tabs li.active {
    background-color: #f0ead2 !important;
    border-bottom-color: #f0ead2 !important;
}

.woocommerce-tabs ul.tabs li a {
    color: #6c584c !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
}

/* Galeria de producto */
.woocommerce-product-gallery {
    border-radius: 1rem;
    overflow: hidden;
}

/* Cantidad de producto */
.quantity {
    display: inline-flex !important;
    align-items: center !important;
    background: rgba(221, 229, 182, 0.3);
    border-radius: 9999px;
    padding: 2px;
    border: 2px solid #6c584c;
}

.quantity input[type="number"] {
    width: 45px !important;
    height: 40px !important;
    padding: 0 !important;
    margin: 0 !important;
    text-align: center !important;
    background: transparent !important;
    border: none !important;
    font-weight: 800 !important;
    color: #6c584c !important;
    appearance: textfield !important;
    -moz-appearance: textfield !important;
}

.quantity-button {
    width: 36px !important;
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #6c584c !important;
    color: white !important;
    border-radius: 50% !important;
    border: none !important;
    cursor: pointer !important;
    font-size: 1.2rem !important;
    font-weight: bold !important;
    transition: all 0.2s ease !important;
}

.quantity-button:hover {
    background: #a98467 !important;
}

/* Carrito */
.woocommerce-cart-form {
    background-color: rgba(221, 229, 182, 0.3);
    padding: 2rem;
    border-radius: 1rem;
    border: 2px solid #6c584c;
}

/* Checkout */
.woocommerce-checkout .woocommerce-form-login,
.woocommerce-checkout .woocommerce-info {
    border-radius: 1rem !important;
    border: 2px solid #6c584c !important;
    background-color: #dde5b6 !important;
    padding: 1.5rem !important;
}

/* Menu responsive */
@media (max-width: 1024px) {
    header nav {
        display: none;
    }
}

/* Grid de productos responsive en front-page */
.product-grid-responsive {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem !important;
}

@media (min-width: 640px) {
    .product-grid-responsive {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
    }
}

@media (min-width: 1024px) {
    .product-grid-responsive {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 2rem !important;
    }
}

/* Product cards en grid - alinear boton al fondo */
.product-grid-responsive .wc-block-product-template>li,
.product-grid-responsive .wp-block-post {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    background: white !important;
    border-radius: 1rem !important;
    border: 2px solid #6c584c !important;
    overflow: hidden !important;
    padding-bottom: 1rem !important;
}

.product-grid-responsive .wc-block-components-product-image {
    aspect-ratio: 1 !important;
    overflow: hidden !important;
    background: #f0ead2 !important;
}

.product-grid-responsive .wc-block-components-product-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    padding: 0.5rem !important;
}

.product-grid-responsive .wp-block-post-title,
.product-grid-responsive .wc-block-components-product-title {
    font-size: 0.875rem !important;
    font-weight: 700 !important;
    color: #6c584c !important;
    padding: 0.5rem 0.75rem 0 !important;
    margin: 0 !important;
    flex-grow: 0 !important;
}

@media (min-width: 768px) {

    .product-grid-responsive .wp-block-post-title,
    .product-grid-responsive .wc-block-components-product-title {
        font-size: 1rem !important;
        padding: 0.75rem 1rem 0 !important;
    }
}

.product-grid-responsive .wc-block-components-product-price {
    font-size: 1rem !important;
    font-weight: 800 !important;
    color: #a98467 !important;
    padding: 0.25rem 0.75rem !important;
    flex-grow: 1 !important;
}

@media (min-width: 768px) {
    .product-grid-responsive .wc-block-components-product-price {
        font-size: 1.125rem !important;
        padding: 0.5rem 1rem !important;
    }
}

.product-grid-responsive .wc-block-components-product-button {
    margin-top: auto !important;
    padding: 0 0.75rem !important;
}

@media (min-width: 768px) {
    .product-grid-responsive .wc-block-components-product-button {
        padding: 0 1rem !important;
    }
}

.product-grid-responsive .wc-block-components-product-button a,
.product-grid-responsive .wc-block-components-product-button button {
    width: 100% !important;
    background: #a98467 !important;
    color: white !important;
    border: 2px solid #6c584c !important;
    border-radius: 9999px !important;
    padding: 0.5rem 1rem !important;
    font-weight: 700 !important;
    font-size: 0.75rem !important;
    text-transform: uppercase !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.25rem !important;
}

@media (min-width: 768px) {

    .product-grid-responsive .wc-block-components-product-button a,
    .product-grid-responsive .wc-block-components-product-button button {
        padding: 0.75rem 1.5rem !important;
        font-size: 0.875rem !important;
    }
}

.product-grid-responsive .wc-block-components-product-button a:hover,
.product-grid-responsive .wc-block-components-product-button button:hover {
    background: #6c584c !important;
}

/* Ajustes responsive para hero */
@media (max-width: 768px) {
    .aspect-\[21\/9\] {
        aspect-ratio: 16/9;
    }
}

/* Animaciones suaves */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Fix para iconos de Material Symbols */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ============================================
   SINGLE PRODUCT PAGE - Custom Styles
   ============================================ */

/* Tabs personalizados */
.product-tabs .tab-btn {
    background-color: #dde5b6;
    color: #6c584c;
    border: 2px solid transparent;
}

.product-tabs .tab-btn:hover {
    background-color: #adc178;
}

.product-tabs .tab-btn.active {
    background-color: #a98467;
    color: white;
    border-color: #6c584c;
}

/* Formulario de compra - variaciones */
.product-purchase-form .variations {
    margin-bottom: 1.5rem;
}

.product-purchase-form .variations table {
    width: 100%;
    border-collapse: collapse;
}

.product-purchase-form .variations tr {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.product-purchase-form .variations .label {
    min-width: 80px;
    margin-bottom: 0;
}

.product-purchase-form .variations .label label {
    font-weight: 700;
    color: #6c584c;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.product-purchase-form .variations td.value {
    flex: 1;
}

.product-purchase-form .variations select {
    width: 100%;
    max-width: 200px;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    border: 2px solid #6c584c;
    background-color: rgba(221, 229, 182, 0.5);
    font-weight: 600;
    font-size: 0.875rem;
    color: #6c584c;
}

.product-purchase-form .variations select:focus {
    outline: none;
    border-color: #a98467;
    box-shadow: 0 0 0 3px rgba(169, 132, 103, 0.2);
}

/* Cantidad y boton de agregar */
.product-purchase-form .single_add_to_cart_button {
    width: 100%;
    background-color: #a98467 !important;
    color: white !important;
    padding: 1rem 2rem !important;
    border-radius: 9999px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    border: 2px solid #6c584c !important;
    font-size: 1rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    transition: all 0.3s ease !important;
    margin-top: 1.5rem !important;
}

.product-purchase-form .single_add_to_cart_button:hover {
    background-color: #6c584c !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 88, 76, 0.3);
}

.product-purchase-form .quantity {
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.product-purchase-form .quantity .qty {
    width: 70px !important;
    padding: 0.5rem 0.5rem !important;
    border-radius: 9999px !important;
    border: 2px solid #6c584c !important;
    text-align: center !important;
    font-weight: 700;
    font-size: 1rem;
    -moz-appearance: textfield;
}

.product-purchase-form .quantity .qty::-webkit-outer-spin-button,
.product-purchase-form .quantity .qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Reset button (limpiar variacion) */
.product-purchase-form .reset_variations {
    color: #a98467;
    font-weight: 600;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: inline-block;
}

.product-purchase-form .reset_variations:hover {
    color: #6c584c;
    text-decoration: underline;
}

/* Reviews Container */
.reviews-container .commentlist {
    list-style: none;
    padding: 0;
    margin: 0;
}

.reviews-container .comment {
    padding: 1.5rem;
    margin-bottom: 1rem;
    background-color: #f0ead2;
    border-radius: 1rem;
    border: 2px solid rgba(108, 88, 76, 0.1);
}

.reviews-container .comment .meta {
    margin-bottom: 0.75rem;
}

.reviews-container .comment .meta strong {
    color: #6c584c;
    font-weight: 700;
}

.reviews-container .comment .meta time {
    color: rgba(108, 88, 76, 0.6);
    font-size: 0.875rem;
}

.reviews-container .star-rating {
    color: #a98467;
    margin-bottom: 0.5rem;
}

.reviews-container .description p {
    color: rgba(108, 88, 76, 0.8);
    line-height: 1.6;
}

/* Review Form */
.reviews-container #review_form_wrapper {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid rgba(108, 88, 76, 0.1);
}

.reviews-container #reply-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #6c584c;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.reviews-container .comment-form-rating {
    margin-bottom: 1.5rem;
}

.reviews-container .comment-form-rating label {
    font-weight: 700;
    color: #6c584c;
    margin-bottom: 0.5rem;
    display: block;
}

.reviews-container .stars {
    display: flex;
    gap: 0.25rem;
}

.reviews-container .stars a {
    color: #a98467;
    font-size: 1.5rem;
}

.reviews-container .comment-form-comment textarea {
    width: 100%;
    min-height: 120px;
    padding: 1rem;
    border-radius: 1rem;
    border: 2px solid #6c584c;
    background-color: rgba(221, 229, 182, 0.3);
    resize: vertical;
}

.reviews-container .comment-form-comment textarea:focus {
    outline: none;
    border-color: #a98467;
    box-shadow: 0 0 0 3px rgba(169, 132, 103, 0.2);
}

.reviews-container .form-submit input[type="submit"] {
    background-color: #a98467 !important;
    color: white !important;
    padding: 0.875rem 2rem !important;
    border-radius: 9999px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    border: 2px solid #6c584c !important;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reviews-container .form-submit input[type="submit"]:hover {
    background-color: #6c584c !important;
}

/* Prose styles para descripcion */
.prose {
    max-width: none;
}

.prose p {
    margin-bottom: 1rem;
    line-height: 1.75;
}

.prose h2,
.prose h3,
.prose h4 {
    color: #6c584c;
    font-weight: 800;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.prose ul,
.prose ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.prose li {
    margin-bottom: 0.5rem;
}

/* Line clamp para titulos */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Sticky info del producto */
@media (min-width: 1024px) {
    .sticky {
        position: sticky;
    }
}

/* Responsive ajustes para galeria */
@media (max-width: 1024px) {
    .single-product-wrapper .lg\:flex-row {
        flex-direction: column;
    }

    .single-product-wrapper .lg\:w-3\/5,
    .single-product-wrapper .lg\:w-2\/5 {
        width: 100%;
    }
}

/* Zoom en hover para imagen principal del producto */
.single-product-wrapper .aspect-square {
    overflow: hidden;
    cursor: zoom-in;
}

.single-product-wrapper #main-product-image {
    transition: transform 0.4s ease, opacity 0.3s ease;
}

.single-product-wrapper .aspect-square:hover #main-product-image {
    transform: scale(1.5);
}

/* Lightbox overlay */
#product-lightbox {
    cursor: zoom-out;
}

#product-lightbox img {
    cursor: default;
}

/* WooCommerce single product - usar estilos nativos */


/* ============================================
   CART COUNTER & NOTIFICATIONS
   ============================================ */

/* Animacion del contador de carrito */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Notificacion personalizada */
.custom-notification {
    animation: slideInRight 0.3s ease;
    box-shadow: 0 4px 12px rgba(108, 88, 76, 0.2);
}

/* Bounce animation para el icono del carrito */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-bounce {
    animation: bounce 0.6s ease;
}

/* Contador del carrito - transiciones suaves */
.cart-count {
    transition: all 0.3s ease;
}

/* Asegurar que el contador sea visible */
#cart-icon {
    position: relative;
}

#cart-icon .cart-count {
    pointer-events: none;
}