/* =============================================
   EGOZ — Boutique Esotérica
   style.css — Estilos globales
   ============================================= */

/* ── VARIABLES ─────────────────────────────── */
:root {
    --bg-primary:     #0f0720;
    --bg-secondary:   #1a0a2e;
    --bg-card:        #200d38;
    --bg-dark:        #0a0418;
    --border:         #3a1f6e;
    --gold:           #c9a96e;
    --gold-light:     #e8d5a3;
    --gold-dark:      #a07840;
    --purple:         #9a8abf;
    --purple-dark:    #7a6a9f;
    --purple-muted:   #5a4a8f;
    --purple-deep:    #4a3a6f;
    --text-white:     #ffffff;
    --text-light:     #e8d5a3;
    --text-gray:      #9a8abf;
    --text-muted:     #6a5a8f;
    --green-wa:       #4ade80;
    --green-wa-dark:  #1a3a2e;
    --radius-sm:      6px;
    --radius-md:      10px;
    --radius-lg:      14px;
    --radius-xl:      20px;
    --shadow:         0 4px 24px rgba(0,0,0,0.4);
    --shadow-gold:    0 4px 24px rgba(201,169,110,0.15);
    --transition:     all 0.3s ease;
    --font-title:     'Georgia', serif;
    --font-body:      'Segoe UI', sans-serif;
}

/* ── RESET ──────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    background-color: var(--bg-primary);
    color: var(--text-white);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    min-height: 100vh;
    padding-top: 100px;
}
a { color: var(--gold); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--gold-light); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* ── TIPOGRAFÍA ─────────────────────────────── */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-title); color: var(--gold-light); line-height: 1.3; }
h1 { font-size: 2.2rem; letter-spacing: 3px; }
h2 { font-size: 1.6rem; letter-spacing: 2px; }
h3 { font-size: 1.2rem; letter-spacing: 1px; }
.text-gold       { color: var(--gold); }
.text-gold-light { color: var(--gold-light); }
.text-purple     { color: var(--purple); }
.text-muted      { color: var(--text-muted); }

/* ── NAVBAR ─────────────────────────────────── */
.navbar {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
    z-index: 1030;
    box-shadow: var(--shadow);
    width: 100%;
}

.navbar-brand { color: var(--gold) !important; font-family: var(--font-title); font-size: 1.3rem; font-weight: 700; letter-spacing: 3px; }
.navbar-brand:hover { color: var(--gold-light) !important; }
.nav-link { color: var(--purple) !important; font-size: 0.9rem; letter-spacing: 1px; transition: var(--transition); padding: 6px 12px !important; }
.nav-link:hover, .nav-link.active { color: var(--gold) !important; }
.nav-link.active { border-bottom: 1px solid var(--gold); }
.navbar-toggler { border-color: var(--border) !important; background: transparent !important; }
.navbar-toggler-icon { filter: invert(1); }

/* ── CARRITO BADGE ──────────────────────────── */
.cart-btn { position: relative; color: var(--gold) !important; font-size: 1.2rem; }
.cart-count { position: absolute; top: -6px; right: -8px; background: var(--gold); color: var(--bg-primary); font-size: 10px; font-weight: 700; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }

/* ── LANG SWITCHER ──────────────────────────── */
.lang-switcher { color: var(--purple); font-size: 0.8rem; cursor: pointer; }
.lang-switcher span.active { color: var(--gold); font-weight: 700; }

/* ── HERO ───────────────────────────────────── */
.hero {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    padding: 80px 0 60px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(ellipse at center, rgba(58,31,110,0.3) 0%, transparent 70%);
    pointer-events: none;
}

.hero h1 { font-size: 2.4rem; letter-spacing: 5px; margin-bottom: 16px; text-transform: uppercase; }
.hero p  { color: var(--purple-dark); font-size: 1rem; max-width: 500px; margin: 0 auto 30px; }

/* ── BOTONES ────────────────────────────────── */
.btn-gold {
    background: var(--gold); color: var(--bg-primary); border: none;
    padding: 12px 32px; border-radius: var(--radius-xl);
    font-weight: 600; font-size: 0.9rem; letter-spacing: 1px;
    cursor: pointer; transition: var(--transition); display: inline-block;
}
.btn-gold:hover { background: var(--gold-light); color: var(--bg-primary); transform: translateY(-2px); box-shadow: var(--shadow-gold); }

.btn-outline-gold {
    background: transparent; color: var(--gold); border: 1px solid var(--gold);
    padding: 10px 24px; border-radius: var(--radius-xl);
    font-size: 0.85rem; letter-spacing: 1px; cursor: pointer;
    transition: var(--transition); display: inline-block;
}
.btn-outline-gold:hover { background: var(--gold); color: var(--bg-primary); }

.btn-purple {
    background: var(--border); color: var(--gold); border: none;
    padding: 8px 16px; border-radius: var(--radius-md);
    font-size: 0.85rem; cursor: pointer; transition: var(--transition);
    white-space: nowrap;
}
.btn-purple:hover { background: var(--gold); color: var(--bg-primary); }

/* ── SECTION TITLE ──────────────────────────── */
.section-title { color: var(--gold); font-size: 0.75rem; letter-spacing: 4px; text-align: center; text-transform: uppercase; padding: 24px 0 16px; }
.section-divider { width: 60px; height: 1px; background: var(--gold); margin: 8px auto 24px; opacity: 0.5; }

/* ── CARDS PRODUCTO ─────────────────────────── */
.product-card { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; transition: var(--transition); height: 100%; }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-gold); border-color: var(--gold); }
.product-card-img { height: 200px; background: var(--bg-card); display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.product-card-img img { width: 100%; height: 100%; object-fit: cover; }
.product-badge { position: absolute; top: 10px; left: 10px; background: var(--gold); color: var(--bg-primary); font-size: 0.7rem; font-weight: 700; padding: 3px 8px; border-radius: var(--radius-sm); letter-spacing: 1px; }
.product-badge.agotado { background: var(--border); color: var(--purple); }
.product-card-body { padding: 16px; }
.product-category { color: var(--purple-muted); font-size: 0.75rem; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 6px; }
.product-name { color: var(--gold-light); font-family: var(--font-title); font-size: 1rem; font-weight: 600; margin-bottom: 6px; }
.product-desc { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 14px; line-height: 1.5; }
.product-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.product-price { color: var(--gold); font-size: 1.1rem; font-weight: 700; flex-shrink: 0; }

/* ── FILTROS ────────────────────────────────── */
.filters-bar { background: var(--bg-dark); padding: 14px 0; border-bottom: 1px solid var(--border); border-top: 1px solid var(--border); }
.filter-btn { background: var(--bg-secondary); border: 1px solid var(--border); color: var(--purple); font-size: 0.8rem; padding: 6px 16px; border-radius: 20px; cursor: pointer; transition: var(--transition); margin: 4px; }
.filter-btn:hover, .filter-btn.active { background: var(--gold); color: var(--bg-primary); border-color: var(--gold); font-weight: 600; }

/* ── FORMULARIOS ────────────────────────────── */
.form-control, .form-select { background: var(--bg-primary) !important; border: 1px solid var(--border) !important; color: var(--purple) !important; border-radius: var(--radius-sm) !important; padding: 10px 14px !important; transition: var(--transition); }
.form-control:focus, .form-select:focus { border-color: var(--gold) !important; box-shadow: 0 0 0 2px rgba(201,169,110,0.15) !important; color: var(--text-white) !important; }
.form-control::placeholder { color: var(--text-muted) !important; }
.form-label { color: var(--purple-muted); font-size: 0.8rem; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 6px; }

/* ── CARRITO ────────────────────────────────── */
.cart-item { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px; margin-bottom: 12px; display: flex; align-items: center; gap: 16px; }
.cart-item-img { width: 70px; height: 70px; border-radius: var(--radius-sm); background: var(--bg-card); object-fit: cover; flex-shrink: 0; }
.cart-total-box { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }

/* ── INFO BOXES ─────────────────────────────── */
.info-box { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 14px 16px; display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.info-box-icon  { color: var(--gold); font-size: 1.1rem; flex-shrink: 0; }
.info-box-label { color: var(--purple-muted); font-size: 0.75rem; letter-spacing: 1px; text-transform: uppercase; }
.info-box-value { color: var(--gold-light); font-size: 0.9rem; margin-top: 2px; }

/* ── WHATSAPP FLOTANTE ──────────────────────── */
.whatsapp-float {
    position: fixed !important;
    bottom: 24px; right: 24px;
    background: #25d366; color: white;
    width: 56px; height: 56px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 4px 16px rgba(37,211,102,0.4);
    z-index: 9999;
    transition: var(--transition);
    text-decoration: none;
}
.whatsapp-float:hover { transform: scale(1.1); color: white; }

/* ── FOOTER ─────────────────────────────────── */
.footer { background: var(--bg-dark); border-top: 1px solid var(--border); padding: 20px 0; margin-top: auto; }
.footer-text   { color: var(--purple-deep); font-size: 0.8rem; }
.footer-stripe { color: var(--purple-deep); font-size: 0.8rem; display: flex; align-items: center; gap: 6px; }

/* ── ADMIN ──────────────────────────────────── */
.admin-sidebar { background: var(--bg-secondary); border-right: 1px solid var(--border); min-height: 100vh; width: 240px; position: fixed; top: 0; left: 0; padding: 24px 0; z-index: 100; }
.admin-content { margin-left: 240px; padding: 24px; min-height: 100vh; }
.admin-nav-link { color: var(--purple); padding: 10px 24px; display: flex; align-items: center; gap: 10px; font-size: 0.9rem; transition: var(--transition); border-left: 3px solid transparent; }
.admin-nav-link:hover, .admin-nav-link.active { color: var(--gold); background: rgba(201,169,110,0.05); border-left-color: var(--gold); }
.admin-card { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px 24px; margin-bottom: 16px; }
.stat-card { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; text-align: center; transition: var(--transition); }
.stat-card:hover { border-color: var(--gold); }
.stat-number { color: var(--gold); font-size: 2rem; font-weight: 700; font-family: var(--font-title); }
.stat-label  { color: var(--purple); font-size: 0.8rem; letter-spacing: 1px; text-transform: uppercase; margin-top: 4px; }

/* ── NOTIFICACION BADGE ─────────────────────── */
.notif-badge { background: var(--gold); color: var(--bg-primary); font-size: 10px; font-weight: 700; width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; margin-left: 6px; }

/* ── ESTADOS PEDIDO ─────────────────────────── */
.badge-pendiente { background: #a07840; color: #fff; }
.badge-pagado    { background: #2d6a4f; color: #fff; }
.badge-enviado   { background: #1d4e89; color: #fff; }
.badge-entregado { background: #386641; color: #fff; }
.badge-cancelado { background: #6b2737; color: #fff; }

/* ── TABLA ADMIN ────────────────────────────── */
.table-egoz { color: var(--text-white); }
.table-egoz thead th { background: var(--bg-card); color: var(--gold); font-size: 0.8rem; letter-spacing: 1px; text-transform: uppercase; border-color: var(--border); padding: 12px 16px; }
.table-egoz tbody td { background: var(--bg-secondary); border-color: var(--border); color: var(--text-white); vertical-align: middle; padding: 12px 16px; }
.table-egoz tbody tr:hover td { background: var(--bg-card); }

/* ── PAGINATION ─────────────────────────────── */
.page-item .page-link { background: var(--bg-secondary); border-color: var(--border); color: var(--purple); }
.page-item.active .page-link { background: var(--gold); border-color: var(--gold); color: var(--bg-primary); }
.page-item .page-link:hover { background: var(--border); color: var(--gold); }

/* ── ALERTS ─────────────────────────────────── */
.alert-egoz { background: var(--bg-secondary); border: 1px solid var(--border); color: var(--gold-light); border-radius: var(--radius-md); padding: 14px 18px; }
.alert-egoz.success { border-color: #2d6a4f; color: #4ade80; }
.alert-egoz.error   { border-color: #6b2737; color: #f87171; }

/* ── LOADER ─────────────────────────────────── */
.loader { width: 36px; height: 36px; border: 3px solid var(--border); border-top-color: var(--gold); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── OFFCANVAS MENU LATERAL ─────────────────── */
.offcanvas-link { display: flex; align-items: center; padding: 14px 24px; color: var(--purple); font-size: 1rem; text-decoration: none; border-left: 3px solid transparent; transition: var(--transition); }
.offcanvas-link:hover, .offcanvas-active { color: var(--gold); background: rgba(201,169,110,0.05); border-left-color: var(--gold); }

/* Offcanvas z-index por encima del navbar */
.offcanvas { z-index: 1055 !important; }
.offcanvas-backdrop { z-index: 1054 !important; }

/* ── RESPONSIVE — UN SOLO BLOQUE ────────────── */
@media (max-width: 768px) {
    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.3rem; }

    .hero { padding: 50px 0 40px; }
    .hero h1 { font-size: 1.6rem; letter-spacing: 3px; }

    /* Productos */
    .product-card-img  { height: 130px; }
    .product-card-body { padding: 10px 12px 12px; }
    .product-name      { font-size: 0.88rem; margin-bottom: 4px; }
    .product-desc      { font-size: 0.8rem; margin-bottom: 10px; }
    .product-category  { font-size: 0.7rem; }
    .product-price     { font-size: 0.95rem; }
    .btn-purple        { font-size: 0.8rem; padding: 6px 12px; }

    /* Admin */
    .admin-sidebar { width: 100%; min-height: auto; position: relative; }
    .admin-content { margin-left: 0; padding: 16px; }

    /* WhatsApp */
    .whatsapp-float { bottom: 16px; right: 16px; width: 48px; height: 48px; font-size: 1.4rem; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 1.3rem; letter-spacing: 2px; }
    .btn-gold { padding: 10px 24px; font-size: 0.85rem; }
}

/* ── BREADCRUMB ─────────────────────────────── */
.breadcrumb {
    margin-bottom: 0;
}

.breadcrumb-item a {
    color: var(--purple) !important;
    text-decoration: none;
}

.breadcrumb-item.active {
    color: var(--gold) !important;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--border);
}

/* Separación del navbar */
.breadcrumb-bar {
    margin-top: 12px;
}