
/* Articles Section Styles */
.articles-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 5rem 0;
}

.section-title {
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: #f61919;
    border-radius: 2px;
}

.section-subtitle {
    color: #6c757d;
}

/* Article Card Styles */
.article-card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: white;
    height: 100%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    margin: 0 0.75rem 1.5rem 0.75rem;
}

.article-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.article-image {
    height: 220px;
    overflow: hidden;
    position: relative;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.article-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f61919;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

.stock-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #2f3ba5;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
}

.article-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    height: calc(100% - 220px);
}

.article-meta {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    color: #6c757d;
}

.article-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f61919;
    margin-bottom: 0.5rem;
}

.article-reference {
    color: #6c757d;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.article-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-excerpt {
    color: #6c757d;
    margin-bottom: 1.25rem;
    flex-grow: 1;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.article-stock {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: #6c757d;
}

.stock-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.stock-in {
    background: #28a745;
}

.stock-low {
    background: #ffc107;
}

.stock-out {
    background: #dc3545;
}

.view-details-btn {
    background: transparent;
    color: #f61919;
    border: 1px solid #f61919;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.view-details-btn i {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.view-details-btn:hover {
    background: #f61919;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(246, 25, 25, 0.3);
    text-decoration: none;
}

.view-details-btn:hover i {
    transform: translateX(3px);
}

/* Filter Section */
.articles-filter {
    margin-bottom: 3rem;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-btn {
    background: white;
    border: 1px solid #e0e0e0;
    color: #6c757d;
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.filter-btn.active, .filter-btn:hover {
    background: #f61919;
    color: white;
    border-color: #f61919;
}

/* Loading State */
.articles-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #f61919;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty State */
.articles-empty {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

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

.article-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 1rem;
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: #6c757d;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.spec-item i {
    font-size: 0.7rem;
    color: #f61919;
}

/* Updated Stock Display */
.article-stock {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
}

.stock-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.stock-in {
    background: #28a745;
}

.stock-low {
    background: #ffc107;
}

.stock-out {
    background: #dc3545;
}

/* Updated Badge Styles */
.stock-badge.bg-success {
    background: #28a745 !important;
}

.stock-badge.bg-warning {
    background: #ffc107 !important;
    color: #000 !important;
}

.stock-badge.bg-danger {
    background: #dc3545 !important;
}

/* Attributes Styles */
.article-attributes {
    margin-bottom: 0.75rem;
}

.attribute-line {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
    padding: 0.2rem 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.attribute-name {
    color: #6c757d;
    font-weight: 500;
}

.attribute-value {
    color: #2c3e50;
    font-weight: 600;
}

/* Modal Attributes Styles */
.product-attributes-modal {
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 0;
}

.attributes-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

.attributes-grid .attribute-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 5px;
    margin-bottom: 0;
    border: 1px solid #e9ecef;
}

.attributes-grid .attribute-name {
    font-weight: 600;
    color: #495057;
}

.attributes-grid .attribute-value {
    color: #f61919;
    font-weight: 600;
}

.product-attributes-section {
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    padding: 1rem;
    background: #f8f9fa;
    margin-bottom: 1.5rem;
}

.product-attributes-section .section-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.75rem;
}

.attributes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.attribute-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: white;
    border-radius: 0.375rem;
    border: 1px solid #dee2e6;
    transition: all 0.2s ease;
}

.attribute-item:hover {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.attribute-name {
    font-weight: 500;
    color: #495057;
    font-size: 0.85rem;
}

.attribute-value {
    font-weight: 600;
    color: #e67e22;
    font-size: 0.85rem;
}

/* Article card attributes */
.article-attributes {
    font-size: 0.8rem;
    background: #f8f9fa;
    padding: 0.5rem;
    border-radius: 0.375rem;
    margin-bottom: 0.75rem;
}

.attribute-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem;
    padding: 0.125rem 0;
}

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

.attribute-line .attribute-name {
    color: #6c757d;
    font-weight: 500;
}

.attribute-line .attribute-value {
    color: #495057;
    font-weight: 600;
}



/* Price and stock section */
.price-stock-section {
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 1rem;
}

.product-price {
    font-size: 1.75rem;
    font-weight: 700;
    color: #f61919;
    margin: 0;
}

.stock-badge-large {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
}

/* Product specifications */
.product-specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
}

.spec-item i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.spec-value {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

/* Product attributes */
.product-attributes-section {
    margin-bottom: 1.5rem;
}

.section-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.attributes-container {
    /*max-height: 200px;
    overflow-y: auto;*/
    padding-right: 0.1rem;
}

.attributes-container .spec-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f8f9fa;
}

.attributes-container .spec-item:last-child {
}

.attributes-container .spec-value {
    font-weight: 500;
    color: #495057;
    font-size: 0.9rem;
}

/* Quantity section */
.quantity-section {
    padding: 1rem 0;
}

.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden;
    width: fit-content;
}

.quantity-btn {
    background: #f8f9fa;
    border: none;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 0.9rem;
}

.quantity-btn:hover:not(:disabled) {
    background: #e9ecef;
}

.quantity-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quantity-input {
    width: 50px;
    text-align: center;
    border: none;
    border-left: 1px solid #dee2e6;
    border-right: 1px solid #dee2e6;
    font-weight: 600;
    background: white;
    font-size: 0.95rem;
    padding: 0.5rem;
}

.available-stock {
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

/* Add to cart button */
#addToCartBtn {
    background: #f61919;
    border: none;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

#addToCartBtn:hover:not(:disabled) {
    background: #e01616;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(246, 25, 25, 0.25);
}

#addToCartBtn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.clear-cart-btn {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #6c757d;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 10px;
    width: 100%;
    text-align: left;
    transition: all 0.2s ease;
}

.clear-cart-btn:hover {
    background-color: #e9ecef;
    color: #495057;
}


/* Responsive Styles */
@media (max-width: 1200px) {
    .col-xl-3 {
        flex: 0 0 auto;
        width: 33.333333%;
    }
}

@media (max-width: 992px) {
    .col-xl-3 {
        flex: 0 0 auto;
        width: 50%;
    }
    
    .product-gallery {
        height: 300px;
    }
    
    .product-details {
        height: auto;
        max-height: 400px;
    }
    
    .product-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .main-product-image {
        height: 250px;
    }

    .attributes-container {
        max-height: none;
        overflow-y: hidden;
    }
}

@media (max-width: 768px) {
    .articles-section {
        padding: 3rem 0;
    }
    
    .article-image {
        height: 200px;
    }
    
    .col-xl-3 {
        flex: 0 0 auto;
        width: 100%;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .quantity-selector {
        width: 100%;
        justify-content: center;
    }
    
    .filter-buttons {
        justify-content: flex-start;
    }
    
    .product-specs-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons .d-flex {
        flex-direction: column;
    }
    
    .product-tabs .nav-link {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    

    
    .product-specs-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .article-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .view-details-btn {
        align-self: stretch;
        justify-content: center;
    }
    
    .gallery-thumb {
        width: 40px;
        height: 40px;
    }
    
    .product-price-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .main-product-image {
        height: 200px;
    }
    
    .product-modal .modal-body {
        padding: 1rem;
    }
    
    .product-modal .modal-dialog {
        margin: 0;
        height: 100vh;
        max-width: 100%;
    }
    
    .product-modal .modal-content {
        border-radius: 0;
    }
    
    .position-sticky-top {
        height: 250px;
    }
    
    .modal-footer .row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .quantity-section {
        margin-bottom: 1rem;
    }
}

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

.product-modal .modal-content {
    animation: fadeInUp 0.3s ease;
}

/* Sidebar responsive content shift */
main.sidebar-open {
    margin-left: 320px;
    transition: margin-left 0.3s ease;
}

.navbar.sidebar-open {
    margin-left: 320px;
    transition: margin-left 0.3s ease;
}

.collections-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.collection-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.collection-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.collection-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #f61919, #f3a9a9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.collection-icon i {
    font-size: 2rem;
    color: white;
}

.collection-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.collection-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 1rem;
}

.collection-stats .stat {
    font-size: 0.85rem;
    color: #6c757d;
}

.collection-stats .stat i {
    margin-right: 0.25rem;
}

.btn-outline-orange {
    border-color: #f61919;
    color: #f61919;
}

.btn-outline-orange:hover {
    background-color: #f61919;
    color: white;
}

.articles-filter {
    margin-bottom: 2rem;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-btn {
    padding: 0.5rem 1.5rem;
    border: 2px solid #e9ecef;
    background: white;
    color: #6c757d;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background: #f61919;
    border-color: #f61919;
    color: white;
}

.loading-spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #f61919;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}



/* Form validation styles */
.was-validated .form-control:valid {
    border-color: #198754;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.was-validated .form-control:invalid {
    border-color: #dc3545;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 3.6.4.4.4-.4'/%3e%3cpath d='M6 7v1'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}



/* Cart Item Attributes Styles */
.cart-item-attributes {
    margin: 5px 0;
}

.cart-item-attribute {
    display: block;
    color: #6c757d;
    font-size: 0.8rem;
    margin: 2px 0;
    padding: 2px 6px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

/* Order Item Attributes Styles */
.order-item-attributes {
    margin: 5px 0;
}

.order-item-attributes .small {
    color: #6c757d;
    padding: 2px 0;
}

/* Enhanced cart sidebar for attributes */
.cart-item-details {
    flex: 1;
    min-width: 0;
}

.cart-item-title {
    font-size: 0.9rem;
    margin-bottom: 4px;
    line-height: 1.3;
}

.cart-item-reference {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 4px;
}

.cart-item-price {
    font-size: 0.9rem;
    font-weight: 600;
    color: #f61919;
}

/* Cart Item Spacing */
.cart-item {
    margin-bottom: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
}

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