/* Variables */
:root {
    /* Colores según la imagen */
    --primary-color: #0D3327; /* Verde oscuro de fondo */
    --secondary-color: #B08840; /* Dorado para logo y acentos */
    --accent-color: #6E2537; /* Burdeos para botones */
    --light-color: #f5f3eb; /* Color claro para textos sobre fondo oscuro */
    --dark-color: #1E1E1E; /* Negro suavizado para textos */
    --bg-color: #FFFFFF; /* Blanco para el fondo general */
    --light-bg: #fafafa; /* Fondo gris muy claro */
    
    /* Fuentes */
    --heading-font: 'Playfair Display', serif;
    --body-font: 'Poppins', sans-serif;
    
    /* Tamaños */
    --container-width: 1200px;
    
    /* Sombras */
    --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.12);
    --shadow-heavy: 0 8px 30px rgba(0, 0, 0, 0.15);
}

/* Estilos Generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--body-font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--bg-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero Section */
.hero-container {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1a4d3a 100%);
    color: var(--light-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    border-radius: 0 0 32px 32px;
    overflow: hidden;
    position: relative;
}

.hero-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20"><defs><pattern id="grain" width="100" height="20" patternUnits="userSpaceOnUse"><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.03)"/></pattern></defs><rect width="100" height="20" fill="url(%23grain)"/></svg>');
    opacity: 0.4;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 50px;
    position: relative;
    z-index: 10;
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.logo a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.logo img {
    width: 80px;
    height: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.logo h1 {
    font-family: var(--heading-font);
    font-size: 24px;
    font-weight: 600;
    color: var(--secondary-color);
    text-align: center;
    line-height: 1.1;
    letter-spacing: 0.5px;
}

.logo h1 span {
    font-size: 20px;
    font-weight: 400;
}

nav ul {
    display: flex;
    gap: 35px;
}

nav ul li a {
    color: var(--secondary-color);
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    position: relative;
    padding: 8px 0;
}

nav ul li a:hover, 
nav ul li a.active {
    color: var(--light-color);
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}

/* Hero Section */
.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 60px 50px;
    flex: 1;
    position: relative;
    z-index: 10;
}

.hero-content {
    flex: 1;
    padding-right: 40px;
}

.hero-content h2 {
    font-family: var(--heading-font);
    font-size: 52px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 24px;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.hero-content p {
    font-size: 18px;
    color: rgba(245, 243, 235, 0.9);
    margin-bottom: 35px;
    max-width: 520px;
    font-weight: 300;
    line-height: 1.7;
}

.btn-primary {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--light-color);
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: var(--body-font);
    box-shadow: 0 4px 15px rgba(110, 37, 55, 0.3);
}

.btn-primary:hover {
    background-color: #7e2a3e;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(110, 37, 55, 0.4);
}

.btn-secondary {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-color) 0%, #7e2a3e 100%);  /* ← Solo esto */
    color: white;
    border: 2px solid var(--accent-color);
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    cursor: pointer;
    font-family: var(--body-font);
}

.btn-secondary:hover {
    background-color: var(--accent-color);
    color: var(--light-color);
    transform: translateY(-2px);
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    max-height: 550px;
    border-radius: 16px;
    box-shadow: var(--shadow-heavy);
}

/* Featured Products Section */
.featured-products {
    padding: 100px 0;
    background-color: var(--light-bg);
}

.featured-products h2 {
    font-family: var(--heading-font);
    font-size: 42px;
    font-weight: 600;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 60px;
    letter-spacing: -0.5px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 35px;
}

.product-card {
    background-color: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-heavy);
}

.product-image {
    height: 280px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f8f8 0%, #f0f0f0 100%);
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 25px;
}

.product-info h3 {
    font-family: var(--heading-font);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--primary-color);
    line-height: 1.3;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.current-price {
    font-weight: 700;
    font-size: 22px;
    color: var(--accent-color);
}

.original-price {
    font-size: 16px;
    text-decoration: line-through;
    color: #999;
}

.add-to-cart {
    width: 100%;
    padding: 12px;
    background-color: var(--primary-color);
    color: var(--light-color);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--body-font);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.add-to-cart:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
}

.loading {
    text-align: center;
    grid-column: 1 / -1;
    padding: 60px;
    color: #888;
    font-size: 18px;
    font-weight: 300;
}

/* About Section */
.about-section {
    padding: 100px 0;
    background-color: white;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content h2 {
    font-family: var(--heading-font);
    font-size: 42px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 30px;
    letter-spacing: -0.5px;
}

.about-content p {
    margin-bottom: 30px;
    color: #555;
    font-size: 18px;
    line-height: 1.7;
    font-weight: 300;
}

/* Footer Mejorado - Delgado y Profesional */
footer {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding: 30px 0;
    border-top: 1px solid rgba(176, 136, 64, 0.2);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.footer-logo img {
    width: 45px;
    height: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.footer-logo h3 {
    font-family: var(--heading-font);
    font-size: 18px;
    font-weight: 600;
    color: var(--secondary-color);
    letter-spacing: 0.5px;
}

.footer-info {
    display: flex;
    align-items: center;
    gap: 40px;
}

.footer-contact {
    display: flex;
    gap: 25px;
    font-size: 14px;
    font-weight: 400;
}

.footer-contact span {
    color: rgba(245, 243, 235, 0.8);
    transition: color 0.3s ease;
}

.footer-contact span:hover {
    color: var(--light-color);
}

.footer-copyright {
    font-size: 14px;
    color: rgba(176, 136, 64, 0.7);
    font-weight: 300;
}

/* Header para páginas internas (shop, contact, profile, etc.) */
.shop-header {
    background: linear-gradient(135deg, #38101a 0%, #7e2a3e 100%);
    padding: 20px 0;
    box-shadow: var(--shadow-medium);
    position: relative;
}


.shop-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20"><defs><pattern id="grain" width="100" height="20" patternUnits="userSpaceOnUse"><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.03)"/></pattern></defs><rect width="100" height="20" fill="url(%23grain)"/></svg>');
    opacity: 0.4;
}

.shop-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 10;
}

.shop-header .logo img {
    width: 100px;
    height: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.shop-header .logo h1 {
    font-size: 20px;
    font-weight: 600;
}

.shop-header .logo h1 span {
    font-size: 18px;
    font-weight: 400;
}

.shop-header nav ul {
    display: flex;
    gap: 30px;
}

.shop-header nav ul li a {
    color: var(--secondary-color);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    position: relative;
    padding: 8px 0;
}

.shop-header nav ul li a:hover,
.shop-header nav ul li a.active {
    color: var(--light-color);
}

.shop-header nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

.shop-header nav ul li a:hover::after,
.shop-header nav ul li a.active::after {
    width: 100%;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 25px;
}

.search-bar {
    position: relative;
}

.search-bar input {
    padding: 12px 45px 12px 18px;
    border: none;
    border-radius: 25px;
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--light-color);
    width: 250px;
    font-size: 14px;
    font-family: var(--body-font);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.search-bar input:focus {
    outline: none;
    background-color: rgba(255, 255, 255, 0.25);
    width: 280px;
    box-shadow: 0 0 0 3px rgba(176, 136, 64, 0.2);
}

.search-bar input::placeholder {
    color: rgba(245, 243, 235, 0.7);
}

.search-bar button {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.search-bar button:hover {
    background-color: rgba(176, 136, 64, 0.2);
}

.search-bar button svg {
    width: 18px;
    height: 18px;
    color: var(--secondary-color);
}

.header-actions a {
    color: var(--secondary-color);
    font-size: 14px;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 20px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.header-actions a:hover {
    background-color: rgba(176, 136, 64, 0.2);
    color: var(--light-color);
    transform: translateY(-1px);
}

.cart-icon {
    position: relative;
    padding: 10px !important;
}

.cart-icon svg {
    width: 24px;
    height: 24px;
    color: var(--secondary-color);
    transition: all 0.3s ease;
}

.cart-icon:hover svg {
    color: var(--light-color);
    transform: scale(1.1);
}

.cart-count {
    position: absolute;
    top: 3px;
    right: 3px;
    background: linear-gradient(135deg, var(--accent-color) 0%, #7e2a3e 100%);
    color: white;
    font-size: 10px;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(110, 37, 55, 0.4);
    border: 2px solid var(--primary-color);
}

/* Pagination general */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 60px;
    gap: 10px;
}

.pagination a, .pagination span {
    display: inline-block;
    padding: 12px 18px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    transition: all 0.3s ease;
    color: var(--primary-color);
    font-weight: 600;
    background-color: white;
}

.pagination a:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1a4d3a 100%);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(13, 51, 39, 0.2);
}

.pagination-current {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1a4d3a 100%);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(13, 51, 39, 0.2);
}

/* Auth elements display */
.login-required {
    display: none;
}

/* Profile icon styles */
.profile-icon {
    position: relative;
    padding: 8px !important;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.profile-icon svg {
    width: 24px;
    height: 24px;
    color: var(--secondary-color);
    transition: all 0.3s ease;
}

.profile-icon:hover {
    background-color: rgba(176, 136, 64, 0.2);
}

.profile-icon:hover svg {
    color: var(--light-color);
    transform: scale(1.05);
}

/* Form styles */
.form-container {
    max-width: 500px;
    margin: 80px auto;
    padding: 40px;
    background-color: #fff;
    border-radius: 16px;
    box-shadow: var(--shadow-medium);
}

.form-container h2 {
    font-family: var(--heading-font);
    font-size: 32px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 30px;
    text-align: center;
    letter-spacing: -0.5px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    padding: 14px;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    font-family: var(--body-font);
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(176, 136, 64, 0.1);
}

.form-btn {
    width: 100%;
    padding: 14px;
    background-color: var(--primary-color);
    color: var(--light-color);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--body-font);
    font-weight: 600;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.form-btn:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
}

.form-footer {
    margin-top: 25px;
    text-align: center;
}

.form-footer a {
    color: var(--accent-color);
    font-weight: 500;
}

.form-footer a:hover {
    text-decoration: underline;
}

.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-weight: 500;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

/* Responsive */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-content h2 {
        font-size: 44px;
    }
}

/* Responsive */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 20px;
        gap: 15px;
    }
    
    /* Responsive para shop-header */
    .shop-header .container {
        flex-direction: column;
        gap: 15px;
    }
    
    /* Navegación centrada */
    nav ul {
        display: flex;
        justify-content: center;
        gap: 25px;
    }
    
    /* Header actions en una línea compacta */
    .header-actions {
        display: flex;
        align-items: center;
        gap: 15px;
        width: 100%;
    }
    
    /* Search bar ocupa el espacio principal */
    .search-bar {
        flex: 1;
    }
    
    .search-bar input {
        width: 100%;
    }
    
    .search-bar input:focus {
        width: 100%;
    }
    
    /* Iconos y login más compactos */
    .header-actions a {
        flex: 0 0 auto;
        padding: 8px;
    }
    
    /* Ocultar login en móvil para hacer más espacio */
    .logout-required {
        display: none;
    }
    
    .hero {
        flex-direction: column;
        padding: 40px 20px;
        text-align: center;
    }
    
    .hero-content {
        padding-right: 0;
        margin-bottom: 40px;
    }
    
    .hero-content h2 {
        font-size: 36px;
    }
    
    .hero-content p {
        font-size: 16px;
    }
    
    .featured-products {
        padding: 60px 0;
    }
    
    .featured-products h2 {
        font-size: 32px;
        margin-bottom: 40px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 25px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .footer-info {
        flex-direction: column;
        gap: 15px;
    }
    
    .footer-contact {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .shop-header {
        padding: 15px 0;
    }
    
    .hero {
        padding: 30px 15px;
    }
    
    .hero-content h2 {
        font-size: 28px;
    }
    
    .featured-products {
        padding: 40px 0;
    }
    
    .featured-products h2 {
        font-size: 26px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .form-container {
        margin: 40px auto;
        padding: 25px;
    }
    
    footer {
        padding: 20px 0;
    }
    
    .pagination {
        margin-top: 40px;
        gap: 8px;
    }
    
    .pagination a, .pagination span {
        padding: 10px 14px;
        font-size: 14px;
    }
}