/* ============================================================
   PERÚ EN GRANADA — Design System
   Peruvian red + gold + warm neutrals, mobile-first
   ============================================================ */

/* --- FONTS --- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,500&family=Inter:wght@300;400;500;600;700&display=swap');

/* --- CSS VARIABLES --- */
:root {
    --color-primary: #C8102E;        /* Peruvian red */
    --color-primary-dark: #9A0C22;
    --color-primary-light: #FDE8EC;
    --color-accent: #D4AF37;         /* Gold */
    --color-accent-light: #FFF8E1;
    --color-gold: #C5A55A;
    --color-gold-dark: #8B6914;
    --color-bg: #FDF8F4;
    --color-bg-warm: #F5EDE4;
    --color-surface: #FFFFFF;
    --color-text: #1E1E1E;
    --color-text-muted: #6B6360;
    --color-border: rgba(200, 16, 46, 0.08);
    --color-success: #2E7D32;
    --color-success-light: #E8F5E9;
    --color-error: #D32F2F;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(200, 16, 46, 0.06), 0 1px 4px rgba(0,0,0,0.04);
    --shadow-lg: 0 8px 32px rgba(200, 16, 46, 0.08), 0 2px 8px rgba(0,0,0,0.06);
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 20px;
    --nav-height: 64px;
    --header-height: 56px;
}

/* --- RESET --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    padding-bottom: calc(var(--nav-height) + 24px);
    padding-top: var(--header-height);
}

h1, h2, h3, h4 { font-family: 'Playfair Display', Georgia, serif; font-weight: 600; letter-spacing: 0.5px; }

/* --- TOP HEADER --- */
.top-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 16px; height: var(--header-height);
    box-shadow: var(--shadow-sm);
}
.header-logo {
    display: flex; align-items: center; gap: 8px;
    font-family: 'Playfair Display', serif; font-size: 1.1rem; font-weight: 700;
    color: var(--color-primary); text-decoration: none;
}
.header-logo img { display: none; }
.header-account {
    background: var(--color-primary); color: white; border: none;
    border-radius: 50%; width: 34px; height: 34px; font-size: 1rem;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    font-weight: 600; transition: background 0.2s; flex-shrink: 0;
}
.header-account:hover { background: var(--color-primary-dark); }

/* legacy — kept so old references don't crash */
.header-cart {
    position: relative; background: none; border: none; font-size: 1.4rem;
    cursor: pointer; padding: 8px; border-radius: var(--radius-sm);
    transition: background 0.2s;
}
.cart-badge {
    position: absolute; top: 2px; right: 2px;
    background: var(--color-primary); color: white;
    font-size: 0.7rem; font-weight: 700;
    min-width: 18px; height: 18px; border-radius: 9px;
    display: none; align-items: center; justify-content: center;
}

/* --- BOTTOM NAV --- */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000;
    background: var(--color-surface); border-top: 1px solid var(--color-border);
    display: flex; height: var(--nav-height);
    box-shadow: 0 -2px 16px rgba(0,0,0,0.04);
}
.nav-item {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 4px;
    background: none; border: none; padding: 8px 4px;
    font-family: 'Inter', sans-serif; font-size: 0.65rem; font-weight: 500;
    color: var(--color-text-muted); cursor: pointer;
    transition: color 0.2s, background 0.2s;
    text-decoration: none;
}
.nav-item.active { color: var(--color-primary); }
.nav-item:hover { background: var(--color-primary-light); }
.nav-icon { font-size: 1.3rem; }

/* --- HERO --- */
.hero {
    position: relative;
    background: url('../bilder/header.jpg') center 30% / cover no-repeat;
    padding: 48px 24px 56px; text-align: center; color: white;
    overflow: hidden;
}
.hero::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to bottom,
        rgba(10,0,0,0.52) 0%,
        rgba(10,0,0,0.38) 50%,
        rgba(10,0,0,0.62) 100%);
}
.hero-overlay { display: none; }
.hero-content { position: relative; z-index: 2; max-width: 600px; margin: 0 auto; }
.hero-badge {
    display: inline-block; background: rgba(255,255,255,0.12);
    padding: 6px 16px; border-radius: 20px; font-size: 0.8rem;
    margin-bottom: 16px; backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.15);
}
.hero h1 { font-size: 2.2rem; margin-bottom: 12px; line-height: 1.2; color: white; }
.hero p { font-size: 1rem; opacity: 0.85; margin-bottom: 24px; max-width: 450px; margin-left: auto; margin-right: auto; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* --- CONTAINER --- */
.container { max-width: 960px; margin: 0 auto; padding: 20px 16px; }

/* --- GRID --- */
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }

/* --- CARDS --- */
.card {
    background: var(--color-surface); border-radius: var(--radius);
    border: 1px solid var(--color-border); overflow: hidden;
    cursor: pointer; transition: transform 0.25s, box-shadow 0.25s;
    box-shadow: var(--shadow-sm);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card-img {
    width: 100%; height: 180px; object-fit: cover;
    background: var(--color-bg-warm);
}
.card-body { padding: 16px; }
.card-title { font-size: 1.05rem; font-weight: 600; margin-bottom: 6px; color: var(--color-text); }
.card-desc { font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: 12px; line-height: 1.4; }
.card-footer { display: flex; justify-content: space-between; align-items: center; }
.card-price { font-size: 1.2rem; font-weight: 700; color: var(--color-primary); font-family: 'Playfair Display', serif; }
.card-location { font-size: 0.8rem; color: var(--color-text-muted); }

/* --- EVENT CARD --- */
.event-card { position: relative; }
.event-date-badge {
    position: absolute; top: 150px; left: 16px;
    background: var(--color-surface); border-radius: var(--radius-sm);
    padding: 8px 12px; text-align: center;
    box-shadow: var(--shadow-md); min-width: 52px;
}
.event-day { display: block; font-size: 1.3rem; font-weight: 700; color: var(--color-primary); line-height: 1; }
.event-month { font-size: 0.7rem; color: var(--color-text-muted); text-transform: uppercase; font-weight: 600; letter-spacing: 1px; }
.event-meta { display: flex; gap: 12px; align-items: center; margin-top: 4px; font-size: 0.85rem; color: var(--color-text-muted); }

/* --- PROMO CARD --- */
.promo-card { position: relative; }
.promo-img { width: 100%; height: 140px; }
.promo-tagline { font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: 8px; }
.promo-offer {
    background: var(--color-primary-light); color: var(--color-primary);
    padding: 8px 12px; border-radius: var(--radius-sm);
    display: flex; align-items: center; gap: 8px;
    font-size: 0.9rem; font-weight: 500; margin-bottom: 10px;
}
.offer-icon { font-size: 1.1rem; }
.promo-code {
    background: var(--color-accent-light); color: var(--color-gold-dark);
    padding: 6px 10px; border-radius: 6px; font-size: 0.8rem;
    cursor: pointer; margin-bottom: 8px; transition: opacity 0.2s;
    border: 1px dashed var(--color-gold);
}
.promo-code:hover { opacity: 0.7; }

/* --- BADGES --- */
.badge {
    display: inline-block; padding: 3px 10px; border-radius: 12px;
    font-size: 0.72rem; font-weight: 600; letter-spacing: 0.5px;
}
.badge-category { background: var(--color-bg-warm); color: var(--color-text-muted); }
.badge-condition { background: var(--color-accent-light); color: var(--color-gold-dark); margin-left: 4px; }
.badge-free { background: var(--color-success-light); color: var(--color-success); }
.badge-full { background: var(--color-primary-light); color: var(--color-primary); }
.badge-premium { background: var(--color-accent-light); color: var(--color-gold-dark); }
.badge-soon { background: #FFF3E0; color: #E65100; margin-top: 8px; display: inline-block; }
.badge-tag { background: var(--color-bg-warm); color: var(--color-text-muted); font-weight: 400; }
.badge-own { background: #E8F5E9; color: #2E7D32; }
.badge-valid { font-size: 0.72rem; color: var(--color-success); }

/* --- BUTTONS --- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 20px; border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif; font-size: 0.9rem; font-weight: 600;
    cursor: pointer; border: 2px solid transparent; text-decoration: none;
    transition: all 0.25s; white-space: nowrap;
}
.btn-primary { background: var(--color-primary); color: white; }
.btn-primary:hover { background: var(--color-primary-dark); transform: translateY(-1px); }
.btn-accent { background: var(--color-accent); color: #1a1a1a; }
.btn-accent:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-outline { background: transparent; border-color: var(--color-primary); color: var(--color-primary); }
.btn-outline:hover { background: var(--color-primary-light); }
.btn-text { background: transparent; border: none; color: var(--color-primary); padding: 8px 4px; }
.btn-text:hover { opacity: 0.8; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-full { width: 100%; }
.btn-icon { background: none; border: none; cursor: pointer; font-size: 1.2rem; padding: 8px; }
.btn-icon:hover { opacity: 0.7; }

/* --- SECTION HEADER --- */
.section-header {
    display: flex; justify-content: space-between; align-items: flex-end;
    margin: 40px 0 20px; padding-bottom: 12px;
    border-bottom: 1px solid var(--color-border);
}
.section-title { font-size: 1.5rem; color: var(--color-text); }
.section-subtitle { font-size: 0.85rem; color: var(--color-text-muted); margin-top: 4px; }

/* --- PAGE HEADER --- */
.page-header {
    background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-bg-warm) 100%);
    padding: 32px 16px; text-align: center;
    border-bottom: 1px solid var(--color-border);
}
.page-header h1 { font-size: 1.8rem; color: var(--color-text); margin-bottom: 4px; }
.page-header p { color: var(--color-text-muted); margin-bottom: 16px; }

/* --- FILTER CHIPS --- */
.filter-scroll {
    display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 12px;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.filter-scroll::-webkit-scrollbar { display: none; }
.filter-chip {
    flex-shrink: 0; padding: 8px 16px; border-radius: 20px;
    font-size: 0.85rem; font-weight: 500; cursor: pointer;
    border: 1px solid var(--color-border); background: var(--color-surface);
    color: var(--color-text-muted); transition: all 0.2s;
}
.filter-chip.active { background: var(--color-primary); border-color: var(--color-primary); color: white; }
.filter-chip:hover:not(.active) { border-color: var(--color-primary); color: var(--color-primary); }

/* --- DETAIL CARD --- */
.detail-card { background: var(--color-surface); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); border: 1px solid var(--color-border); }
.detail-body { padding: 24px; }
.detail-body h2 { font-size: 1.6rem; margin: 8px 0; }
.detail-price { font-family: 'Playfair Display', serif; font-size: 1.8rem; color: var(--color-primary); font-weight: 700; margin: 12px 0; }
.detail-desc { color: var(--color-text-muted); line-height: 1.7; margin-bottom: 16px; font-size: 0.95rem; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 20px; font-size: 0.9rem; color: var(--color-text-muted); }
.detail-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.seller-card {
    display: flex; align-items: center; gap: 12px;
    background: var(--color-bg-warm); padding: 14px; border-radius: var(--radius-sm);
    margin-bottom: 20px;
}
.seller-avatar {
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--color-primary); color: white;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.9rem;
}

/* --- ATTENDEE BAR --- */
.attendee-bar { margin: 16px 0; }
.attendee-info { display: flex; justify-content: space-between; font-size: 0.85rem; margin-bottom: 4px; }
.progress-bar { height: 8px; background: var(--color-bg-warm); border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--color-success); border-radius: 4px; transition: width 0.5s; }

/* --- CART LIST --- */
.cart-list { display: flex; flex-direction: column; gap: 8px; }
.cart-item {
    display: flex; align-items: center; gap: 12px;
    background: var(--color-surface); padding: 12px 16px;
    border-radius: var(--radius-sm); border: 1px solid var(--color-border);
}
.cart-item-info { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.cart-item-icon { font-size: 1.8rem; flex-shrink: 0; }
.cart-item-price { font-weight: 600; white-space: nowrap; font-family: 'Playfair Display', serif; font-size: 1rem; }
.cart-total {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 0; margin-top: 16px;
    border-top: 2px solid var(--color-primary); font-size: 1.2rem;
}

/* --- QUANTITY CONTROL --- */
.qty-control { display: flex; align-items: center; gap: 6px; background: var(--color-bg-warm); border-radius: 20px; padding: 2px 4px; }
.qty-btn { background: none; border: none; color: var(--color-primary); font-size: 1.2rem; font-weight: 700; cursor: pointer; padding: 2px 10px; }
.qty-btn:hover { color: var(--color-primary-dark); }
.qty-val { min-width: 24px; text-align: center; font-weight: 600; }

/* --- MODAL --- */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5);
    z-index: 3000; display: none; align-items: flex-end; justify-content: center;
    animation: fadeIn 0.2s;
}
.modal-content {
    background: var(--color-surface); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    width: 100%; max-width: 520px; max-height: 85vh; overflow-y: auto;
    animation: slideUp 0.3s ease;
}
.modal-content.modal-checkout { max-width: 520px; }
.modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px; border-bottom: 1px solid var(--color-border);
}
.modal-header h3 { font-size: 1.2rem; }
.modal-close { background: none; border: none; font-size: 1.8rem; color: var(--color-text-muted); cursor: pointer; line-height: 1; }
.modal-body { padding: 20px; }
.modal-footer { padding: 16px 20px; border-top: 1px solid var(--color-border); display: flex; gap: 10px; justify-content: flex-end; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* --- CHECKOUT STEPS --- */
.checkout-step-indicator {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 16px 20px; border-bottom: 1px solid var(--color-border);
}
.step-dot {
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--color-bg-warm); border: 2px solid var(--color-border);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; font-weight: 700; color: var(--color-text-muted);
    flex-shrink: 0; transition: all 0.3s;
}
.step-dot.active { background: var(--color-primary); border-color: var(--color-primary); color: white; }
.step-dot.done { background: var(--color-success); border-color: var(--color-success); color: white; }
.step-line { flex: 1; height: 2px; background: var(--color-bg-warm); max-width: 40px; }

/* --- CHECKOUT ITEMS --- */
.checkout-items { margin-bottom: 12px; }
.checkout-summary-item { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--color-border); font-size: 0.9rem; }
.checkout-total-line { display: flex; justify-content: space-between; padding-top: 12px; font-size: 1.1rem; }

/* --- PAYMENT METHODS --- */
.payment-methods { display: flex; flex-direction: column; gap: 10px; }
.payment-option {
    display: flex; align-items: center; gap: 14px;
    background: var(--color-bg); border: 2px solid var(--color-border); border-radius: var(--radius);
    padding: 16px; cursor: pointer; text-align: left; transition: all 0.2s;
    font-family: 'Inter', sans-serif; font-size: 0.9rem; color: var(--color-text);
}
.payment-option:hover { border-color: var(--color-accent); background: var(--color-accent-light); }
.payment-icon { font-size: 1.8rem; flex-shrink: 0; }

/* --- FORMS --- */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--color-text-muted); }
.form-row { display: flex; gap: 12px; }
.input {
    width: 100%; padding: 12px 14px; background: var(--color-bg); color: var(--color-text);
    border: 1px solid var(--color-border); border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif; font-size: 0.95rem; transition: border-color 0.3s;
}
.input:focus { outline: none; border-color: var(--color-primary); background: var(--color-surface); }
textarea.input { resize: vertical; min-height: 80px; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B6360' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }

/* --- STATS --- */
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 24px 0; }
.stat-card {
    background: var(--color-surface); border: 1px solid var(--color-border);
    border-radius: var(--radius); padding: 16px 12px; text-align: center;
    cursor: pointer; transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-number { font-family: 'Playfair Display', serif; font-size: 1.8rem; font-weight: 700; color: var(--color-primary); }
.stat-label { font-size: 0.8rem; color: var(--color-text-muted); margin-top: 4px; }

/* --- CTA --- */
.cta-section {
    background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-bg-warm) 100%);
    border: 1px solid var(--color-border); border-radius: var(--radius-lg);
    padding: 40px 24px; text-align: center; margin: 40px 0 20px;
}
.cta-section h2 { font-size: 1.5rem; margin-bottom: 8px; }
.cta-section p { color: var(--color-text-muted); margin-bottom: 20px; }

/* --- EMPTY STATE --- */
.empty-state { text-align: center; padding: 48px 20px; }
.empty-icon { font-size: 3.5rem; margin-bottom: 12px; }
.empty-state h3 { font-size: 1.2rem; margin-bottom: 8px; }
.empty-state p { color: var(--color-text-muted); margin-bottom: 20px; }

/* --- TOAST --- */
.toast {
    position: fixed; top: 70px; left: 50%; transform: translateX(-50%) translateY(-20px);
    background: var(--color-success); color: white; padding: 12px 24px;
    border-radius: 24px; font-weight: 600; font-size: 0.9rem;
    z-index: 9999; opacity: 0; pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    box-shadow: var(--shadow-lg);
}
.toast-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-error { background: var(--color-error); }

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .hero h1 { font-size: 1.7rem; }
    .hero { padding: 36px 16px 44px; }
    .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(3, 1fr); }
    .stat-card { padding: 12px 8px; }
    .stat-number { font-size: 1.3rem; }
    .form-row { flex-direction: column; gap: 0; }
    .detail-actions { flex-direction: column; }
    .section-header { flex-direction: column; align-items: flex-start; gap: 8px; }
    .hero-actions { flex-direction: column; align-items: center; }
    .hero-actions .btn { width: 100%; max-width: 280px; }
    .page-header h1 { font-size: 1.4rem; }
}

/* desktop-nav — hidden on mobile */
.desktop-nav { display: none; }

@media (min-width: 768px) {
    body { padding-top: var(--header-height); padding-bottom: 24px; }
    .top-header { display: flex; }
    .bottom-nav { display: none; }
    .header-account { display: none; }
    .desktop-nav {
        display: flex;
        flex: 1;
        justify-content: center;
        gap: 4px;
    }
    .desktop-nav .nav-item {
        flex: none;
        flex-direction: row;
        gap: 6px;
        padding: 6px 14px;
        border-radius: var(--radius);
        font-size: 0.95rem;
        height: auto;
    }
    .desktop-nav .nav-icon { font-size: 1rem; }
    .hero { border-radius: 0; padding: 80px 24px 88px; }
    .hero h1 { font-size: 3rem; }
    .container { padding: 32px 24px; max-width: 900px; margin: 0 auto; }
    .modal-overlay { align-items: center; }
    .modal-content { border-radius: var(--radius-lg); max-height: 80vh; }
}

/* ============================================================
   NUEVOS ESTILOS — Auth, Bizum, Dashboard, Stock
   ============================================================ */

/* --- USER GREETING (home) --- */
.user-greeting {
    background: var(--color-accent-light);
    border: 1px solid var(--color-accent);
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    color: var(--color-gold-dark);
}

/* --- SOLD-OUT CARD --- */
.card-sold-out { opacity: 0.55; pointer-events: none; }
.card-sold-out::after {
    content: 'Agotado';
    position: absolute; top: 12px; right: 12px;
    background: var(--color-primary); color: white;
    font-size: 0.75rem; font-weight: 700; padding: 3px 10px;
    border-radius: 20px; pointer-events: none;
}
.card-sold-out { position: relative; }

/* --- CHECKBOX GROUP (create listing) --- */
.check-group {
    display: flex; gap: 20px; flex-wrap: wrap; margin-top: 8px;
}
.check-label {
    display: flex; align-items: center; gap: 6px;
    cursor: pointer; font-size: 0.95rem; color: var(--color-text);
}
.check-input {
    width: 18px; height: 18px; cursor: pointer;
    accent-color: var(--color-primary);
}

/* --- BIZUM INSTRUCTIONS --- */
.bizum-instructions {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
}
.bizum-detail {
    display: flex; flex-direction: column; gap: 4px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--color-border);
}
.bizum-detail:last-child { border-bottom: none; }
.bizum-label {
    font-size: 0.8rem; color: var(--color-text-muted);
    text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600;
}
.bizum-value {
    font-size: 1.1rem; color: var(--color-text); font-weight: 700;
    word-break: break-all;
}
.bizum-value-row {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.btn-copy {
    font-size: 0.8rem; padding: 4px 8px; white-space: nowrap;
}
.bizum-tip {
    background: var(--color-accent-light);
    border: 1px solid var(--color-accent);
    border-radius: var(--radius-sm);
    padding: 12px; margin-top: 16px;
    font-size: 0.85rem; color: var(--color-gold-dark);
}

/* --- MI CUENTA DASHBOARD --- */
.dashboard-section-title {
    margin: 24px 0 16px;
    color: var(--color-primary);
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
}
.dashboard-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    margin-bottom: 16px;
    overflow: hidden;
}
.dashboard-card-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px;
    background: var(--color-bg-warm);
    border-bottom: 1px solid var(--color-border);
    gap: 12px; flex-wrap: wrap;
}
.dashboard-card-title {
    font-size: 0.95rem;
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.price-tag {
    color: var(--color-primary); font-weight: 700;
}
.stock-control {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.85rem; color: var(--color-text-muted);
}
.stock-input {
    width: 72px; padding: 6px 8px !important; font-size: 0.9rem !important;
    text-align: center;
}
.btn-delete-item {
    background: none; border: none; cursor: pointer;
    font-size: 1.1rem; padding: 4px 6px; border-radius: 6px;
    opacity: 0.5; transition: opacity 0.15s, background 0.15s;
}
.btn-delete-item:hover { opacity: 1; background: #FDE8EC; }

/* --- BUYER LIST --- */
.buyer-list { border-top: 1px solid var(--color-border); }
.buyer-row {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 16px; border-bottom: 1px solid var(--color-border);
}
.buyer-row:last-child { border-bottom: none; }
.buyer-paid-check { display: flex; align-items: center; flex-shrink: 0; }
.buyer-info { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.buyer-name { font-size: 0.9rem; font-weight: 600; color: var(--color-text); }
.buyer-tel { font-size: 0.82rem; color: var(--color-primary); text-decoration: none; }
.buyer-qty { font-size: 0.85rem; color: var(--color-text-muted); flex-shrink: 0; }
.buyer-total { font-size: 0.9rem; font-weight: 700; color: var(--color-text); flex-shrink: 0; min-width: 48px; text-align: right; }
.buyer-method { font-size: 0.72rem; font-weight: 700; padding: 2px 7px; border-radius: 10px; flex-shrink: 0; }
.buyer-method-bizum { background: #E3F2FD; color: #1565C0; }
.buyer-method-wa { background: #E8F5E9; color: #2E7D32; }

.dashboard-table-wrap {
    overflow-x: auto;
}
.dashboard-table {
    width: 100%; border-collapse: collapse; font-size: 0.88rem;
}
.dashboard-table thead th {
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
    font-weight: 600; font-size: 0.8rem;
    padding: 8px 12px; text-align: left;
    white-space: nowrap;
}
.dashboard-table tbody tr {
    border-bottom: 1px solid var(--color-border);
}
.dashboard-table tbody tr:last-child { border-bottom: none; }
.dashboard-table tbody tr:hover { background: var(--color-bg); }
.dashboard-table td {
    padding: 10px 12px; vertical-align: middle;
}
.td-check { width: 60px; text-align: center; }
.td-center { text-align: center; }
.td-empty {
    text-align: center; color: var(--color-text-muted);
    padding: 20px !important; font-style: italic;
}
.row-check {
    width: 18px; height: 18px; cursor: pointer;
    accent-color: var(--color-primary); display: block; margin: 0 auto;
}
.tel-link {
    color: var(--color-primary); text-decoration: none; font-weight: 500;
}
.tel-link:hover { text-decoration: underline; }

/* Efectivo payment badge */
.buyer-method-efectivo {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 600;
    background: #FFF8E1;
    color: #8B6914;
}

/* Google Maps clickable location links */
.map-link {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.8rem;
}
.map-link:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

/* Category picker */
.cat-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}
.cat-chip {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1.5px solid var(--color-border);
    background: var(--color-bg);
    color: var(--color-text);
    font-size: 0.88rem;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    white-space: nowrap;
}
.cat-chip:hover { border-color: var(--color-primary); }
.cat-chip.selected {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
    font-weight: 600;
}
.cat-chip-add {
    border-style: dashed;
    color: var(--color-text-muted);
}
.cat-chip-add:hover { color: var(--color-primary); }

/* Image picker — upload area in create forms */
.img-picker {
    position: relative;
    width: 100%;
    height: 160px;
    border: 2px dashed var(--color-border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    background: var(--color-bg);
    margin-bottom: 16px;
    overflow: hidden;
    transition: border-color 0.2s;
}
.img-picker:hover { border-color: var(--color-primary); }
.img-picker-icon { font-size: 2rem; }
.img-picker-label { font-size: 0.85rem; color: var(--color-text-muted); }
.img-picker-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.img-picker-edit {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.55);
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.78rem;
    cursor: pointer;
    white-space: nowrap;
}

/* Full-screen crop overlay */
.crop-overlay {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 9999;
    display: flex;
    flex-direction: column;
}
.crop-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #111;
    flex-shrink: 0;
}
.crop-title {
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.01em;
}
.crop-btn-cancel {
    color: #999;
    background: none;
    border: none;
    font-size: 0.95rem;
    cursor: pointer;
    padding: 4px 0;
}
.crop-btn-done {
    color: #D4AF37;
    background: none;
    border: none;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    padding: 4px 0;
}
.crop-workspace {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 24px 20px;
}
.crop-frame {
    position: relative;
    width: 100%;
    max-width: 420px;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.85), 0 0 0 9999px rgba(0,0,0,0.6);
}
.crop-frame::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,0.18) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.18) 1px, transparent 1px);
    background-size: 33.33% 33.33%;
    z-index: 2;
}
.crop-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 50%;
    display: block;
    cursor: grab;
    user-select: none;
    -webkit-user-drag: none;
}
.crop-img:active { cursor: grabbing; }
.crop-corner {
    position: absolute;
    width: 22px;
    height: 22px;
    border-color: #fff;
    border-style: solid;
    z-index: 3;
    pointer-events: none;
}
.crop-tl { top: 0;    left: 0;  border-width: 3px 0 0 3px; }
.crop-tr { top: 0;    right: 0; border-width: 3px 3px 0 0; }
.crop-bl { bottom: 0; left: 0;  border-width: 0 0 3px 3px; }
.crop-br { bottom: 0; right: 0; border-width: 0 3px 3px 0; }
.crop-hint {
    color: rgba(255,255,255,0.5);
    font-size: 0.82rem;
    text-align: center;
}

/* Card/detail placeholders when no photo */
.card-img-placeholder {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    background: var(--color-bg-warm);
}
.detail-img-placeholder {
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    background: var(--color-bg-warm);
    border-radius: 12px 12px 0 0;
}
