body{background:#f6f8fb;color:#1f2937}.hero{background:linear-gradient(135deg,#0d6efd,#6610f2);color:#fff;border-radius:24px;padding:2.2rem}.card-product{border:0;border-radius:22px;overflow:hidden;box-shadow:0 12px 30px rgba(15,23,42,.08);height:100%}.card-product img{width:100%;height:220px;object-fit:cover;background:#eef2f7}.card-product .card-body{padding:1.1rem}.badge-soft{background:#eef4ff;color:#0d6efd}.price-box{display:flex;flex-wrap:wrap;gap:.4rem}.section-title{font-weight:800}.whatsapp-float{position:fixed;right:18px;bottom:18px;width:58px;height:58px;border-radius:50%;display:flex;align-items:center;justify-content:center;text-decoration:none;font-size:1.6rem;background:#25d366;color:#fff;box-shadow:0 10px 30px rgba(0,0,0,.18);z-index:1050}.footer{color:#475569}.cart-pill{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;padding:0 6px;border-radius:999px;background:#0d6efd;color:#fff;font-size:.75rem;font-weight:700}.admin-nav{background:linear-gradient(135deg,#0f172a,#1d4ed8)}.admin-body .card,.admin-body .table-wrap,.soft-card{border:0;border-radius:22px;box-shadow:0 12px 30px rgba(15,23,42,.08)}.soft-card{background:#fff}.metric-card{padding:1.1rem 1.2rem;border-radius:22px;background:#fff;box-shadow:0 12px 30px rgba(15,23,42,.08)}.metric-label{font-size:.85rem;color:#64748b;text-transform:uppercase;letter-spacing:.04em}.metric-value{font-size:1.8rem;font-weight:800;line-height:1.1}.metric-icon{width:46px;height:46px;border-radius:0px;display:flex;align-items:center;justify-content:center;font-size:1.2rem}.table thead th{font-size:.86rem;text-transform:uppercase;color:#64748b;border-bottom-width:1px}.table>:not(caption)>*>*{padding:.85rem .75rem}.order-status,.pay-badge{display:inline-flex;align-items:center;gap:.35rem;padding:.45rem .75rem;border-radius:999px;font-size:.78rem;font-weight:700}.status-nuevo{background:#e0f2fe;color:#0369a1}.status-revision{background:#ede9fe;color:#6d28d9}.status-confirmado{background:#dcfce7;color:#166534}.status-preparando{background:#fef3c7;color:#92400e}.status-enviado{background:#dbeafe;color:#1d4ed8}.status-entregado{background:#dcfce7;color:#15803d}.status-anulado{background:#fee2e2;color:#b91c1c}.status-default{background:#e5e7eb;color:#374151}.payment-pendiente{background:#fee2e2;color:#b91c1c}.payment-parcial{background:#fef3c7;color:#92400e}.payment-pagado{background:#dcfce7;color:#166534}.payment-default{background:#e5e7eb;color:#374151}.admin-form-card{background:#fff;border-radius:0px;padding:1.35rem;box-shadow:0 12px 30px rgba(15,23,42,.08)}.thumb-mini{width:56px;height:56px;border-radius:12px;object-fit:cover;background:#eef2f7}.empty-box{padding:2.5rem;border:2px dashed #cbd5e1;border-radius:0px;text-align:center;color:#64748b;background:#fff}.sticky-panel{position:sticky;top:92px}textarea.form-control{min-height:120px}

/* BOTONES ADMIN */
.btn-admin{
  background:#ffffff;
  color:#212529;
  border:1px solid #dee2e6;
  font-size:.85rem;
  border-radius:10px;
  padding:.35rem .6rem;
}

.btn-admin:hover{
  background:#f1f3f5;
  color:#000;
}

.btn-admin-outline{
  background:transparent;
  color:#fff;
  border:1px solid rgba(255,255,255,.5);
  font-size:.85rem;
  border-radius:10px;
  padding:.35rem .6rem;
}

.btn-admin-outline:hover{
  background:rgba(255,255,255,.1);
}

/* NAVBAR COLOR */
.admin-nav{
  background:linear-gradient(135deg,#0d6efd,#0a58ca);
}

/* MOBILE MEJORAS */
@media (max-width: 991px){

  .btn-admin,
  .btn-admin-outline{
    width:100%;
    text-align:left;
  }

  .btn-admin{
    background:#fff;
    color:#000;
  }

}
.app-install-banner{
  background:linear-gradient(135deg,#073bb0,#7ab428);
  border-radius:18px;
  padding:18px;
  margin:20px 0;
  color:#fff;
}

.app-install-content{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  flex-wrap:wrap;
}

.app-install-text h3{
  margin:0 0 6px;
  font-size:1.3rem;
}

.app-install-text p{
  margin:0 0 12px;
  font-size:.9rem;
  opacity:.95;
}

.btn-install-app{
  background:#fff;
  color:#111;
  border:none;
  padding:12px 18px;
  border-radius:30px;
  font-weight:700;
  cursor:pointer;
  box-shadow:0 4px 12px rgba(0,0,0,.15);
}

.btn-install-app:hover{
  transform:scale(1.05);
}

.app-install-image img{
  width:90px;
  height:auto;
}

@media(max-width:768px){
  .app-install-content{
    flex-direction:column;
    text-align:center;
  }

  .app-install-image img{
    width:70px;
  }
}
.install-btn{
  border:none;
  background:#073bb0;
  color:#fff;
  padding:6px 12px;
  border-radius:999px;
  font-size:.85rem;
  font-weight:600;
  line-height:1;
  display:inline-flex;
  align-items:center;
  gap:6px;
  box-shadow:0 2px 8px rgba(0,0,0,.12);
}

.install-btn:hover{
  opacity:.92;
}

 .productos-scroll{
    max-height: calc(100vh - 180px);
    overflow-y: auto;
    overflow-x: hidden;
}

/* Scroll bonito */
.productos-scroll::-webkit-scrollbar{
    width: 8px;
}

.productos-scroll::-webkit-scrollbar-track{
    background:#f1f1f1;
    border-radius:10px;
}

.productos-scroll::-webkit-scrollbar-thumb{
    background:#c1c1c1;
    border-radius:10px;
}

.productos-scroll::-webkit-scrollbar-thumb:hover{
    background:#999;
}
.productos-scroll table thead th{
    position: sticky;
    top: 0;
    z-index: 10;
    background: #fff;
    box-shadow: 0 1px 0 rgba(0,0,0,.08);
}
.table-scroll-products{
    max-height: 75vh;
    overflow-y: auto;
    overflow-x: auto;
}

.table-scroll-products thead th{
    position: sticky;
    top: 0;
    z-index: 10;
    background: #fff;
    box-shadow: 0 1px 0 rgba(0,0,0,.08);
}
@media (max-width: 768px){

    .dashboard-actions{
        display:flex;
        flex-direction:column;
        width:100%;
        gap:.5rem;
    }

    .dashboard-actions .btn{
        width:100%;
    }

}
.dropdown-menu{
    border:none;
    border-radius:12px;
    overflow:hidden;
}

.dropdown-item{
    padding:.65rem 1rem;
    font-weight:500;
}

.dropdown-item:hover{
    background:#f8f9fa;
    color:#0d6efd;
}

.dropdown-toggle::after{
    margin-left:.5rem;
}


/* =========================================
   MENÚ ADMINISTRACIÓN
========================================= */

.admin-nav {
    background: #0875ed;
    min-height: 64px;
}

.admin-nav .navbar-brand {
    font-size: 1.25rem;
    margin-right: 1.2rem;
}

/* Enlaces principales */
.admin-link {
    color: #fff !important;
    padding: .55rem .65rem !important;
    border-radius: 8px;
    font-size: .88rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all .2s ease;
}

.admin-link i {
    margin-right: 4px;
}

.admin-link:hover {
    background: rgba(255,255,255,.15);
    color: #fff !important;
}

/* Inventarios */
.inventario-link {
    background: #198754;
    font-weight: 600;
}

.inventario-link:hover {
    background: #157347;
}

/* Catálogo */
.catalogo-link {
    color: #fff !important;
    border: 1px solid rgba(255,255,255,.5);
    border-radius: 8px;
    padding: .5rem .65rem !important;
    font-size: .88rem;
    margin-left: 3px;
}

.catalogo-link:hover {
    background: rgba(255,255,255,.15);
}

/* Salir */
.salir-link {
    background: #dc3545;
    color: #fff !important;
    border-radius: 8px;
    padding: .5rem .7rem !important;
    font-size: .88rem;
    font-weight: 600;
    margin-left: 3px;
}

.salir-link:hover {
    background: #bb2d3b;
    color: #fff !important;
}


/* Dropdown */
.admin-nav .dropdown-menu {
    border: 0;
    border-radius: 10px;
    padding: .4rem;
}

.admin-nav .dropdown-item {
    border-radius: 7px;
    padding: .55rem .75rem;
    font-size: .9rem;
}

.admin-nav .dropdown-item:hover {
    background: #f1f5f9;
}


/* =========================================
   TABLET / MÓVIL
========================================= */

@media (max-width: 991.98px) {

    .admin-nav .navbar-collapse {
        padding: 1rem 0;
    }

    .admin-nav .navbar-nav {
        align-items: stretch !important;
    }

    .admin-link,
    .catalogo-link,
    .salir-link {
        width: 100%;
        padding: .7rem .8rem !important;
        margin: 2px 0;
    }

    .admin-nav .dropdown-menu {
        width: 100%;
        margin-top: 0;
    }

    .admin-nav .dropdown-item {
        padding: .65rem .8rem;
    }
}




/* =========================================================
   PRODUCTOS - FORMULARIO
   ========================================================= */

.producto-form {
    width: 100%;
}

/* En desktop aprovechamos mejor el ancho */
@media (min-width: 1200px) {
    .producto-form-container {
        width: 100%;
        max-width: none;
    }
}

/* =========================================================
   PRECIOS
   ========================================================= */

.precios-producto-wrapper {
    width: 100%;
}

.precios-producto-table {
    width: 100%;
    min-width: 760px;
    table-layout: fixed;
}

.precios-producto-table th,
.precios-producto-table td {
    vertical-align: middle;
}

.precios-col-tipo {
    width: 22%;
}

.precios-col-cantidad {
    width: 14%;
}

.precios-col-cliente {
    width: 21.33%;
}

.precio-tipo-nombre {
    font-weight: 700;
    font-size: 0.95rem;
}

.precio-tipo-desc {
    font-size: 0.78rem;
    color: #6c757d;
    margin-top: 2px;
}

.precio-cantidad {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    padding: 5px 9px;
    border-radius: 999px;
    background: #6c757d;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
}

.precio-input-group {
    display: flex;
    align-items: stretch;
    width: 100%;
}

.precio-moneda {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    padding: 0 8px;
    background: #f1f3f5;
    border: 1px solid #dee2e6;
    border-right: 0;
    border-radius: 0.375rem 0 0 0.375rem;
    font-weight: 600;
    color: #495057;
}

.precio-input-group input {
    min-width: 0;
    width: 100%;
    height: 42px;
    border-radius: 0 0.375rem 0.375rem 0;
}

/* =========================================================
   MÓVIL - PRECIOS COMO TARJETAS
   ========================================================= */

.precios-mobile {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.precio-mobile-card {
    border: 1px solid #dee2e6;
    border-radius: 12px;
    background: #fff;
    padding: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}

.precio-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #edf0f2;
}

.precio-mobile-title {
    font-weight: 700;
    font-size: 1rem;
}

.precio-mobile-desc {
    font-size: 0.78rem;
    color: #6c757d;
    margin-top: 2px;
}

.precio-mobile-fields {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.precio-mobile-field label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 4px;
}

.precio-mobile-field input {
    height: 44px;
    font-size: 1rem;
}

/* =========================================================
   LISTADO DE PRODUCTOS
   ========================================================= */

.productos-scroll {
    width: 100%;
}

.productos-listado-table {
    width: 100%;
}

/* Desktop grande */
@media (min-width: 1200px) {

    .productos-listado-table {
        min-width: 100%;
    }

    .productos-listado-table th:nth-child(1) {
        width: 28%;
    }

    .productos-listado-table th:nth-child(2) {
        width: 13%;
    }

    .productos-listado-table th:nth-child(3) {
        width: 10%;
    }

    .productos-listado-table th:nth-child(4) {
        width: 30%;
    }

    .productos-listado-table th:nth-child(5) {
        width: 10%;
    }

    .productos-listado-table th:nth-child(6) {
        width: 9%;
    }
}


/* =========================================================
   PRODUCTOS - ESTRUCTURA GENERAL
   ========================================================= */

.productos-page {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.productos-layout {
    width: 100%;
    margin: 0;
}

/* =========================================================
   COLUMNA DE EDICIÓN
   ========================================================= */

.productos-editor-col {
    min-width: 0;
}

.admin-form-card {
    width: 100%;
    max-width: 100%;
    background: #fff;
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, .06);
    box-sizing: border-box;
}

@media (min-width: 992px) {
    .productos-editor-col .admin-form-card {
        position: sticky;
        top: 85px;
    }
}

/* Evita que inputs o contenidos internos rompan la columna */

.producto-form,
.producto-form > div {
    min-width: 0;
    max-width: 100%;
}

.producto-form .row {
    --bs-gutter-x: .75rem;
    --bs-gutter-y: .75rem;
}

.producto-form input,
.producto-form select,
.producto-form textarea {
    max-width: 100%;
}

/* =========================================================
   COLUMNA LISTADO
   ========================================================= */

.productos-listado-col {
    min-width: 0;
    width: 100%;
    max-width: 100%;
}

.productos-listado-header {
    width: 100%;
    max-width: 100%;
}

.productos-listado-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

/* =========================================================
   TABLA DE PRECIOS
   ========================================================= */

.precios-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.precios-producto-table {
    min-width: 680px;
    margin-bottom: 0;
}

.precios-producto-table th,
.precios-producto-table td {
    vertical-align: middle;
}

.precios-col-tipo {
    min-width: 150px;
}

.precios-col-cantidad {
    width: 110px;
    min-width: 110px;
}

.precios-col-cliente {
    min-width: 145px;
}

.precio-input-group {
    display: flex;
    align-items: stretch;
    width: 100%;
    min-width: 0;
}

.precio-moneda {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    padding: 0 8px;
    background: #f1f3f5;
    border: 1px solid #dee2e6;
    border-right: 0;
    border-radius: 6px 0 0 6px;
    color: #667085;
}

.precio-input-group input {
    width: 100%;
    min-width: 0;
    height: 42px;
    border: 1px solid #ced4da;
    border-radius: 0 6px 6px 0;
    padding: 8px 10px;
}

.precio-tipo-nombre {
    font-weight: 600;
}

.precio-tipo-desc {
    font-size: .8rem;
    color: #6c757d;
    margin-top: 2px;
}

.precio-cantidad {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    height: 32px;
    padding: 0 10px;
    border-radius: 999px;
    background: #6c757d;
    color: #fff;
    font-size: .9rem;
}

/* =========================================================
   PRECIOS MOBILE
   ========================================================= */

.precios-mobile {
    width: 100%;
}

.precio-mobile-card {
    width: 100%;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 12px;
    box-sizing: border-box;
}

.precio-mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.precio-mobile-title {
    font-weight: 700;
    font-size: 1rem;
}

.precio-mobile-desc {
    color: #6c757d;
    font-size: .8rem;
    margin-top: 2px;
}

.precio-mobile-field {
    margin-top: 12px;
}

.precio-mobile-field label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    margin-bottom: 5px;
}

/* =========================================================
   GALERÍA
   ========================================================= */

.producto-gallery {
    width: 100%;
}

.producto-gallery .gallery-item {
    min-width: 0;
}

.producto-gallery img {
    display: block;
    width: 100%;
    height: 90px;
    object-fit: cover;
}

/* =========================================================
   TABLA DE PRODUCTOS
   ========================================================= */

.productos-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.productos-listado-table {
    min-width: 900px;
}

.productos-listado-table th {
    white-space: nowrap;
    font-size: .82rem;
    text-transform: uppercase;
    color: #667085;
}

.productos-listado-table td {
    vertical-align: middle;
}

.thumb-mini {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 8px;
    flex: 0 0 48px;
}

.productos-precios {
    min-width: 180px;
}

.productos-acciones {
    white-space: nowrap;
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 991.98px) {

    .productos-layout {
        --bs-gutter-x: .75rem;
        --bs-gutter-y: 1rem;
    }

    .admin-form-card {
        padding: 16px;
    }

    .productos-editor-col .admin-form-card {
        position: static;
    }

    .productos-listado-header .buscador-productos {
        width: 100%;
    }

    .buscador-productos {
        width: 100%;
    }

    .buscador-productos .form-control {
        min-width: 0;
    }

    .precios-producto-table {
        min-width: 0;
    }

    .productos-listado-table {
        min-width: 760px;
    }
}

@media (max-width: 575.98px) {

    .admin-form-card {
        padding: 14px;
        border-radius: 10px;
    }

    .productos-listado-card {
        padding: 12px !important;
    }

    .producto-form .row > [class*="col-"] {
        width: 100%;
    }

    .producto-form textarea {
        min-height: 180px;
    }

    .productos-listado-table {
        min-width: 700px;
    }

    .precio-mobile-card {
        padding: 12px;
    }

    .precio-mobile-header {
        gap: 8px;
    }
}
