/* Variables de color - Paleta Frikeando 3D */
:root {
    --primary-cyan: #00BCD4;
    --primary-cyan-dark: #0097A7;
    --dark-blue: #0D3B52;
    --dark-blue-light: #1A5266;
    --light-cyan: #E0F7FA;
    --text-dark: #0D3B52;
    --text-gray: #607D8B;
    --bg-light: #F5FAFB;
    --white: #ffffff;
    --shadow: rgba(13, 59, 82, 0.08);
    --shadow-hover: rgba(13, 59, 82, 0.16);
    --border-color: rgba(0, 188, 212, 0.15);
}

/* Reset y base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.47059;
    letter-spacing: -0.022em;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-top: 50px;
}

/* Barra de Instagram fija */
.instagram-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(135deg, #833AB4 0%, #C13584 50%, #E1306C 75%, #FD1D1D 100%);
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.instagram-bar-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 0.75rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.instagram-text {
    color: var(--white);
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
    text-align: center;
}

.instagram-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 980px;
    color: var(--white);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    animation: shake 2s infinite;
}

.instagram-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.5);
    animation: none;
}

@keyframes shake {
    0%, 50%, 100% {
        transform: translateX(0) rotate(0deg);
    }
    10%, 30% {
        transform: translateX(-3px) rotate(-2deg);
    }
    20%, 40% {
        transform: translateX(3px) rotate(2deg);
    }
}

.instagram-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.instagram-follow {
    white-space: nowrap;
}

.container {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 22px;
}

/* Header estilo Apple */
.header {
    background: var(--bg-light);
    color: var(--text-dark);
    padding: 2.5rem 0 3rem;
    text-align: center;
    position: relative;
}

.header .container {
    background: var(--white);
    border-radius: 18px;
    padding: 3rem 2rem;
    border: 1px solid var(--border-color);
}

.header-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Botón flotante del carrito */
.cart-button-floating {
    position: fixed;
    right: 2rem;
    bottom: 2rem;
    background: var(--primary-cyan);
    color: var(--white);
    border: none;
    border-radius: 980px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 24px rgba(0, 188, 212, 0.4);
    z-index: 999;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.5px;
}

.cart-button-floating:hover {
    background: var(--primary-cyan-dark);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 188, 212, 0.5);
}

.cart-button-floating svg {
    flex-shrink: 0;
}

.cart-text {
    text-transform: uppercase;
    white-space: nowrap;
}

.cart-count {
    background: var(--dark-blue);
    color: var(--white);
    border-radius: 50%;
    min-width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
    padding: 0 0.5rem;
    margin-left: 0.25rem;
}

.cart-count.empty {
    display: none;
}

.logo-img {
    max-width: 500px;
    width: 100%;
    height: auto;
    margin-bottom: 1rem;
}

.tagline {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text-gray);
    letter-spacing: -0.01em;
    margin-top: 0.5rem;
}

/* Barra de filtro por categorías */
.category-filter-bar {
    background: var(--white);
    border-radius: 18px;
    padding: 1.5rem 2rem;
    border: 1px solid var(--border-color);
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.category-select {
    flex: 1;
    max-width: 400px;
    min-width: 280px;
    padding: 0.75rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-dark);
    background: var(--white);
    border: 2px solid var(--primary-cyan);
    border-radius: 980px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
    letter-spacing: -0.01em;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300BCD4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 20px;
    padding-right: 3rem;
}

.category-select:hover {
    background-color: var(--light-cyan);
    border-color: var(--primary-cyan-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 188, 212, 0.15);
}

.category-select:focus {
    border-color: var(--primary-cyan-dark);
    box-shadow: 0 0 0 3px rgba(0, 188, 212, 0.1);
}

.category-select option {
    padding: 0.75rem;
    font-weight: 500;
}

/* Main */
.main {
    padding: 2rem 0 5rem;
    min-height: calc(100vh - 300px);
}

/* Filtros estilo Apple */
.filters {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3.5rem;
}

.filter-btn {
    padding: 0.5rem 1.25rem;
    border: 1px solid var(--border-color);
    background: var(--white);
    color: var(--text-dark);
    font-weight: 400;
    font-size: 0.875rem;
    cursor: pointer;
    border-radius: 980px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
    letter-spacing: -0.01em;
}

.filter-btn:hover {
    background: var(--light-cyan);
    border-color: var(--primary-cyan);
    color: var(--dark-blue);
}

.filter-btn.active {
    background: var(--primary-cyan);
    color: var(--white);
    border-color: var(--primary-cyan);
}

/* Grid de productos estilo Apple */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    animation: fadeIn 0.5s ease;
}

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

/* Tarjetas de producto estilo Apple */
.product-card {
    background: var(--white);
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.12);
}

.product-image-container {
    position: relative;
    width: calc(100% - 24px);
    height: 320px;
    overflow: hidden;
    background: #ffffff;
    border: 2px solid #00B2CA;
    border-radius: 12px;
    margin: 12px 12px 0 12px;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    background: #ffffff;
}

.product-image[loading="lazy"] {
    opacity: 0;
    animation: imageLoad 0.5s ease forwards;
}

@keyframes imageLoad {
    to {
        opacity: 1;
    }
}

.product-card:hover .product-image {
    transform: scale(1.04);
}

.badge-featured {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: var(--text-dark);
    padding: 0.35rem 0.85rem;
    border-radius: 980px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    z-index: 2;
}

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

.product-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    line-height: 1.3;
    letter-spacing: -0.015em;
}

.product-description {
    color: var(--text-gray);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    line-height: 1.5;
    flex-grow: 1;
    letter-spacing: -0.01em;
}

.product-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.product-category {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    background: var(--light-cyan);
    color: var(--dark-blue);
    border-radius: 980px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.product-price {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--primary-cyan);
    letter-spacing: -0.02em;
}

/* Estado vacío */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-gray);
    font-size: 1.1rem;
}

/* Footer estilo Apple */
.footer {
    background: var(--bg-light);
    color: var(--text-gray);
    text-align: center;
    padding: 2.5rem 0;
    margin-top: 5rem;
}

.footer .container {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-color);
}

.footer p {
    font-size: 0.75rem;
    letter-spacing: -0.01em;
}

/* Clase para ocultar productos filtrados */
.product-card.hidden {
    display: none;
}

/* Responsive - Estilo Apple */
@media (max-width: 1068px) {
    .container {
        max-width: 692px;
    }
}

@media (max-width: 735px) {
    .instagram-bar-content {
        gap: 0.75rem;
        padding: 0.6rem 1rem;
    }

    .instagram-text {
        font-size: 0.75rem;
    }

    .instagram-link {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }

    .instagram-icon {
        width: 18px;
        height: 18px;
    }

    .container {
        padding: 0 16px;
    }

    .header .container {
        padding: 2rem 1.5rem;
        border-radius: 12px;
    }

    .category-filter-bar {
        padding: 1.25rem 1.5rem;
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }

    .filter-label {
        font-size: 0.9375rem;
    }

    .category-select {
        min-width: 100%;
        max-width: 100%;
        font-size: 0.875rem;
    }

    .logo-img {
        max-width: 400px;
    }

    .tagline {
        font-size: 1.0625rem;
    }

    .main {
        padding: 1.5rem 0 4rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        max-width: 600px;
        margin: 0 auto;
    }

    .filter-btn {
        padding: 0.45rem 1rem;
        font-size: 0.8125rem;
    }

    .product-card {
        border-radius: 16px;
    }

    .product-image-container {
        width: calc(100% - 24px);
        height: 360px;
        margin: 12px 12px 0 12px;
    }

    .product-image {
        object-fit: contain;
    }

    .product-title {
        font-size: 1.25rem;
    }

    .product-description {
        font-size: 0.9375rem;
    }

    .product-info {
        padding: 1.25rem 1.25rem 1.5rem;
    }

    .product-meta {
        flex-direction: row;
        gap: 0.75rem;
        align-items: center;
    }

    .product-category {
        font-size: 0.75rem;
    }

    .product-price {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    body {
        padding-top: 45px;
    }

    .instagram-bar-content {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.5rem;
    }

    .instagram-text {
        font-size: 0.7rem;
        line-height: 1.3;
    }

    .instagram-link {
        padding: 0.4rem 0.75rem;
        font-size: 0.7rem;
    }

    .instagram-icon {
        width: 16px;
        height: 16px;
    }

    .header {
        padding: 1.5rem 0 2rem;
    }

    .header .container {
        padding: 1.5rem 1rem;
    }

    .category-filter-bar {
        padding: 1rem;
        border-radius: 12px;
    }

    .filter-label {
        font-size: 0.875rem;
    }

    .category-select {
        font-size: 0.8125rem;
        padding: 0.625rem 1rem;
        padding-right: 2.5rem;
        background-size: 18px;
    }

    .logo-img {
        max-width: 300px;
    }

    .tagline {
        font-size: 0.9375rem;
    }

    .products-grid {
        max-width: 100%;
    }

    .product-image-container {
        width: calc(100% - 24px);
        height: 280px;
        margin: 12px 12px 0 12px;
    }

    .product-info {
        padding: 1rem 1rem 1.25rem;
    }

    .cart-button-floating {
        right: 1rem;
        bottom: 1rem;
        padding: 0.875rem 1.25rem;
        font-size: 0.875rem;
    }

    .cart-text {
        font-size: 0.875rem;
    }

    .cart-count {
        min-width: 24px;
        height: 24px;
        font-size: 0.75rem;
    }
}

@media (max-width: 390px) {
    .product-image-container {
        width: calc(100% - 24px);
        height: 240px;
        margin: 12px 12px 0 12px;
    }

    .product-title {
        font-size: 1.125rem;
    }

    .product-price {
        font-size: 1.25rem;
    }
}
