/* ===========================
   BASE CSS - Variables y estilos comunes
   Reutilizable para cualquier proyecto
=========================== */

:root {
    --radius: 14px;
    --shadow: 0 1px 3px rgba(0,0,0,.04), 0 4px 12px rgba(0,0,0,.06);
    --shadow-hover: 0 8px 30px rgba(0,0,0,.1);
    --transition: .2s ease;
    --blue: #3b82f6;
    --green: #16a34a;
    --red: #dc2626;
    --orange: #f97316;
    --purple: #8b5cf6;
}

* {
    box-sizing: border-box;
}

body {
    background: #eef1f6;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #1e293b;
    transition: background .3s, color .3s;
    line-height: 1.5;
    margin: 0;
    padding: 0;
}

/* ===========================
   CONTAINER
=========================== */

.container-fluid {
    max-width: 1400px;
    margin: 0 auto;
}

/* ===========================
   BUTTONS
=========================== */

.btn-icon {
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 10px;
    background: #f1f5f9;
    color: #475569;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon:hover {
    background: var(--blue);
    color: white;
    box-shadow: 0 2px 8px rgba(59,130,246,.25);
}

/* ===========================
   SEARCH BOX
=========================== */

.search-box {
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border-radius: 10px;
    padding: 0 14px;
    gap: 8px;
    border: 2px solid transparent;
    transition: var(--transition);
}

.search-box:focus-within {
    border-color: var(--blue);
    background: white;
    box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}

.search-box i { color: #94a3b8; }

.search-box input {
    border: none;
    background: transparent;
    padding: 10px 0;
    font-size: .92rem;
    outline: none;
    width: 200px;
    color: inherit;
}

/* ===========================
   BADGES
=========================== */

.badge {
    font-size: .66rem;
    font-weight: 600;
    padding: 3px 7px;
    border-radius: 6px;
}

/* ===========================
   STORE BADGES
=========================== */

.store-badge-wrapper {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
}

.store-badge-wrapper-inline {
    display: inline-block;
}

.store-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .65rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    letter-spacing: .3px;
    white-space: nowrap;
}

.store-elflorido {
    background: linear-gradient(135deg, var(--blue), #2563eb);
    color: white;
    box-shadow: 0 2px 6px rgba(59,130,246,.3);
}

.store-calimax {
    background: linear-gradient(135deg, var(--orange), #ea580c);
    color: white;
    box-shadow: 0 2px 6px rgba(249,115,22,.3);
}

/* ===========================
   STORE ICONS (Tabla)
=========================== */

.store-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    color: white;
    font-size: .85rem;
}

.store-icon-elflorido { background: linear-gradient(135deg, var(--blue), #2563eb); }
.store-icon-calimax { background: linear-gradient(135deg, var(--orange), #ea580c); }

/* ===========================
   GRAMMAGE BADGE
=========================== */

.grammage-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: .7rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 5px;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

/* ===========================
   UNIT PRICE
=========================== */

.unit-price {
    font-size: .72rem;
    font-weight: 700;
    color: #0891b2;
    white-space: nowrap;
}

.table-unitprice {
    font-size: .8rem;
    font-weight: 600;
    color: #0891b2;
}

/* ===========================
   TOAST
=========================== */

.toast-msg {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 24px;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    font-size: .88rem;
    z-index: 9999;
    transform: translateY(16px);
    opacity: 0;
    transition: .3s ease;
    box-shadow: 0 4px 16px rgba(0,0,0,.2);
}

.toast-msg.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-error { background: linear-gradient(135deg, #ef4444, #dc2626); }
.toast-success { background: linear-gradient(135deg, #22c55e, #16a34a); }
.toast-info { background: linear-gradient(135deg, #3b82f6, #2563eb); }

/* ===========================
   SCROLLBAR
=========================== */

::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }

/* ===========================
   EMPTY STATE
=========================== */

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid #f1f5f9;
}

.empty-state i { font-size: 3.5rem; color: #cbd5e1; }
.empty-state p { margin: 16px 0 6px; font-weight: 600; color: #334155; }
.empty-state small { color: #94a3b8; }

/* ===========================
   MODAL BASE
=========================== */

.modal-content {
    border: none;
    border-radius: var(--radius);
    overflow: hidden;
}

.modal-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 16px 22px;
}

.modal-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: #1e293b;
}

.modal-body {
    padding: 24px;
}

/* ===========================
   CROSS STORE
=========================== */


.cross-store-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: .65rem;
    font-weight: 600;
    color: #8b5cf6;
    background: #f5f3ff;
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 2px;
}

.cross-store-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
}

.cross-store-title {
    font-size: .78rem;
    font-weight: 700;
    color: #8b5cf6;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cross-store-item {
    background: white;
    border: 1px solid #f1f5f9;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 8px;
}

.cross-store-item.cheaper {
    border-color: #22c55e;
    background: #f0fdf4;
}

.cross-store-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.cross-store-sim {
    font-size: .65rem;
    color: #94a3b8;
    font-weight: 600;
}

.cross-store-item-name {
    font-size: .78rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 4px;
}

.cross-store-item-prices {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.cross-store-price {
    font-size: .88rem;
    font-weight: 800;
    color: var(--green);
}

.cross-store-unit {
    font-size: .72rem;
    font-weight: 600;
    color: #0891b2;
}

.cross-store-saving {
    font-size: .68rem;
    font-weight: 700;
    color: var(--green);
    background: #dcfce7;
    padding: 2px 6px;
    border-radius: 4px;
}

.cross-store-unit-more {
    font-size: .68rem;
    font-weight: 600;
    color: #dc2626;
}

.cross-store-unit-less {
    font-size: .68rem;
    font-weight: 600;
    color: var(--green);
}

/* ===========================
   QUOTE
=========================== */

.quote-section {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 14px;
    margin-top: 12px;
}

.quote-header {
    font-weight: 700;
    color: #166534;
    margin-bottom: 8px;
    font-size: .85rem;
}

.quote-row {
    display: flex;
    justify-content: space-between;
    font-size: .85rem;
    color: #334155;
    margin-bottom: 4px;
}

.quote-total {
    font-weight: 700;
    font-size: .95rem;
    border-top: 1px solid #bbf7d0;
    padding-top: 6px;
    margin-top: 6px;
}

/* ===========================
   LIST CARDS
=========================== */

.list-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all .15s;
}

.list-card:hover {
    border-color: var(--blue);
}

.list-card.active {
    border-color: var(--blue);
    background: #eff6ff;
}

.list-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.list-card-name {
    font-weight: 700;
    font-size: .9rem;
    color: #1e293b;
}

.list-card-count {
    font-size: .72rem;
    color: #94a3b8;
}

.list-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.list-card-total {
    font-size: .88rem;
    font-weight: 800;
    color: var(--green);
}

.list-card-actions {
    display: flex;
    gap: 4px;
}

.list-action-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .1s;
}

.list-action-btn:hover { background: #e2e8f0; color: #475569; }
.list-action-btn[data-action="delete"]:hover { background: #fee2e2; color: #dc2626; }

.home-back{position:fixed;top:12px;left:12px;z-index:1000;display:grid;place-items:center;width:40px;height:40px;border-radius:8px;background:#fff;color:#153e65;box-shadow:0 1px 5px #0003;text-decoration:none;font-size:24px;line-height:1}.home-back:focus-visible{outline:3px solid #2563eb;outline-offset:2px}
