* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-dark: hsl(0, 0%, 4%);
    --fg-light: hsl(0, 0%, 98%);
    --card-bg: hsl(0, 0%, 8%);
    --netflix-red: hsl(357, 92%, 47%);
    --text-secondary: hsl(0, 0%, 70%);
    --text-muted: hsl(0, 0%, 50%);
    --border: hsl(0, 0%, 18%);
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg-dark);
    color: var(--fg-light);
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Navigation */
.shop-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
}

.nav-logo {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--netflix-red);
}

.nav-search {
    display: flex;
    align-items: center;
    flex: 1;
    max-width: 500px;
    margin: 0 2rem;
}

.search-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border);
    color: var(--fg-light);
    padding: 0.5rem 1rem;
    border-radius: 0.375rem 0 0 0.375rem;
    font-size: 0.9375rem;
    outline: none;
    transition: all 0.3s;
}

.search-input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--netflix-red);
}

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

.search-btn {
    background: var(--netflix-red);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0 0.375rem 0.375rem 0;
    cursor: pointer;
    font-size: 1.125rem;
    transition: all 0.3s;
}

.search-btn:hover {
    background: hsl(357, 92%, 40%);
}

.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-menu a {
    color: var(--fg-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--netflix-red);
}

/* Botón del carrito */
.cart-button {
    background: var(--netflix-red);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
}

.cart-button:hover {
    background: hsl(357, 92%, 40%);
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
}

.cart-count {
    background: white;
    color: var(--netflix-red);
    border-radius: 50%;
    padding: 0.125rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 0.25rem;
}

/* Botones de autenticación */
.login-btn,
.register-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 600;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-btn:hover,
.register-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--netflix-red);
    color: white;
}

.register-btn {
    background: var(--netflix-red);
    border-color: var(--netflix-red);
}

.register-btn:hover {
    background: hsl(357, 92%, 40%);
    border-color: hsl(357, 92%, 40%);
}

/* Usuario logueado */
.user-link {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.user-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--netflix-red);
}

.logout-btn {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.logout-btn:hover {
    color: var(--netflix-red);
}

/* Carrito flotante */
.floating-cart {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: var(--card-bg);
    border-left: 2px solid var(--netflix-red);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.5);
    z-index: 10000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.floating-cart.show {
    right: 0;
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.floating-cart.show+.cart-overlay,
.cart-overlay.show {
    opacity: 1;
    visibility: visible;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.cart-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--netflix-red);
}

.cart-close {
    background: none;
    border: none;
    color: var(--fg-light);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
}

.cart-close:hover {
    color: var(--netflix-red);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.empty-cart {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

.cart-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 0.375rem;
}

.cart-item-details {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.cart-item-price {
    color: var(--netflix-red);
    font-weight: 700;
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.25rem;
}

.cart-item-remove:hover {
    color: var(--netflix-red);
}

.cart-footer {
    border-top: 2px solid var(--netflix-red);
    padding: 1.5rem;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--fg-light);
}

.cart-total span:last-child {
    color: var(--netflix-red);
}

.btn-checkout-cart {
    display: block;
    width: 100%;
    background: var(--netflix-red);
    color: white;
    text-align: center;
    padding: 1rem;
    border-radius: 0.5rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-checkout-cart:hover {
    background: hsl(357, 92%, 40%);
    transform: translateY(-2px);
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .floating-cart {
        width: 100%;
        right: -100%;
    }
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    background: linear-gradient(180deg, transparent 0%, var(--bg-dark) 100%),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><rect fill="%23dc143c" width="1200" height="600"/></svg>');
    background-size: cover;
    background-position: center;
    padding-top: 80px;
}

.hero-content {
    text-align: center;
    padding: 4rem 1rem;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--netflix-red), #ff4757);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero-cta {
    display: inline-block;
    background: var(--netflix-red);
    color: white;
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.3s;
    box-shadow: 0 0 30px rgba(220, 20, 60, 0.4);
}

.hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 40px rgba(220, 20, 60, 0.6);
}

/* Product Carousel */
.product-section {
    padding: 3rem 0 2rem;
    position: relative;
}

.product-section:first-of-type {
    padding-top: 100px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding: 0 1rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
    padding: 0 1rem;
}

.product-card {
    background: var(--card-bg);
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.3s;
    border: 1px solid var(--border);
}

.product-card:hover {
    transform: scale(1.03);
    box-shadow: 0 0 20px rgba(220, 20, 60, 0.3);
    border-color: var(--netflix-red);
}

.product-image {
    width: 100%;
    height: 140px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--netflix-red), #ff4757);
}

.product-info {
    padding: 1rem;
}

.product-name {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.375rem;
}

.product-description {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.price-current {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--netflix-red);
}

.price-original {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.product-features {
    list-style: none;
    margin-bottom: 1rem;
}

.product-features li {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    padding: 0.125rem 0;
}

.product-features li:before {
    content: "✓ ";
    color: var(--netflix-red);
    font-weight: 700;
}

.btn-buy {
    width: 100%;
    background: var(--netflix-red);
    color: white;
    padding: 0.75rem;
    border: none;
    border-radius: 0.375rem;
    font-weight: 700;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-buy:hover {
    background: hsl(357, 92%, 40%);
    transform: translateY(-2px);
}

.btn-buy.btn-disabled,
.btn-buy:disabled {
    background: #666;
    color: #999;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-buy.btn-disabled:hover,
.btn-buy:disabled:hover {
    background: #666;
    transform: none;
}

/* Footer */
footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    padding: 3rem 0;
    text-align: center;
    margin-top: 4rem;
}

.footer-content {
    color: var(--text-secondary);
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--netflix-red);
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 2rem;
    }
}

/* Stock Badges */
.stock-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.stock-available {
    background: linear-gradient(135deg, #2ed573 0%, #26de81 100%);
    color: white;
}

.stock-out {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
}

/* Asegurar que las tarjetas de producto tengan posición relativa */
.product-card {
    position: relative;
}