/* ============================================================
   TO BACANO - ESTILOS PRINCIPALES Y RESPONSIVE
   ============================================================ */

:root {
    --color-primary: #0f0f1e;
    --color-primary-dark: #090a14;
    --color-primary-surface: #14162b;
    --color-accent: #ffc107;
    --color-accent-hover: #ffb300;
    --color-accent-glow: rgba(255, 193, 7, 0.35);
    --color-bg: #f8f9fa;
    --color-card: #ffffff;
    --color-text: #212529;
    --color-muted: #6c757d;
    --font-main: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    --header-height: 72px;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-bg);
    color: var(--color-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

main {
    flex: 1;
    min-width: 0;
}

/* ===== Botones Globales ===== */
.btn-primary {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: #ffffff;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #1a1a2e;
    border-color: #1a1a2e;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(15, 15, 30, 0.25);
}

.btn-warning {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
    color: #111111;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-warning:hover,
.btn-warning:focus {
    background-color: var(--color-accent-hover);
    border-color: var(--color-accent-hover);
    color: #000000;
    box-shadow: 0 4px 14px var(--color-accent-glow);
}

/* ============================================================
   1. NAVBAR & HEADER RESPONSIVE
   ============================================================ */

.main-navbar {
    background: rgba(14, 16, 31, 0.96) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    transition: all 0.3s ease;
    z-index: 1030;
}

/* Brand */
.navbar-brand {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #ffffff !important;
    transition: transform 0.2s ease;
}

.navbar-brand:hover {
    transform: scale(1.02);
}

.brand-icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.38));
    transition: transform 0.25s ease, filter 0.25s ease;
}

.brand-logo {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.navbar-brand:hover .brand-icon-wrapper {
    transform: translateY(-2px) rotate(-3deg);
    filter: drop-shadow(0 5px 14px rgba(0, 0, 0, 0.52));
}

.navbar-brand:hover .brand-logo {
    transform: scale(1.08);
}

.brand-text {
    background: linear-gradient(135deg, #ffffff 60%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Toggler de menú hamburguesa */
.navbar-toggler {
    padding: 0.45rem 0.65rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #ffffff;
    transition: all 0.2s ease;
}

.navbar-toggler:hover,
.navbar-toggler:focus {
    background: rgba(255, 255, 255, 0.12);
    box-shadow: none;
}

.navbar-toggler-icon {
    width: 1.3em;
    height: 1.3em;
}

/* Links de navegación */
.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    font-size: 0.92rem;
    padding: 0.5rem 0.85rem !important;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus,
.navbar-nav .nav-link.active {
    color: #000000 !important;
    background-color: var(--color-accent);
    box-shadow: 0 2px 8px var(--color-accent-glow);
}

/* ===== Subcategorías: menú desplegable del header ===== */
.navbar-nav .nav-link.dropdown-toggle::after {
    margin-left: 0.35rem;
    vertical-align: 0.15em;
    border-top-color: currentColor;
    transition: transform 0.2s ease;
}

.main-navbar .dropdown-menu {
    background: var(--color-primary-surface);
    background-clip: padding-box;
    border: 1px solid rgba(255, 255, 255, 0.09);
    /* El hueco bajo el enlace se hace con un borde transparente:
       así el menú sigue "pegado" al link y no se cierra al bajar el mouse */
    border-top: 0.45rem solid transparent;
    border-radius: 12px;
    padding: 0.45rem;
    margin-top: 0;
    min-width: 240px;
    max-width: 300px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
}

.main-navbar .dropdown-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.88rem;
    font-weight: 500;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    white-space: normal;
    transition: all 0.15s ease;
}

.main-navbar .dropdown-menu .dropdown-item .bi {
    color: var(--color-accent);
    font-size: 0.8rem;
    flex: 0 0 auto;
}

.main-navbar .dropdown-menu .dropdown-item:hover,
.main-navbar .dropdown-menu .dropdown-item:focus,
.main-navbar .dropdown-menu .dropdown-item.active {
    background-color: var(--color-accent);
    color: #111111;
}

.main-navbar .dropdown-menu .dropdown-item:hover .bi,
.main-navbar .dropdown-menu .dropdown-item:focus .bi {
    color: #111111;
}

.main-navbar .dropdown-menu .dropdown-divider {
    border-color: rgba(255, 255, 255, 0.12);
    margin: 0.35rem 0.25rem;
}

/* Último ítem del desplegable: "Ver todo en <categoría>" */
.main-navbar .dropdown-menu .dropdown-item-todos {
    color: #ffffff;
    font-weight: 600;
}

/* En escritorio el desplegable también se abre al pasar el mouse */
@media (min-width: 992px) {
    .main-navbar .nav-item.dropdown,
    .main-navbar .nav-item.dropdown > .nav-link {
        position: relative;
    }

    .main-navbar .nav-item.dropdown:hover > .dropdown-menu,
    .main-navbar .nav-item.dropdown:focus-within > .dropdown-menu {
        display: block;
    }

    .main-navbar .nav-item.dropdown:hover > .nav-link.dropdown-toggle::after {
        transform: rotate(180deg);
    }
}

/* Inputs de búsqueda en navbar */
.bg-dark-input {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 8px 0 0 8px !important;
    padding: 0.5rem 0.85rem;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.bg-dark-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.bg-dark-input:focus {
    background-color: rgba(255, 255, 255, 0.12) !important;
    border-color: var(--color-accent) !important;
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.25) !important;
    color: #ffffff !important;
}

.navbar-search-group {
    width: 220px;
    transition: width 0.3s ease;
}

.navbar-search-group:focus-within {
    width: 270px;
}

.navbar-search-group .btn-warning,
.input-group .btn-warning {
    border-radius: 0 8px 8px 0 !important;
}

/* Botones de carrito */
.btn-cart-desktop,
.btn-cart-mobile {
    border-radius: 8px;
    font-weight: 600;
}

.btn-cart-desktop {
    width: 44px;
    height: 40px;
    padding: 0;
}

.btn-cart-desktop .badge,
.btn-cart-mobile .badge {
    font-size: 0.72rem;
    padding: 0.35em 0.55em;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* Responsive Navbar en Móviles (< 992px) */
@media (max-width: 991.98px) {
    .main-navbar .navbar-collapse {
        background: rgba(14, 16, 31, 0.98);
        margin-top: 0.75rem;
        padding: 1rem 1.25rem;
        border-radius: 12px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }

    .navbar-nav .nav-link {
        padding: 0.65rem 0.85rem !important;
        margin-bottom: 0.25rem;
        width: 100%;
        border-radius: 6px;
    }

    .navbar-nav .nav-link:hover,
    .navbar-nav .nav-link:focus {
        color: #111111 !important;
        background-color: var(--color-accent);
    }

    /* Subcategorías en móvil: lista anidada (sin caja flotante) */
    .navbar-nav .nav-link.dropdown-toggle::after {
        margin-left: auto;
        border-top-color: currentColor;
    }

    .main-navbar .dropdown-menu {
        position: static;
        background: rgba(255, 255, 255, 0.04);
        border: 0;
        border-left: 2px solid rgba(255, 193, 7, 0.45);
        border-radius: 0 8px 8px 0;
        box-shadow: none;
        padding: 0.25rem 0.25rem 0.25rem 0.5rem;
        margin: 0.15rem 0 0.5rem 0.4rem;
        min-width: 0;
        max-width: 100%;
        width: auto;
    }

    .main-navbar .dropdown-menu .dropdown-item {
        font-size: 0.85rem;
        color: rgba(255, 255, 255, 0.75);
        padding: 0.45rem 0.7rem;
    }
}

/* ============================================================
   2. HERO SECTION RESPONSIVE
   ============================================================ */

.hero {
    background: linear-gradient(135deg, #090a14 0%, #0f1026 50%, #161b3d 100%);
    color: white;
    padding: clamp(30px, 5vw, 60px) 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    display: none;
}

.hero h1 {
    font-weight: 800;
    font-size: clamp(1.85rem, 4.5vw, 3.1rem);
    line-height: 1.2;
}

.hero .lead {
    font-size: clamp(0.95rem, 2vw, 1.2rem);
}

.hero .text-accent {
    color: var(--color-accent);
}

/* ============================================================
   3. PRODUCTOS & CATEGORÍAS
   ============================================================ */

.section-title {
    font-weight: 700;
    font-size: clamp(1.3rem, 3vw, 1.75rem);
    position: relative;
    padding-bottom: 12px;
    margin-bottom: 25px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--color-accent);
    border-radius: 2px;
}

/* Cards de producto */
.producto-card {
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    background: var(--color-card);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.producto-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.producto-card .card-img-top {
    height: 210px;
    width: 100%;
    object-fit: cover;
    background: #f4f4f6;
    transition: transform 0.3s ease;
}

.producto-card:hover .card-img-top {
    transform: scale(1.03);
}

.producto-card .card-body {
    padding: 0.85rem 1rem 1rem;
}

.producto-card .badge-oferta {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #dc3545;
    color: white;
    padding: 4px 9px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    z-index: 2;
}

.producto-card .badge-mas-vendido {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 0.42rem 0.65rem;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, #dc2626, #f97316);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.producto-card .badge-mas-vendido i {
    margin-right: 0.15rem;
}

.producto-card .badge-sin-stock {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #6c757d;
    color: white;
    padding: 4px 9px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    z-index: 2;
}

.producto-card .card-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7em;
}

.producto-card .precio {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
}

.producto-card .precio-oferta {
    color: #dc3545;
    text-decoration: line-through;
    font-size: 0.85rem;
    font-weight: 400;
    margin-right: 6px;
}

/* Categorías */
.categoria-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: clamp(190px, 20vw, 240px);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
}

.categoria-card:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.categoria-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.categoria-card .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 11, 22, 0.92) 0%, rgba(10, 11, 22, 0.3) 100%);
    display: flex;
    align-items: flex-end;
    padding: 20px;
    color: white;
}

.categoria-card h5 {
    font-weight: 700;
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.cat-card-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
}

/* Chips de subcategorías dentro de la tarjeta */
.cat-card-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.45rem;
}

.cat-card-chip {
    background: rgba(255, 193, 7, 0.16);
    border: 1px solid rgba(255, 193, 7, 0.45);
    color: #ffd75e;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.12rem 0.5rem;
    border-radius: 30px;
    white-space: nowrap;
}

/* ===== Slider automático de categorías (home) ===== */
.cat-slider {
    position: relative;
}

.cat-track {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding-bottom: 0.25rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.cat-track::-webkit-scrollbar {
    display: none;
}

.cat-slide {
    flex: 0 0 85%;
    scroll-snap-align: start;
}

@media (min-width: 576px) {
    .cat-slide { flex: 0 0 calc(50% - 0.5rem); }
}

@media (min-width: 992px) {
    .cat-slide { flex: 0 0 calc(33.3333% - 0.67rem); }
}

.cat-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(15, 15, 30, 0.85);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    transition: all 0.2s ease;
}

.cat-nav:hover,
.cat-nav:focus {
    background: var(--color-accent);
    color: #111111;
}

.cat-nav-prev { left: -14px; }
.cat-nav-next { right: -14px; }

@media (max-width: 767.98px) {
    .cat-nav { display: none; }
}

/* Chips de subcategorías en la página de categoría */
.subcategorias-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1.5rem;
}

.subcat-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.42rem 0.9rem;
    border-radius: 30px;
    background: var(--color-card);
    border: 1px solid rgba(15, 15, 30, 0.12);
    color: var(--color-text);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.subcat-chip .bi {
    color: var(--color-accent);
    font-size: 0.75rem;
}

.subcat-chip:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(15, 15, 30, 0.2);
}

.subcat-chip:hover .bi {
    color: var(--color-accent);
}

.subcat-chip-todos {
    border-style: dashed;
    font-weight: 600;
}

/* Detalle producto */
.producto-imagen-principal {
    width: 100%;
    border-radius: 12px;
    aspect-ratio: 1;
    object-fit: cover;
    background: #f1f1f1;
}

.galeria-thumb {
    width: 75px;
    height: 75px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.galeria-thumb:hover,
.galeria-thumb.active {
    border-color: var(--color-accent);
}

/* ============================================================
   4. CARRITO & CHECKOUT RESPONSIVE
   ============================================================ */

.carrito-item {
    border-bottom: 1px solid #eeeeee;
    padding: 14px 0;
}

.carrito-item:last-child {
    border-bottom: none;
}

.carrito-item img {
    width: 75px;
    height: 75px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.carrito-resumen {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 22px;
    position: sticky;
    top: 90px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.checkout-box {
    background: white;
    border-radius: 12px;
    padding: clamp(16px, 3vw, 25px);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Responsive específico para el Carrito en pantallas pequeñas */
@media (max-width: 575.98px) {
    .carrito-item {
        flex-wrap: wrap;
        gap: 0.75rem !important;
        position: relative;
    }

    .carrito-item .flex-grow-1 {
        min-width: calc(100% - 95px);
    }

    .carrito-item .text-end {
        text-align: left !important;
        min-width: auto !important;
        margin-left: auto;
    }
}

/* Tarjeta Nequi */
.nequi-card {
    background: linear-gradient(135deg, #20003b 0%, #4b0082 55%, #6d28d9 100%);
    border-radius: 16px;
    padding: 18px 20px;
    color: #ffffff;
    box-shadow: 0 10px 28px rgba(75, 0, 130, 0.40);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.nequi-card__header {
    font-weight: 700;
    letter-spacing: .5px;
    margin-bottom: 14px;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nequi-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    padding: 2px 8px;
    border: 2px solid #ffffff;
    border-radius: 999px;
    font-size: .92rem;
    font-weight: 800;
    letter-spacing: -0.3px;
    line-height: 1.2;
    text-transform: lowercase;
}

.nequi-card__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.18);
}

.nequi-card__row:last-of-type {
    border-bottom: none;
}

.nequi-card__label {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    opacity: .75;
}

.nequi-card__value {
    font-weight: 700;
    font-size: 1.02rem;
    letter-spacing: .3px;
}

.nequi-card__row--total .nequi-card__value {
    font-size: 1.35rem;
    color: #d8b4fe;
}

/* ============================================================
   5. FOOTER RESPONSIVE & ELEGANTE
   ============================================================ */

.main-footer {
    background: #0a0b16 !important;
    color: #ffffff !important;
    border-top: 2px solid rgba(255, 193, 7, 0.4);
    position: relative;
    overflow: hidden;
}

.footer-brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 3.25rem;
    padding: 0.3rem;
    overflow: hidden;
    background: #0e101f;
    border: 1px solid rgba(255, 193, 7, 0.45);
    border-radius: 1rem;
    box-shadow: 0 5px 16px rgba(0, 0, 0, 0.35);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.footer-brand-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.75rem;
}

.footer-brand-icon:hover {
    transform: translateY(-3px) rotate(-3deg);
    box-shadow: 0 8px 20px rgba(255, 193, 7, 0.2);
}

.main-footer h5,
.main-footer h6,
.main-footer p,
.main-footer span,
.main-footer small,
.main-footer li,
.main-footer a,
.main-footer div,
.main-footer strong {
    color: #ffffff !important;
}

.main-footer p,
.main-footer .footer-features-bar small,
.main-footer .footer-contact-list span,
.main-footer .footer-divider ~ .row small {
    color: #f1f5f9 !important;
    opacity: 0.95;
}

.main-footer h5,
.main-footer h6,
.main-footer strong {
    color: #ffffff !important;
    font-weight: 700;
}

/* Barra superior de beneficios */
.footer-features-bar {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.feature-icon-box {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: rgba(255, 193, 7, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Títulos del footer */
.footer-heading {
    color: #ffffff !important;
    font-size: 1.05rem;
    letter-spacing: 0.5px;
    position: relative;
    padding-bottom: 8px;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 32px;
    height: 2px;
    background: var(--color-accent);
    border-radius: 2px;
}

/* En móvil, si está centrado el texto, centramos la barrita */
@media (max-width: 767.98px) {
    .text-center .footer-heading::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

/* Links del footer */
.footer-links a {
    color: #ffffff !important;
    text-decoration: none !important;
    transition: all 0.2s ease;
    display: inline-block;
    padding: 2px 0;
    opacity: 0.95;
}

.footer-links a:hover {
    color: var(--color-accent) !important;
    transform: translateX(4px);
    opacity: 1;
}

/* Botones sociales del footer */
.footer-social-btn {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.15rem;
    transition: all 0.2s ease;
}

.footer-social-btn:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #000000 !important;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px var(--color-accent-glow);
}

/* Iconos OFICIALES de redes sociales: el logotipo (SVG de marca) se pinta en
   blanco sobre el color corporativo de cada red. */
.footer-social-btn svg {
    width: 21px;
    height: 21px;
    display: block;
    fill: currentColor;
    pointer-events: none;
}

.footer-social-btn:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.footer-social-btn--whatsapp {
    background: #25d366;
    border-color: #25d366;
}

.footer-social-btn--instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    border-color: rgba(255, 255, 255, 0.18);
}

.footer-social-btn--facebook {
    background: #1877f2;
    border-color: #1877f2;
}

.footer-social-btn--tiktok {
    background: #010101;
    border-color: #010101;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.footer-social-btn--youtube {
    background: #ff0000;
    border-color: #ff0000;
}

.footer-social-btn--correo {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Al pasar el mouse conservan el color de su marca */
.footer-social-btn--whatsapp:hover,
.footer-social-btn--instagram:hover,
.footer-social-btn--facebook:hover,
.footer-social-btn--tiktok:hover,
.footer-social-btn--youtube:hover {
    color: #ffffff !important;
}

.footer-social-btn--whatsapp:hover {
    background: #1ebe5a;
    border-color: #1ebe5a;
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.45);
}

.footer-social-btn--instagram:hover {
    background: linear-gradient(45deg, #f5a04a 0%, #ee7b4d 25%, #e63a58 50%, #d83470 75%, #c92a95 100%);
    box-shadow: 0 6px 16px rgba(220, 39, 67, 0.45);
}

.footer-social-btn--facebook:hover {
    background: #1466d1;
    border-color: #1466d1;
    box-shadow: 0 6px 16px rgba(24, 119, 242, 0.45);
}

.footer-social-btn--tiktok:hover {
    background: #010101;
    border-color: #010101;
    box-shadow: 0 6px 16px rgba(254, 44, 85, 0.45), 0 0 10px rgba(37, 244, 238, 0.4);
}

.footer-social-btn--youtube:hover {
    background: #e60000;
    border-color: #e60000;
    box-shadow: 0 6px 16px rgba(255, 0, 0, 0.45);
}

.footer-social-btn--correo:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #000000 !important;
    box-shadow: 0 4px 12px var(--color-accent-glow);
}

/* Badges de métodos de pago */
.payment-badge {
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    font-size: 0.84rem;
    border-radius: 8px;
}

.bg-dark-card {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #ffffff !important;
}

.footer-divider {
    border-color: rgba(255, 255, 255, 0.18) !important;
}

/* ============================================================
   5.1 MODAL DE VERIFICACIÓN DE EDAD (18+)
   ============================================================ */

.edad-modal {
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 18px 45px rgba(10, 11, 22, 0.35);
}

.edad-modal__icon {
    width: 76px;
    height: 76px;
    margin: 0 auto;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    color: #111111;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.1rem;
    box-shadow: 0 8px 22px rgba(255, 193, 7, 0.4);
}

#modalEdad .modal-backdrop,
.modal-backdrop.show {
    opacity: 0.8;
}

/* Mientras el modal está abierto no se puede hacer scroll */
body.edad-bloqueada {
    overflow: hidden;
}

/* En móviles el modal ocupa el ancho disponible con margen */
@media (max-width: 575.98px) {
    .edad-modal .modal-body {
        padding: 1.75rem 1.25rem !important;
    }
}

/* ============================================================
   6. BOTÓN FLOTANTE DE WHATSAPP (RESPONSIVE & PULSE)
   ============================================================ */

.btn-whatsapp-floating {
    position: fixed;
    bottom: clamp(16px, 4vw, 24px);
    right: clamp(16px, 4vw, 24px);
    width: clamp(52px, 8vw, 60px);
    height: clamp(52px, 8vw, 60px);
    border-radius: 50%;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1.5rem, 3.5vw, 1.85rem);
    text-decoration: none;
    z-index: 1040;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-whatsapp-floating:hover {
    transform: scale(1.08);
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.55);
}

.btn-whatsapp-pulse {
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 2px solid #25d366;
    animation: whatsappPulse 2s infinite ease-out;
    pointer-events: none;
}

.section-title--new {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.new-arrivals-sticker {
    position: relative;
    display: inline-block;
    width: 4.15rem;
    height: 4.15rem;
    flex: 0 0 auto;
    animation: newArrivalsEntrance 700ms cubic-bezier(0.2, 1.5, 0.45, 1) both,
        newArrivalsWobble 3.5s ease-in-out 900ms infinite;
}

.new-arrivals-sticker::after {
    content: '';
    position: absolute;
    inset: 9% 18%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    filter: blur(8px);
    opacity: 0;
    transform: translateX(-150%) rotate(20deg);
    pointer-events: none;
    animation: newArrivalsShine 3.5s ease-in-out 1.2s infinite;
}

.new-arrivals-sticker img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 7px 7px rgba(118, 0, 0, 0.28));
}

.new-arrivals-label {
    align-self: flex-start;
    margin-top: -0.45rem;
    padding: 0.18rem 0.45rem;
    color: #fff;
    background: #d63384;
    border-radius: 999px;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1;
    box-shadow: 0 3px 8px rgba(214, 51, 132, 0.25);
    animation: newArrivalsLabelPulse 2s ease-in-out infinite;
}

@keyframes newArrivalsEntrance {
    from {
        opacity: 0;
        transform: scale(0.35) rotate(-22deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(-3deg);
    }
}

@keyframes newArrivalsWobble {
    0%, 100% {
        transform: rotate(-3deg) translateY(0);
    }
    50% {
        transform: rotate(4deg) translateY(-4px);
    }
}

@keyframes newArrivalsShine {
    0%, 45% {
        opacity: 0;
        transform: translateX(-150%) rotate(20deg);
    }
    60% {
        opacity: 0.8;
    }
    75%, 100% {
        opacity: 0;
        transform: translateX(150%) rotate(20deg);
    }
}

@keyframes newArrivalsLabelPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.08);
    }
}

@keyframes whatsappPulse {
    0% {
        transform: scale(1);
        opacity: 0.9;
    }
    70% {
        transform: scale(1.35);
        opacity: 0;
    }
    100% {
        transform: scale(1.35);
        opacity: 0;
    }
}

/* ============================================================
   7. TOAST NOTIFICACIONES & AJUSTES MÓVILES
   ============================================================ */

.cart-toast {
    top: 85px;
    right: 20px;
    z-index: 9999;
    min-width: 250px;
    max-width: calc(100% - 40px);
    margin: 0;
    animation: fadeInUp 0.3s ease-out;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.cart-toast-link {
    flex-shrink: 0;
    color: inherit;
    font-weight: 700;
    text-decoration: underline;
    white-space: nowrap;
}

.cart-toast-link:hover {
    color: inherit;
    opacity: .8;
}

.cart-drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1040;
    background: rgba(10, 11, 22, 0.48);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
}

.cart-drawer-backdrop.is-open {
    opacity: 1;
    visibility: visible;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    width: min(390px, 92vw);
    height: 100vh;
    background: #ffffff;
    color: var(--color-text);
    box-shadow: -12px 0 32px rgba(10, 11, 22, .2);
    transform: translateX(100%);
    transition: transform .28s ease;
}

.cart-drawer.is-open {
    transform: translateX(0);
}

.cart-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.25rem 1rem;
    color: #ffffff;
    background: var(--color-primary);
    border-bottom: 3px solid var(--color-accent);
}

.cart-drawer__header h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
}

.cart-drawer__header h2 i {
    margin-right: .45rem;
    color: var(--color-accent);
}

.cart-drawer__close {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(255, 255, 255, .12);
    transition: background .2s ease, color .2s ease;
}

.cart-drawer__close:hover,
.cart-drawer__close:focus-visible {
    color: #111111;
    background: var(--color-accent);
}

.cart-drawer__body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.25rem;
}

.cart-drawer__empty {
    padding: 2rem 1rem;
    color: var(--color-muted);
    text-align: center;
}

.cart-drawer__item {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    gap: .75rem;
    align-items: center;
    padding: .75rem 0;
    border-bottom: 1px solid #e9ecef;
}

.cart-drawer__item img {
    width: 58px;
    height: 58px;
    object-fit: cover;
    border-radius: 8px;
    background: #f1f1f1;
}

.cart-drawer__item-details {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: .25rem;
}

.cart-drawer__item-details strong {
    overflow: hidden;
    font-size: .9rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cart-drawer__item-details small {
    color: var(--color-muted);
}

.cart-drawer__item > strong {
    font-size: .85rem;
    white-space: nowrap;
}

.cart-drawer__footer {
    padding: 1rem 1.25rem 1.25rem;
    border-top: 1px solid #e9ecef;
    background: #ffffff;
}

.cart-badge-pulse {
    animation: cartBadgePulse .55s ease-out;
}

.cart-floating-button {
    position: fixed;
    right: 24px;
    bottom: 96px;
    z-index: 1030;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    color: #111111;
    background: var(--color-accent);
    border: 3px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 8px 20px rgba(10, 11, 22, .25);
    font-size: 1.35rem;
    text-decoration: none;
    transition: transform .2s ease, background-color .2s ease;
}

.cart-floating-button:hover,
.cart-floating-button:focus-visible {
    color: #111111;
    background: var(--color-accent-hover);
    transform: translateY(-3px);
}

.cart-floating-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 5px;
    color: #ffffff;
    background: #dc3545;
    border: 2px solid #ffffff;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
}

@keyframes cartBadgePulse {
    0% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.35); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.5s ease-out;
}

/* Ajustes en pantallas de móviles pequeños */
@media (max-width: 767.98px) {
    .new-arrivals-sticker {
        width: 3.35rem;
        height: 3.35rem;
    }

    .section-title--new {
        gap: 0.45rem;
    }

    .producto-card .card-img-top {
        height: 165px;
    }

    .producto-card .card-title {
        font-size: 0.86rem;
    }

    .producto-card .precio {
        font-size: 1.1rem;
    }

    .cart-toast {
        right: 15px;
        left: 15px;
        top: 75px;
    }

    /* (El botón flotante del carrito se ajusta en la sección 8.11 y se
       oculta solo en las páginas de carrito/checkout, no en todo móvil) */
}

/* ===== Rastreo de pedidos (línea de tiempo) ===== */
.rastreo-pasos {
    position: relative;
}

.rastreo-paso {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    position: relative;
}

/* Línea vertical que conecta los pasos */
.rastreo-paso:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 19px;
    top: 46px;
    bottom: -6px;
    width: 2px;
    background: var(--border-soft, rgba(255, 255, 255, 0.12));
}

.rastreo-paso.rastreo-completado:not(:last-child)::before {
    background: var(--neon-lime, #b6ff00);
}

.rastreo-icono {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    background: var(--bg-elevated, #1c1f33);
    border: 2px solid var(--border-soft, rgba(255, 255, 255, 0.12));
    color: var(--text-muted, #8b90ad);
    z-index: 1;
}

.rastreo-completado .rastreo-icono {
    background: rgba(182, 255, 0, 0.15);
    border-color: var(--neon-lime, #b6ff00);
    color: var(--neon-lime, #b6ff00);
}

.rastreo-activo .rastreo-icono {
    background: rgba(255, 193, 7, 0.15);
    border-color: var(--color-accent, #ffc107);
    color: var(--color-accent, #ffc107);
    animation: pulseGlow 2s ease-in-out infinite;
}

.rastreo-info { flex: 1; }

.rastreo-titulo {
    font-weight: 600;
    color: var(--text-main, #f5f7ff);
}

.rastreo-pendiente .rastreo-titulo { color: var(--text-muted, #8b90ad); }

.rastreo-detalle {
    font-size: .85rem;
    color: var(--text-muted, #8b90ad);
}

/* ============================================================
   8. MOBILE-FIRST — AJUSTES PARA TELÉFONOS
   ------------------------------------------------------------
   La mayoría de los clientes entra desde el celular, así que
   aquí se refina la experiencia táctil en pantallas pequeñas:
   tipografía, áreas de toque (>= 44px), teclado de iOS sin
   zoom automático, carrito, checkout y botones flotantes.
   Todas las reglas están dentro de media queries para no
   alterar la vista de escritorio.
   ============================================================ */

/* --- 8.1 Base: táctil, texto y desbordes -------------------- */

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    overflow-wrap: break-word;
}

/* Áreas táctiles: sin retardo de 300 ms ni zoom por doble toque */
a,
button,
.btn,
.nav-link,
label.btn,
input[type="submit"] {
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(255, 193, 7, 0.18);
}

/* En pantallas táctiles no hay hover real y el navegador deja los
   efectos "pegados" tras el toque: anulamos solo los que mueven cajas. */
@media (hover: none) {
    .producto-card:hover,
    .categoria-card:hover,
    .footer-links a:hover {
        transform: none;
    }
}

/* Respeta el área segura del notch (iPhone / Android modernos) */
@supports (padding: env(safe-area-inset-left)) {
    .container {
        padding-left: calc(var(--bs-gutter-x, 1.5rem) * 0.5 + env(safe-area-inset-left, 0px));
        padding-right: calc(var(--bs-gutter-x, 1.5rem) * 0.5 + env(safe-area-inset-right, 0px));
    }
}

/* Con el carrito lateral abierto no se hace scroll de fondo */
body.drawer-abierto {
    overflow: hidden;
}

/* --- 8.2 Campos de formulario: sin zoom automático en iOS ---- */

@media (max-width: 767.98px) {
    .form-control,
    .form-select,
    .form-control-sm,
    .form-control-lg,
    textarea.form-control,
    .bg-dark-input,
    .qty-input {
        /* iOS hace zoom si el campo tiene menos de 16px */
        font-size: 16px !important;
    }

    .form-label {
        font-size: 0.9rem;
    }
}

/* --- 8.3 Header táctil -------------------------------------- */

@media (max-width: 991.98px) {
    .main-navbar .nav-link {
        min-height: 44px;
    }

    .main-navbar .dropdown-menu .dropdown-item {
        min-height: 40px;
    }

    /* El menú desplegable nunca supera la pantalla: se hace scroll */
    .main-navbar .navbar-collapse {
        max-height: 78vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* --- 8.4 Tipografía adaptada a pantallas pequeñas ----------- */

@media (max-width: 575.98px) {
    /* OJO: no reducir el padding del .container por debajo de 12px, porque
       los .row con .g-3/.g-4 usan márgenes negativos de 8-12px y el
       contenido se saldría del ancho del teléfono (2px por lado). */

    .row.g-3 {
        --bs-gutter-x: 0.75rem;
        --bs-gutter-y: 0.75rem;
    }

    h1, .h1 { font-size: 1.6rem; }
    h2, .h2 { font-size: 1.35rem; }
    h3, .h3 { font-size: 1.2rem; }
    h4, .h4 { font-size: 1.08rem; }
    h5, .h5 { font-size: 1rem; }
    .display-1 { font-size: 3rem; }
    .display-3 { font-size: 2.2rem; }
    .display-4 { font-size: 1.9rem; }
    .lead { font-size: 1rem; }
    .fs-2 { font-size: 1.45rem !important; }
    .fs-3 { font-size: 1.25rem !important; }
    .fs-4 { font-size: 1.1rem !important; }

    .section-title {
        font-size: 1.25rem;
        margin-bottom: 18px;
        padding-bottom: 10px;
    }

    .section-title::after {
        width: 40px;
    }

    /* Migas de pan: se recorta el último tramo si es muy largo */
    .breadcrumb {
        --bs-breadcrumb-item-padding-x: 0.3rem;
        font-size: 0.8rem;
    }

    .breadcrumb-item.active {
        max-width: 52vw;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* --- 8.5 Navbar en teléfonos -------------------------------- */

@media (max-width: 991.98px) {
    .main-navbar {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }

    .main-navbar .navbar-collapse {
        padding: 0.9rem 1rem;
    }
}

@media (max-width: 575.98px) {
    .navbar-brand,
    .brand-text {
        font-size: 1.15rem;
    }

    .brand-icon-wrapper {
        width: 42px;
        height: 42px;
        margin-right: 0.4rem !important;
    }

    .btn-cart-mobile {
        padding: 0.45rem 0.7rem !important;
    }

    .navbar-toggler {
        width: 42px;
        height: 42px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0;
    }
}

/* --- 8.6 Hero ----------------------------------------------- */

@media (max-width: 575.98px) {
    .hero {
        padding: 26px 0 30px;
        text-align: center;
    }

    .hero h1 {
        font-size: 1.7rem;
    }

    .hero .lead {
        font-size: 0.95rem;
        margin-bottom: 1rem !important;
    }

    .hero .btn-lg {
        width: 100%;
        padding: 0.8rem 1rem;
        font-size: 1rem;
    }
}


/* --- 8.7 Tarjetas de producto (2 por fila en el celular) ---- */

@media (max-width: 575.98px) {
    .producto-card {
        border-radius: 10px;
    }

    .producto-card .card-img-top {
        height: 142px;
    }

    .producto-card .card-body {
        padding: 0.6rem 0.7rem 0.75rem;
    }

    .producto-card .card-body small.text-muted {
        font-size: 0.68rem;
    }

    .producto-card .card-title {
        font-size: 0.82rem;
        min-height: 2.6em;
    }

    .producto-card .precio {
        font-size: 1.02rem;
        line-height: 1.2;
    }

    .producto-card .precio-oferta {
        display: block;
        margin-right: 0;
        font-size: 0.74rem;
    }

    .producto-card .btn-sm {
        min-height: 38px;
        padding: 0.4rem 0.5rem;
        font-size: 0.8rem;
    }

    .producto-card .badge-oferta,
    .producto-card .badge-sin-stock {
        top: 7px;
        padding: 3px 7px;
        font-size: 0.6rem;
    }

    .producto-card .badge-oferta {
        right: 7px;
    }

    .producto-card .badge-sin-stock {
        left: 7px;
    }

    .producto-card .badge-mas-vendido {
        top: 7px;
        left: 7px;
        padding: 0.26rem 0.45rem;
        font-size: 0.58rem;
    }
}

/* --- 8.8 Chips, galería y ficha de producto ------------------ */

@media (max-width: 575.98px) {
    .subcategorias-chips {
        gap: 0.4rem;
        margin-bottom: 1.1rem;
    }

    .subcat-chip {
        padding: 0.45rem 0.8rem;
        font-size: 0.8rem;
    }

    .galeria-thumb {
        width: 62px;
        height: 62px;
    }

    .producto-imagen-principal {
        max-height: 70vh;
        border-radius: 10px;
    }
}

/* --- 8.9 Carrito: fila reordenada en teléfonos --------------- */

@media (max-width: 575.98px) {
    .carrito-item {
        display: grid !important;
        grid-template-columns: 62px minmax(0, 1fr) auto;
        grid-template-areas:
            "foto info info"
            "foto cant precio";
        align-items: center;
    }

    .carrito-item img {
        grid-area: foto;
        width: 62px;
        height: 62px;
        align-self: start;
    }

    .carrito-item > .flex-grow-1 {
        grid-area: info;
        min-width: 0;
    }

    .carrito-item > .d-flex {
        grid-area: cant;
    }

    .carrito-item > .text-end {
        grid-area: precio;
        min-width: 0 !important;
        margin-left: 0;
        text-align: right !important;
    }

    .carrito-item h6 {
        font-size: 0.95rem;
        margin-bottom: 0.15rem !important;
    }

    .carrito-item .qty-input {
        width: 58px !important;
    }

    .carrito-item .btn-remove-cart {
        min-width: 40px;
        min-height: 40px;
    }

    .carrito-resumen {
        position: static;
        top: auto;
        padding: 1.15rem;
    }
}

/* --- 8.10 Carrito lateral (drawer) --------------------------- */

@media (max-width: 575.98px) {
    .cart-drawer {
        width: 100vw;
    }

    .cart-drawer__body {
        padding: 0.9rem 1rem;
    }

    .cart-drawer__item {
        grid-template-columns: 52px minmax(0, 1fr) auto;
    }

    .cart-drawer__item img {
        width: 52px;
        height: 52px;
    }

    .cart-drawer__close {
        width: 42px;
        height: 42px;
    }

    .cart-drawer__footer {
        padding: 0.9rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
    }
}

/* --- 8.11 Botones flotantes ---------------------------------- */

.btn-whatsapp-floating {
    right: calc(clamp(16px, 4vw, 24px) + env(safe-area-inset-right, 0px));
    bottom: calc(clamp(16px, 4vw, 24px) + env(safe-area-inset-bottom, 0px));
}

.cart-floating-button {
    bottom: calc(96px + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 991.98px) {
    .cart-floating-button {
        right: calc(16px + env(safe-area-inset-right, 0px));
        /* WhatsApp ocupa la esquina inferior derecha; el carrito se apila
           justo encima para no quedar tapado ni salirse de pantalla. */
        bottom: calc(96px + env(safe-area-inset-bottom, 0px));
    }
}

/* --- 8.13 Checkout y formularios de tienda ------------------- */

@media (max-width: 767.98px) {
    .checkout-box {
        padding: 1rem;
        border-radius: 12px;
    }

    .checkout-box h5 {
        font-size: 1.02rem;
    }

    .carrito-resumen {
        position: static;
        top: auto;
        padding: 1.15rem;
    }

    /* Opciones de entrega / pago: toda la caja es "tocable" */
    .btn-check + label.btn {
        min-height: 44px;
        padding: 0.85rem 0.8rem !important;
        font-size: 0.88rem;
    }

    .nequi-card {
        padding: 1rem;
    }

    .nequi-card__header {
        font-size: 0.98rem;
    }

    .nequi-card__row {
        gap: 0.25rem;
        flex-wrap: wrap;
    }

    .nequi-card__value {
        font-size: 0.95rem;
    }

    .nequi-card__row--total .nequi-card__value {
        font-size: 1.2rem;
    }

    #previewComprobante img {
        width: auto;
        max-height: 190px;
    }

    .payment-badge {
        font-size: 0.78rem;
    }
}

/* --- 8.14 Tablas y rastreo ----------------------------------- */

@media (max-width: 767.98px) {
    .table-responsive {
        -webkit-overflow-scrolling: touch;
    }

    .table {
        font-size: 0.85rem;
    }

    .table > :not(caption) > * > * {
        padding: 0.45rem 0.5rem;
    }

    .rastreo-paso {
        gap: 10px;
        padding: 12px 0;
    }

    .rastreo-icono {
        width: 34px;
        height: 34px;
        font-size: 0.95rem;
    }

    .rastreo-paso:not(:last-child)::before {
        left: 16px;
        top: 40px;
    }

    .rastreo-titulo {
        font-size: 0.95rem;
    }

    .rastreo-detalle {
        font-size: 0.8rem;
    }
}

/* --- 8.15 Footer --------------------------------------------- */

@media (max-width: 575.98px) {
    .main-footer {
        padding-top: 2rem !important;
    }

    .footer-features-bar {
        padding: 1rem !important;
        border-radius: 1rem !important;
    }

    .feature-icon-box {
        width: 44px;
        height: 44px;
    }

    .footer-brand-icon {
        width: 2.75rem;
        height: 2.75rem;
    }

    .footer-heading {
        font-size: 1rem;
    }

    /* Enlaces del footer: cada uno con su propia área de toque */
    .footer-links a {
        display: block;
        padding: 7px 0;
    }

    .footer-social-btn {
        width: 44px;
        height: 44px;
    }

    .footer-features-bar h6 {
        font-size: 0.95rem;
    }
}

/* --- 8.16 Modal de edad y páginas legales -------------------- */

@media (max-width: 575.98px) {
    .edad-modal {
        border-radius: 14px;
    }

    .edad-modal__icon {
        width: 62px;
        height: 62px;
        font-size: 1.7rem;
    }

    .edad-modal h2 {
        font-size: 1.2rem;
    }

    /* Páginas legales: menos aire y texto más cómodo de leer */
    .legal-contenido {
        font-size: 0.95rem;
        line-height: 1.65;
    }

    .legal-contenido h2 {
        font-size: 1rem;
    }
}


/* En teléfonos el botón flotante SÍ se muestra (queda encima del botón de
   WhatsApp). Solo se oculta en las páginas donde el usuario ya está viendo
   el carrito o confirmando el pedido, para no tapar botones de compra ni el
   "Confirmar pedido". */
@media (max-width: 991.98px) {
    body.pagina-carrito .cart-floating-button,
    body.pagina-checkout .cart-floating-button {
        display: none;
    }
}

/* --- 8.12 Toasts / avisos ------------------------------------ */

@media (max-width: 767.98px) {
    .cart-toast {
        top: calc(70px + env(safe-area-inset-top, 0px));
        right: 12px;
        left: 12px;
        padding: 0.7rem 0.85rem;
        font-size: 0.88rem;
        gap: 10px;
    }
}

/* ============================================================
   Página de confirmación del pedido: número + estado en vivo
   ============================================================ */

.confirmacion-icono {
    width: 92px;
    height: 92px;
    margin: 0 auto;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(25, 135, 84, 0.12);
    color: #198754;
    font-size: 3rem;
    animation: conf-pop .5s cubic-bezier(.2, .9, .3, 1.4) both;
}

@keyframes conf-pop {
    0%   { transform: scale(.4); opacity: 0; }
    60%  { transform: scale(1.08); opacity: 1; }
    100% { transform: scale(1); }
}

/* Número de pedido protagonista en la confirmación: tipografía fluida
   (nunca más ancha que el contenedor), espaciado entre letras para leerlo
   fácil y salto de línea por caracteres si el código fuera muy largo.
   En pantallas de 360 px se ve completo sin desbordar horizontalmente. */
.pedido-codigo-grande {
    font-size: clamp(1.6rem, 9vw, 2.75rem);
    line-height: 1.15;
    letter-spacing: .15em;
    word-break: break-all;
    overflow-wrap: anywhere;
}

/* Foco visible para accesibilidad (botón Copiar y campo de seguimiento) */
.btn-copiar-codigo:focus-visible,
#codigoSeguimiento:focus-visible {
    outline: 3px solid rgba(255, 193, 7, .75);
    outline-offset: 2px;
}

/* Selección de UN SOLO TOQUE del número de pedido: al tocar el código o el
   campo de seguimiento se marca completo (sin arrastrar espacios extra que
   rompían la consulta en "Rastrear mi pedido"). */
.user-select-all {
    user-select: all;
    -webkit-user-select: all;
}

@media (max-width: 575.98px) {
    .confirmacion-icono { width: 72px; height: 72px; font-size: 2.3rem; }
}/* ============================================================
   Mis pedidos (carrito): resaltado cuando el estado cambia
   ============================================================ */

.pedido-cambio .alert {
    animation: pedido-destacar 2.5s ease;
}

@keyframes pedido-destacar {
    0%   { transform: scale(1);    box-shadow: 0 0 0 0 rgba(25, 135, 84, .45); }
    25%  { transform: scale(1.02); box-shadow: 0 0 0 6px rgba(25, 135, 84, .16); }
    60%  { transform: scale(1.01); box-shadow: 0 0 0 3px rgba(25, 135, 84, .10); }
    100% { transform: scale(1);    box-shadow: 0 0 0 0 rgba(25, 135, 84, 0); }
}

#misPedidosActualizado {
    font-size: .72rem;
    letter-spacing: .3px;
}