/* ================== FUENTES ================== */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;700;800&family=Cormorant+Garamond:ital,wght@1,600&display=swap');


/* ================== VARIABLES ================== */
:root {
    --bg: #F8F3E8;
    --green: #534940;
    --border: #1a1a1a;
    --primary: #1a1a1a;
}

/* ================== BASE ================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
    height: 100%;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--bg);
    color: var(--primary);
    padding-top: 65px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

/* ================== HEADER ======================== */
.main-header {
    position: fixed;
    top: 0;
    width: 100%;
    height: 65px;
    background: var(--green);
    display: flex;
    align-items: center;
    z-index: 2000;
    border-bottom: 1px solid var(--border);
    padding: 0 5%;
}

.header-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

/* ================== LOGO ========================= */
.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

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

.logo h1 {
    font-size: 1.1rem;
    font-weight: 800;
    color: black;
    display: flex;
    align-items: center;
    line-height: 1;
}

.logo span {
    color: var(--bg);
}

/* ================== NAV ========================== */
nav {
    display: flex;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 25px;
    align-items: center;
}

.nav-list a {
    text-decoration: none;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 4px;
    transition: 0.3s;
}

.nav-list a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: white;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.nav-list a:hover::after {
    transform: scaleX(1);
}

.nav-list a.active {
    border-bottom: 2px solid white;
}

/* ================== DESPLEGABLE =================== */
.dropdown {
    position: relative;
    perspective: 1000px;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) rotateX(-90deg);
    transform-origin: top;

    min-width: 150px;
    background: rgba(111, 127, 106, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 0 0 14px 14px;
    padding: 8px 0;
    list-style: none;
    box-shadow: 0 15px 30px rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.15);
    overflow: hidden;
    z-index: 3000;
    opacity: 0;
    pointer-events: none;
    transition:
        transform 0.45s cubic-bezier(0.2, 0.9, 0.2, 1),
        opacity 0.25s ease;
}

.dropdown-menu a {
    display: block;
    padding: 12px 16px;
    color: white;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    transition: background 0.2s ease, padding-left 0.2s ease;
}

.dropdown-menu a:hover {
    background: rgba(0, 0, 0, 0.15);
    padding-left: 20px;
}

.dropdown:hover .dropdown-menu,
.dropdown.open .dropdown-menu {
    transform: translateX(-50%) rotateX(0deg);
    opacity: 1;
    pointer-events: auto;
}

/* MI CUENTA */
.dropdown-menu form {
    margin: 0;
}

.dropdown-btn {
    width: 100%;
    background: none;
    border: none;
    color: rgb(0, 0, 0);
    text-align: left;
    padding: 12px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s ease, padding-left 0.2s ease;
}

.dropdown-btn:hover {
    background: rgba(0, 0, 0, 0.15);
    padding-left: 20px;
}

.dropdown-btn.danger {
    color: #ffb3b3;
}

/* =============== HAMBURGUESA ================== */
.menu-toggle {
    display: none;
    font-size: 1.6rem;
    color: white;
    cursor: pointer;
    z-index: 2100;
}

.menu-toggle.active i::before {
    content: "\f00d";
}

.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
    z-index: 1990;
}

.menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* ================== CART ========================== */
.cart-section {
    padding: 40px 5%;
    flex: 1;
}

.cart-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 25px;
}

.cart-wrapper {
    max-width: 1000px;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 16px;
    overflow: hidden;
}

.cart-table th,
.cart-table td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #eee;
    font-size: 0.85rem;
}

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

.product-cell img {
    width: 55px;
    height: 55px;
    object-fit: cover;
    border-radius: 10px;
}

.qty-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.qty-control button {
    background: var(--green);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
}

.btn-secondary {
    border: 1px solid var(--border);
    background: #f1403d;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    color: white;
}

.btn-secondary:hover {
    background: #b50704;
    color: white;
}

.btn-main {
    display: inline-block;
    background: var(--green);
    color: white;
    padding: 12px;
    border-radius: 12px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.cart-total {
    text-align: right;
    margin-top: 15px;
    font-weight: 800;
}

.address-form {
    margin-top: 25px;
    display: grid;
    gap: 10px;
}

.address-form input {
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #ddd;
}

.alert {
    text-align: center;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 10px;
}

.alert-info {
    background: #d9edf7;
}

.alert-danger {
    background: #f2dede;
}

.empty-cart {
    text-align: center;
    margin-top: 40px;
}

/* ================== MODAL ========================= */
.checkout-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(6px);

    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 0;
    pointer-events: none;
    transition: 0.3s ease;

    z-index: 5000;
}

.checkout-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.checkout-box {
    width: 90%;
    max-width: 520px;
    background: white;
    border-radius: 20px;
    padding: 30px;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 12px;
    right: 15px;
    border: none;
    background: transparent;
    font-size: 1.6rem;
    cursor: pointer;
}

.modal-form {
    display: grid;
    gap: 10px;
}

/* ================== FOOTER ================ */
.main-footer {
    background: #6F7F6A;
    color: white;
    padding: 60px 5% 30px;
}

/* CONTENEDOR PRINCIPAL */
.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
    align-items: flex-start;
}

/* BLOQUES */
.footer-brand,
.footer-links,
.footer-social {
    flex: 1;
    min-width: 220px;
    color: white;
}

/* TEXTO AUTORES */
.footer-brand h2 {
    font-size: 1.3rem;
    font-weight: 800;
}

.footer-brand p {
    margin-top: 10px;
    font-size: 0.85rem;
    opacity: 0.9;
    text-align: left;
}

/* EMAIL */
.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-links .footer-email {
    font-family: 'Billabong', cursive !important;
    font-size: 2.2rem;
    color: white;
    text-decoration: none;
    transition: transform 0.3s ease;
    text-align: center;
}

.footer-links .footer-email:hover {
    transform: scale(1.05);
    color: var(--bg);
}

.footer-link-creadores {
    color: rgb(0, 0, 0);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.footer-link-creadores:hover {
    text-decoration: underline;
}

/* REDES */
.footer-social {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
    flex-wrap: wrap;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-size: 1.4rem;
    color: white;
    text-decoration: none;
    transition: 0.3s;
}

/* Hover más visible */
.footer-social a:hover {
    transform: scale(1.2);
}

/* ================== AJUSTES COPYRIGHT & LICENCIA ================ */
.footer-bottom {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: white;
}

.footer-bottom-content p {
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    opacity: 0.8;
}

.footer-bottom-content strong {
    font-weight: 800;
    color: #000;
}

.footer-bottom-content strong span {
    color: white;
}

.footer-license-link {
    color: white;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity 0.3s ease;
}

.footer-license-link:hover {
    opacity: 0.6;
}

.cc-badge {
    margin-top: 15px;
    filter:none;
    opacity: 0.7;
    transition: 0.3s;
}

.cc-badge:hover {
    filter: grayscale(1) invert(1) brightness(2);
    opacity: 1;
}

.cc-badge img {
    height: 25px;
}

/* ===== ACCIONES MÓVIL ===== */
.mobile-actions {
    display: none;
    align-items: center;
    gap: 18px;
}

/* ===== CARRITO GLOBAL ===== */
.cart-link {
    position: relative;
    color: white;
    font-size: 1.1rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background: black;
    color: white;
    font-size: 0.65rem;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* carrito desktop */
.desktop-cart .cart-link {
    transform: translateY(4px);
}


/* =============== RESPONSIVE ==================== */
@media (max-width: 768px) {

    .menu-toggle {
        display: block;
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
    }

    .nav-list {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 80%;
        max-width: 320px;
        background: rgba(111,127,106,0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        padding: 40px;
        gap: 25px;
        transform: translateX(100%);
        transition: transform 0.35s ease;
        z-index: 2000;
    }

    .nav-list.active {
        transform: translateX(0);
    }

    .header-container {
        gap: 10px;
    }

    .dropdown-menu {
        position: static;
        transform: none;
        opacity: 1;
        pointer-events: auto;
        box-shadow: none;
        border: none;
        background: transparent;
        padding-left: 10px;
    }

    .dropdown:hover .dropdown-menu {
        transform: none;
    }

    .cart-wrapper {
        overflow: visible;
    }

    .cart-table thead {
        display: none;
    }

    .cart-table {
        border: none;
        background: transparent;
    }

    .cart-table tbody tr {
        display: flex;
        flex-direction: column;
        gap: 12px;
        background: white;
        margin-bottom: 15px;
        padding: 15px;
        border-radius: 16px;
        border: 1px solid #eee;
        box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    }

    .cart-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border: none;
        padding: 5px 0;
        font-size: 0.85rem;
    }

    .cart-table td::before {
        content: attr(data-label);
        font-weight: 700;
        text-transform: uppercase;
        font-size: 0.7rem;
        opacity: 0.6;
    }

    .product-cell::before {
        display: none;
    }

    .product-cell {
        flex-direction: row;
        justify-content: flex-start;
        gap: 10px;
    }

    .product-cell img {
        width: 50px;
        height: 50px;
    }

    .qty-control {
        justify-content: flex-end;
    }

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

    .cart-total {
        text-align: center;
        font-size: 1.1rem;
        margin-top: 20px;
    }

    #openCheckout,
    .cart-wrapper .btn-main {
        width: 100%;
        max-width: 320px;
        text-align: center;
    }

    /* FOOTER */
    .footer-container {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .footer-brand p {
        text-align: center;
        margin: 10px 0;
        font-size: 0.8rem;
    }

    .footer-social {
        justify-content: center;
        width: 100%;
    }

    .footer-social a {
        width: 45px;
        height: 45px;
        font-size: 1.6rem;
    }

    .footer-links .footer-email {
        font-size: 2rem;
    }

    .mobile-actions {
        display: flex;
        position: fixed;
        right: 5%;
        top: 32px;
        transform: translateY(-50%);
        z-index: 5000;
    }

    .desktop-cart {
        display: none;
    }

    .menu-toggle {
        position: static;
        transform: none;
    }
}

@media (max-width: 480px) {

    .logo h1 {
        font-size: 0.9rem;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .btn-main {
        font-size: 0.65rem;
        padding: 10px 18px;
    }

    #openCheckout,
    .cart-wrapper .btn-main {
        width: 100%;
        max-width: 100%;
    }

    /* FOOTER */
    .footer-links .footer-email {
        font-size: 1.6rem;
    }

    .footer-brand h2 {
        font-size: 1.1rem;
    }
}






* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f5f5f5;
    color: #111;
    font-family: Arial, Helvetica, sans-serif;
}

.carrito-page {
    width: min(1200px, 92%);
    margin: 40px auto 80px;
}

.carrito-header {
    margin-bottom: 32px;
}

.carrito-header h1 {
    margin: 0 0 8px;
    font-size: 2.2rem;
}

.carrito-header p {
    margin: 0;
    color: #555;
}

.carrito-layout {
    display: grid;
    grid-template-columns: 1.8fr 0.9fr;
    gap: 28px;
    align-items: start;
}

.carrito-lista {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.carrito-item {
    display: grid;
    grid-template-columns: 140px 1fr auto;
    gap: 20px;
    background: #fff;
    border-radius: 20px;
    padding: 18px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    align-items: center;
}

.carrito-item-img img {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 16px;
    display: block;
    background: #eee;
}

.carrito-item-info h3 {
    margin: 0 0 12px;
    font-size: 1.2rem;
}

.carrito-item-info p {
    margin: 6px 0;
    line-height: 1.4;
}

.carrito-item-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 140px;
}

.carrito-item-actions form {
    width: 100%;
}

.btn-main,
.btn-secondary,
.btn-remove {
    width: 100%;
    min-height: 44px;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
    padding: 12px 18px;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s ease;
}

.btn-main {
    background: #000;
    color: #fff;
}

.btn-main:hover {
    background: #222;
}

.btn-secondary {
    background: #e9e9e9;
    color: #111;
}

.btn-secondary:hover {
    background: #dcdcdc;
}

.btn-remove {
    background: #fff0f0;
    color: #8b0000;
    border: 1px solid #f0c9c9;
}

.btn-remove:hover {
    background: #ffe3e3;
}

.full-width {
    width: 100%;
}

.carrito-resumen {
    position: sticky;
    top: 100px;
}

.resumen-box {
    background: #fff;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.resumen-box h2 {
    margin-top: 0;
    margin-bottom: 20px;
}

.resumen-box p {
    margin: 10px 0;
}

.carrito-vacio {
    padding: 40px 0 20px;
}

.carrito-vacio-box {
    background: #fff;
    border-radius: 24px;
    padding: 50px 24px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.carrito-vacio-box i {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.checkout-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 9999;
}

.checkout-modal.active {
    display: flex;
}

.checkout-box {
    width: min(680px, 95vw);
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 24px;
    padding: 28px;
    position: relative;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.22);
}

.close-modal {
    position: absolute;
    top: 14px;
    right: 16px;
    border: none;
    background: transparent;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

.address-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.address-form h3 {
    margin: 0 0 10px;
    font-size: 1.5rem;
}

.address-form input {
    width: 100%;
    min-height: 46px;
    border: 1px solid #d0d0d0;
    border-radius: 12px;
    padding: 0 14px;
    font-size: 1rem;
    outline: none;
}

.address-form input:focus {
    border-color: #000;
}

.checkout-total {
    margin-top: 8px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #f5f5f5;
}

.checkout-login-message {
    text-align: center;
    padding: 20px 10px 10px;
}

.fly-dot {
    position: fixed;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #000;
    z-index: 10000;
    pointer-events: none;
}

.cart-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%) translateY(20px);
    background: #111;
    color: #fff;
    padding: 14px 20px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s ease;
    z-index: 10000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.cart-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.cart-bounce {
    animation: cartBounce 0.45s ease;
}

@keyframes cartBounce {
    0% { transform: scale(1); }
    30% { transform: scale(1.25); }
    60% { transform: scale(0.92); }
    100% { transform: scale(1); }
}

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

    .carrito-resumen {
        position: static;
    }
}

@media (max-width: 720px) {
    .carrito-page {
        width: min(94%, 100%);
        margin: 24px auto 56px;
    }

    .carrito-item {
        grid-template-columns: 1fr;
    }

    .carrito-item-img img {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
    }

    .carrito-item-actions {
        min-width: 100%;
    }

    .checkout-box {
        padding: 22px 16px;
        border-radius: 18px;
    }

    .carrito-header h1 {
        font-size: 1.8rem;
    }
}
