/* Variables de Diseño Obligatorias (Marca Blanca) */
:root {
    --color-principal: #EB641E;
    --negro-profundo: #1A1A1A;
    --gris-oscuro: #333333;
    --blanco-puro: #FFFFFF;
    --rojo-oferta: #D92525;
    --fuente-sistema: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--fuente-sistema);
}

body {
    background-color: #F9F9F9;
    color: var(--negro-profundo);
    overflow-x: hidden;
}

/* Header Fijo */
.main-header {
    background-color: var(--blanco-puro);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.logo {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--color-principal);
    cursor: pointer;
}

.nav-principal {
    display: flex; gap: 30px; font-weight: bold; font-size: 15px;
}
.nav-principal a {
    color: var(--negro-profundo); text-decoration: none;
}
.nav-principal a.active {
    color: var(--color-principal);
}

.header-actions {
    display: flex; align-items: center; gap: 20px;
}
.menu-usuario { font-size: 14px; font-weight: bold; }

.cart-trigger {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    position: relative;
}
.cart-badge {
    position: absolute; top: -8px; right: -10px; background: var(--color-principal); color: white;
    font-size: 11px; width: 18px; height: 18px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-weight: bold;
}

/* Hero Section */
.hero-section {
    background-color: #F1F1F1;
    padding: 40px 20px;
    text-align: center;
}

.tagline {
    font-size: 14px;
    color: var(--gris-oscuro);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.btn-primary {
    display: inline-block;
    background-color: var(--color-principal);
    color: var(--blanco-puro);
    text-decoration: none;
    padding: 16px 24px;
    font-weight: bold;
    border-radius: 8px;
    font-size: 16px;
    width: 100%;
    text-align: center;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Grilla de Catálogo */
.container { padding: 20px; }
.section-title { font-size: 22px; margin-bottom: 20px; }

.products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 768px) {
    .products-grid { grid-template-columns: repeat(3, 1fr); }
}

.product-card {
    background-color: var(--blanco-puro);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
}

.card-image-container {
    position: relative;
    width: 100%;
    height: 200px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
    background-color: #f4f4f4;
}

.card-image-container .product-image {
    width: 100%; height: 100%; object-fit: cover; border-radius: 0; margin-bottom: 0;
}

.product-card h3 { font-size: 16px; margin-bottom: 8px; }
.price-tag {
    font-size: 20px; font-weight: bold; color: var(--color-principal);
    margin-bottom: 12px; transition: opacity 0.2s;
}

.btn-details {
    background-color: #F1F1F1; color: var(--negro-profundo); border: 1px solid #E0E0E0;
    padding: 12px; font-weight: bold; border-radius: 6px; cursor: pointer;
    font-size: 14px; width: 100%; margin-bottom: 15px; transition: background-color 0.2s;
}
.btn-details:hover { background-color: #E8E8E8; }

.btn-add-to-cart {
    background-color: var(--color-principal); color: var(--blanco-puro); border: none;
    padding: 14px; font-weight: bold; border-radius: 6px; cursor: pointer;
    font-size: 15px; width: 100%; margin-top: auto;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15); transition: filter 0.2s;
}
.btn-add-to-cart:hover { filter: brightness(0.9); }

/* MODAL DE PRODUCTO */
.modal {
    display: none; position: fixed; z-index: 300; left: 0; top: 0;
    width: 100%; height: 100%; background-color: rgba(0,0,0,0.7);
    align-items: center; justify-content: center;
}
.modal.open { display: flex; }
.modal-content {
    background-color: var(--blanco-puro); width: 92%; max-width: 450px;
    border-radius: 12px; padding: 20px; position: relative;
    max-height: 90vh; overflow-y: auto;
}
.close-modal {
    position: absolute; right: 15px; top: 10px; font-size: 28px;
    font-weight: bold; color: #999; cursor: pointer; z-index: 10;
}

/* ESTILOS DE LOS CARRUSELES */
.modal-gallery { display: flex; flex-direction: column; gap: 10px; margin-bottom: 15px; }
.main-image-container {
    position: relative; width: 100%; height: 250px; background-color: #f9f9f9;
    border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.main-image-container img { width: 100%; height: 100%; object-fit: cover; }
.carousel-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.85); border: none; width: 35px; height: 35px;
    border-radius: 50%; cursor: pointer; font-size: 16px; font-weight: bold; color: #333;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2); transition: 0.2s;
}
.carousel-btn:hover { background-color: #FFF; }
.prev-btn { left: 10px; }
.next-btn { right: 10px; }
.carousel-btn.mini { width: 28px; height: 28px; font-size: 12px; }

.thumbnail-container {
    display: flex; gap: 8px; overflow-x: auto; padding-bottom: 5px; scroll-behavior: smooth;
}
.thumbnail-container::-webkit-scrollbar { height: 4px; }
.thumbnail-container::-webkit-scrollbar-thumb { background-color: #ccc; border-radius: 4px; }
.thumb {
    width: 55px; height: 55px; object-fit: cover; border-radius: 6px; cursor: pointer;
    border: 2px solid transparent; opacity: 0.6; transition: 0.2s; flex-shrink: 0;
}
.thumb:hover { opacity: 1; }
.thumb.active { border-color: var(--color-principal); opacity: 1; }

/* Carrito Lateral Deslizable */
.cart-sidebar {
    position: fixed; top: 0; right: -100%; width: 100%; max-width: 400px; height: 100%;
    background-color: var(--blanco-puro); z-index: 200; box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    transition: right 0.3s ease; display: flex; flex-direction: column;
}
.cart-sidebar.open { right: 0; }
.cart-sidebar-header {
    padding: 20px; border-bottom: 1px solid #EEE; display: flex;
    justify-content: space-between; align-items: center;
}
.btn-close { background: none; border: none; font-size: 20px; cursor: pointer; }
.cart-items-list { flex: 1; overflow-y: auto; padding: 20px; }
.upsell-section {
    background-color: #F9F9F9; padding: 15px; border-top: 1px solid #EEE; border-bottom: 1px solid #EEE;
}
.upsell-section h4 { font-size: 13px; color: var(--color-principal); margin-bottom: 8px; }
.cart-sidebar-footer { padding: 20px; border-top: 1px solid #EEE; }
.totals-row { display: flex; justify-content: space-between; font-size: 18px; font-weight: bold; margin-bottom: 15px; }
.btn-action-checkout {
    background-color: var(--color-principal); color: var(--blanco-puro); border: none;
    width: 100%; padding: 16px; font-size: 16px; font-weight: bold; border-radius: 8px; cursor: pointer;
}

.overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.5); z-index: 150; display: none;
}
.overlay.open { display: block; }

.table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* =========================================
   ESTILOS COMPARTIDOS (CTA, Footer, WhatsApp)
   ========================================= */
.cta-bottom {
    background: var(--color-principal); color: white; text-align: center; padding: 50px 20px; margin-top: 60px;
}
.cta-bottom h2 { font-size: 28px; margin-bottom: 15px; }
.cta-bottom p { font-size: 16px; margin-bottom: 25px; }
.btn-cta {
    background: white; color: var(--color-principal); border: none; padding: 15px 35px;
    font-size: 18px; font-weight: 900; border-radius: 8px; cursor: pointer; box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.main-footer { background: var(--negro-profundo); color: white; padding: 50px 20px 20px; text-align: center; }
.footer-container {
    max-width: 1200px; margin: auto; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 30px; text-align: left;
}
.footer-col { flex: 1; min-width: 200px; }
.footer-logo { color: var(--color-principal); font-size: 24px; font-weight: 900; margin-bottom: 15px; }
.footer-col p { color: #aaa; line-height: 1.6; margin-bottom: 10px; }
.footer-col ul { list-style: none; padding: 0; line-height: 2; }
.footer-col a { color: #ccc; text-decoration: none; }
.footer-bottom { margin-top: 40px; border-top: 1px solid #333; padding-top: 20px; color: #666; font-size: 14px; }

.btn-whatsapp-flotante {
    position: fixed; bottom: 25px; right: 25px; width: 60px; height: 60px;
    background: #25D366; color: white; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 35px; box-shadow: 0 4px 15px rgba(0,0,0,0.3); z-index: 1000; text-decoration: none;
}
.btn-whatsapp-flotante img { width: 35px; height: 35px; }

.btn-whatsapp-flotante::before {
    content: "¿Necesitas ayuda?";
    position: absolute;
    right: 75px; /* Lo empuja a la izquierda del botón verde */
    background-color: #ffffff;
    color: #333333;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 900;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    white-space: nowrap;
    pointer-events: none; /* Para que el texto no estorbe si pasan el mouse por ahí */
}

/* Triangulito que conecta el texto con el botón */
.btn-whatsapp-flotante::after {
    content: "";
    position: absolute;
    right: 64px;
    border-width: 6px;
    border-style: solid;
    border-color: transparent transparent transparent #ffffff;
    pointer-events: none;
}

/* =========================================
   ESTILOS ESPECÍFICOS: PÁGINA TIENDA
   ========================================= */
.tienda-layout {
    max-width: 1300px; margin: 40px auto; padding: 0 20px;
    display: flex; gap: 30px; align-items: flex-start; flex-wrap: wrap;
}

.tienda-sidebar {
    flex: 1; min-width: 250px; max-width: 280px; background: var(--blanco-puro);
    padding: 25px; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    position: sticky; top: 90px;
}

.sidebar-titulo {
    margin-bottom: 20px; color: var(--negro-profundo); border-bottom: 2px solid #eee; padding-bottom: 10px;
}
.form-group-filtro { margin-bottom: 20px; }
.form-group-filtro label {
    display: block; font-size: 13px; font-weight: bold; color: var(--gris-oscuro); margin-bottom: 8px;
}
.form-group-filtro input[type="text"], .form-group-filtro select {
    width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 6px; outline: none;
}
.form-group-filtro input[type="range"] { width: 100%; cursor: pointer; }
.label-precio { display: flex; justify-content: space-between; align-items: center; }
.label-precio span { color: var(--color-principal); }

.tienda-resultados { flex: 3; min-width: 300px; }
.resultados-header {
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 2px solid #eee; margin-bottom: 20px; padding-bottom: 10px;
}
.resultados-header h2 { font-size: 24px; color: var(--negro-profundo); margin: 0; }
#info-paginacion { font-size: 14px; color: #888; font-weight: bold; }
.paginacion-container { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 40px; }


/* =========================================
   DISEÑO RESPONSIVO (MÓVILES Y TABLETS)
   ========================================= */
@media (max-width: 992px) {
    body { flex-direction: column; }
    .sidebar { width: 100%; min-height: auto; padding: 15px; }
    .nav-menu { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
    .nav-menu li { margin-bottom: 0; }
    .nav-menu a { padding: 8px 12px; font-size: 13px; text-align: center; }
    .main-content { padding: 15px; width: 100%; max-width: 100vw; overflow-x: hidden; min-width: 0; }
    .form-grid { grid-template-columns: 1fr !important; }
    .full-width { grid-column: span 1 !important; }
    .charts-grid { grid-template-columns: 1fr !important; }

    /* Ajuste para que la tienda se vea bien en móviles */
    .tienda-sidebar { max-width: 100%; position: static; margin-bottom: 20px; }
    .resultados-header { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* =========================================
   ESTILOS ESPECÍFICOS: PÁGINA "MI CUENTA"
   ========================================= */
.header-right-actions { display: flex; gap: 15px; align-items: center; }
.link-tienda { text-decoration: none; color: #666; font-weight: bold; font-size: 14px; transition: color 0.2s; }
.link-tienda:hover { color: var(--color-principal); }
.btn-logout { background: #d9534f; color: white; border: none; padding: 8px 12px; border-radius: 6px; cursor: pointer; font-weight: bold; transition: background 0.2s; }
.btn-logout:hover { background: #c9302c; }

.cuenta-container { max-width: 1000px; margin: 40px auto; padding: 0 20px; display: flex; gap: 30px; flex-wrap: wrap; }
.cuenta-sidebar { width: 250px; background: #fff; padding: 20px; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); height: fit-content; }
.sidebar-greeting { margin-bottom: 20px; font-size: 18px; color: var(--color-principal); }

.cuenta-content { flex: 1; min-width: 300px; background: #fff; padding: 30px; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
.cuenta-section-title { margin-bottom: 20px; border-bottom: 2px solid #eee; padding-bottom: 10px; }

.tab-btn { display: block; width: 100%; text-align: left; padding: 12px 15px; background: none; border: none; border-radius: 6px; cursor: pointer; font-size: 15px; margin-bottom: 5px; color: #666; font-weight: bold; transition: 0.2s; }
.tab-btn:hover { background: #f9f9f9; }
.tab-btn.active { background: var(--color-principal); color: #fff; }
.tab-section { display: none; }
.tab-section.active { display: block; }

/* Formulario de Perfil */
.perfil-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 15px; }
.perfil-form-group label { font-size: 13px; font-weight: bold; display: block; margin-bottom: 5px; }
.perfil-form-group input { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 6px; outline: none; }
.perfil-form-group input:focus { border-color: var(--color-principal); }
.full-width-col { grid-column: span 2; }
.label-hint { font-weight: normal; color: #888; font-size: 12px; }
.btn-guardar-perfil { background: var(--color-principal); color: white; border: none; padding: 12px 20px; border-radius: 6px; cursor: pointer; font-weight: bold; font-size: 14px; transition: filter 0.2s; }
.btn-guardar-perfil:hover { filter: brightness(0.9); }

/* Tarjetas de Historial de Pedidos */
.pedido-card { border: 1px solid #eee; border-radius: 8px; padding: 15px; margin-bottom: 15px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px;}
.pedido-info h4 { margin-bottom: 5px; color: var(--negro-profundo); }
.pedido-info p { font-size: 13px; color: #666; }
.btn-recompra { background: #28a745; color: #fff; border: none; padding: 10px 15px; border-radius: 6px; cursor: pointer; font-weight: bold; transition: 0.2s; }
.btn-recompra:hover { background: #218838; }

.empty-state-text { color: #888; }

/* Responsive Mi Cuenta */
@media (max-width: 768px) {
    .cuenta-container { flex-direction: column; }
    .cuenta-sidebar { width: 100%; position: static; margin-bottom: 10px; }
    .perfil-grid { grid-template-columns: 1fr; }
    .full-width-col { grid-column: span 1; }
    .pedido-card { flex-direction: column; align-items: flex-start; text-align: left; }
    .pedido-card > div:last-child { width: 100%; text-align: left !important; }
    .btn-recompra { width: 100%; }
}

/* =========================================
   ESTILOS ESPECÍFICOS: INDEX (Inicio)
   ========================================= */

/* Slider de Banners */
.slider-section {
    max-width: 1200px;
    margin: 20px auto;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.slider-wrapper {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
}
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9);
    border: none;
    font-size: 24px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 10;
    color: #333;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.slider-btn:hover { background: #fff; transform: translateY(-50%) scale(1.1); }
.slider-btn.prev { left: 15px; }
.slider-btn.next { right: 15px; }
.slider-dots-container {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

/* Secciones de Productos en Inicio (Ofertas y Novedades) */
.home-section {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}
.home-section-title {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--negro-profundo);
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}
.home-section-title.title-danger { color: #dc3545; }

.home-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

/* =========================================
   ESTILOS ESPECÍFICOS: PÁGINA CONTACTO
   ========================================= */
.contact-hero {
    background: var(--color-principal);
    color: white;
    padding: 60px 20px;
    text-align: center;
}
.contact-hero h1 {
    font-size: 36px;
    margin-bottom: 15px;
}
.contact-hero p {
    font-size: 16px;
    color: #ccc;
    max-width: 600px;
    margin: auto;
}

.contact-container {
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
}

/* Columna Izquierda: Información */
.contact-info {
    flex: 1;
    min-width: 300px;
}
.contact-title {
    font-size: 24px;
    color: var(--negro-profundo);
    margin-bottom: 30px;
}

.info-card {
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    display: flex;
    align-items: center;
    gap: 15px;
}
.info-icon {
    font-size: 30px;
    background: #f4f6f9;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--color-principal);
}
.info-text h3 {
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
}
.info-text p {
    color: #666;
    font-size: 14px;
}

/* Columna Derecha: Formulario */
.contact-form-wrapper {
    flex: 1;
    min-width: 300px;
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}
.form-title {
    font-size: 24px;
    color: var(--color-principal);
    margin-bottom: 25px;
}

.form-group-contacto {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}
.form-group-contacto label {
    font-size: 14px;
    font-weight: bold;
    color: #555;
    margin-bottom: 8px;
}
.form-group-contacto input,
.form-group-contacto textarea,
.form-group-contacto select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 15px;
    outline: none;
    transition: 0.2s;
    background: white;
}
.form-group-contacto input:focus,
.form-group-contacto textarea:focus,
.form-group-contacto select:focus {
    border-color: var(--color-principal);
}

.btn-enviar-contacto {
    background: var(--color-principal);
    color: white;
    border: none;
    padding: 15px;
    width: 100%;
    font-size: 16px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
}
.btn-enviar-contacto:hover {
    filter: brightness(0.9);
}

/* =========================================
   ESTILOS ESPECÍFICOS: PÁGINA CHECKOUT
   ========================================= */

.checkout-container {
    display: flex;
    flex-wrap: wrap;
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
    gap: 40px;
}
.checkout-form {
    flex: 1;
    min-width: 300px;
}
.checkout-summary {
    width: 380px;
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    height: fit-content;
    position: sticky;
    top: 90px;
}

.form-section {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.section-title-checkout {
    margin-bottom: 15px;
    color: var(--color-principal);
    font-size: 18px;
    border-bottom: 2px solid #eee;
    padding-bottom: 8px;
}

.input-group {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}
.input-group input,
.input-group select {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    width: 100%;
    min-width: 120px;
    outline: none;
    transition: 0.2s;
}
.input-group input:focus,
.input-group select:focus {
    border-color: var(--color-principal);
}

.btn-confirm {
    background: var(--color-principal);
    color: #fff;
    border: none;
    padding: 16px;
    width: 100%;
    font-size: 16px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
}
.btn-confirm:hover { filter: brightness(0.9); }

.btn-volver {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #ccc;
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    text-decoration: none;
    transition: 0.2s;
    display: flex;
    align-items: center;
}
.btn-volver:hover { background: #e2e6ea; }

/* Pestañas de Autenticación */
.auth-tabs { display: flex; margin-bottom: 15px; border-bottom: 2px solid #eee; }
.auth-tab-btn {
    flex: 1; padding: 10px; background: none; border: none;
    border-bottom: 3px solid transparent; font-weight: bold;
    cursor: pointer; transition: 0.2s;
}
.auth-tab-btn.active { border-bottom-color: var(--color-principal); color: #333; }
.auth-tab-btn.inactive { color: #888; }

.auth-text-helper { font-size: 13px; color: #666; margin-bottom: 15px; }

.auth-btn {
    background: #17a2b8; color: white; width: 100%; padding: 12px;
    font-size: 15px; cursor: pointer; border: none; border-radius: 6px;
    font-weight: bold; transition: 0.2s;
}
.auth-btn:hover { filter: brightness(0.9); }

.auth-link {
    background: none; border: none; color: var(--color-principal);
    text-decoration: underline; cursor: pointer; font-size: 13px;
    margin-top: 15px; display: block; text-align: center; width: 100%;
}

/* Tarjeta Logueado */
.logged-in-card {
    background: #e9f7ef; padding: 15px; border-radius: 6px; border: 1px solid #c3e6cb;
}
.logged-in-title { color: #155724; font-weight: bold; margin-bottom: 5px; }
.logged-in-name { font-size: 14px; color: #333; margin-bottom: 5px; font-weight: bold; }
.logged-in-text { font-size: 13px; color: #666; }
.logged-in-actions {
    display: flex; justify-content: space-between; margin-top: 15px; align-items: center;
}
.btn-account {
    background: #28a745; border: none; color: white; border-radius: 4px;
    padding: 6px 12px; cursor: pointer; font-weight: bold; font-size: 12px; transition: 0.2s;
}
.btn-account:hover { background: #218838; }
.btn-logout-link {
    background: none; border: none; color: #d9534f;
    text-decoration: underline; cursor: pointer; font-size: 12px;
}

/* Resumen del Checkout */
.summary-title { margin-bottom: 20px; font-size: 18px; color: var(--negro-profundo); }
.summary-item {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px solid #eee;
}
.summary-item img {
    width: 50px; height: 50px; border-radius: 6px; object-fit: cover; border: 1px solid #ddd;
}
.summary-totals { margin-top: 20px; border-top: 2px solid #eee; padding-top: 15px; }
.summary-row {
    display: flex; justify-content: space-between; margin-bottom: 10px;
    color: #666; font-size: 14px;
}
.summary-row.total {
    font-size: 20px; font-weight: bold; color: var(--negro-profundo);
    margin-bottom: 0; margin-top: 5px;
}
.total-val { color: var(--color-principal); }

/* Responsivo para Checkout */
@media (max-width: 768px) {
    .checkout-container { flex-direction: column; }
    .checkout-summary { width: 100%; position: static; margin-top: 20px; }
}

/* =========================================
   ESTILOS ESPECÍFICOS: PÁGINA ACCESO (LOGIN/REGISTRO)
   ========================================= */

.header-right-link { font-weight: bold; color: #666; }
.header-right-link a { text-decoration: none; color: #666; transition: color 0.2s; }
.header-right-link a:hover { color: var(--color-principal); }

.auth-container {
    max-width: 450px;
    margin: 60px auto;
    background: #fff;
    padding: 35px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.auth-tabs-header { display: flex; margin-bottom: 25px; border-bottom: 2px solid #eee; }
.auth-tab-btn {
    flex: 1; padding: 12px; background: none; border: none;
    border-bottom: 3px solid transparent; font-weight: bold;
    cursor: pointer; color: #888; font-size: 15px; transition: 0.2s;
}
.auth-tab-btn.active { border-bottom-color: var(--color-principal); color: #333; }

.auth-form-desc { font-size: 13px; color: #666; margin-bottom: 20px; text-align: center; }

.auth-btn-action {
    background: var(--color-principal); color: #fff; border: none;
    padding: 14px; width: 100%; font-size: 15px; font-weight: bold;
    border-radius: 6px; cursor: pointer; transition: 0.2s; margin-top: 10px;
}
.auth-btn-action:hover { filter: brightness(0.9); }

.auth-link-forgot {
    background: none; border: none; color: var(--color-principal);
    text-decoration: underline; cursor: pointer; font-size: 13px;
    margin-top: 20px; display: block; text-align: center; width: 100%;}



/* Ocultar el botón de menú en PC */
.btn-menu-movil {
    display: none;
}

/* =========================================
   ESTILOS COMPARTIDOS: PÁGINAS DE POLÍTICAS
   ========================================= */
.politicas-main {
    max-width: 900px;
    margin: 40px auto;
    padding: 40px 40px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    color: #333;
    line-height: 1.6;
}

.politicas-title {
    color: var(--color-principal);
    margin-bottom: 25px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.politicas-section {
    margin-bottom: 25px;
}

.politicas-subtitle {
    color: #444;
    margin-bottom: 10px;
    font-size: 18px;
}

.politicas-text {
    color: #555;
    margin-bottom: 10px;
}

.politicas-text:last-child {
    margin-bottom: 0;
}

.politicas-list {
    margin-left: 20px;
    color: #555;
    margin-bottom: 10px;
}

.politicas-list li {
    margin-bottom: 5px;
}

/* Ajustes para móviles de las políticas */
@media (max-width: 768px) {
    .politicas-main {
        margin: 20px;
        padding: 25px 20px;
    }
}

/* =========================================
   REGLAS EXCLUSIVAS PARA MÓVILES
========================================= */
@media (max-width: 768px) {
    /* 1. Cabecera adaptable */
    .main-header {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        position: relative;
        padding: 10px 15px;
    }

    /* 2. Botón Hamburguesa */
    .btn-menu-movil {
        display: block;
        background: none;
        border: none;
        font-size: 28px;
        color: #EB641E;
        cursor: pointer;
        order: 2; /* Lo ubica al medio */
    }

    /* 3. Acciones (Usuario y Carrito) a la derecha */
    .header-actions {
        order: 3;
    }

    /* Ocultar temporalmente el nombre de usuario en celular para no saturar */
    #menu-usuario-publico {
        display: none;
    }

    /* 4. Menú Desplegable */
    .nav-principal {
        display: none; /* Oculto por defecto */
        width: 100%;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        background-color: white;
        box-shadow: 0 8px 16px rgba(0,0,0,0.1);
        z-index: 999;
        order: 4;
    }

    /* Clase que lo activa */
    .nav-principal.activo {
        display: flex !important;
    }

    .nav-principal a {
        padding: 15px;
        border-bottom: 1px solid #f0f0f0;
        text-align: center;
        width: 100%;
        margin: 0;
    }

   /* 5. CORRECCIÓN DEL CARRUSEL EN MÓVIL (Con las clases reales) */
       .slider-section {
           height: auto !important;
           min-height: auto !important;
           width: 100% !important;
           margin: 10px 0 !important; /* Reduce márgenes laterales a 0 para aprovechar toda la pantalla */
           border-radius: 0 !important; /* Opcional: quita bordes redondos en celular si quieres que pegue a los lados */
       }

       .slider-wrapper {
           height: auto !important;
           align-items: flex-start !important;
       }

       /* Apunta dinámicamente a cualquier elemento (div o img) que inyecte tu Javascript */
       .slider-wrapper > * {
           min-width: 100% !important;
           flex: 0 0 100% !important;
           height: auto !important;
       }

       .slider-wrapper img {
           width: 100% !important;
           height: auto !important;
           object-fit: contain !important; /* Escala la imagen proporcionalmente sin recortarla */
           display: block;
       }

       /* 6. DOS PRODUCTOS POR FILA EN MÓVIL */
           .products-grid,
           .home-grid {
               grid-template-columns: repeat(2, 1fr) !important;
               gap: 10px !important;
           }

           .product-card {
               padding: 10px !important;
           }

           .card-image-container {
               height: 140px !important; /* Reducimos la altura para mantener proporción */
           }

           .product-card h3 {
               font-size: 13px !important; /* Texto más pequeño para evitar saltos de línea largos */
               margin-bottom: 5px !important;
           }

           .price-tag {
               font-size: 16px !important;
           }

           .btn-details,
           .btn-add-to-cart {
               padding: 8px !important;
               font-size: 12px !important;
           }

           /* Ajuste de los selectores de variantes y cantidad en móvil */
           .product-card select,
           .product-card input[type="number"] {
               padding: 6px !important;
               font-size: 12px !important;
           }
}