/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #e74c3c;
    --accent-color: #f39c12;
    --text-color: #333;
    --text-light: #666;
    --background-light: #f8f9fa;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 5px 20px rgba(0, 0, 0, 0.15);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden;
    scroll-padding-top: 80px; /* For fixed header */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header and Navigation */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid #eee;
}

.navbar {
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

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

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--secondary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--secondary-color);
}

.cart-icon {
    font-size: 1.2rem;
    padding: 8px 12px;
    background: var(--background-light);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.cart-icon:hover {
    background: var(--secondary-color);
    color: var(--white);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger .bar {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    margin: 3px 0;
    transition: var(--transition);
}

/* Main Content */
.main-content {
    margin-top: 80px;
    flex-grow: 1;
}

/* Estilos para el formulario de dirección */
#shipping-address-container {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.shipping-title {
    font-size: 1.2em;
    margin-bottom: 15px;
}

#shipping-form .form-group {
    margin-bottom: 15px;
}

#shipping-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

#shipping-form input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

#shipping-form .form-row {
    display: flex;
    gap: 15px;
}

#shipping-form .form-row .form-group {
    flex: 1;
}

.hidden {
    display: none;
}

/* Section Management */
.section {
    min-height: calc(100vh - 80px);
    padding: 80px 0 40px;
    scroll-margin-top: 80px;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
    font-weight: 600;
}

.page-title {
    font-size: 2.8rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
    font-weight: 700;
    padding: 2rem 0;
}

/* Hero Section */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, var(--background-light) 0%, #ffffff 100%);
}

.hero-content {
    padding: 2rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.cta-button {
    background: var(--secondary-color);
    color: var(--white);
    padding: 15px 30px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cta-button:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-placeholder {
    width: 400px;
    height: 500px;
    background: linear-gradient(45deg, #f0f0f0, #e0e0e0);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--text-light);
    box-shadow: var(--shadow);
}

/* Featured Products */
.featured-products {
    padding: 4rem 0;
    background: var(--white);
}

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

/* Product Cards */
.product-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-hover);
}

.product-card,
.product-card:link,
.product-card:visited {
    text-decoration: none;
    color: inherit;
}

.product-image {
    height: 250px;
    overflow: hidden;
}

.product-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--text-light);
}

.product-info {
    padding: 1.5rem;
}

.product-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.product-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.product-link {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
    text-align: center;
}

.product-link:hover {
    background: #34495e;
    transform: translateY(-1px);
}

.add-to-cart {
    width: 100%;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 12px;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.add-to-cart:hover {
    background: #34495e;
    transform: translateY(-1px);
}

/* Filters */
.filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 12px 24px;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

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

/* Products Gallery */
.products-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

/* About Section */
#sobre-nosotros {
    padding: 4rem 0;
    background: var(--background-light);
}

/* Company Info */
.company-info {
    margin-top: 4rem;
    padding: 3rem 0;
}

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

.info-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.info-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.info-card h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.info-card p {
    color: var(--text-light);
    line-height: 1.6;
}

.about-content {
    max-width: 1000px;
    margin: 0 auto;
}

.about-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
    align-items: start;
}

.about-text h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    margin-top: 2rem;
}

.about-text h3:first-child {
    margin-top: 0;
}

.about-text h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1rem;
    margin-top: 2.5rem;
}

.about-text h2:first-child {
    margin-top: 0;
}

.about-text p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.values-list {
    list-style: none;
    padding: 0;
}

.values-list li {
    padding: 0.8rem 0;
    color: var(--text-color);
    font-size: 1.1rem;
    border-bottom: 1px solid #eee;
}

.values-list li:last-child {
    border-bottom: none;
}

.about-placeholder {
    width: 100%;
    height: 300px;
    background: linear-gradient(45deg, #f0f0f0, #e0e0e0);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-light);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.stat {
    text-align: center;
    padding: 1.5rem;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.stat h3 {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.stat p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0;
}

/* Team Section */
.team-section {
    text-align: center;
}

.team-section h3 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 2rem;
}

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

.team-member {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.team-member:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.member-photo {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.team-member h4 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.member-role {
    color: var(--secondary-color);
    font-weight: 600;
    font-style: normal;
    margin-bottom: 1rem;
}

.member-desc {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.6;
}

.team-intro {
    text-align: center;
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Footer */
.footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: var(--accent-color);
}

.footer-section p,
.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
    margin-bottom: 0.5rem;
    display: block;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--white);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: inline-block;
    margin-bottom: 0;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #34495e;
    color: #95a5a6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow);
        padding: 2rem 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hero {
        grid-template-columns: 1fr;
        padding: 2rem 1rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-placeholder {
        width: 300px;
        height: 350px;
        margin: 0 auto;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .products-grid,
    .products-gallery {
        grid-template-columns: 1fr;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .filters {
        flex-direction: column;
        align-items: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-placeholder {
        width: 250px;
        height: 300px;
    }
    
    .team-grid {
        grid-template-columns: 1fr;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

html {
    scroll-behavior: smooth;
}

/* Product Card Hover Effects */
.products-gallery .product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(231, 76, 60, 0.1));
    opacity: 0;
    transition: var(--transition);
    z-index: 1;
}

#product-detail-container {
    padding-top: 2rem; /* Add some spacing */
}

.products-gallery .product-card {
    position: relative;
}

.product-card:hover::before {
    opacity: 1;
}

/* Product Detail Page Layout */
.product-detail-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2rem;
    padding: 2rem 0;
}

.main-image-container img {
    max-width: 100%;
    height: auto;
    display: block;
}

.thumbnail-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.thumbnail-img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
}

.thumbnail-img.active {
    border-color: var(--primary-color);
}

.product-info-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-title-detail {
    color: var(--primary-color);
}

.product-price-detail {
    color: var(--secondary-color);
    font-weight: 700;
}

.option-group {
    margin-bottom: 1rem;
}

.size-selector { display: flex; gap: 8px; flex-wrap: wrap; }
.size-option {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
}
.size-option.selected { border-color: var(--primary-color); }

.color-selector { display: flex; gap: 8px; }
.color-option { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 2px #ddd; cursor: pointer; }
.color-option.selected { box-shadow: 0 0 0 2px var(--primary-color); }

.add-to-cart-btn {
    padding: 12px 16px;
    border: none;
    border-radius: var(--border-radius);
    background: var(--primary-color);
    color: var(--white);
    font-weight: 600;
    cursor: pointer;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(44, 62, 80, 0.95);
    color: #fff;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: var(--shadow-hover);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .2s ease, transform .2s ease;
    z-index: 2000;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Focus states for accessibility */
.size-option:focus,
.color-option:focus,
.page-btn:focus,
.filter-btn:focus,
.add-to-cart-btn:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .product-detail-layout { grid-template-columns: 1fr; }
}

/* Loading Animation for Product Placeholders */
.product-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 2s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Cart Page Styles */
.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr auto auto;
    gap: 1.5rem;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding: 1.5rem 0;
}

.cart-item-image {
    width: 100px;
    height: 120px;
    object-fit: cover;
    border-radius: var(--border-radius);
}

.cart-item-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.cart-item-meta {
    font-size: 0.9rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.color-swatch {
    display: inline-block;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 1px solid #ddd;
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
}

.quantity-btn {
    background: none;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 1.2rem;
}

.quantity-value {
    padding: 0 10px;
}

.remove-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.8rem;
}

.cart-item-total {
    font-size: 1.2rem;
    font-weight: 600;
    text-align: right;
}

.cart-summary {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #000;
    width: 50%;
    margin-left: auto;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.summary-row.total {
    font-weight: 600;
    font-size: 1.5rem;
}

.checkout-btn {
    width: 100%;
    margin-top: 1rem;
}

.cart-empty {
    text-align: center;
    padding: 4rem 0;
}

.cart-empty p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* Cart Icon Badge */
.cart-icon {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -10px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1;
}

/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 3rem;
    gap: 0.5rem;
}

.page-btn {
    padding: 10px 15px;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.page-btn:hover,
.page-btn.active {
    background: var(--primary-color);
    color: var(--white);
}
