:root {
    --primary-color: #A7D30C;
    --background-marron: #3E261A;
    --secondary-color: #27ae60;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --style-font: "KlinicSlabLight", cursive;
}

html,
body {
    font-family: var(--style-font);
    background-color: #f8f9fa;
}

/* Estructura de la página */
.row.g-4 {
    display: flex;
    align-items: stretch;
    /* Ambos divs tendrán la misma altura */
}

/* Sidebar de categorías */
.category-sidebar {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    height: calc(100vh - 100px);
    /* Ajustar altura para ocupar toda la pantalla menos el navbar */
    overflow-y: auto;
    border: 1px solid #ddd;
    padding-right: 10px;
}

/* Scrollbar personalizado */
.category-sidebar::-webkit-scrollbar,
#products-container::-webkit-scrollbar {
    width: 8px;
}

.category-sidebar::-webkit-scrollbar-thumb,
#products-container::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.category-sidebar::-webkit-scrollbar-thumb:hover,
#products-container::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Categorías */
.category-title {
    font-size: 1.5rem;
    color: var(--dark-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    font-family: var(--style-font);
}

.category-item {
    cursor: pointer;
    padding: 12px 20px;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 4px 0;
}

.category-item:hover {
    background-color: #f8f9fa;
}

.category-item.active {
    background-color: var(--background-marron);
    color: white;
}

/* Subcategorías */
.subcategory {
    padding-left: 25px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.subcategory.show {
    max-height: 500px;
}

.subcategory-item {
    padding: 8px 15px;
    cursor: pointer;
    border-radius: 6px;
    margin: 4px 0;
    transition: all 0.3s ease;
}

.subcategory-item:hover {
    background-color: #f8f9fa;
    color: var(--primary-color);
}

.subcategory-item.active {
    background-color: var(--light-color);
    color: var(--primary-color);
}

/* Sección de productos */
#products-container {
    height: calc(100vh - 100px);
    overflow-y: auto;
    padding-right: 10px;
    position: relative;
    top: 30px;
}

/* Tarjetas de productos */
.product-card2 {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    display: flex !important;
    flex-direction: column;
    height: 100%;
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
}

.product-card2:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.product-card2 .position-relative {
    width: 100%;
    height: 200px;
}

.product-card2 .product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-card2 .product-info2 {
    /*  flex-grow: 1; */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 10px;
    text-align: center;
}

.product-title {
    font-size: 1.1rem;
    font-weight: bold;
}

.product-item {
    padding-bottom: 10px;
}

.producto-descripcion-categoria {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    /* Máximo 3 líneas */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 60px;
    text-align: center;
    font-size: 14px;
    font-family: var(--style-font);
}

.product-price {
    font-size: 18px;
    font-weight: bold;
}

.precio-original {
    text-decoration: line-through;
    color: #999;
    font-size: 16px;
    margin-right: 10px;
}

.precio-descuento {
    color: #e60000;
    font-size: 20px;
}

.descuento {
    background-color: #ff0000;
    color: white;
    padding: 3px 6px;
    font-size: 14px;
    border-radius: 5px;
    margin-left: 5px;
}


.product-price {
    font-size: 1rem;
    color: #e74c3c;
}

/* Overlay de productos */
.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 200px;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    opacity: 0;
    transition: all 0.3s ease;
}

.product-card2:hover .product-overlay {
    opacity: 1;
}

.overlay-icon {
    width: 45px;
    height: 45px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.overlay-icon:hover {
    background: var(--primary-color);
    color: white;
}

/* Breadcrumb */
.breadcrumb2 {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.breadcrumb2-item {
    color: var(--dark-color);
    font-size: 0.9rem;
}

.breadcrumb2-item.active {
    color: var(--primary-color);
    font-weight: 500;
}

/* Modal de vista previa */
.preview-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.preview-modal.active {
    display: flex;
}

.modal-content2 {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
}

.modal-image {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 10px;
}

.close-modal {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 30px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px;
}

.close-modal:hover {
    color: var(--primary-color);
}

/* Notificación del carrito */
.cart-notification {
    position: fixed;
    top: 20px;
    right: -300px;
    background: var(--background-marron);
    color: white;
    padding: 15px 25px;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: right 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.cart-notification.show {
    right: 20px;
}

.cart-notification i {
    font-size: 1.2em;
}

/* Contador del carrito */
.cart-counter {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--primary-color);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Estilos responsive */
@media (max-width: 768px) {
    .product-card2 {
        width: 111%;
    }
}

