/* Importar colores dinámicos desde la base de datos */
@import url('colores_dinamicos_version.php');

:root {
    --primary: #1a448d; /* Fallback - será sobrescrito por colores_dinamicos.php */
    --primary-hover: #658bdc;
    --secondary: #74f96a;
    --dark: #1d1d1d;
    --text: #3a3a3a;
    --light-text: #717171;
    --light: #f8f8f8;
    --white: #ffffff;
    --off-white: #f2f2f2;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --card-shadow: 0 15px 35px rgba(0, 0, 0, 0.07);
    --hover-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    --border-radius: 16px;
    --card-radius: 12px;
    --button-radius: 8px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
    
}

body {
    background-color: var(--light);
    color: var(--text);
    display: flex;
}

.dashboard {
    display: flex;
    min-height: 100vh;
    width: 100vw;
    background: var(--light);
}

/* Sidebar Styles */
.sidebar {
    width: 260px;
    min-width: 220px;
    max-width: 300px;
    background-color: var(--white);
    box-shadow: var(--shadow);
    padding: 0;
    display: flex;
    flex-direction: column;
    z-index: 10;
    border-radius: 0 24px 24px 0;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    height: 100vh;
    overflow: hidden;
}

/* Contenedor principal del sidebar con scroll */
.sidebar-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
}

/* Scrollbar personalizado para todo el contenido del sidebar */
.sidebar-content::-webkit-scrollbar {
    width: 6px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* Scrollbar para Firefox */
.sidebar-content {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

/* Contenedor de categorías sin scroll individual */
#sidebar-categories-container {
    flex: 1;
    padding-right: 8px;
}

.logo {
    font-size: 26px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 15px; /*antes estaba en 42px*/
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo span {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-icon {
    width: 100px; /*antes estaba en 36px*/
    height: 50px; /*antes estaba en 36px*/
}

.nav-section {
    margin-bottom: 24px;
}

.nav-header {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--light-text);
    margin-bottom: 16px;
    font-weight: 600;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: var(--button-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    color: var(--text);
}

.nav-item:hover {
    background-color: var(--off-white);
}

.nav-item.active {
    background-color: var(--primary);
    color: var(--white);
}

.nav-item i {
    margin-right: 12px;
    font-size: 18px;
}

.nav-item a {
    display: flex;
    align-items: center;
    color: var(--text);
    text-decoration: none;
    width: 100%;
}

.nav-item a:hover {
    color: var(--text);
}

.nav-item a i {
    margin-right: 12px;
    font-size: 18px;
}

.nav-item a span {
    flex: 1;
}

.promo-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: var(--card-radius);
    padding: 20px;
    margin-top: 24px;
    color: white;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.promo-card.active {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.promo-card.disabled {
    background: linear-gradient(135deg, #6c757d 0%, #868e96 100%);
    opacity: 0.7;
    cursor: not-allowed;
}

.promo-title {
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 8px;
}

.promo-description {
    font-size: 14px;
    margin-bottom: 16px;
    opacity: 0.9;
}

.promo-button {
    background-color: white;
    color: var(--primary);
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.promo-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.promo-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.promo-button:disabled:hover {
    transform: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Estilos para la fila de descuento en el carrito */
.discount-row {
    background-color: rgba(40, 167, 69, 0.1);
    border-left: 3px solid #28a745;
}

.discount-value {
    color: #28a745 !important;
    font-weight: 600;
}

.promo-card::after {
    content: "";
    position: absolute;
    width: 150px;
    height: 150px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    right: -60px;
    bottom: -60px;
}

.promo-card::before {
    content: "";
    position: absolute;
    width: 80px;
    height: 80px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    right: 40px;
    top: -20px;
}

/* Main Content Styles */
.main-content {
    flex: 1 1 0%;
    width: calc(100vw - 260px);
    margin-left: 260px;
    background: var(--light);
    box-sizing: border-box;
    min-height: 100vh;
    display: block;
    padding: 0;
}

.margintop{
    margin-top: 1rem !important;
    max-width: 700px!important;
}

.header {
    width: 100%;
    background: #fff;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    border-radius: 0.5rem;
    margin-bottom: 2rem;
    position: static;
    margin-top: 0;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark);
}

.search-container {
    position: relative;
}

.search-input {
    background-color: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 12px 20px 12px 48px;
    border-radius: 30px;
    width: 300px;
    font-size: 15px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 75, 43, 0.1);
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--light-text);
    font-size: 18px;
}

.categories-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.filter-chip {
    background: #f5f7ff;
    color: #1a448d;
    border-radius: 16px;
    padding: 6px 16px;
    font-size: 0.95em;
    cursor: pointer;
    transition: background 0.2s;
}

.filter-chip.active, .filter-chip:hover {
    background: #1a448d;
    color: #fff;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 24px;
}

.menu-items {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 32px;
    max-width: 100%;
}

.menu-item {
    background-color: var(--white);
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    position: relative;
}

.menu-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

.item-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: var(--transition);
}

.menu-item:hover .item-image {
    transform: scale(1.05);
}

.item-details {
    padding: 20px;
}

.item-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.item-tag {
    padding: 4px 8px;
    background-color: var(--off-white);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    color: var(--primary);
}

.item-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
}

.item-description {
    font-size: 13px;
    color: var(--light-text);
    margin-bottom: 16px;
    line-height: 1.4;
}

.item-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.item-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
}

.add-to-cart {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary);
    color: var(--white);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.add-to-cart:hover {
    background-color: var(--primary-hover);
    transform: scale(1.1);
}

/* Cart Section Styles */
.cart-section {
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    height: 100vh;
    background: #fff;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

.cart-title {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
}

.cart-title span {
    font-size: 20px;
    font-weight: 600;
    color: var(--dark);
}

.cart-icon {
    width: 40px;
    height: 40px;
    background-color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 18px;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: calc(100vh - 180px);
}

.cart-items::-webkit-scrollbar {
    width: 4px;
}

.cart-items::-webkit-scrollbar-thumb {
    background-color: var(--light-text);
    border-radius: 4px;
}

.cart-item {
    display: flex;
    gap: 10px;
    padding: 12px;
    border-radius: 8px;
    background: #f8f9fa;
    position: relative;
}

.cart-item:hover {
    background-color: var(--white);
    box-shadow: var(--card-shadow);
}

.cart-item-image {
    width: 60px;
    height: 60px;
    border-radius: var(--button-radius);
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
}

.cart-item-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 6px;
    line-height: 1.2;
}

.cart-item-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 4px;
    background-color: var(--white);
    border-radius: 20px;
    padding: 2px 6px;
}

.quantity-btn {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--primary);
    color: var(--white);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 12px;
}

.quantity-btn:hover {
    background-color: var(--primary-hover);
}

.quantity {
    font-size: 12px;
    font-weight: 600;
    color: var(--dark);
    min-width: 16px;
    text-align: center;
}

.cart-item-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
}

.cart-total {
    position: fixed;
    bottom: 0;
    right: 0;
    width: 320px;
    background: #fff;
    padding: 20px;
    border-top: 1px solid #eee;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
}

.total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.total-title {
    font-size: 14px;
    color: var(--light-text);
}

.total-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
}

.grand-total {
    font-weight: bold;
    font-size: 1.1em;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 2px solid #eee;
}

.checkout-btn {
    width: 100%;
    padding: 12px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    margin-top: 15px;
    cursor: pointer;
    transition: background 0.3s;
}

.checkout-btn:hover {
    background: #0056b3;
}

.empty-cart {
    text-align: center;
    padding: 40px 20px;
}

.empty-cart-icon {
    font-size: 3em;
    color: #ccc;
    margin-bottom: 20px;
}

/* Submenu Styles */
.nav-item.has-submenu {
    position: relative;
    cursor: pointer;
}

.nav-item.has-submenu .submenu {
    position: absolute;
    left: 100%;
    top: 0;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 10px;
    min-width: 200px;
    display: none;
    z-index: 1000;
}

.nav-item.has-submenu .submenu.active {
    display: block;
}

.nav-item.has-submenu .submenu .nav-item {
    padding: 8px 15px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.nav-item.has-submenu .submenu .nav-item:hover {
    background-color: #f5f5f5;
}

.nav-item.has-submenu .submenu .nav-item a {
    display: flex;
    align-items: center;
    color: #333;
    text-decoration: none;
}

.nav-item.has-submenu .submenu .nav-item i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* Estilos para los modales */
.modal-content {
    border-radius: 15px;
    border: none;
}

.modal-header {
    background-color: var(--primary);
    color: white;
    border-radius: 15px 15px 0 0;
}

.modal-header .btn-close {
    color: white;
}

.modal-body {
    padding: 20px;
}

.form-control {
    border-radius: 8px;
    border: 1px solid #ddd;
    padding: 10px 15px;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(0, 31, 63, 0.25);
}

.btn-primary {
    background-color: var(--primary);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
}

.btn-primary:hover {
    background-color: #003366;
}

/* Responsive Styles */
@media (max-width: 1460px) {
    .main-content {
        max-width: 100vw;
        width: calc(100vw - 260px);
    }
}

@media (max-width: 991px) {
    .sidebar {
        position: relative;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        border-radius: 0;
        padding: 16px;
        margin-bottom: 24px;
        height: auto;
    }
    .main-content {
        margin-left: 0;
        width: 100vw;
        padding: 0;
    }

    .modal-sesion-tienda{
        margin-top: 12% !important;
    }

    .header {
        padding-left: 12px;
    }
}

@media (max-width: 767px) {
    .menu-items {
        grid-template-columns: repeat(2, 1fr) !important;
        display: grid !important;
        gap: 12px;
    }
    .modal-sesion-tienda{
        margin-top: 10% !important;
    }
    
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1rem;
    }
    
    .search-container {
        width: 100%;
    }
    
    .pagination-controls {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .pagination-controls .btn {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
}

@media (max-width: 576px) {
    .menu-items {
        grid-template-columns: repeat(2, 1fr);
        display: grid !important;
        gap: 12px;
    }
    
    .modal-sesion-tienda{
        margin-top: 20% !important;
    }

    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .page-title {
        font-size: 1.25rem;
    }
    
    .section-title {
        font-size: 0.9rem;
    }
    
    .search-container {
        width: 100%;
    }
    
    .search-input {
        width: 100%;
    }

    .cart-section {
        width: 100%;
        height: 100vh;
        position: fixed;
        top: 0;
        right: -100%;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        z-index: 2000;
        background: white;
        overflow-y: auto;
        display: block;
    }

    .cart-section.active {
        transform: translateX(0);
        right: 0;
    }

    .cart-total {
        width: 100%;
        position: fixed;
        bottom: 0;
        right: 0;
        background: white;
        z-index: 2001;
    }

    .cart-items {
        padding-bottom: 200px;
    }
}

@media (max-width: 480px) {
    .menu-items {
        grid-template-columns: repeat(2, 1fr) !important;
        display: grid !important;
        gap: 12px;
    }

    .modal-sesion-tienda{
        margin-top: 20% !important;
    }
}

@media (min-width: 992px) {
    .cart-section {
        position: fixed;
        top: 0;
        right: 0;
        width: 320px;
        height: 100vh;
        display: block !important;
    }
}

.main-content {
    margin-right: 0;
}

.remove-item {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--primary);
    color: var(--white);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 10px;
    padding: 0;
}

.remove-item:hover {
    background-color: var(--primary-hover);
    transform: scale(1.1);
}

.remove-item i {
    font-size: 10px;
} 

.text_card_dashboard{
    font-size: 0.65rem;
}

.dashboard-card-title{
    color: #7f7f7f;
    font-size: 0.8rem;
}

.dashboard-card-value{
    font-size: 1.5rem;
    font-weight: 600;
}

.dashboard-card-badge{
    position: relative;
    top: -4.5rem;
    left: 5.6rem;
}

/* --- Menú hamburguesa y overlay --- */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1002;
    margin-left: 8px;
}
.hamburger-btn span {
    display: block;
    width: 26px;
    height: 3px;
    background: var(--primary, #1a448d);
    margin: 4px 0;
    border-radius: 2px;
    transition: 0.3s;
}

/* Overlay para sidebar */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.25);
    z-index: 1000;
    transition: 0.3s;
}
.sidebar.active ~ .sidebar-overlay {
    display: block;
}

/* Sidebar responsive */
@media (max-width: 991.98px) {
    .hamburger-btn {
        display: flex;
    }
    .sidebar {
        left: -260px;
        transition: left 0.3s;
        position: fixed;
        z-index: 1001;
    }
    .sidebar.active {
        left: 0;
        box-shadow: 0 0 0 100vw rgba(0,0,0,0.25);
    }
    .main-content {
        margin-left: 0 !important;
    }
}

/* --- Footer de carrito móvil --- */
.cart-footer-mobile {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    background: #fff;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
    z-index: 3000;
    padding: 0;
    border-radius: 16px 16px 0 0;
    min-height: 120px;
    max-height: 60vh;
    overflow-y: auto;
    transition: transform 0.3s cubic-bezier(.4,0,.2,1);
}
@media (min-width: 992px) {
    .cart-footer-mobile {
        display: none !important;
    }
}

/* --- Ajustes generales para mejor legibilidad --- */
@media (max-width: 768px) {
    .dashboard {
        flex-direction: column;
        height: auto;
    }
    .main-content {
        padding: 10px 4px;
    }
    .section-title, .page-title {
        font-size: 1.1rem;
    }
    .page-title{
        
        position: absolute;
        margin-top: 25px;
        margin-left: 35%;
    }

    /* Estilos del carrito móvil manejados por tienda_moderno.css */
    
    .cart-count {
        position: absolute;
        top: -8px;
        right: -8px;
        background: #e74c3c;
        color: white;
        border-radius: 50%;
        padding: 2px 6px;
        font-size: 12px;
    }


    .search-container {
        position: relative;
        margin-top: 50px;
    }
    
    .search-input {
        background-color: var(--white);
        border: 1px solid rgba(0, 0, 0, 0.05);
        padding: 12px 20px 12px 48px;
        border-radius: 30px;
        width: 300px;
        font-size: 15px;
        box-shadow: var(--shadow);
        transition: var(--transition);
    }

    .header{
        margin-bottom: 5px;
        padding-bottom: 5px;
    }
   
    .item-details {
        padding: 12px;
    }
}

.cart-btn-mobile {
    display: none;
    position: fixed;
    top: 10px;
    right: 60px;
    z-index: 1000;
    background: #1a4b8c;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
}

/* Estilos base para el botón de cerrar */
.close-cart {
    display: none; /* Por defecto oculto */
}

/* Mostrar solo en modo responsive */
@media (max-width: 991px) {
    .close-cart {
        display: block;
        position: absolute;
        top: 10px;
        right: 10px;
        background: none;
        border: none;
        font-size: 24px;
        color: #1a4b8c;
        cursor: pointer;
        z-index: 2002;
    }

    .cart-btn-mobile {
        display: block;
    }
}

.dashboard-cards-row {
    display: flex !important;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 32px;
    justify-content: flex-start;
    width: 100%;
}

.dashboard-card {
    flex: 1 1 180px;
    min-width: 180px;
    max-width: 240px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.07);
    padding: 20px 18px 16px 18px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: box-shadow 0.2s;
    position: relative;
}

.dashboard-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.bg-blue { background: #e3edfa; }
.bg-pink { background: #fde8e8; }
.bg-yellow { background: #fff9db; }
.bg-green { background: #e6faed; }
.bg-red { background: #ffeaea; }

.dashboard-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #444;
    margin-bottom: 8px;
}

.dashboard-card-main {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.dashboard-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: #222;
}

.dashboard-card-footer {
    font-size: 0.85rem;
    color: #888;
    margin-top: 4px;
}

.dashboard-card-badge {
    font-size: 0.9rem;
    font-weight: 600;
    margin-left: 8px;
}

@media (max-width: 900px) {
    .dashboard-cards-row {
        flex-direction: column;
        gap: 16px;
    }
    .dashboard-card {
        max-width: 100%;
        min-width: 0;
    }
}

/* Asegura que el main-content y las secciones no 
tengan display: flex en row-reverse ni float */
.main-content, .content-section {
    display: block;
    float: none;
    width: 100%;
}

.content-section {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    box-sizing: border-box;
}

@media (min-width: 1300px) {
    .main-content {
        margin-left: 260px;
        margin-right: auto;
        margin-top: 0;
        margin-bottom: 0;
    }
}

.content-inner {
    max-width: 100%; /*1200px*/
    margin: 0 auto;
    /*width: 100%;*/
    padding: 32px 32px 32px 24px;
    margin-left: 230px;
}

@media (max-width: 991px) {
    .content-inner {
        max-width: 100vw;
        padding: 16px;
        margin-left: 0px !important;
    }
}

/* Estilos para autocompletado */
.autocomplete-container {
    position: relative;
}

.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: none;
}

.autocomplete-results .item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.autocomplete-results .item:hover {
    background-color: #f8f9fa;
}

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

/* Estilos para la tabla de compras */
.table-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

.table th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
}

.table td {
    vertical-align: middle;
    border-bottom: 1px solid #dee2e6;
}

.btn-group .btn {
    margin-right: 2px;
}

.btn-group .btn:last-child {
    margin-right: 0;
}

/* Paginación */
.pagination-info {
    font-size: 14px;
    color: #6c757d;
}

.pagination .page-link {
    color: #007bff;
    border: 1px solid #dee2e6;
}

.pagination .page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
}

.pagination .page-link:hover {
    background-color: #e9ecef;
    border-color: #dee2e6;
}

/* Estilos personalizados para Select2 */
.select2-container--default .select2-selection--single {
    height: 38px;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    background-color: #fff;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 36px;
    padding-left: 12px;
    color: #495057;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px;
}

.select2-container--default .select2-dropdown {
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    padding: 8px 12px;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #1a448d;
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background-color: #e9ecef;
}

/* Responsive para Select2 */
@media (max-width: 768px) {
    .select2-container {
        width: 100% !important;
    }
}

/* Estilos responsive para detalle del producto */
@media (max-width: 768px) {
    .product-title {
        font-size: 1.5rem;
    }
    
    .product-price {
        font-size: 1.25rem;
    }
    
    .quantity-selector {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .add-to-cart-btn {
        width: 100%;
        padding: 0.75rem;
    }
    
    .thumbnail-gallery {
        display: none !important;
    }
    
    .related-products .row {
        margin: 0 -0.5rem;
    }
    
    .related-products .col-6 {
        padding: 0 0.5rem;
    }
    
    .product-gallery {
        margin-bottom: 1rem;
    }
    
    .main-image-container {
        border-radius: 8px;
        overflow: hidden;
    }
}

@media (max-width: 576px) {
    .product-title {
        font-size: 1.25rem;
    }
    
    .product-price {
        font-size: 1.1rem;
    }
    
    .breadcrumb {
        font-size: 0.875rem;
    }
    
    .related-products h3 {
        font-size: 1.25rem;
    }
    
    .product-card-title {
        font-size: 0.875rem;
    }
    
    .product-card-price {
        font-size: 0.875rem;
    }
}


