* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #9c27b0;
    --secondary-color: #d4469e;
    --dark-color: #1a1a1a;
    --light-color: #f5f5f5;
    --text-color: #333;
    --border-color: #e0e0e0;
    --success-color: #4caf50;
    --danger-color: #f44336;
    --warning-color: #ff9800;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    background-color: var(--light-color);
    line-height: 1.6;
    overflow-x: hidden;
}

.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    max-width: 100vw;
}

/* Header */
.header {
    background-color: var(--dark-color);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    white-space: nowrap;
}

.navbar ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.navbar a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
    font-size: 0.95rem;
}

.navbar a:hover {
    color: var(--secondary-color);
}

.header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: white;
    border-radius: 4px;
    padding: 0.25rem;
}

.search-bar input {
    padding: 0.6rem 1rem;
    border: none;
    border-radius: 4px;
    width: 200px;
    font-size: 0.9rem;
    min-width: 150px;
    outline: none;
}

.search-btn, .clear-search-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    font-size: 1rem;
    min-width: 35px;
    height: 35px;
}

.search-btn:hover {
    background: var(--secondary-color);
    transform: scale(1.05);
}

.clear-search-btn {
    background: #f44336;
    font-size: 0.9rem;
}

.clear-search-btn:hover {
    background: #d32f2f;
    transform: scale(1.05);
}

.cart-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    position: relative;
    transition: background-color 0.3s;
}

.cart-btn:hover {
    background-color: var(--secondary-color);
}

.cart-count {
    background-color: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    position: absolute;
    top: -8px;
    right: -8px;
}

/* Main Content */
.main-content {
    flex: 1;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 1.5rem 0.75rem;
    box-sizing: border-box;
}

.page {
    display: none;
    max-width: 100%;
    overflow-x: hidden;
}

.page.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Hero Section */
.hero {
    position: relative;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 4rem 1.5rem;
    border-radius: 16px;
    text-align: center;
    margin-bottom: 2rem;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(156, 39, 176, 0.3);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.hero-particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 15s infinite ease-in-out;
}

.hero-particle:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 12s;
}

.hero-particle:nth-child(2) {
    width: 60px;
    height: 60px;
    top: 60%;
    left: 80%;
    animation-delay: 2s;
    animation-duration: 15s;
}

.hero-particle:nth-child(3) {
    width: 100px;
    height: 100px;
    top: 40%;
    left: 70%;
    animation-delay: 4s;
    animation-duration: 18s;
}

.hero-particle:nth-child(4) {
    width: 50px;
    height: 50px;
    top: 70%;
    left: 20%;
    animation-delay: 1s;
    animation-duration: 14s;
}

.hero-particle:nth-child(5) {
    width: 70px;
    height: 70px;
    top: 30%;
    left: 50%;
    animation-delay: 3s;
    animation-duration: 16s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0.3;
    }
    25% {
        transform: translateY(-30px) translateX(20px) scale(1.1);
        opacity: 0.5;
    }
    50% {
        transform: translateY(-60px) translateX(-20px) scale(0.9);
        opacity: 0.4;
    }
    75% {
        transform: translateY(-30px) translateX(-10px) scale(1.05);
        opacity: 0.6;
    }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.hero-title-line {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    opacity: 0;
    animation: slideInUp 0.8s ease-out forwards;
}

.hero-title-line-1 {
    animation-delay: 0.2s;
}

.hero-title-line-2 {
    animation-delay: 0.4s;
}

.hero-title-line-3 {
    animation-delay: 0.6s;
    font-size: 3rem;
}

.hero-gradient {
    background: linear-gradient(90deg, #fff, #fce4ec, #fff);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s linear infinite, slideInUp 0.8s ease-out forwards;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    to {
        background-position: 200% center;
    }
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeIn 1s ease-out 0.8s forwards;
}

.hero-word {
    display: inline-block;
    animation: bounceIn 0.6s ease-out backwards;
}

.hero-word:nth-child(1) {
    animation-delay: 1s;
}

.hero-word:nth-child(2) {
    animation-delay: 1.2s;
    color: #fce4ec;
    font-weight: 500;
}

.hero-word:nth-child(3) {
    animation-delay: 1.4s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(-20px);
    }
    50% {
        transform: scale(1.05) translateY(0);
    }
    70% {
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.hero-btn {
    opacity: 0;
    animation: slideInUp 0.8s ease-out 1.6s forwards;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.hero-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;
}

.hero-btn:hover::before {
    width: 300px;
    height: 300px;
}

.hero-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 30px rgba(156, 39, 176, 0.4);
}

.btn-text {
    position: relative;
    z-index: 1;
}

.btn-icon {
    position: relative;
    z-index: 1;
    font-size: 1.3rem;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: scale(1.2) rotate(180deg);
        opacity: 0.8;
    }
}

/* Buttons (legacy) */
.primary-btn, .secondary-btn {
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 1rem;
}

.primary-btn {
    background-color: var(--primary-color);
    color: white;
}

.primary-btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(156, 39, 176, 0.3);
}

.secondary-btn {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.secondary-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Botón volver en detalle de producto */
.back-btn {
    padding: 0.2rem 0.4rem !important;
    font-size: 0.7rem !important;
    background-color: transparent;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 400;
    line-height: 1;
    height: auto;
    min-height: unset;
}

.back-btn:hover {
    background-color: #f5f5f5;
    border-color: #999;
    color: var(--dark-color);
}

/* Featured Products */
.featured-products {
    margin-bottom: 3rem;
}

.featured-products h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--dark-color);
}

/* Packs Section */
.featured-packs {
    margin-bottom: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
}

.featured-packs h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: white;
    text-align: center;
}

.packs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.pack-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.pack-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

.pack-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 10;
}

.discount-badge {
    background: #ff4444;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
}

.savings-badge {
    background: #4caf50;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
}

.pack-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #f5f5f5;
}

.pack-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pack-content {
    padding: 1.2rem;
}

.pack-name {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.pack-description {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.8rem;
}

.pack-products {
    background: #f9f9f9;
    padding: 0.8rem;
    border-radius: 8px;
    margin-bottom: 0.8rem;
}

.pack-products strong {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--dark-color);
    font-size: 0.9rem;
}

.pack-products ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pack-products li {
    padding: 0.25rem 0;
    color: #555;
    font-size: 0.85rem;
}

.pack-prices {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.8rem;
}

.pack-price-original {
    text-decoration: line-through;
    color: #999;
    font-size: 1rem;
}

.pack-price-final {
    color: var(--primary-color);
    font-size: 1.4rem;
    font-weight: bold;
}

.btn-add-pack {
    width: 100%;
    padding: 0.8rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-add-pack:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-add-pack:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Catalog Packs Section */
.catalog-packs-section {
    margin-bottom: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
}

.catalog-packs-section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: white;
    text-align: center;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 100%;
}

.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    min-width: 0;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.product-image {
    width: 100%;
    height: 300px;
    background-color: var(--light-color);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
    position: relative;
}

.stock-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.stock-badge.out {
    background: #f44336;
    color: white;
}

.stock-badge.low {
    background: #ff9800;
    color: white;
}

/* Oferta Badge */
.offer-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #ff3d00, #ff6e40);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(255, 61, 0, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(255, 61, 0, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 16px rgba(255, 61, 0, 0.6);
    }
}

/* Contenedor de precios */
.price-container {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin: 0.75rem 0;
}

.original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 0.95rem;
}

.product-price.discounted {
    color: #ff3d00;
    font-weight: bold;
    font-size: 1.3rem;
}

.offer-description {
    font-size: 0.85rem;
    color: #ff6e40;
    font-style: italic;
    margin-top: 0.25rem;
}

.product-card.out-of-stock {
    opacity: 0.7;
}

.product-card.out-of-stock .btn-add-cart:disabled {
    background: #9e9e9e;
    cursor: not-allowed;
    opacity: 0.6;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    padding: 1.5rem;
    min-width: 0;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.product-description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
    height: 40px;
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-price {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 1rem;
}

.product-rating {
    color: var(--warning-color);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-small {
    flex: 1;
    padding: 0.6rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.btn-add-cart {
    background-color: var(--primary-color);
    color: white;
}

.btn-add-cart:hover {
    background-color: var(--secondary-color);
}

.btn-details {
    background-color: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-details:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Features Section */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-item {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-item h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.feature-item p {
    color: #666;
    font-size: 0.9rem;
}

/* Products Container */
.products-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
}

/* Botón hamburguesa para filtros */
.filters-toggle-btn {
    display: none; /* Oculto por defecto en desktop */
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 999;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(156, 39, 176, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filters-toggle-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(156, 39, 176, 0.5);
}

.hamburger-icon {
    font-size: 1.3rem;
    line-height: 1;
}

.filters-text {
    font-size: 0.95rem;
}

/* Overlay para cerrar sidebar en móvil */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

.sidebar {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    height: fit-content;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow-x: hidden;
    transition: transform 0.3s ease;
    position: sticky;
    top: 100px;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
}

.sidebar-header h3 {
    margin: 0;
    color: var(--primary-color);
}

.sidebar-close-btn {
    display: none; /* Oculto en desktop */
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.sidebar-close-btn:hover {
    background: #f5f5f5;
    color: var(--danger-color);
}

.filter-group {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
}

.filter-group:last-child {
    border-bottom: none;
}

.filter-title {
    color: var(--dark-color);
    margin-bottom: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: color 0.3s;
    padding: 0.5rem 0;
}

.filter-title:hover {
    color: var(--primary-color);
}

.filter-arrow {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    display: inline-block;
}

.filter-title.collapsed .filter-arrow {
    transform: rotate(-90deg);
}

.filter-content {
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 1;
}

.filter-content.collapsed {
    max-height: 0;
    opacity: 0;
}

.filter-group h4:not(.filter-title) {
    color: var(--dark-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

.filter-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.7rem;
    cursor: pointer;
    color: #666;
    word-break: break-word;
}

.filter-group input[type="range"] {
    width: 100%;
    margin-bottom: 0.5rem;
}

.products-main {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.products-main h2 {
    color: var(--dark-color);
    margin-bottom: 2rem;
}

/* Product Detail */
.product-detail-container {
    background: white;
    border-radius: 8px;
    padding: 0 2rem 2rem 2rem;
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 3rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    max-width: 1200px;
    margin: 0 auto;
}

.product-detail-image {
    width: 100%;
    height: 400px;
    background-color: var(--light-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.product-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-detail-info h2 {
    font-size: 1.75rem;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.product-detail-price {
    font-size: 1.75rem;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 1rem;
}

.product-detail-description {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.product-options {
    margin-bottom: 2rem;
}

.product-options h4 {
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.option-group {
    margin-bottom: 1rem;
}

.option-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #666;
}

.option-group select, .option-group input {
    width: 100%;
    padding: 0.7rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}

.quantity-selector {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 2rem;
}

.quantity-btn {
    background-color: var(--light-color);
    border: 1px solid var(--border-color);
    width: 40px;
    height: 40px;
    cursor: pointer;
    border-radius: 4px;
    font-weight: 600;
}

.quantity-btn:hover {
    background-color: var(--border-color);
}

.quantity-input {
    width: 60px;
    padding: 0.5rem;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}

.btn-add-to-cart {
    width: 100%;
    padding: 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 1rem;
}

.btn-add-to-cart:hover {
    background-color: var(--secondary-color);
}

/* Cart */
.cart-container {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.cart-container h2 {
    color: var(--dark-color);
    margin-bottom: 2rem;
}

.cart-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
}

.empty-cart {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.empty-cart p {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr 100px 100px 50px;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.cart-item-image {
    width: 120px;
    height: 120px;
    background-color: var(--light-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details h4 {
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.cart-item-details p {
    color: #666;
    font-size: 0.9rem;
}

.cart-item-price {
    font-weight: 600;
    color: var(--primary-color);
}

.cart-item-qty {
    width: 60px;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    text-align: center;
}

.btn-remove {
    background-color: var(--danger-color);
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
}

.btn-remove:hover {
    opacity: 0.8;
}

.cart-summary {
    background-color: var(--light-color);
    padding: 1.5rem;
    border-radius: 8px;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    color: #666;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark-color);
    padding-top: 1rem;
    border-top: 2px solid white;
    margin-bottom: 1.5rem;
}

.btn-checkout {
    width: 100%;
    padding: 1rem;
    background-color: var(--success-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-checkout:hover {
    background-color: #45a049;
}

/* About */
.about-container, .contact-container {
    background: white;
    border-radius: 8px;
    padding: 3rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    max-width: 800px;
    margin: 0 auto;
}

.contact-container form {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-container input, .contact-container textarea {
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

.contact-container textarea {
    min-height: 200px;
    resize: vertical;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s;
    overflow-y: auto;
    padding: 20px 0;
}

.modal-content {
    background-color: white;
    margin: 2rem auto;
    padding: 2.5rem;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s;
    position: relative;
}

.modal-content h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    font-weight: 600;
}

.modal-content h3 {
    color: var(--text-color);
    margin: 1.5rem 0 1rem;
    font-size: 1.2rem;
    font-weight: 600;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

/* Estilos para inputs del formulario */
.modal-content input[type="text"],
.modal-content input[type="email"],
.modal-content input[type="tel"],
.modal-content input[type="number"],
.modal-content textarea,
.modal-content select {
    width: 100%;
    padding: 0.875rem 1rem;
    margin: 0.5rem 0;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background-color: #fafafa;
}

.modal-content input:focus,
.modal-content textarea:focus,
.modal-content select:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(156, 39, 176, 0.1);
}

.modal-content input::placeholder,
.modal-content textarea::placeholder {
    color: #999;
}

.modal-content input:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.7;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    color: #aaa;
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    line-height: 1;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close:hover {
    color: var(--danger-color);
    background-color: rgba(244, 67, 54, 0.1);
    transform: rotate(90deg);
}

/* Payment Methods */
.payment-method-btn {
    transition: all 0.3s ease;
    font-family: inherit;
}

.payment-method-btn:active {
    transform: scale(0.98);
}

/* Footer */
.footer {
    background-color: var(--dark-color);
    color: white;
    padding: 3rem 1rem 1rem;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h4 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--secondary-color);
}

/* Media Query para pantallas grandes - Packs más compactos */
@media (min-width: 1200px) {
    .packs-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 1.2rem;
    }
    
    .pack-image {
        height: 160px;
    }
    
    .pack-content {
        padding: 1rem;
    }
    
    .pack-name {
        font-size: 1.1rem;
    }
    
    .pack-price-final {
        font-size: 1.3rem;
    }
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #999;
}

/* Pantallas grandes - Limitar ancho máximo de tarjetas */
@media (min-width: 1400px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 2rem;
    }
}

/* Desktop - Mantener sidebar visible siempre */
@media (min-width: 769px) {
    .filters-toggle-btn {
        display: none !important;
    }
    
    .sidebar-overlay {
        display: none !important;
    }
    
    .sidebar {
        position: sticky;
        transform: translateX(0) !important;
        width: auto;
        height: fit-content;
    }
    
    .sidebar-close-btn {
        display: none !important;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

/* Responsive - Tablets (768px and below) */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }

    .header {
        padding: 0.75rem 0;
    }

    .header-container {
        flex-wrap: wrap;
        gap: 0.75rem;
        padding: 0 0.5rem;
    }

    .logo h1 {
        font-size: 1.3rem;
    }

    .navbar ul {
        gap: 1rem;
        font-size: 0.85rem;
    }

    .search-bar input {
        width: 120px;
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }

    .cart-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .main-content {
        padding: 1rem 0.5rem;
    }

    .hero {
        padding: 2.5rem 1rem;
        margin-bottom: 1.5rem;
        border-radius: 12px;
    }

    .hero-title-line {
        font-size: 1.8rem;
    }

    .hero-title-line-3 {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-btn {
        font-size: 1rem;
        padding: 0.9rem 2rem;
    }

    .hero-particle {
        display: none;
    }

    .hero-content h2 {
        font-size: 1.5rem;
    }

    .hero-content p {
        font-size: 0.95rem;
    }

    .featured-products h3,
    .products-main h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }

    .product-image {
        height: 180px;
        font-size: 3rem;
    }

    .product-info {
        padding: 1rem;
    }

    .product-name {
        font-size: 1rem;
    }

    .product-price {
        font-size: 1.3rem;
    }

    .products-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        overflow-x: hidden;
    }

    /* Mostrar botón hamburguesa en tablets */
    .filters-toggle-btn {
        display: flex;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        width: 280px;
        z-index: 999;
        transform: translateX(-100%);
        padding: 1.5rem;
        border-radius: 0;
        overflow-y: auto;
        box-shadow: 4px 0 12px rgba(0, 0, 0, 0.15);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar-header {
        position: sticky;
        top: 0;
        background: white;
        z-index: 10;
        margin-bottom: 1rem;
        padding-bottom: 1rem;
    }

    .sidebar-close-btn {
        display: flex;
    }

    .filter-group {
        margin-bottom: 1rem;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 1rem;
    }

    .filter-group:last-child {
        border-bottom: none;
    }

    .filter-title {
        padding: 0.5rem 0;
        font-size: 1rem;
    }

    .filter-content label {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }

    .product-detail-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 1.5rem;
    }

    .product-detail-image {
        height: 500px;
    }

    .packs-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .pack-card {
        margin: 0 auto;
        max-width: 400px;
    }

    .cart-content {
        grid-template-columns: 1fr;
    }

    .cart-item {
        grid-template-columns: 80px 1fr 80px 40px;
        gap: 0.75rem;
        grid-template-areas:
            "image details details remove"
            "image price qty remove";
    }

    .cart-item-image {
        grid-area: image;
        width: 80px;
        height: 80px;
    }

    .cart-item-details {
        grid-area: details;
    }

    .cart-item-price {
        grid-area: price;
        font-size: 0.95rem;
    }

    .cart-item-qty {
        grid-area: qty;
        width: 50px;
        font-size: 0.85rem;
        padding: 0.4rem;
    }

    .btn-remove {
        grid-area: remove;
        padding: 0.4rem;
        font-size: 0.75rem;
    }

    .cart-summary {
        position: static;
        margin-top: 1.5rem;
    }

    .about-container, .contact-container {
        padding: 1rem;
    }

    .features {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .feature-item {
        padding: 1.5rem 1rem;
    }

    .feature-icon {
        font-size: 2.5rem;
        margin-bottom: 0.75rem;
    }

    .contact-form {
        max-width: 100%;
    }

    .modal-content {
        width: 95%;
        padding: 1.5rem;
        margin: 1rem auto;
    }

    .modal-content h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .modal-content h3 {
        font-size: 1.1rem;
        margin: 1rem 0 0.75rem;
    }

    .modal-content input,
    .modal-content textarea,
    .modal-content select {
        padding: 0.75rem 0.875rem;
        font-size: 0.95rem;
    }

    .close {
        right: 1rem;
        top: 1rem;
        font-size: 28px;
        width: 36px;
        height: 36px;
    }
}

/* Responsive - Mobile Phones (480px and below) */
@media (max-width: 480px) {
    body {
        font-size: 13px;
    }

    .header {
        padding: 0.5rem 0;
    }

    .header-container {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.5rem;
    }

    .logo h1 {
        font-size: 1.2rem;
        margin: 0;
    }

    .navbar {
        width: 100%;
    }

    .navbar ul {
        justify-content: center;
        gap: 0.75rem;
        font-size: 0.8rem;
        flex-wrap: wrap;
    }

    .navbar a {
        font-size: 0.8rem;
    }

    .header-actions {
        width: 100%;
        gap: 0.5rem;
    }

    .search-bar {
        flex: 1;
        min-width: 150px;
        padding: 0.2rem;
    }

    .search-bar input {
        width: 100%;
        min-width: 100px;
        font-size: 0.85rem;
        padding: 0.5rem;
    }

    .search-btn, .clear-search-btn {
        padding: 0.4rem 0.6rem;
        min-width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }

    .search-bar input {
        width: 100%;
        padding: 0.5rem;
        font-size: 0.8rem;
    }

    .cart-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
        white-space: nowrap;
    }

    .main-content {
        padding: 1rem 0.5rem;
    }

    .hero {
        padding: 2rem 1rem;
        margin-bottom: 1rem;
        border-radius: 6px;
    }

    .hero-content h2 {
        font-size: 1.3rem;
        margin-bottom: 0.75rem;
    }

    .hero-content p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    .primary-btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }

    .featured-products h3,
    .products-main h2 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 0.75rem;
    }

    .product-card {
        border-radius: 6px;
    }

    .product-image {
        height: 130px;
        font-size: 2.5rem;
    }

    .product-info {
        padding: 0.75rem;
    }

    .product-name {
        font-size: 0.9rem;
        margin-bottom: 0.3rem;
    }

    .product-description {
        font-size: 0.8rem;
        height: 30px;
    }

    .product-price {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }

    .product-rating {
        font-size: 0.8rem;
        margin-bottom: 0.75rem;
    }

    .product-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .btn-small {
        padding: 0.5rem;
        font-size: 0.8rem;
    }

    .products-container {
        grid-template-columns: 1fr;
        overflow-x: hidden;
    }

    /* Botón hamburguesa visible en móvil */
    .filters-toggle-btn {
        display: flex;
        bottom: 15px;
        left: 15px;
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        width: 85%;
        max-width: 300px;
        z-index: 999;
        transform: translateX(-100%);
        padding: 1rem;
        border-radius: 0;
        overflow-y: auto;
        box-shadow: 4px 0 12px rgba(0, 0, 0, 0.15);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar-header {
        position: sticky;
        top: 0;
        background: white;
        z-index: 10;
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
    }

    .sidebar-header h3 {
        font-size: 1.2rem;
    }

    .sidebar-close-btn {
        display: flex;
    }

    .filter-group {
        margin-bottom: 1rem;
        padding-bottom: 1rem;
    }

    .filter-title {
        font-size: 0.95rem;
        margin-bottom: 0.75rem;
    }

    .filter-content label {
        font-size: 0.9rem;
        word-break: break-word;
    }

    .filter-group label {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }

    .product-detail-container {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .product-detail-image {
        height: 350px;
    }

    .product-detail-info h2 {
        font-size: 1.3rem;
    }

    .cart-content {
        grid-template-columns: 1fr;
    }

    .cart-item {
        grid-template-columns: 60px 1fr;
        gap: 0.5rem;
        padding: 0.75rem;
        grid-template-areas:
            "image details"
            "image price"
            "qty qty"
            "remove remove";
    }

    .cart-item-image {
        grid-area: image;
        width: 60px;
        height: 60px;
    }

    .cart-item-details {
        grid-area: details;
    }

    .cart-item-details h4 {
        font-size: 0.9rem;
        margin-bottom: 0.25rem;
    }

    .cart-item-details p {
        font-size: 0.8rem;
    }

    .cart-item-price {
        grid-area: price;
        font-size: 0.95rem;
        align-self: end;
    }

    .cart-item-qty {
        grid-area: qty;
        width: 100%;
        max-width: 80px;
        font-size: 0.85rem;
        padding: 0.5rem;
        margin-top: 0.5rem;
    }

    .btn-remove {
        grid-area: remove;
        width: 100%;
        padding: 0.5rem;
        font-size: 0.85rem;
        margin-top: 0.25rem;
    }

    .cart-summary {
        background: white;
        padding: 1rem;
        border-radius: 6px;
        margin-top: 1rem;
    }

    .about-container, .contact-container {
        padding: 1rem;
    }

    .features {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .feature-item {
        padding: 1rem;
    }

    .feature-icon {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }

    .feature-item h4 {
        font-size: 0.95rem;
        margin-bottom: 0.3rem;
    }

    .feature-item p {
        font-size: 0.85rem;
    }

    .contact-form {
        max-width: 100%;
    }

    .contact-form input,
    .contact-form textarea {
        font-size: 16px;
        width: 100%;
    }

    .modal-content {
        width: 95%;
        padding: 1.25rem;
        margin: 0.5rem auto;
    }

    .modal-content h2 {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }

    .modal-content h3 {
        font-size: 1rem;
        margin: 1rem 0 0.5rem;
    }

    .modal-content input,
    .modal-content textarea,
    .modal-content select {
        padding: 0.7rem 0.75rem;
        font-size: 16px; /* Prevent zoom on iOS */
        margin: 0.4rem 0;
    }

    .close {
        right: 0.75rem;
        top: 0.75rem;
        font-size: 26px;
        width: 32px;
        height: 32px;
    }

    .modal-content button[type="submit"] {
        padding: 0.875rem !important;
        font-size: 1rem !important;
    }
}

/* Extra Small Devices (under 360px) */
@media (max-width: 360px) {
    .header-container {
        padding: 0.5rem 0.25rem;
    }

    .logo h1 {
        font-size: 1rem;
    }

    .navbar ul {
        gap: 0.5rem;
        font-size: 0.75rem;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .product-image {
        height: 100px;
        font-size: 2rem;
    }

    .product-info {
        padding: 0.5rem;
    }

    .product-price {
        font-size: 1rem;
    }

    .cart-item {
        grid-template-columns: 50px 1fr;
        gap: 0.4rem;
        padding: 0.6rem;
    }

    .cart-item-image {
        width: 50px;
        height: 50px;
    }

    .cart-item-details h4 {
        font-size: 0.85rem;
    }

    .cart-item-details p {
        font-size: 0.75rem;
    }

    .cart-item-price {
        font-size: 0.9rem;
    }

    .cart-item-qty {
        max-width: 70px;
        padding: 0.4rem;
        font-size: 0.8rem;
    }

    .btn-remove {
        padding: 0.4rem;
        font-size: 0.8rem;
    }
}

/* ============================================
   CHAT DE ASISTENCIA
   ============================================ */

.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.chat-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(156, 39, 176, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
        box-shadow: 0 4px 12px rgba(156, 39, 176, 0.4);
    }
    50% {
        transform: translateY(-8px);
        box-shadow: 0 12px 20px rgba(156, 39, 176, 0.5);
    }
}

.chat-toggle:hover {
    animation: none;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(156, 39, 176, 0.6);
}

.chat-toggle:active {
    transform: scale(0.95);
}

.chat-icon {
    display: block;
    line-height: 1;
}

.chat-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    border: 2px solid white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.chat-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 600px;
    max-height: calc(100vh - 120px);
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-window.active {
    display: flex;
}

.chat-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.chat-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.chat-status {
    font-size: 12px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat-status::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #4caf50;
    border-radius: 50%;
    display: inline-block;
}

.chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.chat-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.chat-message {
    display: flex;
    flex-direction: column;
    max-width: 85%;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.bot-message {
    align-self: flex-start;
}

.user-message {
    align-self: flex-end;
}

.message-content {
    padding: 12px 16px;
    border-radius: 12px;
    line-height: 1.5;
    font-size: 14px;
}

.bot-message .message-content {
    background: white;
    color: var(--text-color);
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.user-message .message-content {
    background: var(--primary-color);
    color: white;
    border-bottom-right-radius: 4px;
}

.message-content p {
    margin: 0 0 8px 0;
}

.message-content p:last-child {
    margin-bottom: 0;
}

.message-content a {
    color: var(--primary-color);
    text-decoration: underline;
    font-weight: 600;
}

.bot-message .message-content a {
    color: var(--primary-color);
}

.user-message .message-content a {
    color: white;
}

.message-content a:hover {
    opacity: 0.8;
}

.message-time {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
    padding: 0 4px;
}

.chat-quick-replies {
    padding: 12px 16px;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.quick-reply-btn {
    padding: 8px 12px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.quick-reply-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.chat-input-container {
    padding: 16px;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    gap: 8px;
}

.chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 24px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.chat-input:focus {
    border-color: var(--primary-color);
}

.chat-send-btn {
    width: 44px;
    height: 44px;
    background: var(--primary-color);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.chat-send-btn:hover {
    background: var(--secondary-color);
    transform: scale(1.05);
}

.chat-send-btn:active {
    transform: scale(0.95);
}

/* Responsive Chat */
@media (max-width: 480px) {
    .chat-window {
        width: calc(100vw - 20px);
        height: calc(100vh - 100px);
        bottom: 80px;
        right: 10px;
    }
    
    .chat-widget {
        bottom: 10px;
        right: 10px;
    }
    
    .chat-toggle {
        width: 56px;
        height: 56px;
        font-size: 24px;
    }
}
