/* Variables */
:root {
    --primary-color: #ff6b00;
    --primary-hover: #e65100;
    --text-color: #2c3e50;
    --bg-color: #f8f9fa;
    --border-color: #e0e0e0;
    --shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

/* Style général */
body {
    font-family: 'Lato', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Guide Container */
.guide-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
}

/* Title Section */
.title-section {
    background: white;
    padding: 40px 30px;
    text-align: center;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.page-title {
    font-size: 2.5em;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 15px 0;
}

.subtitle {
    font-size: 1.1em;
    color: #7f8c8d;
    margin: 0;
    line-height: 1.5;
}

/* Search Section */
.search-section {
    background: white;
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.search-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    position: relative;
    display: flex;
    gap: 1rem;
}

.search-container form {
    display: flex;
    gap: 1rem;
    width: 100%;
}

.search-container input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

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

.search-button {
    background-color: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.search-button:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Search Suggestions */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 0 0 4px 4px;
    box-shadow: var(--shadow);
    z-index: 1000;
    display: none;
    margin-right: 120px;
}

.suggestion-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.suggestion-item:hover {
    background-color: #fff3e0;
}

/* Main Content */
.main-content {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
    padding: 2rem;
}

.sidebar {
    width: 250px;
    flex-shrink: 0;
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.filter-section {
    margin-bottom: 2rem;
    padding: 1rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.filter-section h3 {
    margin-bottom: 1rem;
    color: #333;
    font-size: 1.1rem;
}

.category-list,
.brand-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li,
.brand-list li {
    margin-bottom: 0.5rem;
}

.category-list a,
.brand-list a {
    display: block;
    padding: 0.5rem;
    color: #666;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.category-list a:hover,
.brand-list a:hover,
.category-list a.active,
.brand-list a.active {
    background: #f0f7ff;
    color: #0066cc;
}

.current-category,
.parent-category {
    display: block;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.current-category {
    color: #0066cc;
    background: #f0f7ff;
    border-radius: 4px;
}

.parent-category {
    color: #333;
    border-bottom: 2px solid #0066cc;
}

.back-to-categories {
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    transition: color 0.2s ease;
}

.back-to-categories:hover {
    color: #0066cc;
}

.product-list {
    flex: 1;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    padding: 1rem;
}

.product-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.2s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid #eee;
}

.product-info {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 0.5rem;
    line-height: 1.2;
    white-space: normal;
    word-break: break-word;
}

.product-category {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 4px;
}

.product-brand {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 1rem;
}

.product-details-link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #fff;
    color: var(--primary-hover);
    text-decoration: none;
    border: 2px solid var(--primary-hover);
    border-radius: 4px;
    font-weight: 500;
    text-align: center;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, outline 0.3s ease, box-shadow 0.3s ease;
    margin-top: auto;
}

.product-details-link:hover {
    background-color: var(--primary-hover);
    color: #fff;
    border-color: var(--primary-hover);
}

.product-details-link:focus,
.product-details-link:focus-visible {
    background-color: var(--primary-hover);
    color: #fff;
    border-color: var(--primary-hover);
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.product-card.sponsored {
    border: 2px solid var(--primary-color);
    box-shadow: 0 2px 8px rgba(255, 107, 0, 0.1);
}

.sponsored-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--primary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 5px;
}

.sponsored-badge i {
    font-size: 0.8rem;
}

.no-results {
    text-align: center;
    color: #666;
    padding: 2rem;
    background: #f9f9f9;
    border-radius: 8px;
}

/* Breadcrumb */
.breadcrumb {
    padding: 1rem;
    margin: 20px 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.breadcrumb-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    color: #666;
    font-size: 0.9rem;
}

.breadcrumb-item:not(:last-child)::after {
    content: "›";
    margin-left: 0.5rem;
    color: #999;
}

.breadcrumb-item a {
    color: #666;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
    color: var(--primary-color);
}

.breadcrumb-item.active {
    color: var(--primary-color);
    font-weight: 500;
}

/* Styles pour la liste des marques */
.brand-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 10px 0;
}

.brand-item {
    margin-bottom: 8px;
}

.brand-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.brand-checkbox input[type="checkbox"] {
    margin-right: 8px;
}

.brand-name {
    font-size: 14px;
    color: #333;
}

.product-count {
    color: #666;
    font-size: 12px;
    margin-left: 4px;
}

.apply-filters {
    width: 100%;
    padding: 8px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.3s;
}

.apply-filters:hover {
    background-color: #e65c00;
}

/* Footer */
footer {
    background: var(--text-color);
    color: white;
    text-align: center;
    padding: 1rem;
    width: 100%;
    margin-top: auto;
}

/* Responsive design */
@media (max-width: 1024px) {
    .main-content {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        margin-bottom: 2rem;
    }

    .search-suggestions {
        margin-right: 0;
    }
}

@media (max-width: 768px) {
    .title-section {
        padding: 30px 20px;
    }

    .page-title {
        font-size: 2em;
    }

    .subtitle {
        font-size: 1em;
    }

    .title-section {
        padding: 1rem 0;
    }

    .page-title {
        font-size: 1.75rem;
    }

    .search-container form {
        flex-direction: column;
    }
    
    .search-button {
        width: 100%;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }

    .product-title {
        font-size: 0.9rem;
    }

    .product-category,
    .product-brand {
        font-size: 0.8em;
    }

    .product-details-link {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}
