:root {
    --primary-color: #1a1a1a;
    --background-color: #ffffff;
    --secondary-background: #f8f8f8;
    --accent-color: #5a5a5a;
    --text-light: #666666;
    --border-color: #e5e5e5;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --spacing-container: 1200px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-body);
    background-color: var(--background-color);
    color: var(--primary-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Helpers */
.container {
    max-width: var(--spacing-container);
    margin: 0 auto;
    padding: 0 2rem;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid var(--primary-color);
    transition: var(--transition);
    cursor: pointer;
    font-size: 0.85rem;
}

.btn:hover {
    background-color: transparent;
    color: var(--primary-color);
}

/* Navigation */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-decoration: none;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.9rem;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

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

.icon {
    width: 24px;
    height: 24px;
    cursor: pointer;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Hero Section */
.hero {
    height: 80vh;
    width: 100%;
    margin-bottom: 4rem;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--secondary-background);
    background-image: url('fotos/fondo.jpeg');
    background-size: cover;
    background-position: center;
    transition: var(--transition);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    /* Initial subtle overlay for text readability */
    transition: background 0.5s ease;
    z-index: 1;
}

.hero:hover::before {
    background: rgba(0, 0, 0, 0.6);
    /* Darker overlay on hover */
}

.hero-content {
    text-align: center;
    z-index: 2;
    padding: 2rem;
    max-width: 600px;
    color: white;
    /* Ensure text is white on the image */
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    margin-bottom: 1rem;
    line-height: 1.1;
    color: white;
    /* Explicitly white */
}

.hero p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    /* Lighter text for description */
    margin-bottom: 2rem;
}

/* Products Section */
.products-section {
    padding: 4rem 0;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    text-align: center;
    margin-bottom: 3rem;
    font-weight: 400;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    cursor: pointer;
    transition: var(--transition);
}

.product-image-wrapper {
    width: 100%;
    aspect-ratio: 3/4;
    overflow: hidden;
    margin-bottom: 1rem;
    background-color: #f0f0f0;
    position: relative;
}

.product-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.product-card:hover .product-image-wrapper img {
    transform: scale(1.05);
}

.add-to-cart-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    padding: 1rem;
    text-align: center;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    border-top: 1px solid var(--border-color);
}

.product-card:hover .add-to-cart-overlay {
    transform: translateY(0);
}

.product-info {
    text-align: center;
}

.product-title {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.product-price {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Footer (Simplified) */
footer {
    background-color: var(--secondary-background);
    color: var(--primary-color);
    padding: 4rem 0 2rem;
    margin-top: 5rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: left;
}

.footer-column h4 {
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 0.8rem;
}

.footer-column ul li a {
    text-decoration: none;
    color: var(--text-light);
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-column ul li a:hover {
    color: var(--primary-color);
}

.copyright {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
    font-size: 0.8rem;
    color: var(--text-light);
}

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

    .hero h1 {
        font-size: 2.5rem;
    }

    .container {
        padding: 0 1.5rem;
    }
}

/* =============================================
   CART ICON BUTTON (header)
   ============================================= */
.cart-icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: var(--font-body);
    letter-spacing: 0.5px;
    color: var(--primary-color);
    padding: 0;
    transition: opacity 0.2s;
}

.cart-icon-btn:hover {
    opacity: 0.6;
}

/* =============================================
   CART OVERLAY
   ============================================= */
.cart-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1100;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cart-overlay.open {
    display: block;
    opacity: 1;
}

/* =============================================
   CART SIDEBAR
   ============================================= */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    max-width: 100vw;
    height: 100vh;
    background: #ffffff;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -4px 0 30px rgba(0, 0, 0, 0.12);
}

.cart-sidebar.open {
    transform: translateX(0);
}

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

.cart-sidebar-header h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.cart-close-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--primary-color);
    line-height: 1;
    padding: 0.2rem 0.4rem;
    transition: opacity 0.2s;
}

.cart-close-btn:hover {
    opacity: 0.5;
}

/* Cart items list */
.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 1.8rem;
}

.cart-empty {
    color: var(--text-light);
    font-size: 0.9rem;
    text-align: center;
    margin-top: 3rem;
}

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

.cart-item-img {
    width: 64px;
    height: 80px;
    object-fit: cover;
    background: var(--secondary-background);
    flex-shrink: 0;
}

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

.cart-item-title {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.3rem;
}

.cart-item-price {
    font-size: 0.85rem;
    color: var(--text-light);
}

.cart-item-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    font-size: 0.85rem;
    padding: 0.3rem;
    transition: color 0.2s;
}

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

/* Cart footer */
.cart-footer {
    padding: 1.5rem 1.8rem;
    border-top: 1px solid var(--border-color);
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
    font-weight: 500;
    font-size: 0.95rem;
}

.checkout-btn {
    width: 100%;
    text-align: center;
    padding: 1rem;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
}

.checkout-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.cart-note {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 0.8rem;
}

/* =============================================
   SKELETON LOADING
   ============================================= */
@keyframes shimmer {
    0%   { background-position: -600px 0; }
    100% { background-position: 600px 0; }
}

.skeleton-img,
.skeleton-text {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 600px 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 2px;
}

.skeleton-img {
    width: 100%;
    aspect-ratio: 3/4;
    margin-bottom: 1rem;
}

.skeleton-text {
    height: 14px;
    margin-bottom: 0.7rem;
    width: 80%;
}

.skeleton-text.short {
    width: 40%;
    height: 12px;
}

/* Error / empty state */
.no-products {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-light);
    padding: 3rem 0;
    font-size: 0.95rem;
}
