/* Products Page Specific Styles */

/* ----- Products Hero Section ----- */
#products-hero {
    position: relative;
    background: var(--grey);
    padding: 40px 0;
}

#products-hero::before {
    content: "";
    background: url(../images/baner-dec-left.png) no-repeat;
    position: absolute;
    top: 0;
    left: 0;
    width: 180px;
    height: 100%;
    opacity: 0.2;
    z-index: -1;
}

#products-hero h1 {
    font-size: 2.5rem;
    line-height: 1.2;
}

@media screen and (max-width: 768px) {
    #products-hero h1 {
        font-size: 2rem;
    }
    #products-hero::before {
        width: 120px;
    }
    
}

.hero-stats {
    background: var(--white);
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0px 0px 15px rgb(0 0 0 / 10%);
    transition: all 0.3s ease;
}

.hero-stats:hover {
    transform: translateY(-5px);
    box-shadow: 0px 10px 25px rgb(0 0 0 / 15%);
}

.stat-item h3 {
    font-size: 2rem;
    margin-bottom: 0;
}

/* ----- Search and Filter Section ----- */
#search-filter {
    background: var(--white);
    box-shadow: 0px 2px 10px rgb(0 0 0 / 5%);
    border-radius: 0 0 25px 25px;
    margin-bottom: 30px;
}

.search-box {
    max-width: 100%;
}

.search-input {
    border-radius: 23px;
    border: 1px solid #e9ecef;
    padding: 15px 50px 15px 25px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: var(--white);
    box-shadow: 0px 0px 10px rgb(0 0 0 / 5%);
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0px 0px 15px rgba(255, 105, 95, 0.2);
    outline: none;
}

.search-icon {
    position: absolute;
    right: 25px;
    top: 68%;
    transform: translateY(-50%);
    color: var(--primary-color);
    font-size: 16px;
}

.filter-select {
    border-radius: 23px;
    border: 1px solid #e9ecef;
    padding: 12px 20px;
    background: var(--white);
    transition: all 0.3s ease;
    min-width: 160px;
    box-shadow: 0px 0px 10px rgb(0 0 0 / 5%);
    font-size: 14px;
}

.filter-select:focus {
    border-color: var(--secondary-color);
    box-shadow: 0px 0px 15px rgba(3, 164, 237, 0.2);
    outline: none;
}

#clearFilters {
    border-radius: 23px;
    padding: 12px 20px;
    font-size: 14px;
    transition: all 0.3s ease;
}


/* ----- Product Cards ----- */
.product-card {
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0px 0px 15px rgb(0 0 0 / 8%);
    transition: all 0.3s ease;
    overflow: hidden;
    height: 100%;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0px 15px 35px rgb(0 0 0 / 15%);
}

.product-image {
    position: relative;
    overflow: hidden;
    height: 180px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary-color);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.product-badge.new {
    background: var(--secondary-color);
}

.product-badge.promo {
    background: #28a745;
}

.product-content {
    padding: 20px;
}

.product-category {
    color: var(--secondary-color);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    line-height: 1.3;
}

.product-description {
    color: #666;
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-features {
    margin-bottom: 15px;
}

.product-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.product-features li {
    font-size: 12px;
    color: #555;
    margin-bottom: 4px;
    position: relative;
    padding-left: 18px;
}

.product-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 11px;
}

.product-price {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.price-current {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--primary-color);
}

.price-original {
    font-size: 0.9rem;
    color: #999;
    text-decoration: line-through;
    margin-left: 8px;
}

.product-actions {
    display: flex;
    gap: 8px;
}

.btn-product {
    flex: 1;
    padding: 10px 8px;
    border-radius: 23px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
}

.btn-primary-product {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary-product:hover {
    background: var(--secondary-color);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-secondary-product {
    background: transparent;
    color: var(--secondary-color);
    border: 1px solid var(--secondary-color);
}

.btn-secondary-product:hover {
    background: var(--secondary-color);
    color: var(--white);
}

/* ----- List View Styles ----- */
.product-card.list-view {
    border-radius: 20px;
    margin-bottom: 15px;
}

.product-card.list-view .row {
    align-items: center;
}

.product-card.list-view .product-image {
    height: 150px;
}

.product-card.list-view .product-content {
    padding: 15px;
}

.product-card.list-view .product-description {
    -webkit-line-clamp: 2;
}

/* ----- View Toggle Buttons ----- */
.view-toggle .btn {
    border-radius: 23px;
    padding: 10px 15px;
    margin-left: 5px;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    background: var(--white);
    color: #666;
}

.view-toggle .btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

.view-toggle .btn:hover:not(.active) {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* ----- Section Headers ----- */
.products-section-header,.products-section-header2 {
    background: var(--white);
    padding: 30px 0;
    border-radius: 25px;
    box-shadow: 0px 0px 15px rgb(0 0 0 / 5%);
    margin-bottom: 40px;
    position: relative;
}

.products-section-header::before {
    content: "";
    background: linear-gradient(105deg, rgba(255, 104, 95, 0.05) 0%, rgba(3, 164, 237, 0.05) 100%);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 25px;
    z-index: -1;
}

@media screen and (min-width: 900px) {
    .cart{
        display: none;
    }
}

/* ----- Responsive Design ----- */
@media screen and (max-width: 768px) {
    #products-hero {
        padding: 30px 0;
    }
    
    .hero-stats {
        margin-top: 20px;
        padding: 20px;
    }
    
    .stat-item h3 {
        font-size: 1.8rem;
    }
    
    .filter-controls {
        justify-content: center;
        margin-top: 15px;
    }
    
    .filter-select {
        min-width: 140px;
        font-size: 13px;
        margin-bottom: 10px;
    }
    
    

    /* Ajustement des colonnes pour les produits */
    #featuredProductsGrid .col-sm-6,
    #productsGrid .col-sm-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    /* Ajustement des marges et espacements */
    #featuredProductsGrid,
    #productsGrid {
        margin: 0 -8px;
    }
    
    #featuredProductsGrid > [class*="col-"],
    #productsGrid > [class*="col-"] {
        padding: 0 8px;
        margin-bottom: 16px;
    }
    
    /* Ajustement de la taille des cartes produits */
    .product-card {
        margin-bottom: 0;
    }
    
    /* Ajustement de la hauteur des images */
    .product-image {
        height: 150px;
    }
    
    /* Ajustement du contenu */
    .product-content {
        padding: 15px;
    }
    
    .product-title {
        font-size: 1rem;
        margin-bottom: 8px;
    }
    
    .price-current {
        font-size: 1.1rem;
    }
    
    /* Ajustement des boutons */
    .product-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .btn-product {
        padding: 10px;
        font-size: 12px;
    }

    .products-section-header2 {
        padding: 20px 0;
        margin-bottom: 30px;
    }
}

@media screen and (max-width: 576px) {
    #search-filter {
        border-radius: 0 0 20px 20px;
        padding: 20px 0;
    }
    
    .search-input {
        font-size: 15px;
        padding: 12px 45px 12px 20px;
        margin-bottom: 15px;
    }
    
    .search-icon {
        right: 20px;
        font-size: 15px;
    }
    
    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-select {
        min-width: 100%;
        margin-bottom: 10px;
    }
    
    #clearFilters {
        margin-top: 5px;
    }

    #featuredProductsGrid .col-sm-6,
    #productsGrid .col-sm-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* ----- Loading Animation ----- */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ----- Featured Products Highlight ----- */
#featured-products {
    background: var(--grey);
    position: relative;
    padding: 50px 0;
}

#featured-products::after {
    content: "";
    background: url(../images/portfolio-left-dec.png) no-repeat;
    position: absolute;
    top: 10%;
    right: 20px;
    width: 200px;
    height: 70%;
    opacity: 0.2;
    z-index: -1;
}

.featured-product-card {
    position: relative;
    overflow: hidden;
}

.featured-product-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: all 0.6s;
    z-index: 1;
}

.featured-product-card:hover::before {
    left: 100%;
}

/* ----- All Products Section ----- */
#all-products {
    background: var(--white);
    position: relative;
}

#all-products::before {
    content: "";
    background: url(../images/services-left-dec.png) no-repeat;
    position: absolute;
    top: 20%;
    left: 0;
    width: 180px;
    height: 60%;
    opacity: 0.1;
    z-index: -1;
}

/* ----- Product Details Modal Styles ----- */
.product-modal .modal-content {
    border-radius: 20px;
    border: none;
    overflow: hidden;
}

.product-modal .modal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    border: none;
    padding: 20px;
}

.product-modal .modal-body {
    padding: 25px;
}

.product-modal .btn-close {
    filter: invert(1);
}

/* ----- Animation Classes ----- */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
} 