/* =========================================================================
   main.css - Estilos unificados para la SPA Pública MBA
   ========================================================================= */

:root {
    --primary-color: #000;
    --secondary-color: #fff;
    --accent-color: #FFD700;
    --text-color: #dacc14;
    --light-grey: #f4f4f4;
    --dark-grey: #555;
    --mid-grey: #e0e0e0;
    --header-height: 80px;

    --whatsapp-green: #25D366;
    --gmail-red: #EA4335;
    --google-blue: #4285F4;
    --google-green: #0F9D58;
    --google-yellow: #F4B400;
    --google-red: #DB4437;
    --facebook-blue: #1877F2;
    --instagram-gradient: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);

    --error-color: #dc3545;
    --success-color: #28a745;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    height: 100%;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--secondary-color);
    overflow-x: hidden;
    position: relative;

    /* Configuración por defecto. Puede verse alterada en ciertas vistas (ej. Landing Hub vs Normal) */
    height: auto;
    overflow-y: scroll;
    scroll-snap-type: none;
}

/* Modificador para vistas con Scroll Snap (Hub/Landing Page con videos) */
body.snap-scroll-mode {
    height: 100vh;
    scroll-snap-type: y mandatory;
    background-color: #000;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

ul {
    list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Montserrat', sans-serif;
    color: var(--primary-color);
    line-height: 1.2;
    margin-bottom: 0.8em;
}

p {
    margin-bottom: 1em;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ================== Header ================== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    transition: background-color 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
}

.main-header.scrolled,
.main-header.dark-mode {
    background-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.main-header .logo {
    height: 50px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.main-header .logo .logo-text {
    font-family: 'Dancing Script', cursive;
    font-size: 2.8em;
    font-weight: 700;
    letter-spacing: -3px;
    line-height: 1;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
    background: linear-gradient(to right, #000, #333, #000);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: all 0.3s ease;
}

.main-header.scrolled .logo .logo-text,
.main-header.dark-mode .logo .logo-text {
    background: linear-gradient(to right, var(--secondary-color), var(--light-grey), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 2px 2px 5px rgba(255, 255, 255, 0.3);
}

.main-header .logo .logo-text:hover {
    transform: scale(1.05) translateY(-2px);
}

.main-nav {
    display: block;
}

.main-nav ul {
    display: flex;
}

.main-nav ul li {
    margin-left: 30px;
}

.main-nav ul li a {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    color: var(--primary-color);
    padding: 5px 0;
    transition: color 0.3s ease;
    position: relative;
    cursor: pointer;
}

.main-header.scrolled .main-nav ul li a,
.main-header.dark-mode .main-nav ul li a {
    color: var(--secondary-color);
}

.main-nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    bottom: -5px;
    left: 0;
    transition: width 0.3s ease;
}

.main-nav ul li a:hover::after,
.main-nav ul li a.active::after {
    width: 100%;
}

.main-nav ul li a:hover,
.main-nav ul li a.active {
    color: var(--accent-color);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-cart-btn {
    position: relative;
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: transform 0.3s ease, color 0.3s ease;
}

.main-header.scrolled .header-cart-btn,
.main-header.dark-mode .header-cart-btn {
    color: var(--secondary-color);
}

.header-cart-btn:hover {
    transform: scale(1.1);
    color: var(--accent-color);
}

.header-cart-btn .badge {
    position: absolute;
    top: -5px;
    right: -10px;
    background: red;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2px;
    border: 2px solid #fff;
}

/* Hamburger Menu */
.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    position: relative;
    cursor: pointer;
    z-index: 1001;
    transition: transform 0.3s ease;
}

.hamburger-menu span {
    display: block;
    position: absolute;
    height: 4px;
    width: 100%;
    background: var(--primary-color);
    border-radius: 2px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: .25s ease-in-out;
}

.main-header.scrolled .hamburger-menu span,
.main-header.dark-mode .hamburger-menu span {
    background: var(--secondary-color);
}

.hamburger-menu span:nth-child(1) {
    top: 0px;
}

.hamburger-menu span:nth-child(2),
.hamburger-menu span:nth-child(3) {
    top: 10px;
}

.hamburger-menu span:nth-child(4) {
    top: 20px;
}

.hamburger-menu.open span:nth-child(1) {
    top: 10px;
    width: 0%;
    left: 50%;
}

.hamburger-menu.open span:nth-child(2) {
    transform: rotate(45deg);
}

.hamburger-menu.open span:nth-child(3) {
    transform: rotate(-45deg);
}

.hamburger-menu.open span:nth-child(4) {
    top: 10px;
    width: 0%;
    left: 50%;
}

/* Mobile Nav Panel */
.mobile-nav-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    max-width: 300px;
    height: 100%;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding-top: var(--header-height);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
    transition: right 0.3s ease-in-out;
    z-index: 999;
    overflow-y: auto;
}

.mobile-nav-panel.open {
    right: 0;
}

.mobile-nav-panel ul {
    padding: 20px 0;
}

.mobile-nav-panel ul li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav-panel ul li:last-child {
    border-bottom: none;
}

.mobile-nav-panel ul li a {
    display: block;
    padding: 15px 30px;
    color: var(--secondary-color);
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.mobile-nav-panel ul li a:hover,
.mobile-nav-panel ul li a.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--accent-color);
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

.overlay.active {
    display: block;
}

.no-scroll {
    overflow: hidden;
}

/* Utils Buttons */
.btn {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--primary-color);
    padding: 15px 30px;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: transform 0.3s ease, background-color 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn:hover {
    transform: translateY(-3px);
    background-color: #e6c100;
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    margin-left: 20px;
    box-shadow: none;
}

.btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.mba-text {
    display: inline-block;
    font-weight: 700;
    letter-spacing: -2px;
    color: var(--accent-color) !important;
    background: linear-gradient(to right, var(--accent-color), #fff, var(--accent-color)) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    text-shadow: 0px 0px 10px rgba(255, 215, 0, 0.4);
    transition: all 0.3s ease;
}

.mba-text.light {
    background: linear-gradient(to right, var(--accent-color), #fff, var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
}

/* ================== Animaciones y Clases SPA ================== */
.spa-view {
    display: none !important;
    width: 100%;
    animation: fadeIn 0.5s ease;
}

.spa-view.active {
    display: block !important;
}

/* Fix for fixed videos bleeding through hidden views */
.spa-view:not(.active) video {
    display: none !important;
}

/* New standard for SPA background videos */
.background-video-fixed {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    object-fit: cover !important;
    z-index: -1 !important;
    pointer-events: none;
    transform: none !important;
    opacity: 0.85;
    /* Sutil transparencia para elegancia */
    background-color: #000;
    /* Fondo negro mientras carga */
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Spinner global */
#global-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--secondary-color);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease;
    pointer-events: none;
    opacity: 0;
}

#global-spinner.active {
    opacity: 1;
    pointer-events: all;
}

.spinner-icon {
    width: 50px;
    height: 50px;
    border: 5px solid var(--mid-grey);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


/* ================== VISTA: HOME / LANDING HUB ================== */
.category-section {
    min-height: 100vh;
    padding-top: var(--header-height);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    color: var(--secondary-color);
    scroll-snap-align: start;
    background-color: rgba(0, 0, 0, 0);
}

.category-section h1 {
    font-size: 4em;
    margin-bottom: 20px;
    color: var(--secondary-color);
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    z-index: 2;
}

.category-section p {
    font-size: 1.3em;
    margin-bottom: 40px;
    color: rgba(255, 255, 255, 0.95);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.8);
    z-index: 2;
}

.category-section .btn {
    z-index: 2;
    position: relative;
}

.video-background {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 0;
    opacity: 0.8;
    filter: brightness(1.0);
    transition: opacity 1s ease-in-out, filter 1s ease-in-out;
}

.overlay-content {
    position: relative;
    z-index: 1;
    padding: 20px 40px;
    max-width: 900px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.icon-animated {
    font-size: 6em;
    color: var(--accent-color);
    margin-bottom: 20px;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.7);
    transition: transform 0.3s ease;
}

.icon-animated:hover {
    transform: scale(1.1);
}

/* Pagos Section */
#pagos-section {
    background-color: #000;
    padding-bottom: 50px;
}

.payment-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 30px;
    max-width: 800px;
    margin: 0 auto;
}

.payment-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: var(--secondary-color);
    font-size: 0.9em;
    font-weight: 500;
    transition: transform 0.3s ease;
    padding: 10px 5px;
    width: 120px;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.payment-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
    background-color: rgba(255, 255, 255, 0.1);
}

.payment-item img {
    height: 50px;
    max-width: 100px;
    filter: grayscale(0.2) brightness(1.1);
    transition: filter 0.3s ease, transform 0.3s ease;
    object-fit: contain;
    margin-bottom: 8px;
}

.payment-item img:hover {
    filter: grayscale(0) brightness(1.2) contrast(1);
    transform: scale(1.05);
}

.payment-item i {
    font-size: 3.5em;
    color: var(--secondary-color);
    filter: grayscale(0.5) brightness(1.2);
    margin-bottom: 8px;
    transition: filter 0.3s ease, transform 0.3s ease;
}

.payment-item i:hover {
    color: var(--accent-color);
    filter: grayscale(0) brightness(1.1);
    transform: scale(1.05);
}


/* ================== VISTA GRAL (PADDING TOP PARA HEADER) ================== */
.internal-view-container {
    padding-top: calc(var(--header-height) + 40px);
    padding-bottom: 80px;
    min-height: calc(100vh - 200px);
    /* Altura min menos header y footer */
}

.section-title {
    text-align: center;
    font-size: 2.8em;
    margin-bottom: 60px;
    position: relative;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--accent-color);
    border-radius: 2px;
}


/* ================== VISTA: CATALOGO ================== */
/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background-color: var(--secondary-color);
    border-radius: 15px;
    padding-bottom: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
}

/* Glassmorphism inside overlay view */
#view-catalogo .product-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 15px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 255, 255, 0));
    z-index: -1;
    transition: opacity 0.4s ease;
    opacity: 0;
}

.product-card:hover {
    transform: translateY(-15px) scale(1.03);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4), 0 0 25px rgba(255, 215, 0, 0.5);
    border-color: var(--accent-color);
}

.product-card:hover::before {
    opacity: 1;
}

.product-card img {
    width: 100%;
    height: 250px;
    object-fit: contain;
    background: #fff;
    display: block;
    border-bottom: 1px solid var(--light-grey);
    padding: 10px;
}

.product-card-content {
    padding: 20px 20px 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-card-content h3 {
    font-size: 1.4em;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.product-card-content p {
    font-size: 0.9em;
    color: var(--dark-grey);
    margin-bottom: 10px;
    flex-grow: 1;
}

.product-card .price {
    font-size: 1.6em;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 15px;
}

.product-card .btn {
    width: 90%;
    margin: 0 auto;
    padding: 10px;
    font-size: 0.9em;
}


/* ================== VISTA: CARRITO ================== */
.cart-content-wrapper {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.cart-items {
    flex: 2;
    min-width: 300px;
    background-color: var(--secondary-color);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid var(--light-grey);
    position: relative;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
}

.cart-item-details {
    flex-grow: 1;
}

.cart-item-details h4 {
    font-size: 1.2em;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.cart-item-details p {
    font-size: 0.9em;
    color: var(--dark-grey);
    margin-bottom: 5px;
}

.cart-item-price {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--accent-color);
    min-width: 80px;
    text-align: right;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    border: 1px solid var(--light-grey);
    border-radius: 5px;
    overflow: hidden;
}

.cart-item-quantity button {
    background-color: var(--light-grey);
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.2s ease;
}

.cart-item-quantity button:hover {
    background-color: var(--accent-color);
    color: var(--primary-color);
}

.cart-item-quantity input {
    width: 40px;
    text-align: center;
    border: none;
    outline: none;
    padding: 8px 0;
    font-size: 1em;
    -moz-appearance: textfield;
    appearance: textfield;
}

.cart-item-remove {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-size: 1.2em;
    padding: 8px;
    transition: color 0.2s ease;
}

.cart-item-remove:hover {
    color: #c82333;
}

.cart-summary {
    flex: 1;
    min-width: 280px;
    background-color: var(--secondary-color);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.cart-summary h3 {
    font-size: 1.5em;
    margin-bottom: 20px;
    text-align: center;
    color: var(--primary-color);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed var(--light-grey);
    font-size: 1.1em;
}

.summary-row:last-of-type {
    border-bottom: none;
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.3em;
    margin-top: 20px;
}

.summary-row.total span:last-child {
    color: var(--accent-color);
    font-size: 1.2em;
}

.checkout-button {
    width: 100%;
    text-align: center;
    font-size: 1.1em;
    margin-top: 20px;
}

.empty-cart-message {
    text-align: center;
    padding: 50px;
    background-color: var(--secondary-color);
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    margin-top: 40px;
    display: none;
}


/* ================== VISTA: LOGIN / REGISTER / USUARIO (Formularios) ================== */
.auth-container {
    max-width: 500px;
    margin: 0 auto;
    background: var(--secondary-color);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.auth-container h2 {
    text-align: center;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-grey);
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1.5px solid var(--mid-grey);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1em;
    transition: border-color 0.2s ease;
}

.form-group input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.auth-btn {
    width: 100%;
    border: none;
    font-size: 1.1em;
    margin-top: 10px;
}

.auth-links {
    text-align: center;
    margin-top: 25px;
    font-size: 0.9em;
}

.auth-links a {
    font-weight: 600;
    color: var(--accent-color);
}

.auth-links a:hover {
    text-decoration: underline;
    color: #d4af37;
}

.user-profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    border-bottom: 2px solid var(--light-grey);
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.user-avatar {
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5em;
    font-weight: 700;
}

.user-info h2 {
    margin: 0 0 5px 0;
}

.user-info p {
    margin: 0;
    color: var(--dark-grey);
}

.user-actions {
    margin-top: 30px;
    display: flex;
    gap: 15px;
}


/* ================== Componentes Globales (Modal, Footer) ================== */
/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: var(--secondary-color);
    margin: auto;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 700px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--light-grey);
    padding-bottom: 15px;
}

.modal-header h3 {
    margin-bottom: 0;
    font-size: 1.8em;
    color: var(--primary-color);
}

.close-button {
    color: var(--dark-grey);
    font-size: 2em;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover {
    color: var(--error-color);
}

.modal-body {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.modal-body .product-carousel {
    position: relative;
    width: 100%;
    max-width: 350px;
    height: 250px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 8px;
    flex-shrink: 0;
    background: #fff;
}

.modal-body .product-carousel img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: absolute;
    opacity: 0;
    transition: opacity 0.3s;
}

.modal-body .product-carousel img.active {
    opacity: 1;
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 1.2em;
    border-radius: 50%;
    z-index: 10;
}

.carousel-button:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.carousel-button.prev {
    left: 10px;
}

.carousel-button.next {
    right: 10px;
}

.modal-product-info {
    flex-grow: 1;
}

.modal-product-info .modal-price {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--accent-color);
    margin: 15px 0;
}

.modal-footer {
    border-top: 1px solid var(--light-grey);
    padding-top: 20px;
    text-align: right;
}

.btn-add-cart-modal {
    padding: 12px 25px;
    font-size: 1em;
    border: none;
}

/* Footer */
.main-footer {
    background-color: var(--dark-grey);
    color: var(--secondary-color);
    padding: 40px 0;
    text-align: center;
    font-size: 0.9em;
    z-index: 2;
    position: relative;
}

.main-footer .footer-content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
    text-align: left;
}

.main-footer .footer-col h4 {
    color: var(--secondary-color);
    font-size: 1.2em;
    margin-bottom: 20px;
    text-align: center;
}

.main-footer .footer-col ul {
    text-align: center;
}

.main-footer .footer-col ul li {
    margin-bottom: 10px;
}

.main-footer .footer-col ul li a,
.main-footer .footer-col p {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease;
    font-size: 0.95em;
}

.main-footer .footer-col ul li a:hover {
    color: var(--accent-color);
}

.social-icons {
    margin-top: 20px;
    margin-bottom: 30px;
}

.social-icons a {
    font-size: 1.5em;
    margin: 0 10px;
    transition: transform 0.3s ease;
    display: inline-block;
    color: #fff;
}

.social-icons a:hover {
    transform: translateY(-3px) scale(1.1);
    color: var(--accent-color);
}

.copyright {
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.6);
}

.message {
    padding: 12px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 600;
    text-align: center;
    display: none;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
}

/* ================== Media Queries ================== */
@media (max-width: 992px) {
    .main-header {
        padding: 0 30px;
    }

    .main-header .logo .logo-text {
        font-size: 2.2em;
    }

    .main-header nav {
        display: none;
    }

    .hamburger-menu {
        display: block;
    }

    .category-section h1 {
        font-size: 3.5em;
    }

    .category-section p {
        font-size: 1.1em;
    }

    .icon-animated {
        font-size: 5em;
    }

    .main-footer .footer-content-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .cart-content-wrapper {
        flex-direction: column;
        gap: 30px;
    }

    .cart-items,
    .cart-summary {
        min-width: unset;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .main-header {
        padding: 0 20px;
    }

    .main-header .logo .logo-text {
        font-size: 2em;
    }

    .category-section {
        min-height: 70vh;
        padding-top: var(--header-height);
    }

    .category-section h1 {
        font-size: 2.8em;
    }

    .category-section p {
        font-size: 1em;
    }

    .btn {
        padding: 12px 25px;
    }

    .icon-animated {
        font-size: 4em;
    }

    .section-title {
        font-size: 2em;
    }

    .internal-view-container {
        padding-top: calc(var(--header-height) + 20px);
    }

    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }

    .cart-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .cart-item-price {
        text-align: center;
        width: 100%;
    }

    .cart-item-quantity {
        margin: 10px auto;
        border: 1px solid var(--mid-grey);
    }

    .cart-item-remove {
        position: absolute;
        top: 10px;
        right: 10px;
        background: rgba(220, 53, 69, 0.1);
        color: #dc3545;
        border-radius: 50%;
        width: 35px;
        height: 35px;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }

    .main-footer .footer-content-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .main-footer .footer-col h4,
    .main-footer .footer-col ul {
        text-align: center;
    }

    .payment-logos {
        gap: 15px;
    }

    .payment-item {
        width: 90px;
        padding: 8px 3px;
    }

    .payment-item img {
        height: 35px;
    }

    .payment-item i {
        font-size: 2.5em;
    }

    .modal-body {
        flex-direction: column;
        align-items: center;
    }

    .modal-footer {
        text-align: center;
    }

    .btn-add-cart-modal {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .category-section h1 {
        font-size: 2em;
    }

    .category-section p {
        font-size: 0.9em;
    }

    .icon-animated {
        font-size: 3em;
    }

    .section-title {
        font-size: 1.6em;
    }

    .auth-container {
        padding: 20px;
        box-shadow: none;
        border-radius: 0;
        background: transparent;
    }
}

/* ============================================== */
/*  ESTILOS MEJORADOS - MODAL PRODUCTO            */
/* ============================================== */

.modal-category-tag {
    display: inline-block;
    background: var(--light-grey);
    color: var(--dark-grey);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

#modal-product-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #444;
    margin-bottom: 20px;
}

.modal-specs {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid var(--accent-color);
    margin-bottom: 20px;
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px 20px;
}

.spec-item {
    font-size: 0.85rem;
    color: #555;
    display: flex;
    flex-direction: column;
}

.spec-item strong {
    color: #222;
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.modal-price-container {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-top: 10px;
}

.modal-price {
    font-size: 2.2rem;
    font-weight: 700;
    color: #000;
}

.modal-price.on-sale {
    color: var(--error-color);
}

.modal-price-old {
    font-size: 1.2rem;
    color: #999;
    text-decoration: line-through;
}

.modal-footer {
    display: flex;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.btn-add-cart-modal,
.btn-whatsapp-modal {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px;
    font-size: 1rem;
}

.btn-whatsapp-modal {
    background-color: #25D366;
    color: white;
}

.btn-whatsapp-modal:hover {
    background-color: #1ebe5d;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .modal-footer {
        flex-direction: column;
    }

    .modal-price {
        font-size: 1.8rem;
    }
}

/* ============================================== */
/*  SISTEMA DE NOTIFICACIONES (TOASTS)            */
/* ============================================== */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: white;
    color: #333;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 250px;
    max-width: 350px;
    transform: translateX(120%);
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: auto;
    border-left: 5px solid var(--accent-color);
}

.toast.active {
    transform: translateX(0);
}

.toast.success {
    border-left-color: #25D366;
}

.toast.error {
    border-left-color: var(--error-color);
}

.toast.info {
    border-left-color: var(--accent-color);
}

.toast i {
    font-size: 1.2rem;
}

.toast-message {
    font-size: 0.95rem;
    font-weight: 500;
}

/* FIX VISIBILIDAD TITULOS */
.section-title {
    color: var(--secondary-color) !important;
    text-align: center;
    margin-bottom: 50px;
    font-weight: 700;
}

/* Efecto Fly to Cart Mejorado */
.fly-item {
    position: fixed;
    z-index: 10000;
    width: 60px;
    height: 60px;
    background: var(--accent-color);
    border-radius: 50%;
    pointer-events: none;
    box-shadow: 0 0 30px var(--accent-color), 0 0 10px #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-size: 24px;
    border: 3px solid #fff;
}

.fly-item i {
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.5));
}