﻿/* ========================================
   TENTALO WEBSHOP - SITE.CSS COMPLETO
   VERSIÓN RESTAURADA Y MEJORADA
   ======================================== */

/* ========================================
   VARIABLES CSS GLOBALES
   ======================================== */
:root {
    --weider-red: #111111;
    --weider-red-dark: #000000;
    --weider-red-light: rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
}

/* ========================================
   RESET Y BASE
   ======================================== */
html, body {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden !important;
}

img {
    max-width: 100%;
    height: auto;
}

h1 {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* ========================================
   CONTAINERS FULL WIDTH
   ======================================== */
.container-fluid {
    max-width: 100% !important;
    width: 100% !important;
    padding-right: 1rem;
    padding-left: 1rem;
    margin-right: auto;
    margin-left: auto;
}

@media (min-width: 768px) {
    .container-fluid {
        padding-right: 2rem;
        padding-left: 2rem;
    }
}

@media (min-width: 1200px) {
    .container-fluid {
        padding-right: 3rem;
        padding-left: 3rem;
    }
}

@media (min-width: 1400px) {
    .container-fluid {
        padding-right: 4rem;
        padding-left: 4rem;
    }
}

/* ========================================
   GRID SYSTEM
   ======================================== */
.row {
    --bs-gutter-x: 1.5rem;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

    .row > [class*="col-"] {
        padding-right: calc(var(--bs-gutter-x) * .5);
        padding-left: calc(var(--bs-gutter-x) * .5);
    }

/* ========================================
   NAVBAR Y TOPNAV
   ======================================== */
.navbar {
    background-color: white !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    position: sticky;
    top: 0;
    z-index: 1030;
    width: 100%;
}

.app-icon {
    height: 40px;
    width: auto;
    margin-right: 1rem;
}

/* Desktop Navbar */
@media (min-width: 992px) {
    .navbar .container-fluid {
        max-width: 100%;
        padding-left: 2rem;
        padding-right: 2rem;
        display: flex;
        align-items: center;
    }

    .navbar-brand {
        flex-shrink: 0;
        margin-right: 2rem;
    }

    .navbar-collapse {
        display: flex !important;
        flex: 1;
        align-items: center;
        justify-content: space-between;
    }

    .search-section {
        flex: 0 1 350px;
        min-width: 200px;
        margin-right: auto;
        margin-left: 1rem;
    }

    .navbar-nav {
        flex: 1;
        display: flex;
        justify-content: center;
        gap: 0.5rem;
        margin: 0 2rem !important;
    }

        .navbar-nav .nav-link {
            padding: 0.5rem 1.5rem;
            font-weight: 500;
            color: #495057;
            transition: all 0.3s ease;
            white-space: nowrap;
            position: relative;
            border-radius: 20px;
        }

            .navbar-nav .nav-link:hover {
                background-color: rgba(0, 0, 0, 0.1);
                color: #111111 !important;
            }

    .desktop-actions {
        flex-shrink: 0;
        display: flex;
        align-items: center;
        gap: 1rem;
        margin-left: auto;
    }

    .user-avatar i {
        font-size: 1.25rem;
    }
}

/* Mobile Navbar */
@media (max-width: 991.98px) {
    .navbar {
        padding: 0.5rem 0;
    }

    .app-icon {
        height: 32px;
    }

    .mobile-actions {
        display: flex !important;
        align-items: center;
        gap: 0.5rem;
    }

        .mobile-actions .btn-link {
            padding: 0.5rem !important;
            color: #495057 !important;
            text-decoration: none;
        }

            .mobile-actions .btn-link:hover {
                color: #111111 !important;
            }

    .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        border-top: 1px solid #dee2e6;
        padding: 1rem;
    }

    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        border-radius: 0.375rem;
    }

        .navbar-nav .nav-link:hover {
            background-color: #f8f9fa;
            color: #111111;
        }
}

/* Dropdown menu */
.dropdown-menu {
    min-width: 220px;
    border: none;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    border-radius: 8px;
    margin-top: 0.5rem;
    padding: 0.5rem;
}

.dropdown-header {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6c757d;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 0.5rem;
}

.dropdown-item {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

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

    .dropdown-item.text-danger:hover {
        background: #fff5f5;
        color: #dc3545 !important;
    }

/* ========================================
   SEARCH BAR
   ======================================== */
.search-container {
    position: relative;
    width: 100%;
}

.search-input-group {
    background: white;
    border-radius: 25px;
    border: 2px solid #e9ecef;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
}

    .search-input-group:focus-within {
        border-color: var(--weider-red);
        box-shadow: 0 0 0 0.25rem rgba(0, 0, 0, 0.15);
    }

.search-icon {
    background: transparent;
    border: none;
    color: #6c757d;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-input {
    border: none;
    background: transparent;
    padding: 0.75rem 0.5rem;
    font-size: 0.95rem;
    flex: 1;
}

    .search-input:focus {
        outline: none;
        box-shadow: none;
    }

    .search-input::placeholder {
        color: #adb5bd;
    }

.btn-search {
    background: var(--weider-red);
    border: none;
    color: white;
    padding: 0.75rem 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

    .btn-search:hover:not(:disabled) {
        background: var(--weider-red-dark);
    }

.btn-clear {
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #6c757d;
    padding: 0.25rem;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

    .btn-clear:hover {
        background: rgba(108, 117, 125, 0.1);
        color: var(--weider-red);
    }

/* Search Suggestions */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
}

.suggestion-item {
    width: 100%;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    text-align: left;
    color: #495057;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

    .suggestion-item:hover {
        background: var(--weider-red-light);
        color: var(--weider-red);
    }

/* ========================================
   BOTÓN DE CARRITO
   ======================================== */
.cart-button {
    border-radius: 20px !important;
    padding: 0.5rem 1rem !important;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid #111111;
    position: relative;
    overflow: visible;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .cart-button:hover {
        background-color: #111111;
        border-color: #111111;
        color: white !important;
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
    }

.cart-badge {
    font-size: 0.65rem !important;
    min-width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
    z-index: 10;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: absolute;
    top: -8px;
    right: -8px;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.cart-text {
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .cart-button {
        padding: 0.5rem 0.75rem !important;
        min-width: 48px;
        height: 42px;
        justify-content: center;
        border-radius: 50px !important;
    }

    .cart-text {
        display: none !important;
    }

    .cart-badge {
        top: -8px !important;
        right: -8px !important;
    }
}

/* ========================================
   PRODUCT CARD
   ======================================== */
.product-card {
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 12px;
    overflow: hidden;
    background: white;
    height: 100%;
    display: flex;
    flex-direction: column;
}

    .product-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    }

.product-media {
    position: relative;
    height: 200px;
    overflow: hidden;
    cursor: pointer;
    background: white;
}

.image-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .image-container img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        transition: transform 0.3s ease;
    }

.product-card:hover .image-container img {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.15);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .image-overlay {
    opacity: 1;
}

.product-badges {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.product-badge {
    background: rgba(0, 0, 0, 0.9) !important;
    color: white !important;
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-weight: 500;
}

.card-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.75rem;
    line-height: 1.3;
    height: 2.6rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    cursor: pointer;
    transition: color 0.3s ease;
}

    .product-title:hover {
        color: #111111;
    }

.product-price {
    margin-bottom: 1rem;
}

.price-single {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111111;
}

.price-range {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 700;
    color: #111111;
}

.product-actions {
    margin-top: auto;
}

/* Product Actions - Layout 50/50 */
.product-actions-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.counter-wrapper {
    flex: 1 1 50%;
    min-width: 0;
}

.btn-cart-full {
    flex: 1 1 50%;
    height: 44px;
    padding: 0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    border: none;
    transition: all 0.3s ease;
    cursor: pointer;
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
}

    .btn-cart-full:hover:not(:disabled) {
        background: #000000;
        transform: scale(1.02);
    }

    .btn-cart-full:disabled,
    .btn-cart-full.adding {
        background: #6c757d;
        cursor: not-allowed;
    }

/* ========================================
   QUANTITY STEPPER
   ======================================== */
.quantity-input {
    display: flex !important;
    flex-direction: row !important;
    width: 100%;
    max-width: none !important;
    margin: 0 !important;
}

    .quantity-input .btn {
        flex: 0 0 40px;
        width: 40px !important;
        height: 44px !important;
        min-width: 40px !important;
        padding: 0 !important;
        background: #111111 !important;
        color: white !important;
        border: 1px solid #dee2e6 !important;
        font-size: 1.1rem;
        font-weight: 600;
        transition: all 0.2s ease;
    }

        .quantity-input .btn:first-child {
            border-top-left-radius: 8px !important;
            border-bottom-left-radius: 8px !important;
        }

        .quantity-input .btn:last-child {
            border-top-right-radius: 8px !important;
            border-bottom-right-radius: 8px !important;
        }

    .quantity-input .form-control {
        flex: 1 1 auto;
        height: 44px !important;
        border: 1px solid #dee2e6 !important;
        border-left: none !important;
        border-right: none !important;
        border-radius: 0 !important;
        text-align: center;
        font-weight: 600;
        font-size: 1rem;
        padding: 0 !important;
    }

/* Responsive Product Cards */
@media (max-width: 768px) {
    .product-media {
        height: 220px;
    }

    .card-body {
        padding: 0.875rem;
    }

    .product-title {
        font-size: 0.95rem;
        height: 2.4rem;
    }

    .btn-cart-full {
        height: 42px;
        font-size: 1.1rem;
    }

    .quantity-input .btn {
        width: 38px !important;
        height: 42px !important;
    }

    .quantity-input .form-control {
        height: 42px !important;
    }
}

@media (max-width: 576px) {
    .product-media {
        height: 180px;
    }

    .btn-cart-full {
        height: 40px;
        font-size: 1rem;
    }

    .quantity-input .btn {
        width: 36px !important;
        height: 40px !important;
    }

    .quantity-input .form-control {
        height: 40px !important;
    }

    .container-fluid {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

/* Fixes para categorías en móvil */
@media (max-width: 767px) {
    .catalog-header,
    .products-section {
        background: white !important;
        padding: 0.5rem !important;
        margin: 0 !important;
    }

    .col-6,
    .col-sm-6 {
        padding: 0.25rem !important;
    }
}

/* ========================================
   PÁGINA DE PRODUCTO - MEJORAS RESPONSIVAS
   ======================================== */

/* Contenedor de acciones del producto */
.product-actions-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
    max-width: 280px;
}

/* Botón añadir al carrito */
.btn-add-cart {
    width: 100%;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

    .btn-add-cart:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
    }

    .btn-add-cart:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

/* QuantityStepper dentro del producto */
.product-actions-container .quantity-input {
    width: 100%;
    max-width: 280px;
}

/* Desktop (≥768px) */
@media (min-width: 768px) {
    .product-actions-container {
        max-width: 280px;
    }

        .product-actions-container .quantity-input {
            width: 100%;
        }

    .btn-add-cart {
        width: 100%;
    }
}

/* Tablet (entre 576px y 767px) */
@media (min-width: 576px) and (max-width: 767px) {
    .product-actions-container {
        max-width: 320px;
        margin: 0 auto;
    }
}

/* Móvil (< 576px) */
@media (max-width: 575px) {
    .product-actions-container {
        max-width: 100%;
        width: 100%;
        align-items: stretch;
        padding: 0 1rem;
    }

        .product-actions-container .quantity-input {
            width: 100%;
            max-width: 100%;
            justify-content: center;
        }

    .btn-add-cart {
        width: 100%;
        padding: 0.875rem 1.5rem;
        font-size: 1.05rem;
    }
}

/* ===== ESTILOS PARA EL QUANTITY STEPPER ESPECÍFICO DE PRODUCTO ===== */

/* Aseguramos que el stepper siempre tenga el mismo ancho que el botón */
.product-actions-container .quantity-input {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 0 !important;
    justify-content: center;
}

    .product-actions-container .quantity-input .btn {
        width: 44px !important;
        height: 44px !important;
        background-color: #000 !important;
        color: white !important;
        border: 2px solid #dee2e6 !important;
        border-radius: 8px !important;
        font-weight: bold !important;
        font-size: 18px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        transition: all 0.2s ease;
    }

        .product-actions-container .quantity-input .btn:hover {
            background-color: #333 !important;
            border-color: #adb5bd !important;
        }

    .product-actions-container .quantity-input .form-control {
        width: 80px !important;
        height: 44px !important;
        border: 2px solid #dee2e6 !important;
        border-left: none !important;
        border-right: none !important;
        border-radius: 0 !important;
        text-align: center !important;
        background-color: white !important;
        font-weight: 600 !important;
        font-size: 16px !important;
        margin: 0 !important;
        padding: 0 !important;
        flex-shrink: 0 !important;
    }

        .product-actions-container .quantity-input .form-control:focus {
            border-color: #dee2e6 !important;
            border-left: none !important;
            border-right: none !important;
            box-shadow: none !important;
        }

/* Ajustes para border-radius en los botones laterales */
.product-actions-container .input-group.quantity-input > .btn:first-child {
    border-top-left-radius: 8px !important;
    border-bottom-left-radius: 8px !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.product-actions-container .input-group.quantity-input > .btn:last-child {
    border-top-right-radius: 8px !important;
    border-bottom-right-radius: 8px !important;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

/* Prevenir wrap en el input-group */
.product-actions-container .input-group.quantity-input {
    flex-wrap: nowrap !important;
}

/* ===== INGREDIENTES COMPACTOS ===== */
.ingredients-compact {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #dc3545;
}

.ingredients-header {
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: #212529;
    font-size: 1.1rem;
}

.ingredients-text {
    color: #495057;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0;
}

/* Móvil - ajustes adicionales para página de producto */
@media (max-width: 575px) {
    .ingredients-compact {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
        border-radius: 0;
    }

    .col-12.col-md-7 h1 {
        font-size: 1.5rem;
        padding: 0 1rem;
    }

    .mb-2 {
        padding: 0 1rem;
    }
}

/* Ajustes para pantallas muy pequeñas */
@media (max-width: 375px) {
    .product-actions-container .quantity-input .btn {
        width: 40px !important;
        height: 40px !important;
        font-size: 16px !important;
    }

    .product-actions-container .quantity-input .form-control {
        width: 70px !important;
        height: 40px !important;
        font-size: 15px !important;
    }

    .btn-add-cart {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }
}

/* ========================================
   FILTROS DE SUBCATEGORÍAS HORIZONTALES
   ======================================== */
.category-page {
    padding: 0.5rem 0;
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.category-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
}

.subcategory-filters {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.filter-chips {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    min-width: min-content;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.625rem 1.25rem;
    border: 2px solid #e9ecef;
    background: white;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    user-select: none;
}

    .filter-chip:hover {
        background: #f8f9fa;
        border-color: #dc3545;
        color: #dc3545;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(220, 53, 69, 0.15);
    }

    .filter-chip.active {
        background: linear-gradient(135deg, #dc3545, #c82333);
        color: white;
        border-color: #dc3545;
        box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
    }

        .filter-chip.active:hover {
            background: linear-gradient(135deg, #c82333, #bd2130);
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(220, 53, 69, 0.4);
        }

    .filter-chip i {
        font-size: 1rem;
    }

.products-count {
    padding: 0.5rem 0;
    font-size: 0.925rem;
}

    .products-count i {
        color: #dc3545;
    }

/* Responsive Filtros */
@media (max-width: 768px) {
    .category-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .category-title {
        font-size: 1.5rem;
    }

    .subcategory-filters {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
        border-radius: 0;
        padding: 0.75rem 0.5rem;
    }

    .filter-chips {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        scrollbar-width: thin;
        scrollbar-color: #dc3545 #f8f9fa;
    }

        .filter-chips::-webkit-scrollbar {
            height: 4px;
        }

        .filter-chips::-webkit-scrollbar-track {
            background: #f8f9fa;
            border-radius: 10px;
        }

        .filter-chips::-webkit-scrollbar-thumb {
            background: #dc3545;
            border-radius: 10px;
        }

    .filter-chip {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    .products-count {
        font-size: 0.875rem;
    }
}

/* ========================================
   CATEGORY SIDEBAR
   ======================================== */
.category-sidebar {
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 12px;
    overflow: hidden;
}

    .category-sidebar .card-header {
        background: linear-gradient(135deg, #dc3545, rgba(220, 53, 69, 0.9)) !important;
        color: white !important;
        border: none;
        padding: 1rem 1.25rem;
        font-size: 1.1rem;
        letter-spacing: 0.5px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

.btn-catalog-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s;
    cursor: pointer;
}

    .btn-catalog-toggle:hover {
        background: rgba(255, 255, 255, 0.3);
    }

.catalog-toggle-icon {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 20px;
}

    .catalog-toggle-icon span {
        height: 2px;
        background: white;
        border-radius: 2px;
        transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    }

    .catalog-toggle-icon.open span:nth-child(1) {
        transform: rotate(45deg) translate(4px, 4px);
    }

    .catalog-toggle-icon.open span:nth-child(2) {
        opacity: 0;
    }

    .catalog-toggle-icon.open span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

.family-group {
    border-bottom: 1px solid #f0f0f0;
}

    .family-group:last-child {
        border-bottom: none;
    }

.family-header {
    display: flex;
    align-items: stretch;
    width: 100%;
    background: white;
    transition: background 0.2s;
}

    .family-header:hover {
        background: #f8f9fa;
    }

.fam-link {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0.875rem 1.25rem;
    color: #2c3e50;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    border: none;
    background: transparent;
}

    .fam-link:hover {
        color: #dc3545;
        background: rgba(220, 53, 69, 0.05);
    }

    .fam-link.active-family {
        color: #dc3545;
        background: rgba(220, 53, 69, 0.1);
        border-left: 4px solid #dc3545;
    }

.expand-btn {
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.2s;
    border-left: 1px solid #f0f0f0;
}

    .expand-btn:hover {
        background: rgba(220, 53, 69, 0.1);
        color: #dc3545;
    }

    .expand-btn i {
        transition: transform 0.2s ease;
    }

.subfamily-list {
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

    .subfamily-list.show {
        max-height: 1000px;
        padding: 0.5rem 0;
    }

    .subfamily-list.collapse:not(.show) {
        display: block;
        max-height: 0;
        padding: 0;
    }

.subfamily-link {
    display: flex;
    align-items: center;
    padding: 0.625rem 1rem 0.625rem 2.5rem;
    color: #495057;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

    .subfamily-link:hover {
        background: white;
        color: #dc3545;
        transform: translateX(4px);
    }

    .subfamily-link.active {
        background: white;
        color: #dc3545;
        font-weight: 600;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }

/* Estilos para "Todos los Productos" */
.list-group-item-action {
    padding: 0.875rem 1.25rem;
    font-weight: 600;
    color: #2c3e50;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
    display: flex;
    align-items: center;
}

    .list-group-item-action:hover {
        background: #f8f9fa;
        color: #dc3545;
    }

    .list-group-item-action.active {
        background: rgba(220, 53, 69, 0.1) !important;
        color: #dc3545 !important;
        border-left: 4px solid #dc3545;
        font-weight: 700;
    }

    .list-group-item-action i {
        color: #dc3545;
        font-size: 1.1rem;
    }

/* Mobile Sidebar Collapse */
@media (max-width: 991.98px) {
    .sidebar-accordion {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
    }

        .sidebar-accordion.show-mobile {
            max-height: 80vh;
            overflow-y: auto;
        }

        .sidebar-accordion.hide-mobile {
            max-height: 0;
        }

    .category-sidebar {
        border-radius: 8px;
        margin-bottom: 1rem;
    }

    .fam-link {
        padding: 0.75rem 1rem;
        font-size: 0.925rem;
    }

    .expand-btn {
        width: 36px;
    }

    .subfamily-link {
        padding: 0.5rem 0.875rem 0.5rem 2.25rem;
        font-size: 0.875rem;
    }
}

@media (min-width: 992px) {
    .sidebar-accordion {
        display: block !important;
        max-height: none !important;
        overflow-y: auto !important;
    }

    .btn-catalog-toggle {
        display: none !important;
    }
}

/* ========================================
   CARRITO DE COMPRA
   ======================================== */
.cart-item {
    display: flex;
    padding: 1rem 0;
    border-bottom: 1px solid #dee2e6;
}

    .cart-item:last-child {
        border-bottom: none;
    }

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 0.375rem;
    flex-shrink: 0;
    margin-right: 1rem;
}

.cart-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cart-item-name {
    color: #212529;
    font-weight: 600;
    text-decoration: none;
    display: block;
    margin-bottom: 0.25rem;
    font-size: 1rem;
    line-height: 1.3;
}

    .cart-item-name:hover {
        color: #dc3545;
        text-decoration: none;
    }

.cart-item-details {
    color: #6c757d;
    font-size: 0.875rem;
}

.cart-item-price-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.cart-item-price {
    font-weight: bold;
    font-size: 1.125rem;
    color: #212529;
}

.cart-summary {
    background: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    position: sticky;
    top: 100px;
}

/* Desktop Cart Layout */
@media (min-width: 992px) {
    .cart-item {
        padding: 1.25rem 0;
    }

    .cart-item-content {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        gap: 0.5rem;
    }

    .cart-item-info {
        grid-column: 1;
        grid-row: 1;
    }

    .cart-item-price-section {
        grid-column: 2;
        grid-row: 1 / 3;
        flex-direction: column;
        align-items: flex-end;
        min-width: 150px;
    }

    .cart-item-actions {
        grid-column: 1;
        grid-row: 2;
    }
}

/* Mobile Cart Layout */
@media (max-width: 991.98px) {
    .cart-item-image {
        width: 75px;
        height: 75px;
    }

    .cart-item-name {
        font-size: 0.9rem;
    }

    .cart-item-price {
        font-size: 1.1rem;
    }
}

/* Overlays de Procesamiento */
.processing-overlay,
.result-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
}

.processing-modal,
.result-modal {
    background: white;
    border-radius: 0.5rem;
    padding: 2rem;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.result-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.success-icon {
    color: #28a745;
}

.error-icon {
    color: #dc3545;
}

/* ========================================
   PERFIL - CLIENT INFO MEJORADO
   ======================================== */
.profile-container {
    padding: 1.5rem 0;
}

.profile-card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    background: white;
}

    .profile-card:hover {
        box-shadow: 0 8px 30px rgba(0,0,0,0.12);
        transform: translateY(-2px);
    }

/* Header de las cards */
.client-header,
.financial-header {
    padding: 1.5rem 2rem;
    border-bottom: none;
    position: relative;
    overflow: hidden;
}

.client-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.financial-header {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

    .client-header .card-title,
    .financial-header .card-title {
        color: white;
        font-size: 1.1rem;
        font-weight: 600;
        letter-spacing: 0.5px;
        margin: 0;
        display: flex;
        align-items: center;
    }

        .client-header .card-title i,
        .financial-header .card-title i {
            font-size: 1.3rem;
            margin-right: 0.75rem;
        }

/* Items de información del cliente */
.client-item {
    padding: 1.75rem 2rem;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
    position: relative;
}

    .client-item:last-child {
        border-bottom: none;
    }

    .client-item:hover {
        background: linear-gradient(90deg, rgba(102, 126, 234, 0.03) 0%, transparent 100%);
    }

.client-item-full {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.client-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: #4a5568;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.client-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.icon-person {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.icon-document {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

.icon-location {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
}

.icon-phone {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
}

.icon-email {
    background: linear-gradient(135deg, #fa709a, #fee140);
}

.client-value {
    font-size: 1.05rem;
    color: #2d3748;
    font-weight: 500;
    line-height: 1.6;
    padding-left: 4rem;
}

.client-address {
    line-height: 1.8;
}

/* Resumen Financiero Mejorado */
.financial-summary-card {
    border: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

    .financial-summary-card:hover {
        box-shadow: 0 8px 30px rgba(0,0,0,0.12);
        transform: translateY(-2px);
    }

.financial-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.75rem 2rem;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
    position: relative;
}

    .financial-item:last-child,
    .financial-item.no-border {
        border-bottom: none;
    }

    .financial-item:hover {
        background: linear-gradient(90deg, rgba(240, 147, 251, 0.03) 0%, transparent 100%);
    }

.financial-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 600;
    color: #4a5568;
    font-size: 0.9rem;
}

.financial-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.icon-balance {
    background: linear-gradient(135deg, #48bb78, #38a169);
}

.icon-overdue {
    background: linear-gradient(135deg, #f56565, #e53e3e);
}

.icon-credit {
    background: linear-gradient(135deg, #4299e1, #3182ce);
}

.icon-discount {
    background: linear-gradient(135deg, #ed8936, #dd6b20);
}

.icon-tag {
    background: linear-gradient(135deg, #9f7aea, #805ad5);
}

.financial-value {
    font-weight: 700;
    font-size: 1.25rem;
    text-align: right;
    letter-spacing: -0.5px;
}

    .financial-value.positive {
        color: #48bb78;
    }

    .financial-value.negative {
        color: #f56565;
    }

    .financial-value.neutral {
        color: #4299e1;
    }

    .financial-value.highlight {
        color: #ed8936;
    }

/* Gráfico de Ventas */
.chart-container {
    padding: 1rem;
    min-height: 400px;
}

/* Grid de altura igual */
.equal-height {
    display: flex;
    align-items: stretch;
}

    .equal-height > [class*="col"] {
        display: flex;
        flex-direction: column;
    }

.equal-height-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

    .equal-height-card .card-body {
        flex: 1;
    }

/* Responsive Desktop Grande */
@media (min-width: 1400px) {
    .client-item,
    .financial-item {
        padding: 2rem 2.5rem;
    }

    .client-icon,
    .financial-icon {
        width: 52px;
        height: 52px;
        font-size: 1.35rem;
    }

    .client-value {
        font-size: 1.1rem;
    }

    .financial-value {
        font-size: 1.35rem;
    }
}

/* Responsive Tablet */
@media (max-width: 1199.98px) {
    .client-item,
    .financial-item {
        padding: 1.5rem 1.75rem;
    }

    .client-icon,
    .financial-icon {
        width: 44px;
        height: 44px;
        font-size: 1.15rem;
    }
}

/* Responsive Mobile */
@media (max-width: 767.98px) {
    .profile-container {
        padding: 1rem 0;
    }

    .profile-card {
        border-radius: 12px;
        margin-bottom: 1rem;
    }

    .client-header,
    .financial-header {
        padding: 1.25rem 1.5rem;
    }

        .client-header .card-title,
        .financial-header .card-title {
            font-size: 1rem;
        }

    .client-item,
    .financial-item {
        padding: 1.25rem 1.5rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .client-label,
    .financial-label {
        font-size: 0.8rem;
        gap: 0.75rem;
    }

    .client-icon,
    .financial-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .client-value {
        font-size: 0.95rem;
        padding-left: 0;
        width: 100%;
    }

    .financial-value {
        font-size: 1.15rem;
        text-align: left;
        width: 100%;
    }

    .financial-item {
        padding: 1.25rem 1.5rem;
    }

    .chart-container {
        padding: 0.5rem;
        min-height: 300px;
    }
}

/* Responsive Mobile Pequeño */
@media (max-width: 575.98px) {
    .client-header,
    .financial-header {
        padding: 1rem 1.25rem;
    }

    .client-item,
    .financial-item {
        padding: 1rem 1.25rem;
    }

    .client-icon,
    .financial-icon {
        width: 36px;
        height: 36px;
        font-size: 0.95rem;
    }

    .client-value {
        font-size: 0.9rem;
    }

    .financial-value {
        font-size: 1.05rem;
    }
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profile-card {
    animation: fadeInUp 0.5s ease-out;
}

    /* Estados de carga */
    .profile-card.loading {
        opacity: 0.6;
        pointer-events: none;
    }

/* Hover effects para items */
.client-item:hover .client-icon,
.financial-item:hover .financial-icon {
    transform: scale(1.05) rotate(5deg);
}

/* Separadores visuales */
.client-item::before,
.financial-item::before {
    content: '';
    position: absolute;
    left: 2rem;
    top: 0;
    width: 4px;
    height: 0;
    background: linear-gradient(135deg, #667eea, #764ba2);
    transition: height 0.3s ease;
}

.client-item:hover::before,
.financial-item:hover::before {
    height: 100%;
}

/* Estilos para la información del cliente mejorada */
.client-info-card {
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

    .client-info-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    }

/* ========================================
   PEDIDOS Y FACTURAS - CSS CORREGIDO
   ======================================== */

/* Cards Base */
.order-card,
.invoice-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 1rem;
}

    .order-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
        border-color: #007bff;
    }

    .invoice-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 25px rgba(40, 167, 69, 0.15);
        border-color: #28a745;
    }

/* Header */
.order-header,
.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.order-info,
.invoice-info {
    flex: 1;
    min-width: 0;
}

.order-number,
.invoice-number {
    font-size: 1.125rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.25rem;
    word-break: break-word;
}

    .order-number i,
    .invoice-number i {
        margin-right: 0.5rem;
        font-size: 1rem;
    }

.order-date,
.invoice-date {
    font-size: 0.875rem;
    color: #6c757d;
}

/* Status Badge */
.order-status,
.invoice-status {
    flex-shrink: 0;
}

.status-badge {
    padding: 0.5rem 0.875rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.75rem;
    white-space: nowrap;
    display: inline-block;
}

    .status-badge.status-large {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-released {
    background: #d1ecf1;
    color: #0c5460;
}

.status-completed,
.status-paid {
    background: #d4edda;
    color: #155724;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.status-overdue {
    background: #f8d7da;
    color: #721c24;
}

/* Details Section */
.order-details,
.invoice-details {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1rem;
}

.order-summary,
.invoice-summary {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.summary-item {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: #495057;
}

    .summary-item i {
        margin-right: 0.5rem;
        color: #6c757d;
        width: 16px;
        text-align: center;
    }

/* Amount Section */
.order-amount,
.invoice-amount {
    text-align: right;
    flex-shrink: 0;
}

.amount-label {
    font-size: 0.75rem;
    color: #6c757d;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.amount-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #dc3545;
    white-space: nowrap;
}

/* Footer Actions */
.order-footer,
.invoice-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

    .order-footer .btn,
    .invoice-footer .btn {
        border-radius: 8px;
        font-weight: 500;
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
        white-space: nowrap;
    }

        .order-footer .btn i,
        .invoice-footer .btn i {
            font-size: 0.875rem;
        }

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-icon {
    font-size: 4rem;
    color: #dee2e6;
    margin-bottom: 1rem;
}

    .empty-icon i {
        display: block;
    }

.empty-state h3 {
    color: #495057;
    margin-bottom: 0.5rem;
}

.empty-state .text-muted {
    margin-bottom: 1.5rem;
}

/* Responsive Tablet */
@media (max-width: 991.98px) {
    .order-card,
    .invoice-card {
        padding: 1rem;
    }

    .order-number,
    .invoice-number {
        font-size: 1rem;
    }

    .amount-value {
        font-size: 1.25rem;
    }

    .status-badge {
        font-size: 0.7rem;
        padding: 0.375rem 0.75rem;
    }
}

/* Responsive Mobile */
@media (max-width: 767.98px) {
    .order-card,
    .invoice-card {
        padding: 1rem;
        border-radius: 8px;
    }

    .order-header,
    .invoice-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .order-status,
    .invoice-status {
        align-self: flex-start;
    }

    .status-badge {
        font-size: 0.7rem;
        padding: 0.375rem 0.75rem;
    }

    .order-number,
    .invoice-number {
        font-size: 0.95rem;
    }

        .order-number i,
        .invoice-number i {
            font-size: 0.9rem;
        }

    .order-date,
    .invoice-date {
        font-size: 0.8rem;
    }

    /* Details en columna */
    .order-details,
    .invoice-details {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .order-summary,
    .invoice-summary {
        order: 2;
    }

    .order-amount,
    .invoice-amount {
        order: 1;
        text-align: left;
        padding: 0.75rem;
        background: #f8f9fa;
        border-radius: 8px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .amount-label {
        font-size: 0.75rem;
        margin-bottom: 0;
    }

    .amount-value {
        font-size: 1.375rem;
    }

    .summary-item {
        font-size: 0.8rem;
    }

        .summary-item i {
            font-size: 0.875rem;
        }

    /* Footer actions en columna */
    .order-footer,
    .invoice-footer {
        flex-direction: column;
        gap: 0.5rem;
    }

        .order-footer .btn,
        .invoice-footer .btn {
            width: 100%;
            justify-content: center;
        }

    /* Ajustes de container */
    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .row {
        margin-left: -0.375rem;
        margin-right: -0.375rem;
    }

        .row > [class*="col-"] {
            padding-left: 0.375rem;
            padding-right: 0.375rem;
        }
}

/* Responsive Mobile Pequeño */
@media (max-width: 575.98px) {
    .order-card,
    .invoice-card {
        padding: 0.875rem;
    }

    .order-number,
    .invoice-number {
        font-size: 0.9rem;
    }

    .amount-value {
        font-size: 1.25rem;
    }

    .summary-item {
        font-size: 0.75rem;
    }

    .order-footer .btn,
    .invoice-footer .btn {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
    }

    .empty-icon {
        font-size: 3rem;
    }

    .empty-state h3 {
        font-size: 1.25rem;
    }
}

/* Detalle de Pedido/Factura */
.order-detail-card,
.invoice-detail-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
}

.order-detail-header,
.invoice-detail-header {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 1.25rem;
    border-radius: 12px 12px 0 0;
}

.invoice-detail-header {
    background: linear-gradient(135deg, #28a745, #1e7e34);
}

    .order-detail-header h5,
    .invoice-detail-header h5 {
        margin: 0;
        font-size: 1.1rem;
        font-weight: 600;
    }

        .order-detail-header h5 i,
        .invoice-detail-header h5 i {
            margin-right: 0.5rem;
        }

/* Info Items */
.info-item {
    margin-bottom: 1.25rem;
}

    .info-item:last-child {
        margin-bottom: 0;
    }

.info-label {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

    .info-label i {
        margin-right: 0.5rem;
        width: 16px;
        text-align: center;
    }

.info-value {
    color: #2d3748;
    font-size: 1rem;
}

/* Tablas de líneas */
.order-lines-table,
.invoice-lines-table {
    width: 100%;
    margin: 0;
}

    .order-lines-table thead,
    .invoice-lines-table thead {
        background: #f8f9fa;
    }

    .order-lines-table th,
    .invoice-lines-table th {
        padding: 1rem;
        font-size: 0.875rem;
        font-weight: 600;
        color: #495057;
        border-bottom: 2px solid #dee2e6;
    }

    .order-lines-table td,
    .invoice-lines-table td {
        padding: 1rem;
        vertical-align: middle;
        border-bottom: 1px solid #f0f0f0;
    }

    .order-lines-table tbody tr:hover,
    .invoice-lines-table tbody tr:hover {
        background: #f8f9fa;
    }

.line-description {
    font-weight: 500;
}

.quantity-badge {
    background: #e9ecef;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-weight: 600;
    display: inline-block;
}

.vat-badge {
    background: #d1ecf1;
    color: #0c5460;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Vista móvil de líneas */
.mobile-order-lines,
.mobile-invoice-lines {
    padding: 0.5rem;
}

.mobile-line-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

    .mobile-line-item:last-child {
        margin-bottom: 0;
    }

.mobile-line-header {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f0f0f0;
}

.mobile-line-description {
    font-weight: 600;
    color: #2d3748;
    font-size: 0.95rem;
}

    .mobile-line-description small {
        display: block;
        margin-top: 0.25rem;
    }

.mobile-line-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-line-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.mobile-label {
    color: #6c757d;
    font-weight: 500;
}

.mobile-value {
    color: #2d3748;
    font-weight: 600;
}

.mobile-line-total {
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e9ecef;
    font-size: 1rem;
}

    .mobile-line-total .mobile-value {
        color: #dc3545;
        font-size: 1.125rem;
    }

/* Resumen financiero */
.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    font-size: 0.95rem;
}

    .summary-row.discount {
        color: #28a745;
    }

    .summary-row.total {
        font-size: 1.25rem;
        font-weight: 700;
        padding-top: 1rem;
        border-top: 2px solid #dee2e6;
        margin-top: 0.5rem;
    }

/* Acciones del detalle */
.order-actions,
.invoice-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Responsive para tablas */
@media (max-width: 767.98px) {
    .order-detail-card,
    .invoice-detail-card {
        border-radius: 8px;
        margin-bottom: 1rem;
    }

    .order-detail-header,
    .invoice-detail-header {
        padding: 1rem;
    }

        .order-detail-header h5,
        .invoice-detail-header h5 {
            font-size: 1rem;
        }

    .info-label {
        font-size: 0.8rem;
    }

    .info-value {
        font-size: 0.9rem;
    }

    /* Ocultar tabla en móvil */
    .table-responsive.d-none.d-md-block {
        display: none !important;
    }

    .d-md-none {
        display: block !important;
    }

    .summary-row {
        font-size: 0.875rem;
    }

        .summary-row.total {
            font-size: 1.125rem;
        }
}

/* Fix para breadcrumbs */
.breadcrumb {
    background: transparent;
    padding: 0.5rem 0;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

    .breadcrumb a {
        color: #007bff;
        text-decoration: none;
    }

        .breadcrumb a:hover {
            text-decoration: underline;
        }

@media (max-width: 575.98px) {
    .breadcrumb {
        font-size: 0.8rem;
    }
}

/* ========================================
   LOGIN Y REGISTER
   ======================================== */
.login-card {
    max-width: 480px;
    border: none;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.login-title {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
    margin-bottom: 2rem;
    color: #2c3e50;
    font-weight: 700;
    text-align: center;
}

.login-card .form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

    .login-card .form-control:focus {
        border-color: #111111;
        box-shadow: 0 0 0 0.25rem rgba(0, 0, 0, 0.15);
    }

.login-btn {
    background: linear-gradient(135deg, #111111, #000000);
    border: none;
    border-radius: 10px;
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

    .login-btn:hover:not(:disabled) {
        background: linear-gradient(135deg, #000000, #1a1a1a);
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    }

/* ========================================
   BREADCRUMBS
   ======================================== */
.breadcrumb {
    background: #f8f9fa;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-sm);
    margin-bottom: 1.5rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #6c757d;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background-color: white;
    border-top: 1px solid #dee2e6;
    margin-top: auto;
    width: 100%;
    padding: 1rem 0;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0 1rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.footer-logo {
    height: 24px;
    width: auto;
    object-fit: contain;
    display: block;
}

.footer-copyright {
    color: #6c757d;
    font-size: 0.875rem;
    white-space: nowrap;
    margin: 0;
    line-height: 1;
}

.footer-nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.footer-link {
    color: #6c757d;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
    white-space: nowrap;
}

    .footer-link:hover {
        color: #495057;
    }

@media (min-width: 992px) {
    .footer-container {
        flex-wrap: nowrap;
        padding: 0 1.5rem;
    }

    .footer-logo {
        height: 28px;
    }
}

@media (max-width: 767px) {
    .footer-container {
        flex-direction: row;
        justify-content: space-between;
        padding: 0 0.75rem;
    }

    .footer-logo {
        height: 22px;
    }

    .footer-copyright {
        font-size: 0.75rem;
    }

    .footer-link {
        font-size: 0.75rem;
    }
}

/* ========================================
   HERO CAROUSEL - ESTILOS COMPLETOS
   ======================================== */

.hero-carousel {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    background-color: #000;
}

/* Contenedor de slides */
.carousel-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Cada slide individual */
.carousel-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    pointer-events: none;
}

    .carousel-slide.active {
        opacity: 1;
        pointer-events: auto;
    }

    .carousel-slide img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        pointer-events: none !important;
    }

.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient( to bottom, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.6) 100% );
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none !important;
}

.carousel-content {
    text-align: center;
    color: white;
    padding: 2rem;
    max-width: 800px;
    z-index: 2;
    pointer-events: auto !important;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
    font-weight: 400;
}

.btn-hero {
    background-color: #dc3545;
    color: white;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
    pointer-events: auto !important;
    cursor: pointer;
    position: relative;
    z-index: 10;
}

    .btn-hero:hover {
        background-color: #c82333;
        transform: translateY(-3px);
        box-shadow: 0 6px 20px rgba(220, 53, 69, 0.6);
        color: white;
        text-decoration: none;
    }

    .btn-hero:active {
        transform: translateY(-1px);
    }

.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 20;
    pointer-events: auto !important;
}

    .carousel-indicators .indicator {
        width: 12px;
        height: 12px;
        border-radius: 50%;
        background-color: rgba(255, 255, 255, 0.5);
        border: 2px solid rgba(255, 255, 255, 0.8);
        cursor: pointer;
        transition: all 0.3s ease;
        padding: 0;
        pointer-events: auto !important;
    }

        .carousel-indicators .indicator:hover {
            background-color: rgba(255, 255, 255, 0.8);
            transform: scale(1.2);
        }

        .carousel-indicators .indicator.active {
            background-color: #dc3545;
            border-color: white;
            width: 14px;
            height: 14px;
        }

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 20;
    font-size: 1.5rem;
    pointer-events: auto !important;
}

    .carousel-control:hover {
        background-color: rgba(220, 53, 69, 0.9);
        border-color: white;
        transform: translateY(-50%) scale(1.1);
    }

    .carousel-control:active {
        transform: translateY(-50%) scale(0.95);
    }

    .carousel-control.prev {
        left: 20px;
    }

    .carousel-control.next {
        right: 20px;
    }

    .carousel-control i {
        pointer-events: none;
    }

@media (max-width: 768px) {
    .hero-carousel {
        height: 400px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .btn-hero {
        padding: 0.75rem 2rem;
        font-size: 1rem;
    }

    .carousel-control {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

        .carousel-control.prev {
            left: 10px;
        }

        .carousel-control.next {
            right: 10px;
        }

    .carousel-indicators {
        bottom: 15px;
    }

        .carousel-indicators .indicator {
            width: 10px;
            height: 10px;
        }

            .carousel-indicators .indicator.active {
                width: 12px;
                height: 12px;
            }
}

@media (max-width: 480px) {
    .hero-carousel {
        height: 350px;
    }

    .carousel-content {
        padding: 1rem;
    }

    .hero-title {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    .btn-hero {
        padding: 0.625rem 1.5rem;
        font-size: 0.9rem;
    }

    .carousel-control {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   SCROLLBAR PERSONALIZADA
   ======================================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: #555;
    }

/* ========================================
   UTILIDADES
   ======================================== */
.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* ========================================
   RESPONSIVE - MÓVIL FIXES
   ======================================== */
@media (max-width: 767px) {
    * {
        max-width: 100% !important;
    }
}

/* ========================================
   ACCESIBILIDAD
   ======================================== */
.product-media:focus,
.product-title:focus {
    outline: 2px solid #111111;
    outline-offset: 2px;
}

.carousel-control:focus,
.carousel-indicators .indicator:focus {
    outline: 2px solid white;
    outline-offset: 4px;
}

.btn-hero:focus {
    outline: 3px solid rgba(255, 255, 255, 0.8);
    outline-offset: 3px;
}

@media (hover: none) {
    .product-card:active {
        transform: scale(0.98);
    }
}

@media (hover: none) and (pointer: coarse) {
    .carousel-control {
        width: 45px;
        height: 45px;
    }

    .carousel-indicators .indicator {
        width: 14px;
        height: 14px;
    }

    .btn-hero {
        padding: 1rem 2rem;
        min-height: 48px;
        min-width: 120px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.carousel-control,
.carousel-indicators .indicator {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}
/* ========================================
   PEDIDO DETALLE - LAYOUT RESPONSIVE CON COLUMN-REVERSE
   ======================================== */

/* Container principal del pedido */
.pedido-container {
    padding: 0 0.75rem;
    max-width: 100%;
}

/* Header Section */
.order-header-section {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.order-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 0.75rem;
}

.order-number {
    font-size: 1.5rem;
    margin: 0;
    font-weight: 700;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .order-number i {
        font-size: 1.25rem;
    }

/* Info Grid en el header */
.order-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.info-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

    .info-box.highlight {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        border: none;
    }

    .info-box i {
        font-size: 1.5rem;
        color: #6c757d;
        flex-shrink: 0;
    }

    .info-box.highlight i {
        color: white;
    }

    .info-box div {
        display: flex;
        flex-direction: column;
        gap: 0.125rem;
        min-width: 0;
    }

    .info-box small {
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        opacity: 0.8;
        font-weight: 600;
    }

    .info-box strong {
        font-size: 0.95rem;
        font-weight: 700;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

/* Desktop: cambiar de column-reverse a row normal */
@media (min-width: 992px) {
    .pedido-content-row {
        flex-direction: row !important;
    }

    .pedido-info-col {
        flex: 0 0 66.666667%;
        max-width: 66.666667%;
        padding: 0 0.75rem !important;
    }

    .pedido-summary-col {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
        padding: 0 0.75rem !important;
    }

    .order-info-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Móvil: column-reverse (ya aplicado con inline style) */
@media (max-width: 991.98px) {
    .pedido-info-col,
    .pedido-summary-col {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
    }

    .order-detail-card {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

/* Móvil pequeño */
@media (max-width: 767.98px) {
    .pedido-container {
        padding: 0 0.5rem;
    }

    .order-header-section {
        padding: 0.875rem;
        margin-bottom: 1rem;
        border-radius: 10px;
    }

    .order-title-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .order-number {
        font-size: 1.125rem;
    }

        .order-number i {
            font-size: 1rem;
        }

    .status-badge {
        padding: 0.375rem 0.875rem !important;
        font-size: 0.8rem !important;
    }

    .order-info-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .info-box {
        padding: 0.625rem;
        gap: 0.5rem;
    }

        .info-box i {
            font-size: 1.25rem;
        }

        .info-box small {
            font-size: 0.65rem;
        }

        .info-box strong {
            font-size: 0.85rem;
        }

    .order-detail-card {
        margin-bottom: 1rem;
        border-radius: 10px;
    }

    .breadcrumb {
        font-size: 0.75rem;
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 374.98px) {
    .order-number {
        font-size: 1rem;
    }

    .info-box small {
        font-size: 0.6rem;
    }

    .info-box strong {
        font-size: 0.8rem;
    }

    .info-box i {
        font-size: 1.1rem;
    }
}
/* ========================================
   PEDIDO DETALLE - LAYOUT RESPONSIVE
   ======================================== */

/* Container principal del pedido */
.pedido-container {
    padding: 0 0.75rem;
    max-width: 100%;
}

/* Header Section */
.order-header-section {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.order-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 0.75rem;
}

.order-number {
    font-size: 1.5rem;
    margin: 0;
    font-weight: 700;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .order-number i {
        font-size: 1.25rem;
    }

/* Info Grid en el header */
.order-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.info-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

    .info-box.highlight {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        border: none;
    }

    .info-box i {
        font-size: 1.5rem;
        color: #6c757d;
        flex-shrink: 0;
    }

    .info-box.highlight i {
        color: white;
    }

    .info-box div {
        display: flex;
        flex-direction: column;
        gap: 0.125rem;
        min-width: 0;
    }

    .info-box small {
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        opacity: 0.8;
        font-weight: 600;
    }

    .info-box strong {
        font-size: 0.95rem;
        font-weight: 700;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

/* Desktop: layout en 2 columnas normal */
@media (min-width: 992px) {
    .pedido-content-row {
        display: flex !important;
        flex-wrap: wrap;
    }

    .pedido-summary-col {
        order: 2 !important;
    }

    .pedido-info-col {
        order: 1 !important;
    }

    .order-info-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Móvil: Resumen arriba, Info abajo */
@media (max-width: 991.98px) {
    .pedido-content-row {
        display: flex !important;
        flex-direction: column !important;
    }

    /* IMPORTANTE: Resumen primero */
    .pedido-summary-col {
        order: 1 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        width: 100% !important;
    }

    /* Info después */
    .pedido-info-col {
        order: 2 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        width: 100% !important;
    }

    .order-detail-card {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

/* Móvil pequeño */
@media (max-width: 767.98px) {
    .pedido-container {
        padding: 0 0.5rem;
    }

    .order-header-section {
        padding: 0.875rem;
        margin-bottom: 1rem;
        border-radius: 10px;
    }

    .order-title-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .order-number {
        font-size: 1.125rem;
    }

        .order-number i {
            font-size: 1rem;
        }

    .status-badge {
        padding: 0.375rem 0.875rem !important;
        font-size: 0.8rem !important;
    }

    .order-info-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .info-box {
        padding: 0.625rem;
        gap: 0.5rem;
    }

        .info-box i {
            font-size: 1.25rem;
        }

        .info-box small {
            font-size: 0.65rem;
        }

        .info-box strong {
            font-size: 0.85rem;
        }

    .order-detail-card {
        margin-bottom: 1rem;
        border-radius: 10px;
    }

    .breadcrumb {
        font-size: 0.75rem;
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 374.98px) {
    .order-number {
        font-size: 1rem;
    }

    .info-box small {
        font-size: 0.6rem;
    }

    .info-box strong {
        font-size: 0.8rem;
    }

    .info-box i {
        font-size: 1.1rem;
    }
}
/* ========================================
   LAYOUT RESPONSIVE - REORDENAMIENTO MÓVIL
   ======================================== */

/* Container principal del pedido */
.pedido-container {
    padding: 0 0.75rem;
    max-width: 100%;
}

/* Header Section */
.order-header-section {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.order-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 0.75rem;
}

.order-number {
    font-size: 1.5rem;
    margin: 0;
    font-weight: 700;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .order-number i {
        font-size: 1.25rem;
    }

/* Info Grid en el header */
.order-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.info-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

    .info-box.highlight {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        border: none;
    }

    .info-box i {
        font-size: 1.5rem;
        color: #6c757d;
        flex-shrink: 0;
    }

    .info-box.highlight i {
        color: white;
    }

    .info-box div {
        display: flex;
        flex-direction: column;
        gap: 0.125rem;
        min-width: 0;
    }

    .info-box small {
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        opacity: 0.8;
        font-weight: 600;
    }

    .info-box strong {
        font-size: 0.95rem;
        font-weight: 700;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

/* Desktop: layout en 2 columnas normal */
@media (min-width: 992px) {
    .pedido-content-row {
        display: flex;
        flex-wrap: wrap;
    }

    .pedido-summary-col {
        order: 2;
    }

    .pedido-info-col {
        order: 1;
    }

    .order-info-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Móvil: Resumen arriba, Info abajo */
@media (max-width: 991.98px) {
    .pedido-content-row {
        display: flex;
        flex-direction: column;
    }

    /* IMPORTANTE: Resumen primero */
    .pedido-summary-col {
        order: 1;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* Info después */
    .pedido-info-col {
        order: 2;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .order-detail-card {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
}

/* Móvil pequeño */
@media (max-width: 767.98px) {
    .pedido-container {
        padding: 0 0.5rem;
    }

    .order-header-section {
        padding: 0.875rem;
        margin-bottom: 1rem;
        border-radius: 10px;
    }

    .order-title-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .order-number {
        font-size: 1.125rem;
    }

        .order-number i {
            font-size: 1rem;
        }

    .status-badge {
        padding: 0.375rem 0.875rem;
        font-size: 0.8rem;
    }

    .order-info-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .info-box {
        padding: 0.625rem;
        gap: 0.5rem;
    }

        .info-box i {
            font-size: 1.25rem;
        }

        .info-box small {
            font-size: 0.65rem;
        }

        .info-box strong {
            font-size: 0.85rem;
        }

    .order-detail-card {
        margin-bottom: 1rem;
        border-radius: 10px;
    }

    .breadcrumb {
        font-size: 0.75rem;
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 374.98px) {
    .order-number {
        font-size: 1rem;
    }

    .info-box small {
        font-size: 0.6rem;
    }

    .info-box strong {
        font-size: 0.8rem;
    }

    .info-box i {
        font-size: 1.1rem;
    }
} 