/* styles-professional.css - Estilos profesionales para página de productos */

:root {
    --brand-primary: #FF6B35;
    --brand-secondary: #F7931E;
    --brand-dark: #D35400;
    --brand-light: #FFE5DC;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --bg-accent: #fef3c7;
    --border-color: #e5e7eb;
    --border-light: #ffffff;
    --success: #10b981;
    --success-light: #d1fae5;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --warning: #f59e0b;
    --info: #3b82f6;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
    --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.2);
    --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;
}

html {
    scroll-behavior: smooth;
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-primary);
    background: var(--bg-light);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    width: 100%;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
    overflow-x: hidden;
}

/* Utilidades */
.text-brand {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.animate-in {
    animation: fadeInUp 0.6s ease-out;
}

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

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-light);
}

/* Desktop: darker navbar for better contrast (only >=769px to keep mobile unchanged) */
@media (min-width: 769px) {
    .navbar {
        background: rgba(17,17,17,0.95) !important;
        border-bottom-color: rgba(255,255,255,0.04) !important;
        box-shadow: 0 4px 18px rgba(0,0,0,0.25);
    }

    .navbar .container {
        color: #fff;
    }

    .brand {
        color: #ffffff !important;
    }

    .nav-link {
        color: rgba(255,255,255,0.85) !important;
    }

    .nav-link:hover {
        color: var(--brand-primary) !important;
    }

    .nav-link.active {
        color: var(--brand-primary) !important;
        border-bottom-color: transparent !important;
    }

    /* Login link as accent button on dark background */
    .login-link {
        background: var(--brand-primary) !important;
        color: #ffffff !important;
        border-radius: 12px !important;
        padding: 0.5rem 0.85rem !important;
    }

    /* Ensure brand-icon keeps its gradient but stands out on dark bg */
    .brand-icon {
        box-shadow: 0 6px 18px rgba(0,0,0,0.35);
    }
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    transition: var(--transition-fast);
}

.brand:hover {
    transform: scale(1.02);
}

.brand-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9375rem;
    transition: var(--transition-fast);
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    position: relative;
}

.nav-link:hover {
    color: var(--brand-primary);
}

.nav-link.active {
    color: var(--brand-primary);
    border-bottom-color: var(--brand-primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.cart-icon {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    padding: 0.625rem 1rem;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    background: white;
    border: 2px solid #e5e7eb;
}

.cart-icon:hover {
    color: var(--brand-primary);
    background: var(--brand-light);
    border-color: var(--brand-primary);
    transform: translateY(-2px);
}

.cart-count {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--brand-primary);
    color: white;
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 12px;
    min-width: 22px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.4);
}

.login-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: white;
    font-weight: 600;
    padding: 0.625rem 1.25rem;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    border-radius: var(--radius-md);
    transition: var(--transition-base);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.login-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.mobile-menu-btn {
    display: none;
}

/* Hero compacto de productos */
.products-hero-compact {
    position: relative;
    padding: 6rem 0 2.5rem;
    margin-top: 52px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.products-hero-compact .hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("img/Fondo.jpeg");
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    z-index: 1;
}

.products-hero-compact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.3));
    z-index: 2;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px;
    overflow: hidden;
}

.page-title {
    font-size: 2.2rem;
    font-weight: 900;
    color: white;
    margin-bottom: 0.8rem;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.page-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.hero-search-box {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 8px;
    background: white;
    padding: 4px;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.hero-search-input {
    flex: 1;
    height: 52px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 0 20px;
    font-size: 15px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    outline: none;
    font-family: inherit;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.hero-search-input::placeholder {
    color: var(--text-muted);
}

.hero-search-btn {
    height: 52px;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    color: white;
    border: none;
    padding: 0 28px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(255, 106, 0, 0.4), 0 2px 4px -1px rgba(255, 106, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}

.hero-search-btn:hover {
    background: linear-gradient(135deg, #ff8533 0%, var(--brand-primary) 100%);
    box-shadow: 0 10px 15px -3px rgba(255, 106, 0, 0.5), 0 4px 6px -2px rgba(255, 106, 0, 0.4);
    transform: translateY(-2px);
}

/* Sección de filtros */
.products-filters {
    margin-bottom: 3rem;
}

.filters-bar {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.filter-section {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-select {
    flex: 1;
    min-width: 200px;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
    background: white;
    cursor: pointer;
    transition: var(--transition-fast);
    font-family: inherit;
}

.filter-select:hover {
    border-color: var(--brand-primary);
}

.filter-select:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.btn-primary {
    background: var(--brand-primary);
    color: white;
}

/* Section containers */
.section {
    padding: 4rem 0;
}

.section.bg-accent {
    background: var(--bg-accent);
    border-radius: 0;
}

/* Section titles for carousels */
.section-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 2rem;
    text-align: center;
    letter-spacing: -0.02em;
}

.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-description {
    font-size: 1rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 0.75rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 1.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Professional carousel styles for categories/featured/offers */
.carousel {
    position: relative;
    padding: 0 60px;
    margin: 2rem 0;
}

.carousel .track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 12px 0;
    scroll-behavior: smooth;
    align-items: center;
    /* Remove negative margin: let track flow naturally */
}

/* Snap children to start of viewport */
.carousel .track > * { scroll-snap-align: start; }

.cat.card {
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(250,250,250,0.95));
    border-radius: 14px;
    padding: 18px 14px;
    box-shadow: 0 8px 24px rgba(6,22,54,0.06);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-width: 260px;
    max-width: 320px;
    width: 100%;
}

.cat.card:hover { transform: translateY(-6px); box-shadow: 0 12px 34px rgba(6,22,54,0.10); }

.cat.card .circle {
    width: 100px;
    height: 100px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255,107,53,0.06), rgba(78,205,196,0.03));
    margin: 0 auto 12px auto;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cat.card:hover .circle {
    transform: scale(1.1) rotate(5deg);
}

.cat.card .circle i { 
    font-size: 44px; 
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.cat.card:hover .circle i {
    transform: scale(1.2);
}

/* Estilos para imágenes de categoría */
.cat.card .circle.has-image {
    background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(250,250,250,0.98));
    box-shadow: inset 0 0 20px rgba(0,0,0,0.05);
}

.cat.card .circle .category-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: fadeInScale 0.6s ease-out;
}

.cat.card:hover .circle .category-image {
    transform: scale(1.15) rotate(-3deg);
    filter: brightness(1.1) contrast(1.05);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Animación de pulso sutil para categorías con imagen */
.cat.card .circle.has-image::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 16px;
    background: linear-gradient(45deg, var(--brand-primary), var(--brand-secondary));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cat.card:hover .circle.has-image::after {
    opacity: 0.2;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.2;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.3;
    }
}

.cat-name { 
    font-size: 17px; 
    font-weight: 800; 
    margin: 6px 0; 
    color: var(--text-primary); 
    text-align: center;
    width: 100%;
}

.cat.card .category-desc { 
    color: var(--text-secondary); 
    font-size: 13px; 
    text-align: center; 
    margin-top: 6px;
    width: 100%;
}

/* Carousel arrows - modern, circular */
.carousel .arrow, .carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 0;
    box-shadow: 0 6px 22px rgba(6,22,54,0.12);
    cursor: pointer;
    z-index: 10;
}

.carousel .arrow.left, .carousel-arrow.prev { left: 12px; }
.carousel .arrow.right, .carousel-arrow.next { right: 12px; }

.carousel .arrow i { color: var(--brand-primary); }

@media (max-width: 900px) {
    .carousel { padding: 0 40px; }
    .cat.card { min-width: 260px; max-width: 300px; padding: 18px; }
    .cat.card .circle { width: 120px; height: 120px; }
    .carousel .arrow { width: 36px; height: 36px; }
}

@media (max-width: 480px) {
    .carousel { padding: 0 20px; }
    .cat.card { min-width: 220px; }
    .cat-name { font-size: 16px; }
    .section-title { font-size: 1.5rem; margin-bottom: 1.5rem; }
    .section-description { font-size: 0.9rem; }
}

/* Fullscreen transition loader (ocean / waves) */
.transition-loader {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(6,22,54,0.95), rgba(6,22,54,0.9));
    color: white;
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 300ms ease, transform 300ms ease;
}
.transition-loader.active {
    opacity: 1;
    pointer-events: auto;
}
.transition-loader .loader-content {
    text-align: center;
    width: min(680px, 92%);
}

.ocean-loader {
    position: relative;
    width: 220px;
    height: 120px;
    margin: 0 auto 14px;
    overflow: hidden;
    border-radius: 18px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.4);
    background: linear-gradient(180deg, #036, #024);
}
.ocean-loader .wave {
    position: absolute;
    left: -50%;
    width: 200%;
    height: 120px;
    bottom: 0;
    background-repeat: repeat-x;
    background-size: 50% 100%;
    transform: translate3d(0,0,0);
    opacity: 0.9;
}
.ocean-loader .wave:nth-child(1) { background-image: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.03) 30%, transparent 31%); animation: waveShift 4s linear infinite; z-index:3; }
.ocean-loader .wave:nth-child(2) { background-image: linear-gradient(90deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02)); bottom: -6px; animation: waveShift 6s linear infinite reverse; z-index:2; }
.ocean-loader .wave:nth-child(3) { background-image: linear-gradient(90deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)); bottom: -12px; animation: waveShift 8s linear infinite; z-index:1; }

.ocean-loader .swimming-fish{
    position: absolute;
    left: 16%;
    top: 28%;
    font-size: 28px;
    transform: translateZ(0);
    animation: fishSwim 3.6s linear infinite;
    z-index: 5;
}
.ocean-loader .bubbles { position: absolute; right: 8px; top: 8px; z-index:6; }
.ocean-loader .bubble { width:8px;height:8px;border-radius:50%;background:rgba(255,255,255,0.7);margin:6px;display:inline-block;opacity:0.9; animation: bubbleRise 1.6s infinite ease-in; }

@keyframes waveShift {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
@keyframes fishSwim {
    0% { transform: translateX(0) translateY(0) rotate(0deg); }
    50% { transform: translateX(60px) translateY(-6px) rotate(-6deg); }
    100% { transform: translateX(0) translateY(0) rotate(0deg); }
}
@keyframes bubbleRise {
    0% { transform: translateY(0); opacity: 0.8; }
    60% { transform: translateY(-34px); opacity: 0.5; }
    100% { transform: translateY(-60px); opacity: 0; }
}

.transition-loader .loader-text { font-size: 1rem; color: rgba(255,255,255,0.95); font-weight: 600; }


/* Hero general: asegurar fondo visible y apilamiento correcto
   - utiliza `img/fondo-tropinside.jpg` si existe, sino prueba `img/Fondo.jpeg` */
.hero {
    position: relative;
    min-height: 70vh;
    display: grid;
    place-items: center;
    overflow: hidden;
    color: white;
}

.hero .hero-bg {
    position: absolute;
    inset: 0;
    background-image: url("img/fondo-tropinside.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
    z-index: 1;
    filter: saturate(1.02) contrast(1.02);
}

/* Fallback si no existe la imagen anterior */
@supports (background-image: url("img/Fondo.jpeg")) {
    .hero .hero-bg { background-image: url("img/Fondo.jpeg"); }
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.18) 60%, rgba(0,0,0,0.35) 100%);
    z-index: 2;
    pointer-events: none;
}

.hero-content { z-index: 3; text-align: center; padding: 2rem 1rem; }
.hero-title { color: white; font-size: 2.6rem; line-height:1.05; }
.hero-subtitle { color: rgba(255,255,255,0.92); margin-top: .5rem; max-width: 38rem; margin-left: auto; margin-right: auto; }

/* Evitar que la barra fija ocupe contenido visible en el inicio */
body { scroll-padding-top: 80px; }

.btn-primary:hover {
    background: var(--brand-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Grid de productos */
.products-grid-section {
    margin-bottom: 4rem;
    display: none;
    width: 100%;
    overflow-x: hidden;
}

.products-grid-section.active {
    display: block;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 3rem;
    width: 100%;
    overflow-x: hidden;
}


@media (min-width: 769px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
    }
    
    .product-card {
        min-width: 240px;
        max-width: 280px;
    }
}

@media (min-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }
}

/* Tarjeta de producto mejorada */
.product-card {
    background: white;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-light);
    position: relative;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    min-width: auto;
    max-width: 100%;
    width: 100%;
}

/* En carruseles, ajustar el ancho */
.carousel .track .product-card {
    min-width: 240px;
    max-width: 280px;
    width: 100%;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary));
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-2xl);
    border-color: transparent;
}

.product-card:hover::before {
    transform: scaleX(1);
}

.product-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform var(--transition-base);
    background: white;
}

.product-card:hover .product-image img {
    transform: scale(1.08) rotate(1deg);
}

.product-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 8px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
}

.product-badge i {
    color: #fbbf24;
    font-size: 0.75rem;
}

.product-info {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.product-brand {
    color: var(--brand-primary);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.product-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.45;
    margin: 0;
    /* Reservar espacio suficiente para 3 líneas y aplicar clamp */
    max-height: 4.5em;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
    text-overflow: ellipsis;
}

/* Recomendaciones - tarjetas pequeñas */
.recommendations-wrapper {
    margin-top: 1.5rem;
}

.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.9rem;
    align-items: start;
}

.recommendation-card {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .15s ease, transform .12s ease;
}

.recommendation-card:hover {
    box-shadow: 0 6px 18px rgba(2,6,23,0.08);
    transform: translateY(-4px);
}

.recommendation-image-container {
    position: relative;
    width: 100%;
    padding-top: 75%; /* aspect ratio */
    overflow: hidden;
}

.recommendation-image {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%; object-fit: cover;
}

.recommendation-badge {
    position: absolute;
    top: 8px; left: 8px;
    background: #ef4444; color: #fff;
    font-size: 0.75rem; padding: 3px 6px; border-radius: 4px;
}

.recommendation-info {
    padding: 0.6rem 0.7rem 0.9rem 0.7rem;
    display: flex; flex-direction: column; gap: 0.45rem;
}

.recommendation-name {
    font-weight: 600; color: var(--text-primary); font-size: 0.95rem; line-height: 1.2;
    display: block; text-decoration: none; margin-bottom: 0.15rem;
    overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}

.recommendation-price { font-weight: 700; color: #065f46; }
.recommendation-price-original { font-size: 0.85rem; color: #6b7280; text-decoration: line-through; }

.recommendation-actions { margin-top: 0.4rem; }
.rec-add-btn {
    width: 100%; padding: 0.45rem 0.6rem; border-radius: 6px; border: none; background: linear-gradient(90deg,#059669,#047857);
    color: #fff; font-weight: 600; cursor: pointer; font-size: 0.9rem;
}
.rec-add-btn[disabled] { opacity: 0.7; cursor: default; }

/* Mobile tweaks */
@media (max-width: 480px) {
    .recommendations-grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
    .recommendation-name { -webkit-line-clamp: 2; }
}

.product-category {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.2rem;
}

.product-price {
    font-size: 2rem;
    font-weight: 900;
    color: var(--brand-primary);
    margin: 0.2rem 0;
    letter-spacing: -0.02em;
}

.price-currency {
    font-size: 1rem;
    font-weight: 700;
}

.product-rating {
    color: #fbbf24;
    font-size: 1.125rem;
    letter-spacing: 2px;
    margin-top: 0.3rem;
    margin-bottom: 0.5rem;
}

.product-stock {
    font-size: 0.875rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    display: inline-block;
    width: fit-content;
}

.product-stock.in-stock {
    color: var(--success);
    background: var(--success-light);
}

.product-stock.out-of-stock {
    color: var(--danger);
    background: var(--danger-light);
}

.product-actions {
    padding: 0 1.75rem 1.75rem;
}

.btn {
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    justify-content: center;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    color: white;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.add-to-cart-btn {
    width: 100%;
}

/* Estados de carga */
.loading-state {
    text-align: center;
    padding: 6rem 2rem;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    border: 4px solid var(--border-color);
    border-top-color: var(--brand-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loading-state p {
    color: var(--text-secondary);
    font-size: 1.125rem;
    font-weight: 500;
}

.empty-state {
    text-align: center;
    padding: 6rem 2rem;
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.empty-state i {
    font-size: 5rem;
    color: var(--text-muted);
    opacity: 0.4;
    margin-bottom: 1.5rem;
}

.empty-state h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

/* Paginación */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.pagination button {
    padding: 0.75rem 1.25rem;
    border: 2px solid var(--border-color);
    background: white;
    color: var(--text-primary);
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.pagination button:hover:not(:disabled) {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    background: var(--brand-light);
}

.pagination button.active {
    background: var(--brand-primary);
    color: white;
    border-color: var(--brand-primary);
}

.pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: white;
    padding: 4rem 0 2rem;
    margin-top: 6rem;
}

.footer-content {
    margin-bottom: 2.5rem;
    display: flex;
    justify-content: center;
}

.footer-contact-centered {
    text-align: center;
    max-width: 600px;
}

.footer-contact-centered h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
}

.footer-contact-centered p {
    font-size: 1.125rem;
    margin: 1rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.footer-contact-centered p i {
    font-size: 1.25rem;
    color: var(--brand-secondary);
}

.footer-contact-centered a {
    color: var(--brand-secondary);
    text-decoration: none;
    transition: color var(--transition-base);
}

.footer-contact-centered a:hover {
    color: var(--brand-primary);
    text-decoration: underline;
}

.footer-section h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, white, rgba(255, 255, 255, 0.8));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
}

.footer-bottom {
    text-align: center;
    padding-top: 2.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9375rem;
}

.footer-bottom p {
    margin: 0.5rem 0;
}

.footer-bottom .powered-by {
    font-size: 0.875rem;
    margin-top: 0.75rem;
    opacity: 0.7;
}

.footer-bottom .powered-by a {
    color: var(--brand-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-base);
}

.footer-bottom .powered-by a:hover {
    color: var(--brand-primary);
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

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

    .nav-menu {
        display: none;
    }
    
    /* Container más estrecho */
    .container {
        padding: 0 1rem;
    }
    
    /* Asegurar que navbar-actions se mantenga en línea */
    .navbar .container {
        gap: 0.5rem;
    }
    
    .navbar-actions,
    .nav-actions {
        display: flex;
        align-items: center;
        gap: 6px;
        flex-shrink: 0;
    }
    
    .cart-icon {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
        gap: 4px;
    }
    
    .cart-icon i {
        font-size: 1rem;
    }
    
    .cart-icon span:not(.cart-count) {
        display: none;
    }
    
    .login-link {
        padding: 0.5rem 0.85rem;
        font-size: 0.8rem;
        gap: 5px;
        flex-shrink: 0;
    }
    
    .page-title {
        font-size: 1.6rem;
    }
    
    .page-subtitle {
        font-size: 0.85rem;
    }
    
    .products-hero-compact {
        padding: 0.8rem 0 0.8rem;
        margin-bottom: 1rem;
    }
    
    .page-title {
        font-size: 1.3rem;
        margin-bottom: 0.4rem;
    }
    
    .page-subtitle {
        font-size: 0.8rem;
        margin-bottom: 0.6rem;
    }
    
    .products-hero-compact .hero-bg {
        background-position: center center;
        background-size: cover;
        background-attachment: scroll;
    }
    
    .hero-content {
        padding: 0 8px;
    }
    
    .hero-search-box {
        flex-direction: row;
        gap: 6px;
        max-width: 100%;
        padding: 4px;
    }
    
    .hero-search-input {
        height: 44px !important;
        font-size: 14px !important;
        padding: 0 12px !important;
        border-radius: 10px !important;
        border-width: 1px !important;
    }
    
    .hero-search-btn {
        height: 48px !important;
        width: 48px !important;
        font-size: 18px !important;
        border-radius: 10px !important;
        padding: 0 !important;
        min-width: 48px;
    }
    
    .filter-section {
        flex-direction: column;
    }
    
    .filter-select {
        width: 100%;
    }
    
    .product-image {
        height: 200px;
        background: white !important;
    }
    
    .product-image img {
        object-fit: contain !important;
        object-position: center !important;
    }
    
    .product-info {
        padding: 0.875rem;
    }
    
    .product-name {
        font-size: 0.9rem;
        max-height: 3.78em; /* 3 líneas con line-height 1.4: 0.9 * 1.4 * 3 */
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .product-price {
        font-size: 1.35rem;
    }
    
    .product-actions {
        padding: 0 0.875rem 0.875rem;
    }
    
    .footer {
        padding: 3rem 0 1.5rem;
        margin-top: 4rem;
    }
}

@media (max-width: 480px) {
    html {
        width: 100vw;
        overflow-x: hidden;
    }
    
    body {
        width: 100vw;
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    .container {
        max-width: 100% !important;
        padding: 0 12px !important;
        width: 100% !important;
        overflow-x: hidden !important;
    }
    
    main {
        width: 100vw;
        overflow-x: hidden;
    }
    
    section {
        width: 100%;
        overflow-x: hidden;
    }
    
    .navbar .container {
        gap: 0.4rem;
    }
    
    .brand {
        font-size: 1.2rem;
        gap: 8px;
    }
    
    .brand-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .cart-icon {
        padding: 0.4rem;
        gap: 0;
        min-width: auto;
    }
    
    .cart-icon i {
        font-size: 1.1rem;
    }
    
    .cart-count {
        top: -4px;
        right: -4px;
        font-size: 0.6rem;
        padding: 2px 5px;
        min-width: 18px;
    }
    
    .login-link {
        padding: 0.4rem 0.55rem;
        font-size: 0.7rem;
        gap: 3px;
        white-space: nowrap;
    }
    
    .login-link i {
        font-size: 0.8rem;
    }
    
    .page-title {
        font-size: 1.4rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        max-width: 100%;
        margin: 0;
    }
    
    .product-card {
        max-width: 100%;
        margin: 0;
    }
    
    .product-image {
        height: 240px;
        background: white !important;
    }
    
    .product-image img {
        object-fit: contain !important;
        object-position: center !important;
    }
}

/* Desktop-only cart color: make it brand-colored with white icon/text */
@media (min-width: 769px) {
    .cart-icon {
        background: var(--brand-primary) !important;
        color: #ffffff !important;
        border-color: transparent !important;
        box-shadow: 0 6px 18px rgba(255,107,53,0.12);
    }

    .cart-icon i,
    .cart-icon span:not(.cart-count) {
        color: #ffffff !important;
    }

    .cart-icon:hover {
        background: var(--brand-dark) !important;
        transform: translateY(-2px);
    }

    .cart-count {
        background: #ffffff !important;
        color: var(--brand-primary) !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.12) !important;
    }
}

/* About section - Quiénes somos */
.about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.about-text h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.about-text h2.text-center {
    text-align: center;
}

.about-text .lead {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.about-text p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.about-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-image {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    aspect-ratio: 4/3;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--transition-slow);
}

.gallery-image:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.gallery-image:hover img {
    transform: scale(1.05);
}

/* Services Section - Tabs System */
.services-section {
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
}

.services-tabs-container {
    margin-top: 3rem;
}

/* Tabs Navigation */
.services-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 3rem;
    padding: 1rem;
}

.service-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: #ffffff;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
}

.service-tab i {
    font-size: 1.125rem;
    transition: transform var(--transition-base);
}

.service-tab:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.service-tab:hover i {
    transform: scale(1.15);
}

.service-tab.active {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    border-color: var(--brand-primary);
    color: #ffffff;
    box-shadow: var(--shadow-lg);
}

.service-tab.active i {
    color: #ffffff;
}

/* Tabs Content */
.services-tabs-content {
    position: relative;
    min-height: 300px;
}

.service-content {
    display: none;
    text-align: center;
    padding: 3rem 2rem;
    background: #ffffff;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    animation: fadeInContent 0.4s ease-out;
}

.service-content.active {
    display: block;
}

@keyframes fadeInContent {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.service-content-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    border-radius: 50%;
    box-shadow: var(--shadow-lg);
}

.service-content-icon i {
    font-size: 2.5rem;
    color: #ffffff;
}

.service-content h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.service-content p {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto;
}

/* Responsive tabs */
@media (max-width: 768px) {
    .services-tabs-nav {
        gap: 0.5rem;
        padding: 0.5rem;
    }
    
    .service-tab {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
    }
    
    .service-tab span {
        display: none;
    }
    
    .service-tab i {
        font-size: 1.25rem;
    }
    
    .service-content {
        padding: 2rem 1.5rem;
    }
    
    .service-content-icon {
        width: 80px;
        height: 80px;
        margin-bottom: 1.5rem;
    }
    
    .service-content-icon i {
        font-size: 2rem;
    }
    
    .service-content h3 {
        font-size: 1.5rem;
    }
    
    .service-content p {
        font-size: 1rem;
    }
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-item {
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    transition: all var(--transition-base);
    border: none;
    text-align: center;
    position: relative;
    overflow: visible;
}

.service-item::before {
    display: none;
}

.service-item:hover {
    transform: translateY(-4px);
    box-shadow: none;
    border-color: transparent;
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    border-radius: 50%;
    transition: all var(--transition-base);
    position: relative;
    box-shadow: var(--shadow-md);
}

.service-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--brand-primary);
    opacity: 0;
    transform: scale(1.2);
    transition: all var(--transition-base);
}

.service-item:hover .service-icon::after {
    opacity: 0.3;
    transform: scale(1.3);
}

.service-item:hover .service-icon {
    transform: scale(1.15);
    box-shadow: var(--shadow-lg);
}

.service-icon i {
    font-size: 2rem;
    color: #ffffff;
    transition: transform var(--transition-base);
}

.service-item:hover .service-icon i {
    transform: scale(1.1);
}

.service-item h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.service-item p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Responsive about section */
@media (min-width: 769px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .about-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (min-width: 1024px) {
    .about-text h2 {
        font-size: 3rem;
    }
    
    .about-gallery {
        gap: 2.5rem;
    }
}

/* Optimizaciones táctiles */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .nav-link,
    .filter-select,
    .hero-search-input {
        min-height: 44px;
        font-size: 16px;
    }
    
    .product-card:hover {
        transform: none;
    }
    
    .product-card:active {
        transform: scale(0.98);
    }
}

/* Performance: reducir animaciones */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
