/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-orange: #ff9900;
    --primary-dark-orange: #e47911;
    --primary-navy: #131921;
    --primary-dark-navy: #232f3e;
    --background-light: #f7f7f7;
    --white: #ffffff;
    --text-primary: #0f1111;
    --text-secondary: #565959;
    --text-light: #888888;
    --border-color: #d5d9d9;
    --success-green: #067d62;
    --error-red: #cc0c39;
    --link-blue: #007185;
    --shadow-sm: 0 2px 5px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --header-height: 120px;
    --header-height-mobile: 100px;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--background-light);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Mobile App Banner */
.mobile-app-banner {
    display: none;
    background: linear-gradient(135deg, var(--primary-orange) 0%, var(--primary-dark-orange) 100%);
    color: var(--white);
    padding: 8px 15px;
    position: relative;
    animation: slideDown 0.3s ease-out;
    z-index: 1001;
}

.banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
}

.banner-content i {
    font-size: 16px;
}

.banner-content a {
    color: var(--white);
    font-weight: 700;
    text-decoration: none;
    background: rgba(255,255,255,0.2);
    padding: 4px 8px;
    border-radius: 4px;
    margin-left: 5px;
}

.close-banner {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--white);
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    transition: var(--transition);
}

.close-banner:hover {
    opacity: 0.8;
}

/* Header Styles */
.header {
    background-color: var(--primary-navy);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Desktop Header */
.header-desktop {
    display: block;
}

.header-mobile {
    display: none;
}

.header-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--white);
    text-decoration: none;
    font-size: 22px;
    font-weight: 700;
    white-space: nowrap;
    transition: var(--transition);
}

.logo i {
    font-size: 24px;
    color: var(--primary-orange);
}

.logo:hover {
    opacity: 0.9;
}

.logo-highlight {
    color: var(--primary-orange);
}

/* Search Container */
.search-container {
    flex: 1;
    max-width: 600px;
    margin: 0 20px;
}

.search-input-wrapper {
    display: flex;
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.search-category {
    background-color: var(--background-light);
    border: none;
    padding: 12px 15px;
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
    border-right: 1px solid var(--border-color);
    min-width: 140px;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 14px;
    z-index: 2;
    display: none;
}

.search-input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    font-size: 14px;
    outline: none;
    background: transparent;
}

.search-input::placeholder {
    color: var(--text-light);
}

.search-button {
    padding: 12px 20px;
    background-color: var(--primary-orange);
    border: none;
    cursor: pointer;
    color: var(--white);
    transition: var(--transition);
    font-size: 14px;
}

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

/* Header Actions */
.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.header-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: var(--white);
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 4px;
    transition: var(--transition);
    font-size: 12px;
}

.header-action:hover {
    background-color: rgba(255,255,255,0.1);
}

.header-action i {
    font-size: 18px;
}

.action-text {
    font-weight: 500;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: var(--transition);
}

.mobile-menu-toggle:hover {
    background-color: rgba(255,255,255,0.1);
}

/* Navigation Bar */
.nav-bar {
    background-color: var(--primary-dark-navy);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.nav-bar::-webkit-scrollbar {
    display: none;
}

.nav-container {
    display: flex;
    align-items: center;
    padding: 8px 0;
    gap: 5px;
    white-space: nowrap;
    max-width: 1400px;
    margin: 0 auto;
    padding-left: 15px;
    padding-right: 15px;
}

.nav-link {
    color: var(--white);
    text-decoration: none;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 4px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(255,255,255,0.15);
}

.nav-link i {
    font-size: 12px;
}

/* Mobile Menu */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    background-color: var(--white);
    z-index: 2000;
    transition: left 0.3s ease;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: var(--primary-navy);
    color: var(--white);
}

.mobile-menu-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 700;
}

.mobile-menu-logo i {
    color: var(--primary-orange);
}

.mobile-menu-close {
    background: none;
    border: none;
    color: var(--white);
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
}

.mobile-menu-content {
    padding: 15px 0;
}

.mobile-menu-section {
    margin-bottom: 20px;
}

.mobile-menu-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 15px 20px 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mobile-menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
    border-left: 3px solid transparent;
    cursor: pointer;
    position: relative;
    z-index: 1;
}

.mobile-menu-item:hover {
    background-color: var(--background-light);
    border-left-color: var(--primary-orange);
}

.mobile-menu-item.featured {
    background: linear-gradient(135deg, var(--primary-orange), var(--primary-dark-orange));
    color: var(--white);
    margin: 0 15px 15px;
    border-radius: 8px;
    border-left: none;
}

.mobile-menu-item.contact {
    background-color: var(--success-green);
    color: var(--white);
    margin: 15px;
    border-radius: 8px;
    border-left: none;
}

.mobile-menu-item i:first-child {
    width: 20px;
    margin-right: 12px;
    font-size: 16px;
}

.mobile-menu-item i:last-child {
    font-size: 12px;
    opacity: 0.7;
}

/* Category Section */
.category-section {
    padding: 30px 0;
    background-color: var(--white);
}

.section-title {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--text-primary);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.category-card {
    background-color: var(--white);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: inherit;
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.category-image {
    position: relative;
    padding-top: 75%;
    overflow: hidden;
    background-color: var(--background-light);
}

.category-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.category-card:hover .category-image img {
    transform: scale(1.05);
}

.category-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 15px;
    transform: translateY(100%);
    transition: var(--transition);
}

.category-card:hover .category-overlay {
    transform: translateY(0);
}

.view-deals {
    color: var(--white);
    font-weight: 600;
    font-size: 12px;
}

.category-info {
    padding: 12px;
}

.category-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.category-info p {
    color: var(--primary-orange);
    font-weight: 600;
    font-size: 13px;
}

/* Main Content */
.main-content {
    padding: 20px 0;
    min-height: 400px;
}

.content-wrapper {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    min-height: calc(100vh - 160px);
}

/* Filters Sidebar */
.filters-sidebar {
    width: 260px;
    background-color: var(--white);
    border-radius: 12px;
    height: fit-content;
    max-height: calc(100vh - 160px);
    position: sticky;
    top: 140px;
    box-shadow: var(--shadow-sm);
    display: block;
    overflow-y: auto;
    flex-shrink: 0;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.filters-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.filters-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.clear-filters {
    background: none;
    border: none;
    color: var(--link-blue);
    font-size: 12px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    padding: 4px 8px;
    border-radius: 4px;
}

.clear-filters:hover {
    color: var(--primary-orange);
    background-color: var(--background-light);
}

.close-filters {
    display: none;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 4px;
}

.filters-content {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.filter-search {
    margin-bottom: 10px;
    position: relative;
}

.filter-search input {
    width: 100%;
    padding: 8px 30px 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 12px;
    outline: none;
    transition: var(--transition);
}

.filter-search i {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 12px;
}

.filter-search input:focus {
    border-color: var(--primary-orange);
}

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

.filter-options.scrollable {
    max-height: 150px;
    overflow-y: auto;
    padding-right: 5px;
}

.filter-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    padding-left: 25px;
    font-size: 13px;
    color: var(--text-primary);
    transition: var(--transition);
    padding-top: 4px;
    padding-bottom: 4px;
}

.filter-option:hover {
    color: var(--primary-orange);
}

.filter-option input[type="checkbox"],
.filter-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.filter-option .checkmark {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 16px;
    width: 16px;
    background-color: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 3px;
    transition: var(--transition);
}

.filter-option input[type="radio"] ~ .checkmark {
    border-radius: 50%;
}

.filter-option:hover .checkmark {
    border-color: var(--primary-orange);
}

.filter-option input:checked ~ .checkmark {
    background-color: var(--primary-orange);
    border-color: var(--primary-orange);
}

.filter-option .checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.filter-option input:checked ~ .checkmark:after {
    display: block;
}

.filter-option input[type="checkbox"] ~ .checkmark:after {
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.filter-option input[type="radio"] ~ .checkmark:after {
    left: 4px;
    top: 4px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: white;
}

.filter-option .label {
    margin-left: 6px;
}

/* Price Range */
.price-range-container {
    margin-top: 10px;
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.price-input-group {
    flex: 1;
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 8px;
}

.price-input-group span {
    color: var(--text-secondary);
    margin-right: 4px;
    font-size: 12px;
}

.price-input-group input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 12px;
    width: 100%;
}

.price-separator {
    color: var(--text-secondary);
    font-size: 12px;
}

/* Products Section */
.products-section {
    flex: 1;
    min-height: 100%;
}

.products-header {
    background-color: var(--white);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: var(--shadow-sm);
}

.results-info {
    margin-bottom: 12px;
}

.results-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.results-count {
    color: var(--text-secondary);
    font-size: 13px;
}

.products-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.filter-toggle {
    background-color: var(--primary-orange);
    color: var(--white);
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: none;
    align-items: center;
    gap: 6px;
}

.filter-toggle:hover {
    background-color: var(--primary-dark-orange);
}

.sort-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sort-select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: var(--white);
    cursor: pointer;
    font-size: 13px;
    outline: none;
    transition: var(--transition);
}

.sort-select:focus {
    border-color: var(--primary-orange);
}

/* Active Filters */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.active-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: var(--primary-orange);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
}

.active-filter-tag button {
    background: none;
    border: none;
    color: var(--white);
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 0;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.product-card {
    background-color: var(--white);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    position: relative;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.product-link {
    text-decoration: none;
    color: inherit;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-image {
    position: relative;
    padding-top: 75%;
    background-color: var(--background-light);
    overflow: hidden;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
    transition: var(--transition);
}

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

.deal-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background-color: var(--error-red);
    color: var(--white);
    padding: 4px 8px;
    font-size: 10px;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
    box-shadow: var(--shadow-sm);
}

.product-info {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-brand {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 4px;
    font-weight: 500;
}

.product-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
    min-height: 34px;
    flex: 1;
}

.price-section {
    margin-bottom: 10px;
}

.price-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 4px;
}

.currency {
    font-size: 12px;
    color: var(--text-primary);
}

.price {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.original-price {
    font-size: 12px;
    color: var(--text-secondary);
    text-decoration: line-through;
}

.save-amount {
    font-size: 11px;
    color: var(--error-red);
    font-weight: 600;
}

.price-history {
    font-size: 10px;
    color: var(--success-green);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.buy-button {
    width: 100%;
    background-color: var(--primary-orange);
    color: var(--white);
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: auto;
}

.buy-button:hover {
    background-color: var(--primary-dark-orange);
    transform: translateY(-1px);
}

/* Loading States */
.loading-container {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    grid-column: 1 / -1;
}

.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid var(--background-light);
    border-top: 3px solid var(--primary-orange);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Load More Button */
.load-more-container {
    text-align: center;
    margin: 30px 0;
}

.load-more-btn {
    background-color: var(--white);
    color: var(--primary-orange);
    border: 2px solid var(--primary-orange);
    padding: 10px 30px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.load-more-btn:hover {
    background-color: var(--primary-orange);
    color: var(--white);
}

.load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.page-btn {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    background-color: var(--white);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    min-width: 40px;
    text-align: center;
}

.page-btn:hover {
    background-color: var(--background-light);
    border-color: var(--primary-orange);
}

.page-btn.active {
    background-color: var(--primary-orange);
    color: var(--white);
    border-color: var(--primary-orange);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Brand Showcases */
.brand-showcases {
    margin: 30px 0;
}

.brand-showcase {
    padding: 30px 0;
    background-color: var(--white);
}

.brand-showcase.alt-bg {
    background-color: var(--background-light);
}

.showcase-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.showcase-header h2 {
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.showcase-header h2 i {
    color: var(--primary-orange);
}

.see-all {
    color: var(--link-blue);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: var(--transition);
}

.see-all:hover {
    color: var(--primary-orange);
    transform: translateX(3px);
}

.showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
}

.showcase-product {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.showcase-product:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.showcase-image {
    position: relative;
    padding-top: 75%;
    background-color: var(--background-light);
}

.showcase-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.hot-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background-color: var(--error-red);
    color: var(--white);
    padding: 3px 6px;
    font-size: 10px;
    font-weight: 700;
    border-radius: 3px;
}

.showcase-info {
    padding: 10px;
}

.showcase-info h4 {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.showcase-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.showcase-price .current {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-orange);
}

.showcase-price .original {
    font-size: 11px;
    color: var(--text-secondary);
    text-decoration: line-through;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background-color: var(--white);
    border-radius: 12px;
    padding: 25px;
    max-width: 400px;
    width: 100%;
    position: relative;
    animation: slideUp 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
    padding: 4px;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-content h3 {
    font-size: 18px;
    margin-bottom: 15px;
}

.share-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 12px;
    font-weight: 500;
}

.share-option i {
    font-size: 20px;
}

.share-option.whatsapp {
    background-color: #25d366;
    color: white;
}

.share-option.twitter {
    background-color: #1da1f2;
    color: white;
}

.share-option.facebook {
    background-color: #1877f2;
    color: white;
}

.share-option.copy {
    background-color: var(--background-light);
    color: var(--text-primary);
}

.share-option:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.share-preview {
    padding: 12px;
    background-color: var(--background-light);
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.4;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--primary-orange);
    color: var(--white);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--primary-dark-orange);
    transform: translateY(-2px);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background-color: var(--text-primary);
    color: var(--white);
    padding: 12px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}

.toast i {
    font-size: 16px;
    color: var(--success-green);
}

/* Footer */
.footer {
    background-color: var(--primary-navy);
    color: var(--white);
    margin-top: 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 30px;
    padding: 40px 0;
}

.footer-section h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--white);
}

.footer-section.main-section {
    max-width: 300px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
}

.footer-logo i {
    color: var(--primary-orange);
    font-size: 22px;
}

.footer-desc {
    color: rgba(255,255,255,0.8);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
}

.footer-social {
    display: flex;
    gap: 10px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background-color: rgba(255,255,255,0.1);
    color: var(--white);
    border-radius: 50%;
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    background-color: var(--primary-orange);
    transform: translateY(-2px);
}

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

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--primary-orange);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.contact-item i {
    color: var(--primary-orange);
    width: 16px;
}

.contact-item a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: var(--transition);
}

.contact-item a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: rgba(255,255,255,0.7);
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--white);
}

/* Animations */
@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.fade-in {
    animation: fadeInUp 0.5s ease-out forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .container {
        max-width: 100%;
    }
    
    .showcase-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}

@media (max-width: 992px) {
    .filters-sidebar {
        width: 220px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .category-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: var(--header-height-mobile);
    }
    
    /* Mobile App Banner */
    .mobile-app-banner {
        display: block;
    }
    
    /* Header Mobile */
    .header-desktop {
        display: none;
    }
    
    .header-mobile {
        display: block;
    }
    
    .mobile-header-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 0;
        gap: 10px;
    }
    
    .mobile-search-row {
        padding-bottom: 12px;
    }
    
    .mobile-search-row .search-container {
        margin: 0;
        max-width: none;
    }
    
    .mobile-search-row .search-category {
        display: none;
    }
    
    .mobile-search-row .search-icon {
        display: block;
    }
    
    .mobile-search-row .search-input {
        padding-left: 35px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .mobile-search-row .search-button {
        padding: 10px 16px;
    }
    
    .logo {
        font-size: 18px;
    }
    
    .logo-text {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .mobile-header-actions {
        display: flex;
        gap: 8px;
    }
    
    .mobile-action {
        color: var(--white);
        text-decoration: none;
        padding: 8px;
        border-radius: 4px;
        transition: var(--transition);
    }
    
    .mobile-action:hover {
        background-color: rgba(255,255,255,0.1);
    }
    
    .mobile-action i {
        font-size: 18px;
    }
    
    /* Navigation Mobile */
    .nav-container {
        padding: 6px 15px;
        justify-content: flex-start;
        overflow-x: auto;
    }
    
    .nav-link {
        padding: 4px 8px;
        font-size: 12px;
        white-space: nowrap;
    }
    
    .nav-link span {
        display: none;
    }
    
    .nav-link i {
        font-size: 14px;
    }
    
    /* Category Section Mobile */
    .category-section {
        padding: 20px 0;
    }
    
    .section-title {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .category-info h3 {
        font-size: 14px;
    }
    
    .category-info p {
        font-size: 12px;
    }
    
    /* Content Wrapper Mobile */
    .content-wrapper {
        flex-direction: column;
        gap: 0;
    }
    
    /* Filters Mobile */
    .filters-sidebar {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100vh;
        z-index: 1500;
        border-radius: 0;
        overflow-y: auto;
    }
    
    .filters-sidebar.active {
        display: block;
    }
    
    .filters-header {
        padding: 15px 20px;
        position: sticky;
        top: 0;
        background: var(--white);
        z-index: 10;
    }
    
    .close-filters {
        display: block;
    }
    
    .filter-toggle {
        display: flex !important;
    }
    
    /* Products Mobile */
    .products-header {
        padding: 15px;
        border-radius: 8px;
        margin-bottom: 12px;
    }
    
    .results-title {
        font-size: 18px;
    }
    
    .products-controls {
        flex-direction: row;
        gap: 10px;
    }
    
    .sort-container {
        flex: 1;
    }
    
    .sort-select {
        width: 100%;
        font-size: 12px;
    }
    
    .filter-toggle {
        flex-shrink: 0;
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .product-info {
        padding: 10px;
    }
    
    .product-title {
        font-size: 12px;
        min-height: 30px;
    }
    
    .price {
        font-size: 16px;
    }
    
    .buy-button {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    /* Brand Showcases Mobile */
    .brand-showcase {
        padding: 20px 0;
    }
    
    .showcase-header h2 {
        font-size: 18px;
    }
    
    .showcase-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .showcase-info {
        padding: 8px;
    }
    
    .showcase-info h4 {
        font-size: 11px;
    }
    
    .showcase-price .current {
        font-size: 13px;
    }
    
    /* Modal Mobile */
    .modal-content {
        margin: 0 10px;
        padding: 20px;
    }
    
    .share-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .share-option {
        padding: 10px;
        font-size: 11px;
    }
    
    /* Footer Mobile */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 30px 0;
    }
    
    .footer-section.main-section {
        max-width: none;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .footer-links {
        gap: 15px;
    }
    
    /* Back to Top Mobile */
    .back-to-top {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .showcase-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .category-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .modal-content {
        margin: 0 5px;
        padding: 15px;
    }
    
    .share-options {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 360px) {
    .header-top-row {
        gap: 8px;
    }
    
    .logo {
        font-size: 16px;
    }
    
    .search-input {
        font-size: 14px;
    }
    
    .products-grid {
        gap: 8px;
    }
    
    .product-info {
        padding: 8px;
    }
}

/* Utility Classes */
.mobile-only {
    display: none;
}

@media (max-width: 768px) {
    .mobile-only {
        display: block;
    }
    
    .desktop-only {
        display: none;
    }
}

/* Custom Scrollbars */
.filters-content::-webkit-scrollbar,
.filter-options.scrollable::-webkit-scrollbar {
    width: 4px;
}

.filters-content::-webkit-scrollbar-track,
.filter-options.scrollable::-webkit-scrollbar-track {
    background: var(--background-light);
    border-radius: 2px;
}

.filters-content::-webkit-scrollbar-thumb,
.filter-options.scrollable::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

.filters-content::-webkit-scrollbar-thumb:hover,
.filter-options.scrollable::-webkit-scrollbar-thumb:hover {
    background: var(--primary-orange);
}

/* Performance optimizations */
.product-image img,
.category-image img,
.showcase-image img {
    will-change: transform;
}

.product-card,
.category-card,
.showcase-product {
    will-change: transform;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
.search-input:focus,
.sort-select:focus,
.filter-option input:focus + .checkmark {
    outline: 2px solid var(--primary-orange);
    outline-offset: 2px;
}

button:focus,
a:focus {
    outline: 2px solid var(--primary-orange);
    outline-offset: 2px;
}
/* Add these CSS fixes to your style.css file */

/* Fix for header transitions on mobile */
.header {
    transition: transform 0.3s ease;
}

.header.header-hidden {
    transform: translateY(-100%);
}

/* Fix duplicate search bar issue - Hide desktop search in mobile header */
@media (max-width: 768px) {
    .header-desktop {
        display: none !important;
    }
    
    .header-mobile {
        display: block !important;
    }
}

/* Fix navigation bar wrapping on mobile */
.nav-bar {
    background-color: var(--primary-dark-navy);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    white-space: nowrap; /* Prevent wrapping */
}

.nav-container {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    gap: 5px;
    white-space: nowrap;
    min-width: max-content;
}

/* Fix product grid for 2 columns on mobile */
@media (max-width: 768px) {
    .products-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    
    /* Ensure loading container spans both columns */
    .loading-container {
        grid-column: 1 / -1;
    }
}

/* Fix navigation widget styling on mobile */
@media (max-width: 768px) {
    .nav-link {
        padding: 8px 12px;
        font-size: 13px;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .nav-link i {
        font-size: 14px;
        margin-right: 4px;
    }
    
    /* Hide text on very small screens */
    @media (max-width: 360px) {
        .nav-link span {
            display: none;
        }
        
        .nav-link {
            padding: 8px 10px;
        }
    }
}

/* Fix category grid on mobile */
@media (max-width: 768px) {
    .category-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .category-card {
        border-radius: 8px;
    }
    
    .category-info {
        padding: 10px;
    }
    
    .category-info h3 {
        font-size: 14px;
        margin-bottom: 2px;
    }
    
    .category-info p {
        font-size: 12px;
    }
}

/* Fix mobile search styling */
.mobile-search-row {
    padding: 0 15px 12px;
}

.mobile-search-row .search-container {
    margin: 0;
    max-width: none;
}

.mobile-search-row .search-input-wrapper {
    position: relative;
}

.mobile-search-row .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 14px;
    z-index: 2;
}

.mobile-search-row .search-input {
    padding-left: 35px;
    font-size: 16px; /* Prevents zoom on iOS */
}

/* Fix product card styling on mobile */
@media (max-width: 768px) {
    .product-card {
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    
    .product-info {
        padding: 10px;
    }
    
    .product-title {
        font-size: 12px;
        min-height: 32px;
        -webkit-line-clamp: 2;
    }
    
    .product-brand {
        font-size: 10px;
    }
    
    .price {
        font-size: 16px;
    }
    
    .original-price {
        font-size: 11px;
    }
    
    .save-amount {
        font-size: 10px;
    }
    
    .buy-button {
        padding: 8px 12px;
        font-size: 12px;
        border-radius: 6px;
    }
    
    .deal-badge {
        font-size: 9px;
        padding: 3px 6px;
    }
}

/* Mobile Apply Button */
.mobile-apply-container {
    display: none;
}

@media (max-width: 768px) {
    .mobile-apply-container {
        display: block;
        position: sticky;
        bottom: 0;
        left: 0;
        right: 0;
        background: linear-gradient(to top, var(--white) 70%, transparent);
        padding: 15px 20px 20px;
        z-index: 10;
    }
    
    .mobile-apply-btn {
        width: 100%;
        background-color: var(--primary-orange);
        color: var(--white);
        border: none;
        padding: 14px 20px;
        border-radius: 8px;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        transition: var(--transition);
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        box-shadow: 0 2px 8px rgba(255, 153, 0, 0.3);
    }
    
    .mobile-apply-btn:hover {
        background-color: var(--primary-dark-orange);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(255, 153, 0, 0.4);
    }
    
    .mobile-apply-btn:active {
        transform: translateY(0);
    }
}

/* Fix filters sidebar on mobile */
@media (max-width: 768px) {
    .filters-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        z-index: 2500;
        border-radius: 0;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        background-color: var(--white);
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        display: flex;
        flex-direction: column;
    }
    
    .filters-sidebar.active {
        left: 0;
    }
    
    .filters-content {
        flex: 1;
        padding-bottom: 80px; /* Space for apply button */
    }
}

/* Fix body scroll when modals are open */
body.modal-open,
body.filters-open,
body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Ensure proper z-index hierarchy */
.mobile-app-banner {
    z-index: 1001;
}

.header {
    z-index: 1000;
}

.mobile-menu-overlay {
    z-index: 1999;
}

.mobile-menu {
    z-index: 2000;
}

.filters-sidebar {
    z-index: 2500;
}

.modal {
    z-index: 2100;
}

.toast {
    z-index: 2200;
}

/* Fix mobile menu overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

/* Touch feedback for mobile */
@media (hover: none) {
    .product-card.touch-active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
    
    button:active,
    .buy-button:active,
    .filter-toggle:active {
        transform: scale(0.95);
    }
}

/* Fix filter toggle button on mobile */
@media (max-width: 768px) {
    .filter-toggle {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 8px 14px;
        font-size: 13px;
        background-color: var(--primary-orange);
        color: white;
        border: none;
        border-radius: 6px;
    }
}

/* Fix active filters display on mobile */
@media (max-width: 768px) {
    .active-filters {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 8px;
        padding: 8px 0;
        margin-bottom: 12px;
    }
    
    .active-filters::-webkit-scrollbar {
        display: none;
    }
    
    .active-filter-tag {
        flex-shrink: 0;
        font-size: 11px;
        padding: 4px 8px;
    }
}

/* Additional mobile optimizations */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .section-title {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    /* Single column for very small screens */
    @media (max-width: 360px) {
        .products-grid {
            grid-template-columns: 1fr !important;
        }
        
        .category-grid {
            grid-template-columns: 1fr;
        }
    }
}
