/* ========================================
   PAYSTATION MARKETPLACE - CLIENT STYLES
   ======================================== */

:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: #e0e7ff;
    --accent: #D946EF;
    --text-dark: #1e293b;
    --text-medium: #64748b;
    --text-light: #94a3b8;
    --border-color: #e2e8f0;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    color: var(--text-dark);
    background: var(--bg-light);
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ========================================
   CLIENT HEADER
   ======================================== */

.client-header {
    background: var(--bg-white) !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
    position: relative !important;
    z-index: 100 !important;
}

.client-header-content {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 1rem 2rem !important;
    max-width: 1400px !important;
    margin: 0 auto !important;
    gap: 1rem !important;
}

.header-logo {
    flex-shrink: 0 !important;
}

.header-logo img {
    height: 40px !important;
}

.header-search {
    flex: 1 1 auto !important;
    max-width: 500px !important;
    margin: 0 2rem !important;
}

.header-search form {
    width: 100% !important;
}

.header-search input {
    width: 100% !important;
    padding: 0.75rem 1rem !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
    font-size: 0.9rem !important;
    background: var(--bg-light) !important;
}

.header-search input:focus {
    outline: none !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px var(--primary-light) !important;
}

.client-header-nav {
    display: flex !important;
    align-items: center !important;
    gap: 1.5rem !important;
    flex-shrink: 0 !important;
    margin-left: auto !important;
}

.client-header-nav a {
    color: var(--text-medium) !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    transition: color 0.2s !important;
    text-decoration: none !important;
}

.client-header-nav a:hover {
    color: var(--primary) !important;
}

.user-menu {
    position: relative !important;
    z-index: 1100 !important;
}

.user-menu-toggle {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
}

.user-dropdown {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    background: white !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
    min-width: 200px !important;
    padding: 0.5rem 0 !important;
    z-index: 1000 !important;
    display: none !important;
}

.user-dropdown.show {
    display: block !important;
}

.user-dropdown a {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    padding: 0.75rem 1rem !important;
    font-size: 0.875rem !important;
    color: #333 !important;
    text-decoration: none !important;
}

.user-dropdown a:hover {
    background: var(--bg-light) !important;
}

.user-dropdown svg {
    width: 18px !important;
    height: 18px !important;
}

.dropdown-divider {
    height: 1px !important;
    margin: 0.5rem 0 !important;
    background: var(--border-color) !important;
}

.cart-link {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
}

.cart-count {
    position: absolute !important;
    top: -8px !important;
    right: -8px !important;
    background: var(--error) !important;
    color: white !important;
    font-size: 0.7rem !important;
    font-weight: bold !important;
    width: 18px !important;
    height: 18px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Header Categories */
.header-categories-wrapper {
    position: relative !important;
    background: var(--bg-light) !important;
    border-top: 1px solid var(--border-color) !important;
    overflow: visible !important;
}

.header-categories {
    display: flex !important;
    gap: 0 !important;
    padding: 0 2rem !important;
    padding-right: 4rem !important;
    max-width: 100% !important;
    margin: 0 !important;
    overflow-x: auto !important;
    background: var(--bg-light) !important;
    /* Masquer les scrollbars */
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE/Edge */
}

.header-categories::-webkit-scrollbar {
    display: none !important; /* Chrome/Safari/Opera */
}

.header-categories a {
    color: var(--text-medium) !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    transition: color 0.2s !important;
    padding: 0.85rem 1.25rem !important;
    text-decoration: none !important;
}

.header-categories a:hover,
.header-categories a.active {
    color: var(--primary) !important;
}

.header-categories a.highlight {
    color: var(--accent) !important;
    font-weight: 600 !important;
}

/* Indicateur de scroll */
.scroll-indicator {
    position: absolute !important;
    right: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 60px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(to right, transparent, var(--bg-light) 30%) !important;
    pointer-events: none !important;
    z-index: 10 !important;
}

.scroll-indicator-arrow {
    display: flex !important;
    align-items: center !important;
    animation: scrollPulse 1.5s ease-in-out infinite !important;
    color: var(--text-medium) !important;
    font-size: 1.2rem !important;
}

@keyframes scrollPulse {
    0%, 100% {
        opacity: 0.4;
        transform: translateX(0);
    }
    50% {
        opacity: 1;
        transform: translateX(5px);
    }
}

.scroll-indicator.hidden {
    display: none !important;
}

/* Masquer la barre de catégories en mobile */
@media (max-width: 768px) {
    .header-categories-wrapper {
        display: none !important;
    }
}

/* ========================================
   HERO BANNER
   ======================================== */

.hero-banner {
    background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
    padding: 4rem 2rem;
    color: white;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.hero-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.hero-content p {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.hero-search {
    display: flex;
    gap: 0.5rem;
    background: white;
    padding: 0.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.hero-search input {
    flex: 1;
    padding: 1rem;
    border: none;
    font-size: 1rem;
    background: transparent;
}

.hero-search input:focus {
    outline: none;
}

.hero-search button {
    padding: 1rem 2rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

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

/* ========================================
   MAIN CONTENT
   ======================================== */

.client-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.section {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.filter-select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.875rem;
    background: white;
    cursor: pointer;
}

/* ========================================
   CATEGORIES GRID
   ======================================== */

.categories-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
}

@media (max-width: 1024px) {
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 640px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.2s;
}

.category-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
    transform: translateY(-2px);
}

.category-icon {
    width: 56px;
    height: 56px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    color: var(--primary);
}

.category-card span {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-dark);
}

/* ========================================
   PRODUCTS GRID
   ======================================== */

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}

.product-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s;
}

.product-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    transform: translateY(-4px);
}

.product-image-wrapper {
    position: relative;
    padding-top: 100%;
    background: var(--bg-light);
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.favorite-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 36px;
    height: 36px;
    background: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.2s;
}

.favorite-btn:hover {
    background: var(--error);
    color: white;
}

.product-info {
    padding: 1rem;
}

.product-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.product-location {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* ========================================
   SELLERS GRID
   ======================================== */

.sellers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .sellers-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .sellers-grid {
        grid-template-columns: 1fr;
    }
}

.seller-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.2s;
}

.seller-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.seller-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.seller-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.seller-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.seller-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0.25rem;
}

.seller-rating .stars {
    color: #fbbf24;
}

.seller-info p {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

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

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

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-dark);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
    background: var(--text-dark);
    color: white;
    padding: 3rem 2rem 1.5rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.footer-section h3 {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 1rem;
    color: white;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #94a3b8;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: white;
}

.footer-copyright {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #334155;
    color: #64748b;
    font-size: 0.875rem;
}

/* ========================================
   UTILITIES
   ======================================== */

.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
