/* Variables CSS */
:root {
    --primary-color: #6a0572; /* Un tono de morado o burdeos */
    --secondary-color: #e0b1cb; /* Un tono más claro para acentos */
    --accent-color: #a8dadc; /* Un verde-azulado suave para contraste */
    --text-color: #333;
    --light-text-color: #666;
    --background-color: #f9f9f9;
    --white-color: #ffffff;
    --border-color: #ddd;
    --shadow-light: rgba(0, 0, 0, 0.1);
}

/* Reset Básico y Estilos Generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', serif; /* Tipo de letra más elegante y floral */
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--background-color);
}

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

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1, h2, h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-family: 'Playfair Display', serif; /* Fuente para títulos, si se usa Google Fonts */
}

h1 { font-size: 2.8em; text-align: center; }
h2 { font-size: 2.2em; text-align: center; margin-bottom: 40px; }
h3 { font-size: 1.8em; }

/* Botones */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.3s ease, transform 0.2s ease;
    cursor: pointer;
    border: none;
    font-size: 1em;
}

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

.primary-btn:hover {
    background-color: #55045d;
    transform: translateY(-2px);
}

.secondary-btn {
    background-color: var(--accent-color);
    color: var(--white-color);
}

.secondary-btn:hover {
    background-color: #8ac0c2;
    transform: translateY(-2px);
}

/* Header */
header {
    background-color: var(--white-color);
    padding: 15px 0;
    box-shadow: 0 2px 5px var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 60px; /* Ajusta según el tamaño de tu logo */
}

header nav ul {
    list-style: none;
    display: flex;
}

header nav ul li {
    margin-left: 25px;
}

header nav ul li a {
    color: var(--text-color);
    font-weight: bold;
    font-size: 1.05em;
    padding: 5px 0;
    position: relative;
}

header nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: width .3s ease-in-out;
}

header nav ul li a:hover::after {
    width: 100%;
}

.header-right {
    display: flex;
    align-items: center;
}

.header-actions {
    display: flex;
    align-items: center;
}

.language-switcher select {
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    margin-right: 15px;
    background-color: var(--white-color);
    color: var(--text-color);
    cursor: pointer;
}

.cart-icon img {
    height: 24px;
    width: 24px;
    vertical-align: middle;
}

.cart-icon span {
    background-color: var(--primary-color);
    color: var(--white-color);
    border-radius: 50%;
    padding: 3px 7px;
    font-size: 0.8em;
    position: relative;
    top: -8px;
    left: -5px;
}

/* Main Content Sections */
main {
    padding-top: 20px;
}

section {
    padding: 60px 0;
}

.text-center {
    text-align: center;
    margin-top: 30px;
}

/* Hero Section */
.hero-section {
    background: url('../img/hero.jpg') no-repeat center center/cover;
    color: var(--white-color);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    padding: 100px 0;
    text-align: center;
}

.hero-section h1 {
    font-size: 3.5em;
    margin-bottom: 20px;
    color: var(--white-color);
}

.hero-section p {
    font-size: 1.3em;
    margin-bottom: 30px;
}

/* Product Grid (for featured and listings) */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.product-card {
    background-color: var(--white-color);
    border-radius: 8px;
    box-shadow: 0 4px 10px var(--shadow-light);
    overflow: hidden;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding-bottom: 20px; /* Espacio para el botón */
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

.product-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    margin-bottom: 15px;
}

.product-card h3 {
    font-size: 1.4em;
    margin: 0 15px 10px;
    color: var(--primary-color);
}

.product-card p {
    font-size: 0.95em;
    color: var(--light-text-color);
    margin: 0 15px 15px;
    min-height: 40px; /* Para uniformidad en cards con descripciones cortas/largas */
}

.product-card .price {
    font-size: 1.5em;
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 15px;
    display: block;
}

.product-card .btn {
    width: calc(100% - 30px); /* Ocupa el ancho de la tarjeta menos padding */
    margin: 0 15px;
}

/* Why Choose Us / Features */
.why-choose-us {
    background-color: var(--secondary-color);
    color: var(--white-color);
    padding: 80px 0;
}

.why-choose-us h2 {
    color: var(--white-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    text-align: center;
    margin-top: 40px;
}

.feature-item img {
    height: 80px;
    margin-bottom: 20px;
    filter: invert(1); /* Para iconos blancos en fondo oscuro */
}

.feature-item h3 {
    color: var(--white-color);
    margin-bottom: 10px;
}

.feature-item p {
    color: rgba(255, 255, 255, 0.9);
}

/* Testimonials */
.testimonials {
    background-color: var(--white-color);
}

.testimonial-item {
    background-color: var(--background-color);
    border-left: 5px solid var(--primary-color);
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 5px;
    font-style: italic;
    box-shadow: 0 2px 5px var(--shadow-light);
}

.testimonial-item p {
    margin-bottom: 10px;
    font-size: 1.1em;
    color: var(--light-text-color);
}

.testimonial-item span {
    display: block;
    text-align: right;
    font-weight: bold;
    color: var(--primary-color);
    font-style: normal;
}

/* Shop Page Specifics */
.page-header {
    background-color: var(--secondary-color);
    color: var(--white-color);
    padding: 60px 0 40px;
    text-align: center;
}
.page-header h1 {
    color: var(--white-color);
}
.shop-content {
    padding: 40px 0;
}

.shop-content .container {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 30px;
    align-items: start;
}

.sidebar {
    background-color: var(--white-color);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px var(--shadow-light);
    height: fit-content; /* Para que no ocupe toda la altura si el contenido es corto */
}

.sidebar h3 {
    font-size: 1.5em;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.sidebar ul {
    list-style: none;
    margin-bottom: 30px;
}

.sidebar ul li {
    margin-bottom: 10px;
}

.sidebar ul li a {
    display: block;
    padding: 5px 0;
    color: var(--light-text-color);
    transition: color 0.3s ease;
}

.sidebar ul li a:hover {
    color: var(--primary-color);
    font-weight: bold;
}

.price-range {
    margin-top: 20px;
}
.price-range .slider {
    width: 100%;
    margin-bottom: 10px;
}
.price-range p {
    text-align: center;
    font-weight: bold;
}

.product-listing {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.shop-content .pagination {
    grid-column: 2;
    flex-wrap: wrap;
}

/* Product Detail Page */
.product-detail {
    display: flex;
    gap: 50px;
    align-items: flex-start;
    padding: 60px 0;
    background-color: var(--white-color);
}

.product-images {
    flex: 1;
    max-width: 50%;
}

.product-images #main-product-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 4px 10px var(--shadow-light);
}

.thumbnail-images {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.thumbnail-images img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    cursor: pointer;
    transition: border-color 0.3s ease, transform 0.2s ease;
}

.thumbnail-images img:hover,
.thumbnail-images img.active-thumbnail {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.product-info {
    flex: 1;
    max-width: 50%;
    background: var(--white-color);
    padding: 35px;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.06);
    border: 1px solid var(--border-color);
}

.product-info h1 {
    text-align: left;
    font-size: 2.4em;
    margin-bottom: 10px;
    line-height: 1.2;
}

.product-info .price-container {
    margin-bottom: 25px;
}

.product-info .price {
    font-size: 2.2em;
    color: var(--primary-color);
    font-weight: bold;
    display: inline-block;
}

.product-info .tax-info {
    font-size: 0.85em;
    color: var(--light-text-color);
    margin-left: 10px;
    vertical-align: middle;
}

.product-info .description {
    color: var(--text-color);
    margin-bottom: 30px;
    line-height: 1.7;
    font-size: 1.05em;
}

.delivery-badges {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 35px;
    background: #fdfafb;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.delivery-badges .badge {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-color);
    font-weight: 500;
}

.delivery-badges .badge i {
    color: var(--primary-color);
    font-size: 1.2em;
    width: 25px;
    text-align: center;
}

.product-options {
    margin-bottom: 30px;
}

.product-options label {
    display: block;
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.quantity-cart-wrapper {
    display: flex;
    gap: 15px;
    align-items: center;
}

.product-options input[type="number"] {
    width: 80px;
    height: 50px;
    padding: 10px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1.2em;
    margin: 0;
    text-align: center;
    font-weight: bold;
}

.product-info .add-to-cart-btn {
    margin: 0;
    flex: 1;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.1em;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.product-info .add-to-cart-btn:hover {
    box-shadow: 0 5px 15px rgba(106, 5, 114, 0.3);
    transform: translateY(-2px);
}

.product-meta {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px dashed var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 12px;
    color: var(--light-text-color);
    font-size: 0.95em;
}

.product-meta p {
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-meta p strong {
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-meta p i {
    color: var(--primary-color);
    width: 16px;
    text-align: center;
}

/* Related Products */
.related-products {
    padding: 60px 0;
    background-color: var(--background-color);
}
.related-products .product-grid {
    margin-top: 30px;
}


/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 50px 0;
    font-size: 0.9em;
}

footer .container {
    display: flex;
    flex-wrap: wrap; /* Permite que las columnas se envuelvan en pantallas pequeñas */
    justify-content: space-between;
    gap: 30px;
}

.footer-col {
    flex: 1;
    min-width: 220px; /* Ancho mínimo para cada columna */
    margin-bottom: 20px;
}

.footer-col h4 {
    color: var(--white-color);
    margin-bottom: 20px;
    font-size: 1.2em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 10px;
}

.footer-col p, .footer-col ul li {
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.8);
}

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

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-col ul li a:hover {
    color: var(--accent-color);
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin-right: 10px;
    color: var(--white-color);
    font-size: 1.2em;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    padding-top: 30px;
    margin-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
}

/* Hamburger Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 10px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
}

/* Header Responsivo */
@media (max-width: 1024px) {
    header nav ul li {
        margin-left: 15px;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .header-actions {
        margin-right: 20px;
    }

    header nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        transition: right 0.3s ease-in-out;
        z-index: 1000;
        padding-top: 80px;
    }

    header nav.active {
        right: 0;
    }

    header nav ul {
        flex-direction: column;
        align-items: center;
        width: 100%;
        padding: 0;
    }

    header nav ul li {
        margin: 15px 0;
        width: 100%;
        text-align: center;
    }

    header nav ul li a {
        font-size: 1.2em;
        display: block;
        padding: 15px;
        color: var(--text-color);
    }
    .menu-toggle.open span:nth-child(1) { transform: rotate(45deg); }
    .menu-toggle.open span:nth-child(2) { opacity: 0; }
    .menu-toggle.open span:nth-child(3) { transform: rotate(-45deg); }

    .hero-section {
        padding: 80px 0;
    }
    .hero-section h1 {
        font-size: 2.8em;
    }
    .hero-section p {
        font-size: 1.1em;
    }
    .shop-content {
        padding: 30px 0;
    }
    .shop-content .container {
        grid-template-columns: 1fr;
    }
    .product-detail {
        flex-direction: column;
        align-items: center;
    }
    .product-images, .product-info {
        max-width: 100%;
        width: 100%;
    }
    .sidebar {
        width: 100%;
        max-width: none;
        margin: 0 auto 30px;
    }
    .product-listing {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
    .shop-content .pagination {
        grid-column: 1;
    }
    .footer-col {
        flex-basis: 45%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    h1 { font-size: 1.8em; }
    h2 { font-size: 1.5em; }
    .logo img {
        height: 50px;
    }
    header nav ul li {
        margin: 5px;
        font-size: 0.9em;
    }
    .hero-section h1 {
        font-size: 2em;
    }
    .hero-section p {
        font-size: 1em;
    }
    .product-grid {
        grid-template-columns: 1fr;
    }
    .product-listing {
        grid-template-columns: 1fr;
        gap: 22px;
    }
    .product-images #main-product-image {
        aspect-ratio: 1 / 1;
        height: auto;
    }
    .thumbnail-images img {
        width: 60px;
        height: 60px;
    }
    .product-detail .product-info h1 {
        font-size: 2em;
    }
    .product-detail .product-info .price {
        font-size: 1.8em;
    }
    .footer-col {
        flex-basis: 100%;
        text-align: center;
    }
    .footer-col ul {
        padding-left: 0;
    }
    .footer-col ul li {
        text-align: center;
    }
    .social-media {
        text-align: center;
    }
}

/* --- Cart Page Styles --- */
.cart-page {
    padding: 40px 0;
    background-color: var(--background-color);
}

.cart-content {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.cart-items {
    flex: 2;
    min-width: 400px;
    background-color: var(--white-color);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 5px var(--shadow-light);
}

.cart-items-table {
    width: 100%;
    border-collapse: collapse;
}

.cart-items-table th,
.cart-items-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.cart-items-table th {
    background-color: var(--secondary-color);
    color: var(--white-color);
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9em;
}

.cart-items-table td {
    vertical-align: middle;
    color: var(--light-text-color);
}

.cart-item-info {
    display: flex;
    align-items: center;
}

.cart-item-info img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
    margin-right: 15px;
}

.cart-item-info .item-name {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.1em;
}

.cart-items-table .quantity-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cart-items-table .quantity-controls input {
    width: 60px;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    text-align: center;
}

.cart-items-table .quantity-controls button {
    background-color: var(--accent-color);
    color: var(--white-color);
    border: none;
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2em;
    line-height: 1;
    transition: background-color 0.3s ease;
}

.cart-items-table .quantity-controls button:hover {
    background-color: #7ababa;
}

.cart-items-table .remove-item-btn {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-size: 0.9em;
    transition: color 0.3s ease;
}

.cart-items-table .remove-item-btn:hover {
    color: #c82333;
    text-decoration: underline;
}

.cart-summary {
    flex: 1;
    min-width: 300px;
    background-color: var(--white-color);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 5px var(--shadow-light);
    height: fit-content;
}

.cart-summary h3 {
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.6em;
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.cart-totals .total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 1.1em;
    color: var(--text-color);
}

.cart-totals .total-row span:first-child {
    font-weight: bold;
}

.cart-totals .total-grand {
    font-size: 1.4em;
    font-weight: bold;
    color: var(--primary-color);
    padding-top: 15px;
    border-top: 2px solid var(--primary-color);
    margin-top: 20px;
}

.cart-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

/* Cookie Banner */
.cookie-banner[hidden] {
    display: none;
}

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    padding: 16px;
    background-color: rgba(51, 51, 51, 0.92);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.2);
}

.cookie-banner__content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cookie-banner__text {
    color: var(--white-color);
}

.cookie-banner__text h3 {
    color: var(--white-color);
    font-size: 1.2em;
    margin-bottom: 6px;
}

.cookie-banner__text p {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
}

.cookie-banner__actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 10px;
}

.cookie-banner__actions .btn {
    padding: 10px 16px;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .cart-content {
        flex-direction: column;
        align-items: center;
    }
    .cart-items, .cart-summary {
        min-width: unset;
        width: 100%;
    }
    .cart-items-table thead {
        display: none;
    }
    .cart-items-table, .cart-items-table tbody, .cart-items-table tr, .cart-items-table td {
        display: block;
        width: 100%;
    }
    .cart-items-table tr {
        margin-bottom: 20px;
        border: 1px solid var(--border-color);
        border-radius: 5px;
        padding: 15px;
        background-color: var(--white-color);
    }
    .cart-items-table td {
        text-align: right;
        border: none;
        position: relative;
        padding-left: 50%;
    }
    .cart-items-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        width: 45%;
        padding-left: 10px;
        font-weight: bold;
        color: var(--primary-color);
        text-align: left;
    }
    .cart-items-table td:first-child {
        padding-left: 10px;
        padding-top: 42px;
        text-align: left;
    }
    .cart-items-table td:first-child::before {
        width: auto;
    }
    .cart-item-info {
        align-items: flex-start;
    }
    .cart-item-info img {
        width: 64px;
        height: 64px;
        flex: 0 0 64px;
    }
    .cart-items-table .quantity-controls {
        justify-content: flex-end;
    }
    .cookie-banner {
        padding: 14px;
    }
    .cookie-banner__content {
        align-items: stretch;
        flex-direction: column;
        gap: 14px;
    }
    .cookie-banner__actions {
        display: grid;
        grid-template-columns: 1fr;
    }
    .cookie-banner__actions .btn {
        width: 100%;
    }
}
