/* I.C.M SHOP - Styles pour la boutique */

:root {
    --shop-accent: #ff6b6b;
    --shop-accent-dark: #ff5252;
    --shop-gray-50: #f8f9fb;
}

/* Hero Section */
#shop-hero {
    background: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
    color: white;
    padding: var(--spacing-8) 0;
    text-align: center;
    margin-top: 0;
}

#shop-hero h2 {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--spacing-3);
    font-weight: 700;
}

#shop-hero p {
    font-size: var(--font-size-base);
    margin-bottom: var(--spacing-4);
    opacity: 0.9;
}

.search-bar {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 1rem;
}

.search-bar input {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    outline: none;
}

.search-bar button {
    padding: 0 1.25rem;
    min-width: 140px;
    height: 42px;
    background: var(--shop-accent);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-bar button:hover {
    background: var(--shop-accent-dark);
}

/* Filters Section */
.filters-section {
    background: var(--shop-gray-50);
    padding: 2rem 0;
    border-bottom: 1px solid #e9ecef;
}

.filters-container {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
}

.filter-group select {
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 8px;
    background: white;
    font-size: 0.9rem;
    min-width: 160px;
}

/* Products Section */
.products-section { 
    padding: var(--spacing-12) 0; 
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-6);
    flex-wrap: wrap;
    gap: var(--spacing-4);
}

.products-header h3 {
    font-size: var(--font-size-xl);
    color: #2c3e50;
    margin: 0;
}

.view-toggle { display: flex; gap: 0.5rem; }

.view-btn {
    min-width: 120px;
    height: 42px;
    padding: 0 var(--spacing-4);
    border: 1px solid #ced4da;
    background: white;
    color: #495057;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-btn.active,
.view-btn:hover {
    background: #0ea5e9;
    color: white;
    border-color: #0ea5e9;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--spacing-6);
    margin-bottom: var(--spacing-8);
}

.products-grid.list-view { grid-template-columns: 1fr; }

.product-card {
    background: white;
    border-radius: var(--radius-xl);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: all var(--transition-normal);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--gray-100);
    display: block;
}

.product-info { 
    padding: var(--spacing-4);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--spacing-2);
    line-height: 1.4;
}

.product-description { 
    color: var(--gray-600); 
    font-size: var(--font-size-sm); 
    margin-bottom: var(--spacing-3); 
    line-height: 1.5;
    flex-grow: 1;
}

.product-price { 
    display: flex; 
    align-items: center; 
    gap: var(--spacing-2); 
    margin-bottom: var(--spacing-3);
}

.current-price { 
    font-size: var(--font-size-xl); 
    font-weight: 700; 
    color: var(--success-color);
}

.original-price { 
    font-size: var(--font-size-sm); 
    color: var(--gray-500); 
    text-decoration: line-through; 
}

.product-actions { 
    display: flex; 
    gap: var(--spacing-2);
    margin-top: auto;
}

.btn-add-cart {
    flex: 1;
    min-width: 100px;
    height: 38px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: var(--font-size-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-add-cart:hover { 
    background: var(--primary-dark);
    transform: scale(1.02);
}

.btn-view {
    min-width: 100px;
    height: 38px;
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: var(--radius-lg);
    font-size: var(--font-size-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

/* List View */
.products-grid.list-view .product-card { display: flex; align-items: center; }
.products-grid.list-view .product-image { width: 220px; height: 160px; flex-shrink: 0; }
.products-grid.list-view .product-info { flex: 1; display: flex; justify-content: space-between; align-items: center; }
.products-grid.list-view .product-details { flex: 1; }
.products-grid.list-view .product-actions { flex-direction: column; min-width: 180px; }

/* Featured Section */
.featured-section { background: var(--shop-gray-50); padding: 3rem 0; }
.featured-section h3 { text-align: center; font-size: 2rem; color: #2c3e50; margin-bottom: 2rem; }
.featured-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; }

/* Categories Section */
.categories-section { padding: 3rem 0; }
.categories-section h3 { text-align: center; font-size: 2rem; color: #2c3e50; margin-bottom: 2rem; }
.categories-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; }

.category-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12); }

.category-card img { width: 100%; height: 150px; object-fit: cover; border-radius: 8px; margin-bottom: 1rem; }
.category-card h4 { font-size: 1.2rem; color: #2c3e50; margin-bottom: 0.5rem; }
.category-card p { color: #6c757d; margin-bottom: 1.5rem; line-height: 1.5; }

/* Pagination */
.pagination { display: flex; justify-content: center; align-items: center; gap: 1rem; margin-top: 2rem; }
.pagination button { min-width: 120px; height: 42px; padding: 0 var(--spacing-4); border: 1px solid #ced4da; background: white; color: #495057; border-radius: 10px; cursor: pointer; transition: all 0.3s ease; }
.pagination button:hover:not(:disabled) { background: #0ea5e9; color: white; border-color: #0ea5e9; }
.pagination button:disabled { opacity: 0.5; cursor: not-allowed; }
#pageInfo { font-weight: 600; color: #495057; }

/* Loading State */
.loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: #6c757d;
    font-size: 1.1rem;
}

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

.empty-state h4 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #495057;
}

.empty-state p {
    font-size: 1rem;
    margin-bottom: 2rem;
}

/* Stock Status */
.stock-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.stock-status.in-stock {
    background: #d4edda;
    color: #155724;
}

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

.stock-status.out-of-stock {
    background: #f8d7da;
    color: #721c24;
}

/* Responsive Design */
@media (max-width: 768px) {
    #shop-hero h2 { font-size: 2rem; }
    .search-bar { flex-direction: column; }
    .filters-container { flex-direction: column; align-items: stretch; }
    .filter-group select { min-width: auto; }
    .products-header { flex-direction: column; gap: 1rem; align-items: stretch; }
    .products-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
    .products-grid.list-view .product-card { flex-direction: column; }
    .products-grid.list-view .product-image { width: 100%; height: 200px; }
    .products-grid.list-view .product-info { flex-direction: column; align-items: stretch; }
    .products-grid.list-view .product-actions { flex-direction: row; min-width: auto; }
    .categories-grid { grid-template-columns: 1fr; }
    .pagination { flex-direction: column; gap: 0.5rem; }
}

@media (max-width: 480px) {
    .products-grid { grid-template-columns: 1fr; }
    .product-actions { flex-direction: column; }
    .btn-add-cart, .btn-view { width: 100%; }
}
