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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #fafafa;
    color: #212b36;
    line-height: 1.5;
    min-height: 100vh;
    padding-top: 70px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Marketplace Navbar - Shopify Style */
.marketplace-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-bottom: 1px solid #e1e3e5;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
    z-index: 1000;
    padding: 0;
}

.navbar-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    flex: 1;
}

.navbar-title h1 {
    font-size: 20px;
    font-weight: 600;
    color: #212b36;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.01em;
}

.navbar-title h1 i {
    color: #2710BF;
    font-size: 20px;
}

.navbar-subtitle {
    font-size: 13px;
    color: #637381;
    font-weight: 400;
    display: block;
    margin-top: 2px;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-link {
    color: #212b36;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.nav-link:hover {
    background: #f6f6f7;
    color: #2710BF;
}

.nav-button {
    background: linear-gradient(135deg, #423964, #1f1342);
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}

.nav-button:hover {
    background: linear-gradient(135deg, #382f5a, #150938);
    border-color: transparent;
    color: white;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: #212b36;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background 0.15s ease;
}

.mobile-menu-toggle:hover {
    background: #f6f6f7;
}

/* Mobile Menu */
.mobile-marketplace-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.mobile-marketplace-menu.active {
    display: block;
    opacity: 1;
}

.mobile-menu-header {
    background: white;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e1e3e5;
}

.mobile-menu-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #212b36;
    margin: 0;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #212b36;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background 0.15s ease;
}

.mobile-menu-close:hover {
    background: #f6f6f7;
}

.mobile-menu-content {
    background: white;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
}

.mobile-nav-link {
    color: #212b36;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    padding: 12px 16px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.15s ease;
}

.mobile-nav-link:hover {
    background: #f6f6f7;
}

.mobile-nav-button {
    background: #008060;
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    padding: 12px 16px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    text-align: center;
    justify-content: center;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 32px 24px;
}

/* Search and Filter Section - Shopify Style */
.search-filter-section {
    background: white;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid #e1e3e5;
}

.search-bar-container {
    margin-bottom: 20px;
    position: relative;
}

.search-input-wrapper {
    position: relative;
    max-width: 100%;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #637381;
    font-size: 16px;
    z-index: 2;
}

.search-input {
    width: 100%;
    padding: 12px 48px 12px 44px;
    font-size: 14px;
    border: 1px solid #c4cdd5;
    border-radius: 6px;
    background: white;
    transition: all 0.15s ease;
    outline: none;
    color: #212b36;
}

.search-input:focus {
    border-color: #2710BF;
    box-shadow: 0 0 0 3px rgba(39, 16, 191, 0.1);
}

.search-input::placeholder {
    color: #919eab;
}

.clear-search {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: #f6f6f7;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    z-index: 2;
    color: #637381;
}

.clear-search:hover {
    background: #e1e3e5;
    color: #212b36;
}

/* Search Suggestions */
.search-suggestions {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    border: 1px solid #e1e3e5;
}

.suggestion-item {
    padding: 10px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.15s ease;
    color: #212b36;
    font-size: 14px;
}

.suggestion-item:hover {
    background: #f6f6f7;
}

.suggestion-item i {
    color: #2710BF;
    font-size: 12px;
}

/* Advanced Search */
.search-advanced-toggle {
    text-align: center;
    margin-top: 12px;
}

.btn-advanced {
    background: white;
    border: 1px solid #c4cdd5;
    color: #212b36;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-advanced:hover {
    background: #f6f6f7;
    border-color: #2710BF;
    color: #2710BF;
}

.btn-advanced.active {
    background: linear-gradient(135deg, #423964, #1f1342);
    border-color: #2710BF;
    color: white;
}

.advanced-search-panel {
    margin-top: 20px;
    background: #f6f6f7;
    border-radius: 6px;
    padding: 20px;
    border: 1px solid #e1e3e5;
}

.advanced-search-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.advanced-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.advanced-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.advanced-group label {
    font-size: 12px;
    font-weight: 600;
    color: #637381;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.advanced-group label i {
    color: #2710BF;
    font-size: 11px;
}

.advanced-input {
    padding: 10px 12px;
    border: 1px solid #c4cdd5;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.15s ease;
    outline: none;
    background: white;
    color: #212b36;
}

.advanced-input:focus {
    border-color: #2710BF;
    box-shadow: 0 0 0 3px rgba(39, 16, 191, 0.1);
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #c4cdd5;
    transition: 0.2s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.2s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

input:checked + .slider {
    background-color: #2710BF;
}

input:checked + .slider:before {
    transform: translateX(20px);
}

.btn-reset-advanced {
    background: #637381;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

.btn-reset-advanced:hover {
    background: #454f5b;
}

/* Filters Container */
.filters-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-group label {
    font-size: 12px;
    font-weight: 600;
    color: #637381;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-group label i {
    margin-right: 6px;
    color: #2710BF;
    font-size: 11px;
}

.filter-select {
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #c4cdd5;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    transition: all 0.15s ease;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23637381' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    color: #212b36;
}

.filter-select:hover {
    border-color: #2710BF;
}

.filter-select:focus {
    border-color: #2710BF;
    box-shadow: 0 0 0 3px rgba(39, 16, 191, 0.1);
}

/* Products Grid - Shopify Style */
.products-section {
    margin-left: -24px;
    margin-right: -24px;
    padding-left: 24px;
    padding-right: 24px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
    border: 1px solid #e1e3e5;
}

.product-card a {
    text-decoration: none !important;
    border-bottom: none !important;
    color: inherit;
}

.product-card a:hover,
.product-card a:focus,
.product-card a:visited {
    text-decoration: none !important;
    border-bottom: none !important;
    color: inherit;
}

.product-card h3,
.product-card h3 a,
.product-card .product-name,
.product-card .product-description {
    text-decoration: none !important;
    border-bottom: none !important;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: #c4cdd5;
}

.product-image-wrapper {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f6f6f7;
}

.product-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image-wrapper img {
    transform: scale(1.03);
}

.remise-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #bf0711;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    z-index: 2;
    letter-spacing: 0.02em;
}

.stock-out-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(33, 43, 54, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    z-index: 2;
}

.product-view-button {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: linear-gradient(135deg, #423964, #1f1342);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 3;
}

.product-view-button:hover {
    background: linear-gradient(135deg, #382f5a, #150938);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39, 16, 191, 0.4);
}

.product-view-button:active {
    transform: translateY(0);
}

.product-view-button i {
    font-size: 13px;
}

.product-view-button span {
    font-weight: 500;
}

.product-card {
    position: relative;
}

.product-details {
    padding: 12px;
}

.product-company {
    font-size: 11px;
    color: #637381;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.product-company i {
    font-size: 10px;
}

.product-name {
    font-size: 14px;
    font-weight: 500;
    color: #212b36;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 40px;
    text-decoration: none !important;
    border-bottom: none !important;
}

.product-price-container {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.product-price {
    font-size: 16px;
    font-weight: 600;
    color: #212b36;
    line-height: 1;
}

.product-old-price {
    font-size: 13px;
    color: #919eab;
    text-decoration: line-through;
    font-weight: 400;
}

.product-description {
    font-size: 12px;
    color: #637381;
    margin-top: 6px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-decoration: none !important;
    border-bottom: none !important;
}

/* No Results / No Products */
.no-products,
.no-results {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e1e3e5;
}

.no-products i,
.no-results i {
    font-size: 64px;
    color: #c4cdd5;
    margin-bottom: 20px;
    opacity: 0.6;
}

.no-products h2,
.no-results h2 {
    font-size: 20px;
    color: #212b36;
    margin-bottom: 8px;
    font-weight: 600;
}

.no-products p,
.no-results p {
    font-size: 14px;
    color: #637381;
    max-width: 500px;
    margin: 0 auto;
}

/* Search Highlight */
mark {
    background: #fff4e6;
    color: #b45309;
    padding: 1px 2px;
    border-radius: 2px;
    font-weight: 500;
}

/* Hidden Products */
.hidden-product {
    display: none !important;
}

/* Loading Indicator */
.loading-indicator {
    text-align: center;
    padding: 40px 20px;
    background: white;
    border-radius: 8px;
    margin-top: 24px;
    border: 1px solid #e1e3e5;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f6f6f7;
    border-top-color: #2710BF;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-indicator p {
    color: #637381;
    font-size: 14px;
    margin: 0;
}

/* Responsive */
@media (max-width: 1400px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

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

@media (max-width: 768px) {
    body {
        padding-top: 60px;
    }

    .navbar-container {
        height: 60px;
        padding: 0 16px;
    }

    .navbar-title h1 {
        font-size: 18px;
    }

    .navbar-title h1 i {
        font-size: 16px;
    }

    .navbar-subtitle {
        font-size: 11px;
    }

    .navbar-actions {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .container {
        padding: 24px 16px;
    }

    .search-filter-section {
        padding: 20px;
    }

    .filters-container {
        grid-template-columns: 1fr;
    }

    .products-section {
        margin-left: -16px;
        margin-right: -16px;
        padding-left: 16px;
        padding-right: 16px;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .product-image-wrapper {
        height: 180px;
    }

    .product-name {
        font-size: 13px;
        min-height: 36px;
    }

    .product-price {
        font-size: 15px;
    }

    .product-details {
        padding: 10px;
    }
}

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

    .product-image-wrapper {
        height: 240px;
    }

    .product-name {
        font-size: 14px;
        min-height: 40px;
    }

    .product-price {
        font-size: 16px;
    }
}
