/**
 * La Finca Product Cards - Estilos principales
 * Un diseño elegante, minimalista y moderno para tarjetas de producto
 * 
 * @package La_Finca_Product_Cards
 */

/* =========================================
   CSS Variables & Theme
   ========================================= */
:root {
    /* Colores principales */
    --lfc-primary: color(srgb 0.9999 1 1);
    --lfc-primary-light: #ffffff;
    --lfc-primary-dark: #f5f5f5;
    --lfc-accent: #8b9d77;
    --lfc-accent-light: #a8b896;
    
    /* Colores neutros */
    --lfc-white: #ffffff;
    --lfc-off-white: #faf9f7;
    --lfc-cream: #f5f3ef;
    --lfc-gray-100: #f7f7f5;
    --lfc-gray-200: #ebebeb;
    --lfc-gray-300: #d4d4d4;
    --lfc-gray-400: #a3a3a3;
    --lfc-gray-500: #737373;
    --lfc-gray-600: #525252;
    --lfc-gray-700: #404040;
    --lfc-gray-800: #262626;
    --lfc-gray-900: #171717;
    
    /* Colores de estado */
    --lfc-success: #4a7c59;
    --lfc-warning: #d4a72c;
    --lfc-error: #b54747;
    --lfc-info: #4a6fa5;
    
    /* Tipografía */
    --lfc-font-display: 'poppins', Georgia, 'Times New Roman', serif;
    --lfc-font-body: 'poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Espaciado */
    --lfc-space-xs: 0.25rem;
    --lfc-space-sm: 0.5rem;
    --lfc-space-md: 1rem;
    --lfc-space-lg: 1.5rem;
    --lfc-space-xl: 2rem;
    --lfc-space-2xl: 3rem;
    
    /* Bordes y sombras */
    --lfc-radius-sm: 4px;
    --lfc-radius-md: 8px;
    --lfc-radius-lg: 12px;
    --lfc-radius-xl: 16px;
    --lfc-radius-full: 9999px;
    
    --lfc-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --lfc-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --lfc-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);
    --lfc-shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.1);
    --lfc-shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.12);
    
    /* Transiciones */
    --lfc-transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --lfc-transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --lfc-transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
    --lfc-transition-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
    
    /* Grid */
    --lfc-columns: 4;
    --lfc-gap: 1.5rem;
}

/* =========================================
   Grid de productos
   ========================================= */
.lfc-products-grid {
    display: grid;
    grid-template-columns: repeat(var(--lfc-columns, 4), 1fr);
    gap: var(--lfc-gap);
    padding: var(--lfc-space-md);
}

/* Fix para pseudo-elementos de WooCommerce que crean espacios */
.woocommerce ul.products.lfc-products-grid::before,
.woocommerce ul.products.lfc-products-grid::after,
.woocommerce-page ul.products.lfc-products-grid::before,
.woocommerce-page ul.products.lfc-products-grid::after,
ul.products.lfc-products-grid::before,
ul.products.lfc-products-grid::after {
    content: none !important;
    display: none !important;
}

/* Grid responsivo */
@media (max-width: 1200px) {
    .lfc-products-grid {
        --lfc-columns: 3;
    }
}

@media (max-width: 900px) {
    .lfc-products-grid {
        --lfc-columns: 2;
    }
}

@media (max-width: 540px) {
    .lfc-products-grid {
        --lfc-columns: 1;
        --lfc-gap: 1.25rem;
    }
}

/* Shortcode grid override */
.lfc-shortcode-grid {
    padding: 0;
}

/* =========================================
   Tarjeta de producto base
   ========================================= */
.lfc-product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--lfc-white);
    border-radius: var(--lfc-radius-lg);
    overflow: hidden;
    transition: box-shadow var(--lfc-transition-slow);
    box-shadow: var(--lfc-shadow-sm);
    transform: none !important;
}

.lfc-product-card:hover {
    box-shadow: var(--lfc-shadow-hover);
    transform: none !important;
}

/* Ocultar elementos default de WooCommerce */
.lfc-product-card .woocommerce-loop-product__link,
.lfc-product-card .woocommerce-LoopProduct-link {
    display: none !important;
}

/* =========================================
   Estilos de tarjeta
   ========================================= */
/* Estilo Minimalista */
.lfc-style-minimal {
    border: 1px solid var(--lfc-gray-200);
}

.lfc-style-minimal:hover {
    border-color: var(--lfc-gray-300);
}

/* Estilo Elegante */
.lfc-style-elegant {
    background: linear-gradient(180deg, var(--lfc-white) 0%, var(--lfc-cream) 100%);
    box-shadow: var(--lfc-shadow-md);
}

.lfc-style-elegant .lfc-card-content {
    padding: var(--lfc-space-lg) var(--lfc-space-xl) var(--lfc-space-xl);
}

.lfc-style-elegant .lfc-card-title a {
    font-weight: 500;
}

/* Estilo Moderno */
.lfc-style-modern {
    border-radius: var(--lfc-radius-xl);
    background: var(--lfc-white);
}

.lfc-style-modern .lfc-card-image-wrapper {
    border-radius: var(--lfc-radius-lg);
    margin: var(--lfc-space-sm);
    overflow: hidden;
}

.lfc-style-modern .lfc-add-to-cart-btn {
    border-radius: var(--lfc-radius-full);
}

/* =========================================
   Imagen del producto
   ========================================= */
.lfc-card-image-wrapper {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--lfc-gray-100);
}

.lfc-card-image-link {
    display: block;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lfc-product-image,
.lfc-product-image-secondary {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform var(--lfc-transition-slow), 
                opacity var(--lfc-transition-base);
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Imagen secundaria (hover) */
.lfc-card-image-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity var(--lfc-transition-slow);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lfc-product-card:hover .lfc-card-image-hover {
    opacity: 1;
}

/* Sin zoom en hover, solo cambio de imagen */

/* =========================================
   Badges
   ========================================= */
.lfc-card-badges {
    position: absolute;
    top: var(--lfc-space-md);
    left: var(--lfc-space-md);
    display: flex;
    flex-direction: column;
    gap: var(--lfc-space-xs);
    z-index: 5;
}

.lfc-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35em 0.75em;
    font-family: var(--lfc-font-body);
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--lfc-radius-sm);
    line-height: 1;
}

.lfc-badge-sale {
    background: var(--lfc-primary);
    color: var(--lfc-white);
}

.lfc-badge-new {
    background: var(--lfc-accent);
    color: var(--lfc-white);
}

.lfc-badge-featured {
    background: var(--lfc-warning);
    color: var(--lfc-gray-800);
}

.lfc-badge-outofstock {
    background: var(--lfc-gray-600);
    color: var(--lfc-white);
}

/* =========================================
   Quick Actions (favoritos, vista rápida)
   ========================================= */
.lfc-card-quick-actions {
    position: absolute;
    top: var(--lfc-space-md);
    right: var(--lfc-space-md);
    display: flex;
    flex-direction: column;
    gap: var(--lfc-space-xs);
    opacity: 0;
    transform: translateX(8px);
    transition: opacity var(--lfc-transition-base), 
                transform var(--lfc-transition-base);
    z-index: 5;
}

.lfc-product-card:hover .lfc-card-quick-actions {
    opacity: 1;
    transform: translateX(0);
}

.lfc-quick-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--lfc-white);
    border: none;
    border-radius: var(--lfc-radius-full);
    box-shadow: var(--lfc-shadow-md);
    cursor: pointer;
    transition: background var(--lfc-transition-fast), 
                transform var(--lfc-transition-fast),
                color var(--lfc-transition-fast);
    color: var(--lfc-gray-600);
}

.lfc-quick-action:hover {
    background: var(--lfc-primary);
    color: var(--lfc-white);
    transform: scale(1.1);
}

.lfc-quick-action svg {
    width: 18px;
    height: 18px;
}

.lfc-quick-action.lfc-wishlist.active {
    background: var(--lfc-error);
    color: var(--lfc-white);
}

.lfc-quick-action.lfc-wishlist.active svg {
    fill: currentColor;
}

/* =========================================
   Contenido de la tarjeta
   ========================================= */
.lfc-card-content {
    display: flex;
    flex-direction: column;
    gap: var(--lfc-space-sm);
    padding: var(--lfc-space-md) var(--lfc-space-lg) var(--lfc-space-lg);
    flex: 1;
}

/* Fila superior: Categoría + Stock */
.lfc-card-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--lfc-space-sm);
}

/* Categoría */
.lfc-card-category {
    font-family: var(--lfc-font-body);
    font-size: 0.7rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--lfc-gray-500);
    text-decoration: none;
    transition: color var(--lfc-transition-fast);
}

.lfc-card-category:hover {
    color: var(--lfc-primary);
}

/* Título */
.lfc-card-title {
    margin: 0;
    font-family: var(--lfc-font-display);
    font-size: 1.15rem;
    font-weight: 400;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.lfc-card-title a {
    color: var(--lfc-gray-800);
    text-decoration: none;
    transition: color var(--lfc-transition-fast);
}

.lfc-card-title a:hover {
    color: var(--lfc-primary);
}

/* =========================================
   Rating / Valoraciones
   ========================================= */
.lfc-card-rating {
    display: flex;
    align-items: center;
    gap: var(--lfc-space-xs);
}

.lfc-stars {
    display: flex;
    gap: 2px;
}

.lfc-star {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: var(--lfc-gray-300);
    stroke-width: 1.5;
}

.lfc-star.filled {
    fill: var(--lfc-warning);
    stroke: var(--lfc-warning);
}

.lfc-review-count {
    font-family: var(--lfc-font-body);
    font-size: 0.75rem;
    color: var(--lfc-gray-500);
}

/* =========================================
   Precio
   ========================================= */
.lfc-card-price {
    display: flex;
    align-items: baseline;
    gap: var(--lfc-space-sm);
    flex-wrap: wrap;
    font-family: var(--lfc-font-body);
}

.lfc-card-price .woocommerce-Price-amount,
.lfc-card-price .price {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--lfc-gray-800);
}

.lfc-card-price del {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--lfc-gray-400);
    text-decoration: line-through;
    order: -1;
}

.lfc-card-price del .woocommerce-Price-amount {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--lfc-gray-400);
}

.lfc-card-price ins {
    text-decoration: none;
}

.lfc-card-price ins .woocommerce-Price-amount {
    font-size: 1.25rem;
    font-weight: 700;
    color: #e53935;
}

/* Precio desde - hasta para variables */
.lfc-card-price .price del + ins {
    margin-left: 0;
}

/* =========================================
   Stock
   ========================================= */
.lfc-card-stock {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: var(--lfc-font-body);
    font-size: 0.65rem;
    color: var(--lfc-success);
    white-space: nowrap;
}

.lfc-stock-indicator {
    width: 6px;
    height: 6px;
    border-radius: var(--lfc-radius-full);
    background: var(--lfc-success);
}

.lfc-card-stock.low-stock .lfc-stock-indicator {
    background: var(--lfc-warning);
}

.lfc-card-stock.low-stock {
    color: var(--lfc-warning);
}

/* =========================================
   Variaciones
   ========================================= */
.lfc-card-variations {
    display: flex;
    flex-direction: column;
    gap: var(--lfc-space-sm);
    margin-top: var(--lfc-space-xs);
}

.lfc-variation-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.lfc-variation-label {
    font-family: var(--lfc-font-body);
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--lfc-gray-600);
}

.lfc-variation-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Botón de variación base */
.lfc-variation-option {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    font-family: var(--lfc-font-body);
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--lfc-gray-700);
    background: var(--lfc-white);
    border: 1px solid var(--lfc-gray-300);
    border-radius: var(--lfc-radius-sm);
    cursor: pointer;
    transition: all var(--lfc-transition-fast);
}

.lfc-variation-option:hover {
    border-color: var(--lfc-gray-500);
    background: var(--lfc-gray-100);
}

.lfc-variation-option.selected {
    border-color: var(--lfc-primary);
    background: var(--lfc-primary);
    color: var(--lfc-white);
}

/* Opción de color (swatch) */
.lfc-option-color {
    width: 28px;
    height: 28px;
    min-width: 28px;
    padding: 3px;
    border-radius: var(--lfc-radius-full);
    border: 2px solid var(--lfc-gray-200);
}

.lfc-option-color .lfc-color-swatch {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: var(--lfc-radius-full);
    background: var(--swatch-color, var(--lfc-gray-400));
}

.lfc-option-color:hover {
    border-color: var(--lfc-gray-400);
}

.lfc-option-color.selected {
    border-color: var(--lfc-primary);
    background: transparent;
}

/* Opción de talla */
.lfc-option-size {
    min-width: 36px;
    font-weight: 500;
}

/* =========================================
   Área de compra
   ========================================= */
.lfc-card-purchase {
    display: flex;
    align-items: stretch;
    gap: var(--lfc-space-sm);
    margin-top: auto;
    padding-top: var(--lfc-space-md);
}

/* Selector de cantidad */
.lfc-quantity-wrapper {
    display: flex;
    align-items: center;
    background: var(--lfc-gray-100);
    border-radius: var(--lfc-radius-md);
    overflow: hidden;
}

.lfc-qty-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 40px;
    padding: 0;
    background: transparent;
    border: none;
    color: var(--lfc-gray-600);
    cursor: pointer;
    transition: background var(--lfc-transition-fast), 
                color var(--lfc-transition-fast);
}

.lfc-qty-btn:hover {
    background: var(--lfc-gray-200);
    color: var(--lfc-gray-800);
}

.lfc-qty-btn svg {
    width: 14px;
    height: 14px;
}

.lfc-quantity-input {
    width: 40px;
    height: 40px;
    padding: 0;
    font-family: var(--lfc-font-body);
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    color: var(--lfc-gray-800);
    background: transparent;
    border: none;
    outline: none;
    -moz-appearance: textfield;
}

.lfc-quantity-input::-webkit-outer-spin-button,
.lfc-quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* =========================================
   Botón añadir al carrito
   ========================================= */
.lfc-add-to-cart-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--lfc-space-sm);
    flex: 1;
    height: 40px;
    padding: 0 var(--lfc-space-md);
    font-family: var(--lfc-font-body);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--lfc-white);
    background: var(--lfc-primary);
    border: none;
    border-radius: var(--lfc-radius-md);
    cursor: pointer;
    overflow: hidden;
    transition: background var(--lfc-transition-fast),
                transform var(--lfc-transition-fast),
                box-shadow var(--lfc-transition-fast);
}

.lfc-add-to-cart-btn:hover:not(:disabled) {
    background: var(--lfc-primary-light);
    box-shadow: 0 4px 12px rgba(44, 62, 45, 0.25);
}

.lfc-add-to-cart-btn:active:not(:disabled) {
    transform: scale(0.98);
}

.lfc-add-to-cart-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Iconos del botón */
.lfc-btn-icon svg,
.lfc-btn-loading svg,
.lfc-btn-success svg {
    width: 16px;
    height: 16px;
}

.lfc-btn-loading,
.lfc-btn-success {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity var(--lfc-transition-fast), 
                transform var(--lfc-transition-fast);
}

/* Estados del botón */
.lfc-add-to-cart-btn.loading {
    pointer-events: none;
}

.lfc-add-to-cart-btn.loading .lfc-btn-text,
.lfc-add-to-cart-btn.loading .lfc-btn-icon {
    opacity: 0;
}

.lfc-add-to-cart-btn.loading .lfc-btn-loading {
    opacity: 1;
    transform: scale(1);
}

.lfc-add-to-cart-btn.success {
    background: var(--lfc-success);
}

.lfc-add-to-cart-btn.success .lfc-btn-text,
.lfc-add-to-cart-btn.success .lfc-btn-icon {
    opacity: 0;
}

.lfc-add-to-cart-btn.success .lfc-btn-success {
    opacity: 1;
    transform: scale(1);
}

/* Spinner */
.lfc-spinner {
    animation: lfc-spin 1s linear infinite;
}

@keyframes lfc-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Producto variable sin selección */
.lfc-add-to-cart-btn.lfc-variable-product {
    background: var(--lfc-gray-200);
    color: var(--lfc-gray-600);
}

.lfc-add-to-cart-btn.lfc-variable-product:hover:not(:disabled) {
    background: var(--lfc-gray-300);
    box-shadow: none;
}

.lfc-add-to-cart-btn.lfc-variable-product.ready {
    background: var(--lfc-primary);
    color: var(--lfc-white);
}

.lfc-add-to-cart-btn.lfc-variable-product.ready:hover:not(:disabled) {
    background: var(--lfc-primary-light);
    box-shadow: 0 4px 12px rgba(44, 62, 45, 0.25);
}

/* =========================================
   Producto agotado
   ========================================= */
.lfc-card-purchase.lfc-out-of-stock {
    justify-content: center;
}

.lfc-view-product-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 40px;
    padding: 0 var(--lfc-space-md);
    font-family: var(--lfc-font-body);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--lfc-gray-600);
    background: var(--lfc-gray-100);
    border: 1px solid var(--lfc-gray-200);
    border-radius: var(--lfc-radius-md);
    text-decoration: none;
    transition: background var(--lfc-transition-fast),
                border-color var(--lfc-transition-fast);
}

.lfc-view-product-btn:hover {
    background: var(--lfc-gray-200);
    border-color: var(--lfc-gray-300);
}

/* =========================================
   Animaciones de entrada
   ========================================= */
.lfc-animate {
    animation: lfc-fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
}

@keyframes lfc-fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger animation para grid */
.lfc-products-grid .lfc-product-card:nth-child(1) { animation-delay: 0ms; }
.lfc-products-grid .lfc-product-card:nth-child(2) { animation-delay: 50ms; }
.lfc-products-grid .lfc-product-card:nth-child(3) { animation-delay: 100ms; }
.lfc-products-grid .lfc-product-card:nth-child(4) { animation-delay: 150ms; }
.lfc-products-grid .lfc-product-card:nth-child(5) { animation-delay: 200ms; }
.lfc-products-grid .lfc-product-card:nth-child(6) { animation-delay: 250ms; }
.lfc-products-grid .lfc-product-card:nth-child(7) { animation-delay: 300ms; }
.lfc-products-grid .lfc-product-card:nth-child(8) { animation-delay: 350ms; }
.lfc-products-grid .lfc-product-card:nth-child(n+9) { animation-delay: 400ms; }

/* =========================================
   Notificación Toast
   ========================================= */
.lfc-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: var(--lfc-space-md);
    padding: var(--lfc-space-md) var(--lfc-space-lg);
    background: var(--lfc-gray-800);
    color: var(--lfc-white);
    border-radius: var(--lfc-radius-md);
    box-shadow: var(--lfc-shadow-xl);
    z-index: 9999;
    transform: translateY(100px);
    opacity: 0;
    transition: transform var(--lfc-transition-bounce),
                opacity var(--lfc-transition-base);
}

.lfc-toast.visible {
    transform: translateY(0);
    opacity: 1;
}

.lfc-toast-message {
    font-family: var(--lfc-font-body);
    font-size: 0.9rem;
}

.lfc-toast-link {
    font-family: var(--lfc-font-body);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--lfc-accent-light);
    text-decoration: none;
    white-space: nowrap;
}

.lfc-toast-link:hover {
    text-decoration: underline;
}

.lfc-toast-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    margin-left: var(--lfc-space-sm);
    background: transparent;
    border: none;
    color: var(--lfc-gray-400);
    cursor: pointer;
    transition: color var(--lfc-transition-fast);
}

.lfc-toast-close:hover {
    color: var(--lfc-white);
}

.lfc-toast-close svg {
    width: 16px;
    height: 16px;
}

/* =========================================
   Actualización del contador del carrito
   ========================================= */
@keyframes lfc-cartBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.lfc-cart-updated {
    animation: lfc-cartBounce 0.4s ease;
}

/* =========================================
   Compatibilidad con Divi y otros temas
   ========================================= */

/* Reset WooCommerce defaults */
.woocommerce ul.products li.product .lfc-product-card,
.woocommerce-page ul.products li.product .lfc-product-card {
    text-align: left;
}

.woocommerce ul.products.lfc-products-grid li.product,
.woocommerce-page ul.products.lfc-products-grid li.product {
    float: none;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Divi specifics */
.et_pb_shop .lfc-products-grid,
.et_pb_module .lfc-products-grid {
    display: grid !important;
}

.et_pb_shop ul.products.lfc-products-grid,
.et_pb_wc_related_products ul.products.lfc-products-grid {
    margin: 0 !important;
}

.et_pb_shop .lfc-product-card,
.et_pb_wc_related_products .lfc-product-card {
    text-align: left;
}

/* Astra theme */
.ast-woocommerce .lfc-products-grid .lfc-product-card {
    background: var(--lfc-white);
}

/* OceanWP theme */
.oceanwp-theme .lfc-products-grid .lfc-product-card {
    margin: 0;
}

/* Flatsome theme */
.flatsome .lfc-products-grid .lfc-product-card {
    box-shadow: var(--lfc-shadow-sm);
}

/* Storefront theme */
.storefront .lfc-products-grid {
    padding-left: 0;
    padding-right: 0;
}

/* GeneratePress theme */
.generate-columns .lfc-products-grid {
    margin: 0;
}

/* =========================================
   Media Queries adicionales
   ========================================= */

/* Tablets */
@media (max-width: 900px) {
    .lfc-card-content {
        padding: var(--lfc-space-sm) var(--lfc-space-md) var(--lfc-space-md);
    }
    
    .lfc-card-title {
        font-size: 1.05rem;
    }
    
    .lfc-card-purchase {
        flex-direction: column;
    }
    
    .lfc-quantity-wrapper {
        align-self: flex-start;
    }
}

/* Móviles */
@media (max-width: 540px) {
    :root {
        --lfc-gap: 1rem;
    }
    
    .lfc-card-image-wrapper {
        aspect-ratio: 1 / 1;
    }
    
    .lfc-card-badges {
        top: var(--lfc-space-sm);
        left: var(--lfc-space-sm);
    }
    
    .lfc-card-quick-actions {
        top: var(--lfc-space-sm);
        right: var(--lfc-space-sm);
        opacity: 1;
        transform: translateX(0);
    }
    
    .lfc-quick-action {
        width: 32px;
        height: 32px;
    }
    
    .lfc-badge {
        font-size: 0.65rem;
    }
    
    .lfc-toast {
        left: 16px;
        right: 16px;
        bottom: 16px;
    }
}

/* Preferencia de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
    .lfc-animate {
        animation: none;
        opacity: 1;
    }
    
    .lfc-product-card,
    .lfc-product-card *,
    .lfc-toast {
        transition-duration: 0ms !important;
    }
}

/* Modo oscuro (si el tema lo soporta) */
@media (prefers-color-scheme: dark) {
    .lfc-products-grid.lfc-dark-mode {
        --lfc-white: #1a1a1a;
        --lfc-off-white: #222222;
        --lfc-cream: #252525;
        --lfc-gray-100: #2a2a2a;
        --lfc-gray-200: #333333;
        --lfc-gray-300: #444444;
        --lfc-gray-400: #666666;
        --lfc-gray-500: #888888;
        --lfc-gray-600: #aaaaaa;
        --lfc-gray-700: #cccccc;
        --lfc-gray-800: #e5e5e5;
        --lfc-gray-900: #f5f5f5;
    }
}

/* =========================================
   Precio por taza (Card)
   ========================================= */
.lfc-price-per-cup {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-top: 2px;
}

.lfc-cup-icon {
    width: 12px;
    height: 12px;
    color: var(--lfc-gray-500);
    flex-shrink: 0;
}

.lfc-cup-price {
    font-family: var(--lfc-font-body);
    font-size: 0.65rem;
    font-weight: 400;
    color: var(--lfc-gray-500);
}

.lfc-cup-price .woocommerce-Price-amount {
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--lfc-gray-500);
}

.lfc-cup-price .woocommerce-Price-currencySymbol {
    font-size: 0.6rem;
}

/* =========================================
   Indicador de intensidad en Card (mini)
   ========================================= */
.lfc-card-intensity {
    position: absolute;
    bottom: var(--lfc-space-sm);
    left: var(--lfc-space-sm);
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 6px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    border-radius: var(--lfc-radius-sm);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    z-index: 5;
}

.lfc-intensity-mini-bars {
    display: flex;
    align-items: center;
    gap: 2px;
}

.lfc-intensity-mini-bar {
    width: 6px;
    height: 10px;
    background: var(--lfc-gray-300);
    border-radius: 1px;
    transition: background var(--lfc-transition-fast);
}

/* Barras activas - colores progresivos café */
.lfc-intensity-mini-bar:nth-child(1).active { background: #d4a574; }
.lfc-intensity-mini-bar:nth-child(2).active { background: #c49463; }
.lfc-intensity-mini-bar:nth-child(3).active { background: #b48352; }
.lfc-intensity-mini-bar:nth-child(4).active { background: #a47241; }
.lfc-intensity-mini-bar:nth-child(5).active { background: #946130; }
.lfc-intensity-mini-bar:nth-child(6).active { background: #84501f; }
.lfc-intensity-mini-bar:nth-child(7).active { background: #74420e; }
.lfc-intensity-mini-bar:nth-child(8).active { background: #633600; }
.lfc-intensity-mini-bar:nth-child(9).active { background: #4d2a00; }
.lfc-intensity-mini-bar:nth-child(10).active { background: #3a2000; }

/* =========================================
   Detalles del café (Página del producto)
   ========================================= */
.lfc-coffee-details {
    margin: var(--lfc-space-lg, 1.5rem) 0;
    padding: var(--lfc-space-lg, 1.5rem);
    background: linear-gradient(135deg, var(--lfc-cream, #f5f3ef) 0%, var(--lfc-off-white, #faf9f7) 100%);
    border-radius: var(--lfc-radius-lg, 12px);
    border: 1px solid var(--lfc-gray-200, #ebebeb);
}

.lfc-coffee-details-title {
    margin: 0 0 var(--lfc-space-md, 1rem) 0;
    font-family: var(--lfc-font-display, 'Cormorant Garamond', Georgia, serif);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--lfc-gray-800, #262626);
    display: flex;
    align-items: center;
    gap: var(--lfc-space-sm, 0.5rem);
}

.lfc-coffee-details-title::before {
    content: "☕";
    font-size: 1.1rem;
}

.lfc-coffee-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--lfc-space-md, 1rem);
}

.lfc-coffee-detail-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: var(--lfc-space-sm, 0.5rem) 0;
}

.lfc-detail-label {
    font-family: var(--lfc-font-body, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--lfc-gray-500, #737373);
}

.lfc-detail-value {
    font-family: var(--lfc-font-body, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--lfc-gray-800, #262626);
}

/* Medidor de intensidad */
.lfc-intensity-meter {
    display: flex;
    align-items: center;
    gap: var(--lfc-space-sm, 0.5rem);
}

.lfc-intensity-bars {
    display: flex;
    gap: 3px;
}

.lfc-intensity-bar {
    width: 8px;
    height: 20px;
    background: var(--lfc-gray-200, #ebebeb);
    border-radius: 2px;
    transition: background var(--lfc-transition-fast, 150ms);
}

.lfc-intensity-bar.active {
    background: linear-gradient(180deg, #8b5a2b 0%, #5d3a1a 100%);
}

/* Intensidad progresiva - colores más oscuros a medida que aumenta */
.lfc-intensity-bar:nth-child(1).active { background: #d4a574; }
.lfc-intensity-bar:nth-child(2).active { background: #c49463; }
.lfc-intensity-bar:nth-child(3).active { background: #b48352; }
.lfc-intensity-bar:nth-child(4).active { background: #a47241; }
.lfc-intensity-bar:nth-child(5).active { background: #946130; }
.lfc-intensity-bar:nth-child(6).active { background: #84501f; }
.lfc-intensity-bar:nth-child(7).active { background: #74420e; }
.lfc-intensity-bar:nth-child(8).active { background: #633600; }
.lfc-intensity-bar:nth-child(9).active { background: #4d2a00; }
.lfc-intensity-bar:nth-child(10).active { background: #3a2000; }

.lfc-intensity-value {
    font-family: var(--lfc-font-body, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--lfc-gray-700, #404040);
}

/* Precio por taza en ficha del producto */
.lfc-detail-price {
    display: flex;
    align-items: center;
    gap: 6px;
}

.lfc-detail-cup-icon {
    width: 18px;
    height: 18px;
    color: var(--lfc-accent, #8b9d77);
    flex-shrink: 0;
}

.lfc-detail-price .woocommerce-Price-amount {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--lfc-gray-800, #262626);
}

/* Responsive para detalles del café */
@media (max-width: 540px) {
    .lfc-coffee-details {
        padding: var(--lfc-space-md, 1rem);
    }
    
    .lfc-coffee-details-grid {
        grid-template-columns: 1fr;
    }
    
    .lfc-intensity-bar {
        width: 6px;
        height: 16px;
    }
}

/* =========================================
   Notificación moderna de carrito
   ========================================= */
.lfc-cart-notification {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 380px;
    max-width: calc(100vw - 48px);
    background: var(--lfc-white);
    border-radius: var(--lfc-radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 8px 25px rgba(0, 0, 0, 0.1);
    z-index: 99999;
    transform: translateY(120%) scale(0.95);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.3s ease,
                visibility 0.3s ease;
    overflow: hidden;
}

.lfc-cart-notification.visible {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
}

.lfc-cart-notification.hiding {
    transform: translateY(20px) scale(0.95);
    opacity: 0;
}

.lfc-notification-content {
    display: flex;
    align-items: center;
    gap: var(--lfc-space-md);
    padding: var(--lfc-space-md) var(--lfc-space-lg);
    border-bottom: 1px solid var(--lfc-gray-200);
}

.lfc-notification-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--lfc-success) 0%, #3d6349 100%);
    border-radius: var(--lfc-radius-full);
    flex-shrink: 0;
    animation: lfc-checkmark 0.5s ease 0.2s both;
}

.lfc-notification-icon svg {
    width: 18px;
    height: 18px;
    color: var(--lfc-white);
    stroke-dasharray: 30;
    stroke-dashoffset: 30;
    animation: lfc-draw-check 0.4s ease 0.4s forwards;
}

@keyframes lfc-checkmark {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes lfc-draw-check {
    to {
        stroke-dashoffset: 0;
    }
}

.lfc-notification-product {
    display: flex;
    align-items: center;
    gap: var(--lfc-space-sm);
    flex: 1;
    min-width: 0;
}

.lfc-notification-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: var(--lfc-radius-md);
    background: var(--lfc-gray-100);
    flex-shrink: 0;
}

.lfc-notification-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.lfc-notification-title {
    font-family: var(--lfc-font-body);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--lfc-gray-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lfc-notification-message {
    font-family: var(--lfc-font-body);
    font-size: 0.75rem;
    color: var(--lfc-success);
    font-weight: 500;
}

.lfc-notification-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: var(--lfc-radius-full);
    color: var(--lfc-gray-400);
    cursor: pointer;
    transition: background var(--lfc-transition-fast), color var(--lfc-transition-fast);
    flex-shrink: 0;
}

.lfc-notification-close:hover {
    background: var(--lfc-gray-100);
    color: var(--lfc-gray-600);
}

.lfc-notification-close svg {
    width: 16px;
    height: 16px;
}

.lfc-notification-actions {
    display: flex;
    gap: var(--lfc-space-sm);
    padding: var(--lfc-space-md) var(--lfc-space-lg);
}

.lfc-notification-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1;
    height: 42px;
    padding: 0 var(--lfc-space-md);
    font-family: var(--lfc-font-body);
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: var(--lfc-radius-md);
    transition: all var(--lfc-transition-fast);
}

.lfc-notification-btn svg {
    width: 16px;
    height: 16px;
}

.lfc-notification-btn.lfc-btn-secondary {
    background: var(--lfc-gray-100);
    color: var(--lfc-gray-700);
    border: 1px solid var(--lfc-gray-200);
}

.lfc-notification-btn.lfc-btn-secondary:hover {
    background: var(--lfc-gray-200);
    border-color: var(--lfc-gray-300);
}

.lfc-notification-btn.lfc-btn-primary {
    background: linear-gradient(135deg, var(--lfc-primary) 0%, #1e2e1f 100%);
    color: var(--lfc-white);
    border: none;
}

.lfc-notification-btn.lfc-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(44, 62, 45, 0.3);
}

.lfc-notification-progress {
    height: 3px;
    background: var(--lfc-gray-200);
    overflow: hidden;
}

.lfc-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--lfc-accent) 0%, var(--lfc-success) 100%);
    width: 100%;
    transform-origin: left;
    animation: lfc-progress 5s linear forwards;
    animation-play-state: paused;
}

.lfc-cart-notification.visible .lfc-progress-bar {
    animation-play-state: running;
}

@keyframes lfc-progress {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}

/* Hover pause progress */
.lfc-cart-notification:hover .lfc-progress-bar {
    animation-play-state: paused;
}

/* Responsive para notificación */
@media (max-width: 540px) {
    .lfc-cart-notification {
        bottom: 16px;
        right: 16px;
        left: 16px;
        width: auto;
        max-width: none;
    }
    
    .lfc-notification-content {
        padding: var(--lfc-space-sm) var(--lfc-space-md);
    }
    
    .lfc-notification-actions {
        flex-direction: column;
        padding: var(--lfc-space-sm) var(--lfc-space-md) var(--lfc-space-md);
    }
    
    .lfc-notification-btn {
        height: 44px;
    }
    
    .lfc-notification-image {
        width: 44px;
        height: 44px;
    }
}

/* Ocultar mensajes por defecto de WooCommerce */
.woocommerce-message,
.woocommerce-info {
    display: none !important;
}

/* =========================================
   Print styles
   ========================================= */
@media print {
    .lfc-card-quick-actions,
    .lfc-card-purchase,
    .lfc-card-variations,
    .lfc-cart-notification {
        display: none !important;
    }
    
    .lfc-product-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

