:root {
    --shoppi-orange: #f7931e;
    --shoppi-red: #e53e3e;
    --shoppi-navy: #202033;
    --surface: #ffffff;
    --background: #f8f9fa;
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    background-color: var(--background);
    color: var(--text-primary);
}

/* CATEGORY BAR */
.category-container {
    padding: 15px 0;
    margin-bottom: 20px;
    background: var(--surface);
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 70px;
    /* Below navbar */
    z-index: 999;
}

.category-scroll {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    scrollbar-width: none;
    /* Hide scrollbar Firefox */
    -ms-overflow-style: none;
    /* Hide scrollbar IE */
    padding: 5px 2px;
}

.category-scroll::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar Chrome/Safari */
}

.category-chip {
    flex: 0 0 auto;
    padding: 8px 20px;
    background: #edf2f7;
    color: var(--text-secondary);
    border-radius: var(--radius-lg);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.category-chip:hover {
    background: #e2e8f0;
    color: var(--shoppi-orange);
}

.category-chip.active {
    background: var(--shoppi-orange);
    color: white;
    box-shadow: 0 4px 12px rgba(247, 147, 30, 0.3);
}

/* PRODUCT GRID */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

@media (max-width: 576px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
        padding: 10px;
    }
}

/* PRODUCT CARD (Premium) */
.product-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-image {
    aspect-ratio: 1 / 1;
    position: relative;
    overflow: hidden;
    background: #f7fafc;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .card-image img {
    transform: scale(1.05);
}

.card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--shoppi-red);
    color: white;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 10;
}

.heart-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
}

.heart-btn:hover {
    background: white;
    color: var(--shoppi-red);
    transform: scale(1.1);
}

.card-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    height: 2.8em;
}

.merchant-name {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.merchant-name i {
    font-size: 11px;
    color: var(--shoppi-orange);
}

.price-row {
    margin-top: auto;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.current-price {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
}

.old-price {
    font-size: 14px;
    color: #a0aec0;
    text-decoration: line-through;
}

.add-btn {
    margin-top: 15px;
    width: 100%;
    padding: 10px;
    border-radius: var(--radius-sm);
    background: var(--shoppi-navy);
    color: white;
    font-weight: 700;
    font-size: 13px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.add-btn:hover {
    background: #000;
    transform: translateY(-1px);
}

.add-btn:active {
    transform: scale(0.98);
}

/* SKELETON LOADING */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #f8f8f8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* FILTERS SIDEBAR (Slide out) */
.filter-drawer {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 2000;
    transition: var(--transition);
    padding: 30px;
}

.filter-drawer.open {
    right: 0;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
    display: block;
}

/* SEARCH SUGGESTIONS CHIPS */
.suggestion-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.suggestion-chip {
    padding: 6px 14px;
    background: #f1f5f9;
    border-radius: 20px;
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.suggestion-chip:hover {
    background: var(--shoppi-orange);
    color: white;
}

/* DISCOVERY PLATFORM ENHANCEMENTS */
.card-description {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
    height: 3em;
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(247, 147, 30, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    opacity: 0.8;
    transition: var(--transition);
}

.product-card:hover .play-overlay {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.card-footer-actions {
    margin-top: auto;
}

.visit-btn {
    background: var(--shoppi-navy);
}

.visit-btn:hover {
    background: #000;
}

.watch-btn {
    background: #ff0000;
}

.watch-btn:hover {
    background: #cc0000;
}

.read-btn {
    background: #4a5568;
}

.read-btn:hover {
    background: #2d3748;
}

.book-btn {
    background: #805ad5;
}

.book-btn:hover {
    background: #6b46c1;
}

.download-btn {
    background: #3182ce;
}

.download-btn:hover {
    background: #2b6cb0;
}

/* Type-specific card adjustments */
.card-type-contents .card-image {
    aspect-ratio: 16 / 9;
}

.card-type-videos .card-image {
    aspect-ratio: 16 / 9;
}

.card-type-posts .card-image {
    aspect-ratio: 16 / 9;
}

/* SEARCH TABS */
.search-tabs-container {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 60px;
    /* Adjust according to header height */
    z-index: 800;
    margin-bottom: 0;
}

.search-tabs {
    display: flex;
    overflow-x: auto;
    gap: 24px;
    padding: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.search-tabs::-webkit-scrollbar {
    display: none;
}

.search-tab {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 12px 4px;
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-tab:hover {
    color: var(--shoppi-navy);
}

.search-tab.active {
    color: var(--shoppi-navy);
    border-bottom-color: var(--shoppi-orange);
    font-weight: 700;
}