/*
Theme Name: Pescadería Marina
Theme URI: https://pescaderiamarina.com
Description: Tema profesional de e-commerce para pescaderías y marisquerías con WooCommerce. Diseño moderno, responsive y optimizado.
Version: 2.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
Author: Pescadería Marina
Author URI: https://pescaderiamarina.com
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pescaderia-marina
Tags: e-commerce, woocommerce, food, seafood, business, responsive, modern
*/

/* ==========================================
   VARIABLES DE COLOR
   ========================================== */
:root {
    --azul-oscuro: #082370;
    --azul-medio: #1060FF;
    --azul-claro: #6CB6FF;
    --fondo: #EFEEEB;
    --negro: #0F0F0F;
    --rojo: #FF4757;
    --verde: #00D48A;
    --blanco: #FFFFFF;
    
    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Transiciones */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================
   RESET Y BASE
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--fondo);
    color: var(--negro);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-fast);
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

/* ==========================================
   HEADER STICKY
   ========================================== */
.sticky-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1000 !important;
    box-shadow: var(--shadow-xl) !important;
    animation: slideDown 0.3s ease-out !important;
    transition: transform var(--transition-base) !important;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ==========================================
   SCROLL TO TOP BUTTON
   ========================================== */
#scrollTopBtn {
    transition: all var(--transition-base);
    opacity: 0;
    transform: scale(0.8);
}

#scrollTopBtn:hover {
    transform: translateY(-5px) scale(1);
    box-shadow: var(--shadow-2xl);
}

/* ==========================================
   PRODUCTOS - TARJETAS
   ========================================== */
.product-card {
    transition: all var(--transition-base);
    will-change: transform, box-shadow;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-2xl);
}

.product-card img {
    transition: transform var(--transition-slow);
}

.product-card:hover img {
    transform: scale(1.1);
}

/* Badge de oferta con animación */
.badge-sale {
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(255, 71, 87, 0);
    }
}

/* ==========================================
   BOTONES
   ========================================== */
.add-to-cart-btn {
    position: relative;
    overflow: hidden;
    transition: all var(--transition-base);
}

.add-to-cart-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.add-to-cart-btn:hover::before {
    width: 300px;
    height: 300px;
}

.add-to-cart-btn:active {
    transform: scale(0.95);
}

/* ==========================================
   PAGINACIÓN
   ========================================== */
.woocommerce-pagination,
.pagination-custom {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.woocommerce-pagination ul,
.pagination-custom ul {
    display: flex;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.woocommerce-pagination li,
.pagination-custom li {
    display: inline-block;
}

.woocommerce-pagination a,
.woocommerce-pagination span,
.pagination-custom a,
.pagination-custom span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 16px;
    background: white;
    color: var(--azul-medio);
    border-radius: 12px;
    font-weight: 600;
    transition: all var(--transition-base);
    box-shadow: var(--shadow);
    text-decoration: none;
}

.woocommerce-pagination a:hover,
.pagination-custom a:hover {
    background: var(--azul-medio);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.woocommerce-pagination .current,
.pagination-custom .current {
    background: var(--azul-medio);
    color: white;
}

/* ==========================================
   FORMULARIOS
   ========================================== */
input[type="text"],
input[type="email"],
input[type="search"],
input[type="tel"],
input[type="number"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: all var(--transition-base);
    background-color: white;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--azul-medio);
    box-shadow: 0 0 0 3px rgba(16, 96, 255, 0.1);
}

input[type="checkbox"],
input[type="radio"] {
    cursor: pointer;
    transition: all var(--transition-fast);
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
    transform: scale(1.1);
}

/* ==========================================
   MENÚ MÓVIL
   ========================================== */
#mobileMenu {
    transition: opacity var(--transition-base);
    opacity: 0;
}

#mobileMenu.active {
    opacity: 1;
}

/* ==========================================
   ANIMACIONES DE CARGA
   ========================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Stagger animation para productos */
.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4) { animation-delay: 0.4s; }
.product-card:nth-child(5) { animation-delay: 0.5s; }
.product-card:nth-child(6) { animation-delay: 0.6s; }
.product-card:nth-child(7) { animation-delay: 0.7s; }
.product-card:nth-child(8) { animation-delay: 0.8s; }

/* ==========================================
   SPINNER DE CARGA
   ========================================== */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.fa-spinner,
.spinner {
    animation: spin 1s linear infinite;
}

/* ==========================================
   BREADCRUMBS
   ========================================== */
.woocommerce-breadcrumb {
    padding: 12px 0;
    font-size: 14px;
}

.woocommerce-breadcrumb a {
    color: var(--azul-medio);
    transition: all var(--transition-fast);
}

.woocommerce-breadcrumb a:hover {
    color: var(--azul-oscuro);
    text-decoration: underline;
}

/* ==========================================
   WOOCOMMERCE - ESTILOS ESPECÍFICOS
   ========================================== */

/* Mensajes de WooCommerce */
.woocommerce-message,
.woocommerce-info {
    background-color: rgba(0, 212, 138, 0.1);
    color: var(--verde);
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid var(--verde);
    margin-bottom: 20px;
}

.woocommerce-error {
    background-color: rgba(255, 71, 87, 0.1);
    color: var(--rojo);
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid var(--rojo);
    margin-bottom: 20px;
}

/* Tabla del carrito */
.woocommerce-cart-form table {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.woocommerce-cart-form th {
    background: var(--azul-oscuro);
    color: white;
    padding: 16px;
    font-weight: 600;
}

.woocommerce-cart-form td {
    padding: 16px;
    background: white;
    border-bottom: 1px solid #e5e7eb;
}

/* Totales del carrito */
.cart-collaterals {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-lg);
}

/* ==========================================
   FILTROS - SIDEBAR
   ========================================== */
.widget {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    transition: all var(--transition-base);
}

.widget:hover {
    box-shadow: var(--shadow-lg);
}

.widget_price_filter .ui-slider {
    background: #e5e7eb;
    border-radius: 8px;
    height: 8px;
}

.widget_price_filter .ui-slider-handle {
    background: var(--azul-medio);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    top: -6px;
    cursor: pointer;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 1024px) {
    .sticky-header {
        position: static !important;
    }
    
    .product-card {
        animation-delay: 0s !important;
    }
}

@media (max-width: 768px) {
    #scrollTopBtn {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
    
    .woocommerce-pagination a,
    .woocommerce-pagination span,
    .pagination-custom a,
    .pagination-custom span {
        min-width: 40px;
        height: 40px;
        padding: 0 12px;
        font-size: 14px;
    }
}

/* ==========================================
   ACCESIBILIDAD
   ========================================== */
:focus-visible {
    outline: 2px solid var(--azul-medio);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ==========================================
   UTILIDADES
   ========================================== */
.container-custom {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.transition-all {
    transition: all var(--transition-base);
}

.hover-lift:hover {
    transform: translateY(-5px);
}

.shadow-custom {
    box-shadow: var(--shadow-lg);
}

.shadow-custom-hover:hover {
    box-shadow: var(--shadow-2xl);
}

.gradient-primary {
    background: linear-gradient(135deg, var(--azul-oscuro) 0%, var(--azul-medio) 100%);
}

/* ==========================================
   MODO OSCURO (Opcional)
   ========================================== */
@media (prefers-color-scheme: dark) {
    /* Aquí puedes añadir estilos para modo oscuro si lo deseas */
}

/* ==========================================
   PRINT STYLES
   ========================================== */
@media print {
    #scrollTopBtn,
    #mobileMenu,
    #mobileMenuBtn,
    aside,
    header,
    footer {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
}