/* Atelier Herreras - Modern & Elegant Design */
:root {
    /* Palette */
    --primary-color: #1a1a2e;
    /* Dark Blue/Black for contrast */
    --accent-color: #D4AF37;
    /* Gold */
    --accent-light: #f3e5ab;
    /* Light Gold */
    --bg-color: #FDFBF7;
    /* Ivory/Cream */
    --card-bg: #FFFFFF;
    --text-main: #333333;
    --text-light: #666666;
    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Montserrat', sans-serif;
    /* Spacing */
    --section-padding: 80px 20px;
    --container-width: 1200px;
    /* Shadows & Effects */
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

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

ul {
    list-style: none;
}

/* Utils */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin: 50px 0 30px;
    width: 100%;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--accent-color);
    margin: 15px auto 0;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--accent-color);
    color: #fff;
    border: 2px solid var(--accent-color);
}

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

.contact-btn {
    text-transform: lowercase !important;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: #fff;
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
    padding: 20px 0;
    background: rgba(218, 165, 32, 0.95);
    /* Semi-transparent gold */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header.scrolled {
    background: rgba(218, 165, 32, 1);
    padding: 10px 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.legal-header {
    position: sticky;
}

.legal-header__nav {
    justify-content: center;
}

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

.logo img,
.navbar-brand img {
    height: 100px;
    transition: var(--transition);
    background: transparent;
    mix-blend-mode: darken;
}

header.scrolled .logo img,
header.scrolled .navbar-brand img {
    height: 60px;
}

.firma-contacto img {
    background: transparent;
    mix-blend-mode: darken;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    /* Slightly larger */
    color: #FFFFFF;
    position: relative;
    font-weight: 500;
    /* Medium weight for elegance */
    white-space: nowrap;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #FFFFFF;
    /* White underline */
    transition: var(--transition);
}

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

.hamburger {
    display: none;
    font-size: 2rem;
    cursor: pointer;
    color: #FFFFFF;
    /* White for gold background */
}

/* Dropdown Styles */
.dropdown {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #FFFFFF;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1;
    border-radius: 8px;
    overflow: hidden;
    top: 100%;
    left: 0;
}

.dropdown-content a {
    color: var(--primary-color) !important;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 1rem !important;
    border-bottom: 1px solid #f1f1f1;
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    background-color: #f9f9f9;
    color: var(--accent-color) !important;
}

.dropdown:hover .dropdown-content {
    display: flex;
    flex-direction: column;
}

.dropdown-content a::after {
    display: none;
    /* No underline in dropdown */
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('imagenes/FondoCabeceraWeb.png') no-repeat center center/cover;
    background-attachment: fixed;
    color: #fff;
    padding-top: 100px;
    /* Increased padding to avoid overlap */
}

.hero-content {
    max-width: 800px;
    animation: fadeInUp 1s ease-out;
}

.hero-buttons {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 10px;
}

.hero h1 {
    font-size: 4rem;
    color: #fff;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 30px;
    font-weight: 300;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* Products Grid */
.products-section {
    padding: 100px 20px 40px;
}

.category-title {
    font-size: 2rem;
    margin: 60px 0 30px;
    color: var(--primary-color);
    border-left: 4px solid var(--accent-color);
    padding-left: 15px;
    display: block;
}

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

.card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

/* Desktop Hover Effect */
@media (min-width: 1024px) {
    .card:hover {
        transform: translateY(-10px) rotateX(2deg);
        box-shadow: var(--shadow-hover);
    }
}

/* Out of Stock Styles */
.card.out-of-stock {
    opacity: 0.8;
}

.card.out-of-stock .card-image::after {
    content: 'AGOTADO TEMPORALMENTE';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 10px 20px;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 1px;
    border: 2px solid #fff;
    z-index: 2;
    pointer-events: none;
    text-align: center;
    width: 80%;
}

.card.out-of-stock .card-controls {
    display: none;
}

.card.out-of-stock .add-to-cart {
    background: #ccc !important;
    border-color: #ccc !important;
    cursor: not-allowed;
    display: none;
}

.card-image {
    height: 300px;
    overflow: hidden;
    position: relative;
    background: transparent;
    cursor: pointer;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.card:hover .card-image img {
    transform: scale(1.1);
}

.zoom-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    padding: 8px;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateY(-10px);
    transition: var(--transition);
    color: var(--primary-color);
}

.card:hover .zoom-badge {
    opacity: 1;
    transform: translateY(0);
}

.card-details {
    padding: 25px;
    text-align: center;
}

.card-title {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.card-ref {
    font-size: 0.8rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    display: block;
}

.card-desc {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 15px;
    min-height: 40px;
    /* Align cards */
}

.card-price {
    font-size: 1.4rem;
    color: var(--accent-color);
    font-weight: 700;
    margin-bottom: 20px;
    display: block;
}

.card-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.8rem;
    text-transform: none;
    /* Ensure no unwanted uppercase */
}

.btn-full {
    width: 100%;
}

.btn-muted {
    border-color: #ccc;
    color: #888;
}

.btn-stacked {
    margin-top: 10px;
}

.btn-observation {
    width: 100%;
    margin-bottom: 10px;
    border-color: #ccc;
    color: #555;
}

.btn-checkout-submit {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
}

/* Materials Section */
.materials-section {
    padding: var(--section-padding);
    background: var(--primary-color);
    color: #fff;
}

.materials-section .section-title {
    color: #fff;
}

.materials-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
}

.materials-text {
    flex: 1;
    min-width: 300px;
}

.materials-text ul {
    margin-top: 20px;
}

.materials-text li {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
}

.materials-text li i {
    color: var(--accent-color);
    margin-right: 15px;
    margin-top: 5px;
}

.materials-image {
    flex: 1;
    min-width: 300px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

/* Mobile Friendly Mobile View */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: #1a1a1a;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: var(--transition);
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }

    .nav-links a {
        color: #FFFFFF !important;
        font-size: 1.8rem;
        margin: 15px 0;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links .dropdown-content {
        position: static;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.05);
        display: none;
        width: 100%;
        text-align: center;
    }

    .nav-links .dropdown.active .dropdown-content {
        display: block;
    }

    .nav-links .dropdown-content a {
        color: #DDD !important;
        font-size: 1.4rem !important;
        background: transparent;
        margin: 5px 0;
    }

    .hamburger {
        display: block;
        z-index: 1001;
    }

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

    .hero-buttons {
        flex-direction: column;
        align-items: center
    }

    .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .card-details {
        padding: 15px;
    }

    .card-title {
        font-size: 1rem;
    }

    .card-image {
        height: 180px;
    }

    .btn {
        padding: 10px 20px;
    }

    .logo img,
    .navbar-brand img {
        height: 60px;
    }
}

@media (max-width: 480px) {
    .grid {
        grid-template-columns: 1fr;
    }
}

/* Info Section (Rules) */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

.info-box {
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow-soft);
    border-top: 4px solid var(--accent-color);
}

.info-box h3 {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Footer */
footer {
    background: #111;
    color: #888;
    padding: 60px 0 20px;
    text-align: center;
}

.footer-logo {
    width: 150px;
    margin: 0 auto 20px;
    opacity: 0.8;
}

.social-links {
    margin: 20px 0;
}

.social-links a {
    color: #fff;
    font-size: 1.5rem;
    margin: 0 10px;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    padding: 20px;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    max-width: 95%;
    max-height: 85vh;
    border-radius: 10px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    background: #fff;
    /* ENSURE WHITE BACKGROUND */
    color: #333;
    /* ENSURE DARK TEXT */
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    object-fit: contain;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
}

.modal-content--success {
    text-align: center;
    padding: 40px;
    max-width: 500px;
}

.modal-content--compact {
    max-width: 400px;
}

.success-icon {
    font-size: 4rem;
    color: #4CAF50;
    margin-bottom: 20px;
}

.success-icon--compact {
    font-size: 3rem;
    margin-bottom: 10px;
}

.success-title {
    color: #4CAF50;
    margin-bottom: 15px;
}

.success-copy {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.success-ref {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 30px;
}

.success-ref strong,
.success-ref span {
    font-weight: bold;
    color: #333;
}

/* Cart Toggle & Count */
.cart-toggle {
    position: relative;
    cursor: pointer;
    font-size: 1.5rem;
    padding: 5px;
    z-index: 1001;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4d4d;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid #fff;
}

/* Card Controls */
.card-controls {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.qty-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid #eee;
    padding: 5px;
    border-radius: 25px;
    width: fit-content;
    margin: 0 auto;
}

.qty-btn {
    background: #f8f8f8;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background: var(--accent-light);
}

.qty-input {
    width: 40px;
    text-align: center;
    border: none;
    font-family: var(--font-body);
    font-size: 1rem;
    background: transparent;
}

/* Remove arrows from number input */
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    /* Hidden by default */
    width: 400px;
    height: 100vh;
    background: #fff;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    z-index: 2100;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    overflow-x: hidden;
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    padding: 25px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
}

.cart-close {
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-light);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px;
}

.cart-item {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 15px;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #f9f9f9;
    margin-bottom: 15px;
}

.cart-item img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    background: #f8f8f8;
    border-radius: 8px;
}

.cart-item-info h4 {
    font-size: 0.95rem;
    color: var(--primary-color);
    margin-bottom: 5px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.item-ref {
    font-size: 0.8rem;
    color: #999;
}

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

.cart-empty {
    text-align: center;
    color: #999;
    margin-top: 50px;
}

.cart-item-note {
    font-size: 0.85rem;
    color: #666;
    margin: 4px 0;
    font-style: italic;
}

.cart-item-total {
    font-weight: 600;
}

.cart-shipping-row {
    padding: 10px 0;
    border-top: 1px dashed #eee;
    border-bottom: none;
}

.cart-shipping-spacer {
    width: 65px;
}

.cart-shipping-title {
    font-weight: 400;
    color: #666;
}

.item-delete {
    background: none;
    border: none;
    color: #ff4d4d;
    cursor: pointer;
    font-size: 0.8rem;
    text-decoration: underline;
}

/* Cart Footer Fixed at Bottom */
.cart-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    background: #fff;
    /* Sticky footer for cart */
    position: sticky;
    bottom: 0;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.05);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.cart-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cart-buttons .btn {
    text-align: center;
    width: 100%;
}

.btn-secondary {
    background: #f8f8f8;
    color: var(--text-light);
    border: 1px solid #ddd;
}

.btn-secondary:hover {
    background: #eee;
    color: var(--primary-color);
}

/* Checkout Modal Adjustments */
.checkout-form-container {
    padding: 30px !important;
    max-width: 500px !important;
    width: 95%;
    background: #fff;
    max-height: 85vh;
    /* Limit height */
    overflow-y: auto;
    /* Allow scrolling inside form if needed */
    display: flex;
    flex-direction: column;
}

.checkout-header {
    margin-bottom: 20px;
    text-align: center;
}

.form-group {
    margin-bottom: 15px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
}

/* Ensure Submit Button is Visible */
.checkout-actions {
    margin-top: 20px;
    position: sticky;
    bottom: 0;
    background: #fff;
    padding-top: 10px;
}

/* Mobile Tweaks for Cart & Menu */
@media (max-width: 768px) {
    .cart-sidebar {
        width: 100%;
        /* Full width on mobile */
        right: -100%;
        height: 100dvh;
        /* Use dynamic viewport height */
    }

    .cart-header {
        padding: 20px 15px;
    }

    .cart-header h3 {
        font-size: 1.3rem;
    }

    .cart-items {
        padding: 15px 10px;
        /* Reducido para dar mÃ¡s espacio */
        overflow-x: hidden;
    }

    .cart-item {
        grid-template-columns: 60px 1fr auto;
        /* Cambiado de fix 75px a auto */
        gap: 10px;
        padding-bottom: 12px;
        margin-bottom: 12px;
        align-items: center;
    }

    .cart-item img {
        width: 60px;
        height: 60px;
    }

    .cart-item-info h4 {
        font-size: 0.85rem;
        line-height: 1.2;
        word-wrap: break-word;
        overflow-wrap: break-word;
        margin-bottom: 2px;
    }

    .item-ref {
        font-size: 0.65rem;
        opacity: 0.7;
    }

    .cart-qty-controls {
        padding: 3px 6px;
        gap: 4px;
        margin-top: 6px;
        background: #f9f9f9;
        border-radius: 4px;
        /* Less rounded for space */
    }

    .cart-qty-btn {
        width: 20px;
        height: 20px;
        font-size: 0.8rem;
    }

    .cart-qty-display {
        font-size: 0.85rem;
        min-width: 12px;
    }

    .cart-qty-controls .item-price {
        margin-left: 4px;
        font-size: 0.7rem;
        color: #888;
    }

    .cart-item-actions {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        justify-content: center;
        gap: 6px;
        min-width: 65px;
        /* Espacio mÃ­nimo para el precio */
    }

    .item-delete {
        font-size: 0.6rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .cart-item-actions span {
        font-size: 0.85rem;
        white-space: nowrap;
    }

    .cart-footer {
        padding: 15px;
    }

    .cart-total {
        font-size: 1.15rem;
        margin-bottom: 15px;
    }

    .cart-toggle {
        margin-right: 15px;
    }

    .checkout-form-container {
        padding: 20px !important;
        max-height: 80vh;
    }

    /* Fix Mobile Menu Dropdown Interaction */
    .nav-links .dropdown-content {
        /* Ensure it's hidden by default and toggled via JS class */
        display: none;
        opacity: 0;
        max-height: 0;
        overflow: hidden;
        transition: all 0.3s ease;
    }

    .nav-links .dropdown.active .dropdown-content {
        display: block;
        opacity: 1;
        max-height: 500px;
        /* Arbitrary large height for animation */
        padding-bottom: 10px;
    }
}

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

.item-delete {
    color: #ff4d4d;
    font-size: 0.8rem;
    cursor: pointer;
    background: none;
    border: none;
    opacity: 0.6;
}

.item-delete:hover {
    opacity: 1;
}

.cart-footer {
    padding: 25px;
    border-top: 1px solid #eee;
    background: #fdfdfd;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 20px;
    font-family: var(--font-heading);
}

/* Checkout Form Container */
/* Added Feedback Animation */
@keyframes addedFeedback {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.btn.added {
    background: #27ae60 !important;
    border-color: #27ae60 !important;
    animation: addedFeedback 0.4s ease;
}

/* Consolidated with mobile tweaks above */
.cart-toggle {
    margin-right: 15px;
}

/* InfografÃ­a Centrada */
.infography-section {
    padding: 4rem 20px;
    background: #fff;
    text-align: center;
}

.infography-section img {
    display: block;
    margin: 0 auto;
    max-width: 80%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: var(--transition);
}

.infography-section img:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
}

.editorial-hero {
    min-height: 80vh;
    height: auto;
    background: var(--bg-color);
    color: var(--text-main);
    padding-top: 120px;
    padding-bottom: 80px;
}

.editorial-content {
    padding: 20px;
}

.editorial-content--medium {
    max-width: 800px;
}

.editorial-content--wide {
    max-width: 900px;
}

.editorial-title {
    color: var(--primary-color);
    font-size: 3rem;
    margin-bottom: 20px;
}

.title-rule {
    width: 60px;
    height: 3px;
    background: var(--accent-color);
    margin: 0 auto 30px;
}

.editorial-lede {
    font-size: 1.5rem;
    font-weight: 300;
    color: #555;
    line-height: 1.6;
}

.editorial-gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin: 20px auto;
    width: 100%;
}

.editorial-image {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.editorial-image--gallery {
    flex: 1 1 300px;
    max-width: 400px;
}

.editorial-image--stacked {
    display: block;
    margin: 20px auto;
    max-width: 500px;
}

.editorial-highlight {
    display: block;
    margin-top: 30px;
    font-style: italic;
    color: var(--primary-color);
    font-size: 1.4rem;
}

.editorial-actions {
    margin-top: 40px;
}

.footer-note {
    font-size: 0.9rem;
    margin-top: 10px;
    opacity: 0.7;
}

@media (max-width: 768px) {
    .infography-section img {
        max-width: 100%;
    }
}

/* Disabled Button Style */
button:disabled,
.btn:disabled {
    background-color: #cccccc !important;
    border-color: #cccccc !important;
    color: #666666 !important;
    cursor: not-allowed !important;
    opacity: 0.7;
}

/* Out of Stock (Agotado) Styles */
.card.sold-out {
    position: relative;
    pointer-events: none;
    /* Disable interactions */
}

.card.sold-out .card-image {
    opacity: 0.6;
}

.card.sold-out .card-image::after {
    content: 'AGOTADO';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(26, 26, 46, 0.9);
    /* Primary color dark */
    color: #fff;
    padding: 12px 25px;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 2px;
    border: 2px solid var(--accent-color);
    z-index: 10;
    white-space: nowrap;
}

.card.sold-out .add-to-cart {
    background-color: #ccc;
    border-color: #ccc;
    color: #fff;
    cursor: not-allowed;
}

/* Checkout Page Specifics */
.checkout-container {
    max-width: 800px;
    margin: 0 auto;
}

.checkout-page {
    padding-top: 150px;
    min-height: 80vh;
}

.checkout-back-row {
    margin-bottom: 30px;
}

.checkout-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.checkout-panel {
    background: #fff;
    padding: 40px;
    border-radius: 15px;
    box-shadow: var(--shadow-soft);
}

.checkout-title {
    margin-top: 0;
    text-align: left;
    margin-bottom: 30px;
}

.order-summary {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin: 30px 0;
}

.order-summary-title {
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.checkout-total-row {
    margin-top: 20px;
    border-top: 1px dashed #ccc;
    padding-top: 15px;
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    font-size: 1.2rem;
}

.checkout-payment-note {
    font-size: 0.9rem;
    color: #666;
    margin-top: 10px;
}

.checkout-summary-item {
    border-bottom: 1px solid #eee;
    padding: 10px 0;
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.checkout-summary-name,
.checkout-summary-price {
    font-weight: 600;
}

.checkout-summary-price {
    white-space: nowrap;
}

.checkout-summary-qty {
    font-weight: 400;
}

.checkout-summary-meta {
    font-size: 0.8rem;
    color: #666;
}

.checkout-summary-note {
    font-size: 0.8rem;
    font-style: italic;
    color: #888;
}

.checkout-shipping-row {
    padding: 10px 0;
    display: flex;
    justify-content: space-between;
    font-weight: bold;
}

.returns-brief {
    margin: 30px 0;
    padding: 20px;
    background: #fffaf0;
    border-radius: 10px;
    border: 1px solid #f3e5ab;
}

.returns-brief-title {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.returns-brief p {
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.returns-brief p:last-of-type {
    margin-bottom: 15px;
}

.text-link {
    text-decoration: underline;
    color: var(--accent-color);
    margin-left: 3px;
}

.returns-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: underline;
}

/* Enhancements for Checkout Summary */
#checkout-items>div {
    font-size: 0.95rem;
}

/* Cart Quantity Controls */
.cart-qty-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fdfbf7;
    /* Light cream/ivory corresponding to --bg-color */
    padding: 6px 14px;
    border-radius: 50px;
    /* Pill shape */
    border: 1px solid #eee;
    width: fit-content;
    margin-top: 10px;
}

.cart-qty-btn {
    background: #fff;
    border: 1px solid #ddd;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    color: var(--primary-color);
    padding: 0;
}

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

.cart-qty-display {
    min-width: 20px;
    text-align: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.cart-qty-controls .item-price {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
    margin-left: 15px;
    white-space: nowrap;
}

/* Checkout Checkboxes Spacing */
.compliance-checks {
    margin: 20px 0;
}

.compliance-checks .checkbox-container {
    display: block;
    margin-bottom: 15px;
}

.compliance-checks .checkbox-container:last-child {
    margin-bottom: 0;
}

/* --- TEMPORAL: San Valentín (14-15 Feb) --- */
.nav-links a {
    display: inline-flex !important;
    align-items: center !important;
}

.valentine-sticker {
    width: 50px !important;
    height: 50px !important;
    object-fit: contain !important;
    margin-left: 10px !important;
    vertical-align: middle !important;
    display: inline-block !important;
    animation: trueHeartBeat 1.5s infinite ease-in-out !important;
    pointer-events: none;
}

@keyframes trueHeartBeat {
    0% {
        transform: scale(1);
    }

    12% {
        transform: scale(1.22);
    }

    24% {
        transform: scale(1);
    }

    36% {
        transform: scale(1.22);
    }

    48% {
        transform: scale(1);
    }

    100% {
        transform: scale(1);
    }
}

@media (max-width: 768px) {
    .valentine-sticker {
        width: 45px !important;
        height: 45px !important;
    }
}

header.scrolled .valentine-sticker {
    width: 38px !important;
    height: 38px !important;
}

/* ------------------------------------------ */
/* --- Efecto Brillo Flor para Momentos --- */
@keyframes florGlow {
    0%, 100% {
        transform: scale(1);
        opacity: 0.85;
        -webkit-filter: brightness(1.15) contrast(1.1) drop-shadow(0 0 3px rgba(255, 255, 255, 0.9)) drop-shadow(0 0 6px rgba(255, 248, 220, 0.7));
        filter: brightness(1.15) contrast(1.1) drop-shadow(0 0 3px rgba(255, 255, 255, 0.9)) drop-shadow(0 0 6px rgba(255, 248, 220, 0.7));
    }

    50% {
        transform: scale(1.08);
        opacity: 1;
        -webkit-filter: brightness(1.25) contrast(1.1) drop-shadow(0 0 5px rgba(255, 255, 255, 1)) drop-shadow(0 0 10px rgba(255, 248, 220, 0.9));
        filter: brightness(1.25) contrast(1.1) drop-shadow(0 0 5px rgba(255, 255, 255, 1)) drop-shadow(0 0 10px rgba(255, 248, 220, 0.9));
    }
}

.momentos-sticker {
    width: 36px;
    height: 36px;
    object-fit: contain;
    margin-left: 6px;
    vertical-align: middle;
    display: inline-block;
    position: relative;
    top: -1px;
    -webkit-animation: florGlow 2.5s ease-in-out infinite;
    animation: florGlow 2.5s ease-in-out infinite;
    pointer-events: none;
}
