@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #10b981;
    --primary-dark: #059669;
    --primary-light: #d1fae5;
    --accent: #6366f1;
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 12px;
    --radius-lg: 20px;

    /* Variables de Estructura - Para configurar desde el Admin */
    --header-bg: #ffffff;
    --topbar-bg: #0f172a;
    --topbar-text: #94a3b8;
    --footer-bg: #0f172a;
    --footer-text: #94a3b8;
    --banner-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --nav-bg: #ffffff;
    --nav-link: #64748b;
    --nav-active: #10b981;

    /* Alertas y Estados */
    --success: #10b981;
    --success-bg: #f0fdf4;
    --success-border: #dcfce7;
    --error: #ef4444;
    --error-bg: #fef2f2;
    --error-border: #fee2e2;
    --warning: #f59e0b;
    --warning-bg: #fffbeb;
    --warning-border: #fef3c7;
    --info: #3b82f6;
    --info-bg: #eff6ff;
    --info-border: #dbeafe;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Ocultar Logo flotante de reReCAPTCHA para que no pise el chat */
.grecaptcha-badge { 
    visibility: hidden; 
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: all 0.2s ease;
}

a:hover {
    color: var(--primary-dark);
}

ul {
    list-style: none;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* UTILIDADES */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-size: 0.95rem;
    font-family: inherit;
}

.btn-primary {
    background: var(--btn-bg);
    color: var(--btn-text);
}

.btn-primary:hover {
    background: var(--btn-hover);
    color: var(--btn-text);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-agregar-carrito {
    background: var(--btn-cart-bg);
    color: var(--btn-cart-text);
}

.btn-agregar-carrito:hover {
    background: var(--btn-cart-hover);
    color: var(--btn-cart-text);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

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

.btn-outline:hover {
    background: var(--primary-light);
}

/* BARRA CABEZA */
.barra-cabeza {
    background-color: var(--topbar-bg);
    color: #fff;
    font-size: 0.85rem;
    padding: 10px 0;
}

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

.barra-cabeza .info-contacto {
    font-weight: 300;
    color: var(--topbar-text);
}

.barra-cabeza a {
    color: #f1f5f9;
    margin-left: 15px;
    font-weight: 500;
}

.barra-cabeza a:hover {
    color: var(--primary);
}

/* CABEZA PRINCIPAL */
.cabeza {
    background-color: var(--header-bg);
    padding: 25px 0;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.cabeza .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--primary) !important;
    letter-spacing: -0.5px;
}

.buscador form {
    display: flex;
    background: #f1f5f9;
    border-radius: 50px;
    padding: 2px 2px 2px 20px;
    border: 1.5px solid transparent;
    transition: all 0.3s;
    height: 46px;
    align-items: center;
}

.buscador form:focus-within {
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.buscador input {
    background: transparent;
    border: none;
    outline: none;
    padding: 8px 0;
    width: 300px;
    font-family: inherit;
    font-size: 0.95rem;
}

.buscador button {
    background: var(--primary);
    color: white;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    flex-shrink: 0;
}

.buscador button:hover {
    background: var(--primary-dark);
}

.carrito-header .btn-carrito {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    height: 46px;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.carrito-header .btn-carrito:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
}

.badge {
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    border: 2px solid #fff;
}

/* NAVEGACION */
.barra-nav {
    background-color: var(--nav-bg);
    border-bottom: 1px solid var(--border);
}

.barra-nav ul {
    display: flex;
    justify-content: center;
}

.barra-nav li a {
    display: block;
    padding: 15px 25px;
    color: var(--nav-link);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

.barra-nav li a:hover {
    color: var(--primary);
}

.barra-nav li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--primary);
    transition: all 0.3s;
    transform: translateX(-50%);
}

.barra-nav li a:hover::after {
    width: 40%;
}

/* BANNER */
.banner-home {
    background: var(--banner-gradient);
    min-height: 400px;
    border-radius: 24px;
    margin-bottom: 50px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.banner-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    text-align: center;
    padding: 40px;
}

.banner-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -0.03em;
}

.banner-content p {
    font-size: 1.25rem;
    font-weight: 300;
    opacity: 0.9;
    margin-bottom: 35px;
}

.btn-banner {
    background: white;
    color: var(--primary);
    padding: 14px 40px;
    border-radius: 50px;
    font-weight: 700;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.btn-banner:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

/* GRID PRODUCTOS */
.grid-destacados {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 30px;
}

.card-producto {
    background: white;
    border-radius: 20px;
    padding: 15px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.card-producto:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.img-container {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.img-container img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.info-producto h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 10px;
    height: 2.8em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.precio {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 15px;
}

.login-precio {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

/* LOGIN CARD */
.login-wrapper {
    display: flex;
    justify-content: center;
    padding: 60px 0;
}

.login-card {
    background: white;
    width: 100%;
    max-width: 450px;
    padding: 50px 40px;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-header h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
    padding-left: 5px;
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    background: #f8fafc;
    border: 1.5px solid var(--border);
    border-radius: 14px;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-control:focus {
    border-color: var(--primary);
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.alert-error {
    background: var(--error-bg);
    border: 1px solid var(--error-border);
    color: var(--error);
    padding: 15px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 500;
}


.btn-flotante-carrito {
    display: none;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .cabeza {
        background-color: var(--bg-body);
        padding-bottom: 15px;
    }

    .buscador form {
        background: #fff;
        /* Que resalten en blanco */
        border: 1px solid #cbd5e1;
    }

    .carrito-header .btn-outline {
        background: #fff;
        /* Boton ingresar con fondo blanco */
        border: 1px solid var(--primary);
    }

    .container {
        padding: 0 15px;
    }

    .cabeza .container {
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }

    .buscador {
        flex: 1;
        min-width: 0;
    }

    .carrito-header {
        flex-shrink: 0;
    }

    .logo {
        display: none;
    }

    .buscador input {
        width: 100%;
    }

    .barra-nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .barra-cabeza .info-contacto {
        display: none;
    }

    .barra-nav ul {
        justify-content: center;
    }

    .barra-nav li a {
        padding: 15px 20px;
    }

    .banner-home {
        min-height: 250px;
        border-radius: 16px;
        margin-bottom: 30px;
    }

    .banner-content h1 {
        font-size: 2.2rem;
    }

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

    .card-producto {
        padding: 10px;
        border-radius: 16px;
    }

    .info-producto h3 {
        font-size: 0.95rem;
    }

    .precio {
        font-size: 1.2rem;
    }

    .btn-flotante-carrito {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        bottom: 25px;
        right: 20px;
        width: 60px;
        height: 60px;
        background: #065f46;
        /* Verde oscuro para resaltar el ícono */
        color: white;
        border-radius: 50%;
        box-shadow: 0 8px 15px rgba(16, 185, 129, 0.4);
        z-index: 1000;
        font-size: 1.8rem;
    }

    .burbuja-roja {
        position: absolute;
        top: 0;
        right: 0;
        background: #ef4444;
        color: white;
        width: 22px;
        height: 22px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.7rem;
        font-weight: 700;
        border: 2px solid white;
    }
}

/* FOOTER */
.pie {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 80px 0 40px;
    margin-top: 80px;
}

.pie h4 {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 25px;
}

.pie a {
    display: block;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.pie a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.pie-bottom {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    font-size: 0.85rem;
}

/* TABLAS MODERNAS */
.table-modern {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.table-modern th {
    background: #f8fafc;
    padding: 18px 20px;
    text-align: left;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--border);
}

.table-modern td {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.table-modern tr:last-child td {
    border-bottom: none;
}

/* CARRITO LAYOUT */
.cart-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    align-items: start;
}

.cart-summary {
    background: white;
    padding: 30px;
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 120px;
}

.cart-summary h3 {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--bg-body);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    color: var(--text-muted);
    font-weight: 500;
}

.summary-row.total {
    border-top: 2px solid var(--bg-body);
    margin-top: 20px;
    padding-top: 20px;
    color: var(--text-main);
    font-size: 1.4rem;
    font-weight: 800;
}

/* ALERTAS PERSONALIZADAS */
.alert-custom {
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 30px;
    font-weight: 500;
    border: 1px solid transparent;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.alert-info {
    background: var(--info-bg);
    border-color: var(--info-border);
    color: #1e40af;
}

.alert-warning {
    background: var(--warning-bg);
    border-color: var(--warning-border);
    color: #92400e;
}

.alert-error-custom {
    background: var(--error-bg);
    border-color: var(--error-border);
    color: var(--error);
}

/* Aviso Explicativo (Institutional/Minimums) */
.aviso-explicativo {
    background: var(--aviso-bg);
    padding: 15px 20px;
    border-left: 4px solid var(--info);
    border-radius: 4px;
    color: var(--aviso-text);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

.aviso-explicativo strong {
    color: var(--aviso-text);
}


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

    .cart-summary {
        position: static;
    }
}

@media (max-width: 768px) {
    .table-modern thead {
        display: none;
    }

    .table-modern,
    .table-modern tbody,
    .table-modern tr,
    .table-modern td {
        display: block;
        width: 100%;
    }

    .table-modern tr {
        margin-bottom: 20px;
        border: 1px solid var(--border);
        border-radius: var(--radius);
        overflow: hidden;
        box-shadow: var(--shadow-sm);
    }

    .table-modern td {
        text-align: right;
        padding: 8px 15px;
        padding-left: 50%;
        position: relative;
        border-bottom: 1px solid #f1f5f9;
    }

    .table-modern td::before {
        content: attr(data-label);
        position: absolute;
        left: 15px;
        top: 50%;
        transform: translateY(-50%);
        font-weight: 700;
        color: var(--text-muted);
        font-size: 0.7rem;
        text-transform: uppercase;
    }

    .table-modern td:first-child {
        text-align: left;
        padding: 12px 15px;
        background: #f8fafc;
        border-bottom: 2px solid var(--border);
    }

    .desktop-only {
        display: none !important;
    }

    .mobile-delete-form {
        display: flex !important;
    }

    .alert-custom svg,
    .alert-custom .alert-icon {
        display: none !important;
    }

    .table-modern td:first-child::before {
        display: none;
    }
}

/* --- CATALOGO Y FILTROS (productos.php) --- */
.layout-tienda {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    padding: 40px 0;
}

.sidebar-filtros {
    width: 260px;
    flex-shrink: 0;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 25px;
    box-shadow: var(--shadow-sm);
}

.filtro-grupo {
    margin-bottom: 30px;
}

.filtro-grupo:last-child {
    margin-bottom: 0;
}

.filtro-grupo h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--bg-body);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filtro-grupo ul li {
    margin-bottom: 8px;
}

.filtro-grupo ul li a {
    color: var(--text-muted);
    font-size: 0.95rem;
    display: block;
    padding: 5px 0;
    transition: all 0.2s;
}

.filtro-grupo ul li a:hover {
    color: var(--primary);
    transform: translateX(5px);
}

.filtro-grupo ul li a.activo {
    color: var(--primary);
    font-weight: 700;
}

.btn-limpiar {
    color: #ef4444;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 20px;
}

.btn-limpiar:hover {
    opacity: 0.8;
}

.catalogo-grid {
    flex: 1;
}

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

/* Forzar 2 columnas en móviles para productos y listados premium */
@media (max-width: 600px) {

    .grid-productos,
    .grid-dos-columnas-mobile {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        padding: 5px !important;
    }

    .producto-card .prod-img-box {
        height: 140px;
        /* Ajuste altura imagen en móvil */
        padding: 10px;
    }

    .producto-card .prod-info {
        padding: 10px;
    }

    .producto-card .prod-titulo {
        font-size: 0.85rem;
        height: 40px;
        line-height: 1.2;
    }

    .producto-card .prod-precio {
        font-size: 1rem;
    }
}

/* Producto Card (Rediseño) */
.producto-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.producto-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.prod-img-box {
    height: 220px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--bg-body);
}

.prod-img-box img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.producto-card:hover .prod-img-box img {
    transform: scale(1.08);
}

.prod-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.prod-marca {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 5px;
}

.prod-titulo {
    font-size: 1rem;
    color: var(--text-main);
    margin-bottom: 10px;
    line-height: 1.4;
    font-weight: 600;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.prod-titulo a:hover {
    color: var(--primary);
}

.prod-precio {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 15px;
    letter-spacing: -0.02em;
}

.prod-login-msg {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 10px;
    background: var(--bg-body);
    padding: 5px 10px;
    border-radius: 6px;
    text-align: center;
}

.btn-agregar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    gap: 8px;
}

.btn-agregar:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.btn-ver {
    display: block;
    width: 100%;
    padding: 10px;
    background: var(--bs-gray-200, #e2e8f0);
    color: var(--text-main);
    text-align: center;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-ver:hover {
    background: #cbd5e1;
}


/* --- FICHA DE PRODUCTO (producto-detalle.php) --- */
.breadcrumb {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 25px;
    margin-top: 15px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.breadcrumb a {
    color: var(--primary);
    font-weight: 500;
}

.breadcrumb .actual {
    color: var(--text-main);
    font-weight: 600;
    margin-left: 10px;
}

.ficha-producto {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-bottom: 60px;
    background: var(--bg-card);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.marco-imagen {
    width: 100%;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 16px;
    border: 1px solid var(--border);
    overflow: hidden;
    padding: 20px;
    position: relative;
}

.marco-imagen img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.no-foto {
    font-size: 5rem;
    color: var(--border);
}

.ficha-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.titulo-prod {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 15px;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.marca-badge {
    background: var(--bg-body);
    color: var(--text-muted);
    padding: 6px 12px;
    border-radius: 50px;
    display: inline-flex;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    border: 1px solid var(--border);
    margin-bottom: 20px;
    width: fit-content;
    transition: border-color .15s ease, color .15s ease, background-color .15s ease;
}

a.marca-badge:hover,
a.marca-badge:focus-visible {
    border-color: var(--primary);
    color: var(--primary);
    background: #fff;
    outline: none;
}

.desc-corta {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 30px;
    line-height: 1.6;
}

/* Precios Ficha */
.precio-box {
    margin-bottom: 25px;
    padding: 20px;
    background: var(--success-bg);
    border-radius: 16px;
    border: 1px solid var(--success-border);
}

.precio-grande {
    font-size: 3rem;
    color: var(--primary);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
}

.label-precio {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-dark);
    text-transform: uppercase;
    margin-bottom: 5px;
    display: block;
}

.box-rentabilidad {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 30px;
}

.dato-renta {
    background: var(--bg-body);
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border);
}

.dato-renta .lbl {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.dato-renta .val {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
}

.dato-renta.ganancia {
    background: #eff6ff;
    border-color: #dbeafe;
}

.dato-renta.ganancia .val {
    color: var(--accent);
}

/* Variantes Ficha */
.variantes-container {
    margin-bottom: 30px;
    background: white;
    border: 1px solid var(--border);
    padding: 20px;
    border-radius: 16px;
}

.form-group-var {
    margin-bottom: 15px;
}

.form-group-var:last-child {
    margin-bottom: 0;
}

.form-group-var label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
    display: block;
}

.form-control-var {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-main);
    background: var(--bg-body);
    transition: all 0.2s;
}

.form-control-var:focus {
    border-color: var(--primary);
    outline: none;
    background: white;
}

/* Acciones Compra */
.acciones-compra {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.input-cantidad {
    width: 100%;
    padding: 0;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text-main);
}

.input-cantidad:focus {
    border-color: var(--primary);
    outline: none;
}

.btn-comprar-ficha {
    background: var(--primary);
    color: white;
    border: none;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.btn-comprar-ficha:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.2);
}

.btn-comprar-ficha:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.alerta-login {
    background: var(--bg-body);
    padding: 40px;
    border-radius: 16px;
    border: 2px dashed var(--border);
    text-align: center;
}

.btn-ingresar {
    display: inline-flex;
    margin-top: 15px;
    background: var(--text-main);
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-ingresar:hover {
    background: black;
    transform: translateY(-2px);
}

/* Detalle Inferior */
.info-detallada-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: start;
    margin-bottom: 60px;
}

.descripcion-larga,
.ficha-tecnica-box {
    background: white;
    padding: 30px;
    border-radius: 20px;
    border: 1px solid var(--border);
}

.descripcion-larga h3,
.ficha-tecnica-box h3 {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--bg-body);
    color: var(--text-main);
}

.texto-desc {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.tabla-tecnica {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.tabla-tecnica tr {
    border-bottom: 1px solid var(--bg-body);
}

.tabla-tecnica tr:last-child {
    border-bottom: none;
}

.tabla-tecnica th {
    text-align: left;
    padding: 12px 0;
    color: var(--text-muted);
    width: 40%;
    font-weight: 500;
}

.tabla-tecnica td {
    padding: 12px 0;
    color: var(--text-main);
    font-weight: 600;
    text-align: right;
}

/* Responsive Adicional */
@media (max-width: 900px) {
    .layout-tienda {
        flex-direction: column;
    }

    .sidebar-filtros {
        width: 100%;
        order: 1;
    }

    .catalogo-grid {
        width: 100%;
        order: 2;
    }

    .ficha-producto {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .marco-imagen {
        height: 350px;
    }

    .info-detallada-grid {
        grid-template-columns: 1fr;
    }

    .precio-grande {
        font-size: 2.5rem;
    }
}

/* --- CHECKOUT (checkout.php) --- */
.checkout-header {
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 20px;
}

.checkout-header h2 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
    align-items: start;
    margin-bottom: 50px;
}

.card-checkout {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
}

.card-checkout:last-child {
    margin-bottom: 0;
}

.card-checkout h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--bg-body);
    display: flex;
    align-items: center;
    gap: 8px;
}

.datos-resumen p {
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: var(--text-muted);
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--border);
    display: flex;
    justify-content: space-between;
}

.datos-resumen p:last-of-type {
    border-bottom: none;
}

.datos-resumen strong {
    color: var(--text-main);
    font-weight: 600;
}

.link-editar {
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
}

.link-editar:hover {
    opacity: 0.8;
}

.form-group-checkout {
    margin-bottom: 20px;
}

.form-group-checkout label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-main);
    font-size: 0.9rem;
}

.form-control-checkout {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 0.95rem;
    background: var(--bg-body);
    transition: all 0.2s;
    font-family: inherit;
}

.form-control-checkout:focus {
    border-color: var(--primary);
    background: white;
    outline: none;
}

.info-pago {
    display: none;
    margin-top: 15px;
    padding: 15px;
    background: var(--info-bg);
    border-radius: 10px;
    font-size: 0.9rem;
    color: #1e40af;
    line-height: 1.5;
    border-left: 4px solid var(--info);
}

.lista-items-checkout {
    list-style: none;
    padding: 0;
    margin-bottom: 25px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 5px;
}

.lista-items-checkout li {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.lista-items-checkout li:last-child {
    border-bottom: none;
}

.lista-items-checkout li span:first-child {
    flex: 1;
    padding-right: 15px;
}

.lista-items-checkout li span:last-child {
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
}

.totales-finales {
    border-top: 2px solid var(--bg-body);
    padding-top: 20px;
}

.fila-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 1rem;
    color: var(--text-muted);
}

.fila-total strong {
    color: var(--text-main);
    font-weight: 600;
}

.fila-total.grand-total {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
    font-size: 1.5rem;
    color: var(--primary);
    align-items: center;
}

.fila-total.grand-total strong {
    font-weight: 800;
}

.btn-confirmar {
    width: 100%;
    margin-top: 25px;
    padding: 18px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-confirmar:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.legal-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 20px;
    text-align: center;
    line-height: 1.5;
    opacity: 0.8;
}

@media (max-width: 900px) {
    .checkout-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .col-totales {
        order: 1;
    }

    /* Totales al final en movil */
}

/* --- PERFIL (perfil.php) --- */
.header-perfil {
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-perfil h2 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
}

.perfil-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
}

.card-perfil {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    height: 100%;
}

.perfil-avatar {
    text-align: center;
    margin-bottom: 25px;
}

.avatar-icon {
    font-size: 4rem;
    margin-bottom: 15px;
    display: block;
}

.perfil-nombre {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--text-main);
}

.perfil-email {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.perfil-lista-info {
    margin-top: 20px;
    text-align: left;
}

.label-lista {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 8px;
    display: block;
}

.badge-lista {
    background: #e0f2fe;
    color: #0369a1;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 700;
    display: inline-block;
    font-size: 0.9rem;
}

.btn-perfil-action {
    display: block;
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    text-decoration: none;
    margin-top: 15px;
    transition: all 0.2s;
}

.btn-ver-pedidos {
    background: var(--primary);
    color: white;
}

.btn-ver-pedidos:hover {
    background: var(--primary-dark);
}

.btn-logout {
    border: 1px solid #ef4444;
    color: #ef4444;
    background: white;
}

.btn-logout:hover {
    background: #fef2f2;
    color: #ef4444;
}

.form-section-title {
    color: var(--primary);
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
    font-size: 1.1rem;
    font-weight: 700;
}

/* --- PEDIDOS (pedidos.php) --- */
.badge-estado {
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: white;
    display: inline-block;
}

.tabla-pedidos {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.tabla-pedidos th {
    text-align: left;
    padding: 15px;
    background: var(--bg-body);
    border-bottom: 2px solid var(--border);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
}

.tabla-pedidos td {
    padding: 15px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    color: var(--text-main);
}

.tabla-pedidos tr:last-child td {
    border-bottom: none;
}

.ficha-pedido {
    background: white;
    padding: 30px;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

/* Stepper */
.stepper-wrapper {
    display: flex;
    justify-content: space-between;
    margin: 30px 0 50px;
    position: relative;
}

.stepper-wrapper::before {
    content: "";
    position: absolute;
    top: 15px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--bg-body);
    z-index: 0;
}

.stepper-item {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.step-counter {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--bg-body);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 8px;
    border: 4px solid white;
    transition: 0.3s;
    box-shadow: 0 0 0 1px var(--border);
}

.step-name {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    font-weight: 500;
}

.stepper-item.completed .step-counter {
    background: var(--primary);
    color: white;
    box-shadow: none;
    border-color: var(--primary-light);
}

.stepper-item.completed .step-name {
    color: var(--primary);
    font-weight: 700;
}

.stepper-item.completed::after {
    content: "";
    position: absolute;
    top: 15px;
    left: -50%;
    width: 100%;
    height: 3px;
    background: var(--primary);
    z-index: -1;
}

.stepper-item:first-child::after {
    content: none;
}

/* Info Grid Pedido */
.pedido-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    background: var(--bg-body);
    padding: 20px;
    border-radius: 12px;
}

.box-info h4 {
    margin: 0 0 5px 0;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.box-info p {
    margin: 0;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-main);
}

/* Comunicación Pedido */
.comunicacion-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 40px;
}

.box-com {
    background: white;
    border: 1px solid var(--border);
    padding: 25px;
    border-radius: 16px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.box-com h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    border-bottom: 2px solid var(--bg-body);
    padding-bottom: 15px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lista-items-com {
    flex: 1;
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding-right: 5px;
}

.item-com {
    background: var(--bg-body);
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
}

.item-com.pago {
    background: #f0fdf4;
    border-color: #dcfce7;
}

.item-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 5px;
}

.item-body {
    font-size: 0.95rem;
    color: var(--text-main);
    line-height: 1.5;
}

.btn-borrar-nota {
    background: none;
    border: none;
    color: #ef4444;
    font-weight: bold;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    padding: 0 5px;
    opacity: 0.5;
    transition: 0.2s;
}

.btn-borrar-nota:hover {
    opacity: 1;
    transform: scale(1.1);
}

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

    .comunicacion-grid {
        grid-template-columns: 1fr;
    }

    .stepper-item .step-name {
        font-size: 0.7rem;
    }

    .header-perfil {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
}

/* --- COMPRA CONFIRMADA (compra-confirmada.php) --- */
.compra-exito-container {
    text-align: center;
    padding: 60px 20px;
}

.icono-exito {
    font-size: 5rem;
    margin-bottom: 20px;
    display: block;
    animation: bounce 1s ease;
}

.titulo-exito {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 2.5rem;
    font-weight: 800;
}

.texto-exito {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.card-exito-info {
    background: white;
    padding: 40px;
    max-width: 600px;
    margin: 0 auto 50px;
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.card-exito-info h3 {
    color: var(--text-main);
    margin-bottom: 15px;
    font-weight: 700;
    font-size: 1.2rem;
}

.card-exito-info p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
}

.alerta-recordatorio {
    background: var(--bg-body);
    padding: 15px;
    border-radius: 10px;
    font-size: 0.9rem;
    color: var(--text-main);
    border: 1px solid var(--border);
}

.botones-exito {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}


/* --- CONTACTO (contacto.php) --- */
.card-contacto {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    display: flex;
    flex-wrap: wrap;
    border: 1px solid var(--border);
}

.col-form-contacto {
    flex: 1.5;
    padding: 40px;
    min-width: 300px;
}

.col-info-contacto {
    flex: 1;
    background: var(--bg-body);
    padding: 40px;
    border-left: 1px solid var(--border);
    min-width: 280px;
}

.titulo-contacto {
    margin-top: 0;
    color: var(--text-main);
    font-weight: 800;
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.desc-contacto {
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 1rem;
}

.form-grid-contacto {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.info-contacto-box {
    padding: 24px;
    background: white;
    border-radius: 16px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.info-contacto-box:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--primary-light);
}

.icon-info {
    font-size: 1.6rem;
    width: 54px;
    height: 54px;
    background: #f1f5f9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: normal;
    padding-bottom: 2px;
    /* Corrección visual para emojis que suelen quedar altos */
}

.text-info {
    color: var(--text-muted);
    white-space: pre-line;
    line-height: 1.4;
    font-size: 0.95rem;
    flex: 1;
    margin: 0;
    display: block;
}

@media (max-width: 768px) {
    .card-contacto {
        flex-direction: column;
    }

    .col-info-contacto {
        border-left: none;
        border-top: 1px solid var(--border);
    }

    .form-grid-contacto {
        grid-template-columns: 1fr;
    }
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-20px);
    }

    60% {
        transform: translateY(-10px);
    }
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

/* Aviso Barra (Alerta Superior) */
.aviso-barra {
    background: var(--alerta-bg);
    color: var(--alerta-text);
    padding: 12px 0;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* Toggle Filtros (Móvil) */
.btn-toggle-filtros {
    display: none;
    width: 100%;
    padding: 12px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    margin-bottom: 15px;
    box-shadow: var(--shadow-sm);
}

@media (max-width: 900px) {
    .btn-toggle-filtros {
        display: block;
    }

    .filtros-contenido {
        display: none;
    }

    .filtros-contenido.activo {
        display: block;
        animation: slideDown 0.3s ease-out;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

/* --- MEJORAS RESPONSIVE Y MOBILE FIRST (FORMULARIOS) --- */
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

.form-grid-2-1 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.form-grid-1-2 {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
}

/* Evitar doble espaciado en grids */
.form-grid-contacto .form-group,
.form-grid-2 .form-group,
.form-grid-3 .form-group,
.form-grid-2-1 .form-group,
.form-grid-1-2 .form-group {
    margin-bottom: 0 !important;
}

@media (max-width: 768px) {

    .form-grid-2,
    .form-grid-3,
    .form-grid-2-1,
    .form-grid-1-2 {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }

    /* Aumentar tamano de campos en movil (Facilidad completar formulario) */
    .form-control,
    .form-control-var,
    .form-control-checkout,
    select.form-control {
        font-size: 16px !important;
        /* Previene auto-zoom en iOS */
        padding: 14px 16px !important;
        min-height: 48px;
    }

    /* Botones mas clickeables en mobile (Excepto algunos minimos) */
    .btn:not(.btn-carrito):not(.buscador button):not(.btn-borrar-nota) {
        min-height: 48px;
        padding: 12px 20px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .btn-comprar-ficha,
    .btn-confirmar {
        width: 100% !important;
        font-size: 1.15rem !important;
        padding: 16px !important;
    }

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

    .breadcrumb {
        margin-top: 10px;
        margin-bottom: 20px;
    }
}

/* Responsividad para tablas no adaptativas */
.tabla-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* FIX: Asegurar que los círculos de categorías y marcas no se vean ovalados en celulares */
.marca-img-box,
.cat-icon-box,
.marca-letra-circulo {
    flex-shrink: 0 !important;
    aspect-ratio: 1 / 1 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
}
/* ─── PORTAL SWITCHER ────────────────────────────────────── */
.ps-label {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 8px;
}
.portal-switcher {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 999px;
    padding: 4px 6px;
    margin-bottom: 12px;
}
.ps-sep {
    color: #475569;
    font-size: 0.65rem;
    user-select: none;
    line-height: 1;
}
.ps-btn {
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 4px 11px;
    border-radius: 999px;
    letter-spacing: 0.01em;
    transition: color 0.18s;
    color: #64748b;
    white-space: nowrap;
}
.ps-particulares:hover   { color: #6366f1; }
.ps-revendedores:hover   { color: #10b981; }
.ps-ayuda:hover          { color: #ec4899; }
.ps-particulares.ps-active { background: #eef2ff; color: #6366f1; }
.ps-revendedores.ps-active { background: #ecfdf5; color: #10b981; }
.ps-ayuda.ps-active        { background: rgba(236,72,153,0.1); color: #ec4899; }

/* Override: evitar que .pie a afecte los botones del switcher */
.portal-switcher .ps-btn {
    display: inline;
    margin-bottom: 0;
    font-size: 0.72rem;
    padding-left: 11px;
}
.portal-switcher .ps-btn:hover {
    padding-left: 11px;
    color: var(--primary);
}
