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

/* =========================================================
   VARIABLES BASE
   ========================================================= */
:root {
    --primary:       #6366f1;
    --primary-dark:  #4f46e5;
    --primary-light: #e0e7ff;
    --accent:        #ec4899;
    --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;

    --header-bg:     #ffffff;
    --topbar-bg:     #0f172a;
    --topbar-text:   #94a3b8;
    --footer-bg:     #0f172a;
    --footer-text:   #94a3b8;
    --nav-bg:        #ffffff;
    --nav-link:      #64748b;
    --nav-active:    #6366f1;
    --banner-gradient: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);

    --success:       #10b981;
    --success-bg:    #f0fdf4;
    --success-border:#dcfce7;
    --error:         #ef4444;
    --error-bg:      #fef2f2;
    --error-border:  #fee2e2;
    --warning:       #f59e0b;
    --warning-bg:    #fffbeb;
    --info:          #3b82f6;
    --info-bg:       #eff6ff;
}

/* =========================================================
   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;
}

.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;
}

/* =========================================================
   BOTONES
   ========================================================= */
.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;
    gap: 6px;
}
.btn-primary { background: var(--btn-bg, var(--primary)); color: var(--btn-text, #fff); }
.btn-primary:hover { background: var(--btn-hover, var(--primary-dark)); color: var(--btn-text, #fff); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-outline { background: transparent; border: 1.5px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary-light); }
.btn-agregar-carrito { background: var(--btn-bg, var(--primary)); color: var(--btn-text, #fff); }
.btn-agregar-carrito:hover { background: var(--btn-hover, var(--primary-dark)); color: var(--btn-text, #fff); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-danger { background: #ef4444; color: white; }
.btn-danger:hover { background: #dc2626; }
.btn-sm { padding: 6px 14px; font-size: 0.85rem; }

/* =========================================================
   BARRA CABEZA (top bar)
   ========================================================= */
.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 (header)
   ========================================================= */
.cabeza {
    background-color: var(--header-bg);
    padding: 22px 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.5rem; font-weight: 800; text-transform: uppercase; color: var(--primary) !important; letter-spacing: -0.5px; font-family: 'Sora', sans-serif; }
.logo a { color: var(--primary) !important; }

.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;
    min-width: 300px;
}
.buscador form:focus-within { border-color: var(--primary); background: white; }
.buscador input { background: none; border: none; outline: none; font-size: 0.95rem; color: var(--text-main); width: 100%; font-family: inherit; }
.buscador button { border-radius: 50px; height: 38px; padding: 0 16px; flex-shrink: 0; }

.btn-carrito {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-body);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 16px;
    color: var(--text-main);
    font-weight: 500;
    transition: all 0.2s;
    font-size: 0.95rem;
    white-space: nowrap;
}
.btn-carrito:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

.badge {
    background: var(--error);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =========================================================
   AVISO BARRA
   ========================================================= */
.aviso-barra {
    background: var(--aviso-bg, #eff6ff);
    color: var(--aviso-text, #1e293b);
    text-align: center;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border-bottom: 1px solid var(--border);
}

/* =========================================================
   BANNER HOME
   ========================================================= */
.banner-home {
    background: var(--banner-gradient);
    border-radius: var(--radius-lg);
    min-height: 320px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 60px;
}
.banner-home::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='20'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.banner-overlay { position: relative; z-index: 1; padding: 60px 50px; }
.banner-content h1 { font-family: 'Sora', sans-serif; font-size: 3rem; font-weight: 700; color: white; margin-bottom: 16px; line-height: 1.2; text-shadow: 0 2px 10px rgba(0,0,0,0.2); }
.banner-content p { font-size: 1.2rem; color: rgba(255,255,255,0.9); margin-bottom: 30px; max-width: 500px; }
.btn-banner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    color: var(--primary);
    padding: 14px 30px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}
.btn-banner:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0,0,0,0.2); color: var(--primary-dark); }

/* =========================================================
   SECCIÓN TITULO
   ========================================================= */
.seccion-titulo {
    text-align: center;
    margin-bottom: 40px;
}
.seccion-titulo h2 {
    font-family: 'Sora', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-main);
}
.seccion-titulo .linea {
    width: 50px;
    height: 4px;
    background: var(--primary);
    border-radius: 10px;
    margin: 0 auto;
}

/* =========================================================
   GRID DE PRODUCTOS
   ========================================================= */
.grid-destacados,
.grid-productos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
}

.card-producto {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    position: relative;
}
.card-producto:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

/* Badges sobre la imagen */
.card-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 2;
}
.badge-destacado {
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    display: inline-block;
}
.badge-oferta {
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    display: inline-block;
}
.badge-sin-stock {
    background: #64748b;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    display: inline-block;
}

.img-container {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    aspect-ratio: 1;
    overflow: hidden;
    cursor: pointer;
}
.img-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
    transition: transform 0.3s ease;
}
.card-producto:hover .img-container img { transform: scale(1.05); }

.info-producto {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
}
.info-producto .marca-tag {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.info-producto h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.info-producto h3 a { color: var(--text-main); }
.info-producto h3 a:hover { color: var(--primary); }

.precio {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    font-family: 'Sora', sans-serif;
}
.precio-anterior {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.card-acciones {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: auto;
}
.card-acciones .btn { width: 100%; font-size: 0.88rem; padding: 9px 16px; }

/* =========================================================
   FILTROS (página productos)
   ========================================================= */
.filtros-barra {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.filtros-barra label { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); }
.filtros-barra select,
.filtros-barra input[type="text"] {
    padding: 8px 14px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text-main);
    background: white;
    outline: none;
    transition: border-color 0.2s;
}
.filtros-barra select:focus,
.filtros-barra input:focus { border-color: var(--primary); }
.resultados-count { margin-left: auto; font-size: 0.85rem; color: var(--text-muted); }

/* =========================================================
   CATEGORIAS CARDS (home)
   ========================================================= */
.grid-categorias {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 60px;
}
.card-categoria {
    background: white;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.9rem;
}
.card-categoria:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); transform: translateY(-2px); }
.card-categoria .emoji { font-size: 2rem; display: block; margin-bottom: 8px; }

/* =========================================================
   FICHA PRODUCTO DETALLE
   ========================================================= */
.contenido-principal { padding: 30px 0 60px; }

.breadcrumb {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .actual { color: var(--text-main); font-weight: 500; }

.ficha-producto {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-bottom: 50px;
}
.ficha-imagen .marco-imagen {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-in;
}
.ficha-imagen .marco-imagen img { width: 100%; height: 100%; object-fit: contain; padding: 20px; }
.no-foto { font-size: 5rem; color: var(--border); }

.ficha-info { display: flex; flex-direction: column; gap: 20px; }
.marca-badge {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    width: fit-content;
}
.titulo-prod {
    font-family: 'Sora', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.3;
}

.precio-box { background: var(--primary-light); border-radius: var(--radius); padding: 20px 24px; }
.label-precio { display: block; font-size: 0.85rem; color: var(--primary-dark); font-weight: 600; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.05em; }
.precio-grande { font-family: 'Sora', sans-serif; font-size: 2.2rem; font-weight: 800; color: var(--primary); }

.variantes-container { display: flex; flex-direction: column; gap: 12px; }
.form-group-var label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; }
.form-control-var {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}
.form-control-var:focus { border-color: var(--primary); }

.acciones-compra { display: flex; gap: 12px; align-items: center; }
.input-cantidad {
    width: 80px;
    padding: 12px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    text-align: center;
    outline: none;
}
.input-cantidad:focus { border-color: var(--primary); }

.info-extra { background: #f8fafc; border-radius: var(--radius); padding: 16px 20px; font-size: 0.9rem; }
.info-extra p { margin-bottom: 6px; }

.info-detallada-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 30px; margin-bottom: 40px; }
.descripcion-larga { background: white; border-radius: var(--radius); border: 1px solid var(--border); padding: 24px; }
.descripcion-larga h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 16px; color: var(--text-main); border-bottom: 2px solid var(--border); padding-bottom: 10px; }
.texto-desc { color: var(--text-muted); line-height: 1.8; white-space: pre-line; }
.ficha-tecnica-box { background: white; border-radius: var(--radius); border: 1px solid var(--border); padding: 24px; align-self: start; }
.ficha-tecnica-box h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 16px; border-bottom: 2px solid var(--border); padding-bottom: 10px; }
.tabla-tecnica { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.tabla-tecnica th { text-align: left; padding: 8px 10px; background: #f8fafc; color: var(--text-muted); font-weight: 600; width: 40%; border-bottom: 1px solid var(--border); }
.tabla-tecnica td { padding: 8px 10px; border-bottom: 1px solid var(--border); }

/* =========================================================
   CARRITO
   ========================================================= */
.carrito-layout { display: grid; grid-template-columns: 1fr 340px; gap: 30px; align-items: start; }
.carrito-tabla { background: white; border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; }
.carrito-tabla table { width: 100%; border-collapse: collapse; }
.carrito-tabla th { background: #f8fafc; padding: 14px 20px; text-align: left; font-size: 0.85rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--border); }
.carrito-tabla td { padding: 16px 20px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.carrito-tabla tr:last-child td { border-bottom: none; }

.producto-carrito-info { display: flex; align-items: center; gap: 16px; }
.producto-carrito-info img { width: 70px; height: 70px; object-fit: contain; border-radius: 8px; border: 1px solid var(--border); background: #f8fafc; padding: 4px; }
.producto-carrito-info .nombre { font-weight: 600; color: var(--text-main); }
.producto-carrito-info .variante { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }

.input-cant-carrito { width: 60px; padding: 6px; border: 1.5px solid var(--border); border-radius: 6px; text-align: center; font-family: inherit; font-size: 0.9rem; }
.btn-eliminar { background: none; border: none; color: var(--error); cursor: pointer; font-size: 1.2rem; padding: 4px 8px; border-radius: 6px; transition: background 0.2s; }
.btn-eliminar:hover { background: var(--error-bg); }

.resumen-carrito {
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 24px;
    position: sticky;
    top: 100px;
}
.resumen-carrito h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 20px; border-bottom: 2px solid var(--border); padding-bottom: 12px; }
.resumen-linea { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 0.95rem; }
.resumen-total { display: flex; justify-content: space-between; font-size: 1.2rem; font-weight: 800; margin-top: 16px; padding-top: 16px; border-top: 2px solid var(--border); color: var(--primary); }
.resumen-carrito .btn { width: 100%; margin-top: 16px; padding: 14px; font-size: 1rem; }

/* =========================================================
   CHECKOUT
   ========================================================= */
.checkout-layout { display: grid; grid-template-columns: 1fr 360px; gap: 30px; align-items: start; }
.checkout-layout > * { min-width: 0; }
.checkout-form-box { background: white; border-radius: var(--radius); border: 1px solid var(--border); padding: 30px; }
.checkout-form-box h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 20px; border-bottom: 2px solid var(--border); padding-bottom: 12px; }

/* Envío — azul pizarra */
.checkout-envio {
    background: linear-gradient(145deg, #f0f5ff 0%, #e8effe 100%);
    border-color: #bfcffe;
}
.checkout-envio h3 { border-bottom-color: #bfcffe; }

/* Pago — mismo estilo que envío */
.checkout-pago {
    background: linear-gradient(145deg, #f0f5ff 0%, #e8effe 100%);
    border-color: #bfcffe;
}
.checkout-pago h3 { border-bottom-color: #bfcffe; color: #1d4ed8; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; color: var(--text-main); }
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-main);
    outline: none;
    transition: border-color 0.2s;
    background: white;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--primary); }
.form-group textarea { resize: vertical; min-height: 80px; }
.form-group small { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; display: block; }

/* =========================================================
   CARD GENÉRICA
   ========================================================= */
.card {
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

/* =========================================================
   ALERTAS
   ========================================================= */
.alert { padding: 14px 20px; border-radius: var(--radius); margin-bottom: 20px; font-size: 0.95rem; font-weight: 500; display: flex; align-items: center; gap: 10px; }
.alert-success { background: var(--success-bg); color: #065f46; border: 1px solid var(--success-border); }
.alert-error { background: var(--error-bg); color: #991b1b; border: 1px solid var(--error-border); }
.alert-warning { background: var(--warning-bg); color: #92400e; border: 1px solid var(--warning-bg); }
.alert-info { background: var(--info-bg); color: #1e40af; border: 1px solid #dbeafe; }

/* =========================================================
   LOGIN / REGISTRO
   ========================================================= */
.login-card {
    max-width: 440px;
    margin: 60px auto;
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 40px;
    box-shadow: var(--shadow-lg);
}
.login-card h2 { font-family: 'Sora', sans-serif; font-size: 1.6rem; font-weight: 700; margin-bottom: 8px; text-align: center; }
.login-card .subtitulo { text-align: center; color: var(--text-muted); font-size: 0.95rem; margin-bottom: 30px; }
.login-card .btn { width: 100%; padding: 13px; font-size: 1rem; margin-top: 8px; }
.login-card .link-abajo { text-align: center; font-size: 0.9rem; color: var(--text-muted); margin-top: 20px; }
.login-card .link-abajo a { color: var(--primary); font-weight: 600; }

/* =========================================================
   PIE DE PÁGINA
   ========================================================= */
.pie {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 60px 0 30px;
    margin-top: 80px;
}
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-bottom: 40px; }
.pie h4 {
    color: #f1f5f9;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 16px 0;
    padding: 7px 12px;
    background: rgba(255,255,255,0.07);
    border-left: 3px solid var(--primary);
    border-radius: 0 6px 6px 0;
}
.pie p { font-size: 0.9rem; line-height: 1.7; color: var(--footer-text); }
.pie a { display: block; color: var(--footer-text); font-size: 0.9rem; margin-bottom: 8px; transition: color 0.2s; }
.pie a:hover { color: var(--primary); }
.pie-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; text-align: center; font-size: 0.85rem; color: #475569; }

/* =========================================================
   BOTÓN CARRITO FLOTANTE (mobile)
   ========================================================= */
.btn-flotante-carrito {
    position: fixed;
    bottom: 24px;
    right: 20px;
    width: 58px;
    height: 58px;
    background: #1e293b;
    color: #fff;
    border: 1.5px solid #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 90;
    transition: transform 0.2s, background 0.2s;
    text-decoration: none;
}
.btn-flotante-carrito:hover { transform: scale(1.1); background: #334155; }
.burbuja-roja {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.icono-carrito { position: relative; display: flex; align-items: center; justify-content: center; line-height: 0; }

/* =========================================================
   PAGINACIÓN
   ========================================================= */
.paginacion { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.paginacion a,
.paginacion span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    border: 1.5px solid var(--border);
    font-size: 0.9rem;
    font-weight: 500;
    background: white;
    color: var(--text-main);
    transition: all 0.2s;
}
.paginacion a:hover { border-color: var(--primary); color: var(--primary); }
.paginacion .activo { background: var(--primary); border-color: var(--primary); color: white; }

/* =========================================================
   TABLAS DE PEDIDOS
   ========================================================= */
.tabla-pedidos { width: 100%; border-collapse: collapse; background: white; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.tabla-pedidos th { background: #f8fafc; padding: 12px 16px; text-align: left; font-size: 0.82rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--border); }
.tabla-pedidos td { padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.tabla-pedidos tr:last-child td { border-bottom: none; }
.tabla-pedidos tr:hover td { background: #f8fafc; }

.estado-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}
.estado-pendiente { background: var(--warning-bg); color: #92400e; }
.estado-confirmado { background: var(--info-bg); color: #1e40af; }
.estado-enviado { background: var(--primary-light); color: var(--primary-dark); }
.estado-entregado { background: var(--success-bg); color: #065f46; }
.estado-cancelado { background: var(--error-bg); color: #991b1b; }

/* =========================================================
   VALORACIONES
   ========================================================= */
.lista-valoraciones { display: flex; flex-direction: column; gap: 16px; }
.item-valoracion { border-bottom: 1px solid var(--border); padding-bottom: 16px; }
.item-valoracion:last-child { border-bottom: none; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
    .checkout-layout,
    .carrito-layout { grid-template-columns: 1fr; }
    .ficha-producto { grid-template-columns: 1fr; gap: 30px; }
    .info-detallada-grid { grid-template-columns: 1fr; }
    .resumen-carrito { position: static; }
}

@media (max-width: 768px) {
    .buscador form { min-width: 200px; }
    .banner-content h1 { font-size: 2rem; }
    .banner-overlay { padding: 40px 24px; }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .grid-destacados,
    .grid-productos { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .grid-categorias { grid-template-columns: repeat(3, 1fr); }
    .form-row { grid-template-columns: 1fr; }
    .ficha-producto { gap: 20px; }
    .carrito-tabla th:nth-child(3),
    .carrito-tabla td:nth-child(3) { display: none; }
    .checkout-form-box { padding: 20px; }
    .resumen-carrito { padding: 16px; }
    .checkout-layout { gap: 20px; }
}

@media (max-width: 480px) {
    .cabeza .container { flex-wrap: wrap; gap: 12px; }
    .buscador form { min-width: 0; width: 100%; order: 3; flex: 1 1 100%; }
    .carrito-header { order: 2; }
    .banner-content h1 { font-size: 1.6rem; }
    .grid-categorias { grid-template-columns: repeat(2, 1fr); }
    .login-card { margin: 20px; padding: 24px; }
    .precio-grande { font-size: 1.8rem; }
    .checkout-form-box { padding: 16px; }
    .resumen-carrito { padding: 14px; }
    .checkout-layout { gap: 16px; }
    .contenido-principal { padding: 16px 0 40px; }
}

/* ─── 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;
}
.portal-switcher .ps-btn:hover {
    color: var(--primary);
}
