/* ==========================================================================
   PakDeals - Category Display & Card Visibility Fix (100% Valid CSS)
   ========================================================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', Arial, sans-serif;
    color: #0a0a0a;
    background-color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease;
}

.font-urdu {
    font-family: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', serif !important;
    line-height: 2.2 !important;
}

.tracking-tighter { letter-spacing: -1.2px; }
.pointer { cursor: pointer; }
.object-fit-cover { object-fit: cover; }

/* Scroll Animation */
.reveal-item {
    opacity: 0;
    transform: translateY(35px) scale(0.97);
    transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}
.reveal-item.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Base Top Bar */
.top-bar {
    background-color: #000000;
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Base Navigation */
.navbar {
    background-color: #ffffff !important;
    border-bottom: 1px solid #e5e7eb;
}
.active-nav {
    border-bottom: 2px solid #000000 !important;
    color: #000000 !important;
}

/* Search Dropdown */
.search-results-dropdown {
    max-height: 420px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background-color: #ffffff;
    z-index: 1050;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.12);
}
.search-item {
    padding: 12px 18px;
    border-bottom: 1px solid #f1f1f1;
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: #0a0a0a;
}
.search-item:hover {
    background-color: #f8f9fa;
}

/* Hero Slider */
.hero-slider {
    background: radial-gradient(circle at top right, #2a2a2a 0%, #0a0a0a 100%);
    color: #ffffff;
    border-radius: 24px;
    padding: 60px 40px;
}

/* ==========================================================================
   CATEGORY SLIDER & VISIBLE TITLES FIX
   ========================================================================== */
.cat-slider-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.cat-slider-track::-webkit-scrollbar {
    display: none;
}

.cat-slider-item {
    flex: 0 0 calc(25% - 12px);
    min-width: 220px;
    transition: transform 0.3s ease;
}

/* Category Card Background & Height */
.category-card {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 18px;
    min-height: 185px;
    transition: all 0.3s ease;
}
.category-card:hover {
    transform: translateY(-6px);
    border-color: #000000;
    background-color: #ffffff;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

/* Avatar Circle */
.cat-avatar-box {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto;
    background-color: #ffffff;
    border: 2px solid #ffffff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.category-card:hover .cat-avatar-box {
    transform: scale(1.08);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
}

/* Category Title (Clear & Bold) */
.cat-title {
    color: #000000 !important;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.35;
    margin-top: 4px;
    margin-bottom: 2px;
    display: block;
    width: 100%;
}

/* Product Cards */
.product-card {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease, border-color 0.4s ease;
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 22px 45px rgba(0, 0, 0, 0.12);
    border-color: #000000;
}
.product-thumb-wrapper {
    position: relative;
    background-color: #f8f8f9;
    padding-top: 100%;
    overflow: hidden;
}
.product-thumb-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.product-card:hover .product-thumb-wrapper img {
    transform: scale(1.08);
}

.badge-sale {
    position: absolute;
    top: 14px;
    left: 14px;
    background-color: #ff334b;
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 5px 10px;
    border-radius: 6px;
    z-index: 3;
}

/* Buttons */
.btn-dark {
    background-color: #000000 !important;
    border-color: #000000 !important;
    color: #ffffff !important;
    font-weight: 700;
    transition: all 0.25s ease;
}
.btn-dark:hover {
    background-color: #222222 !important;
    border-color: #222222 !important;
}

.flash-sale-box {
    background-color: #000000;
    color: #ffffff;
    border-radius: 20px;
    padding: 35px 40px;
}
.timer-unit {
    background-color: #181818;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    min-width: 65px;
    padding: 8px 12px;
    text-align: center;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hero-slider { padding: 35px 20px; }
    .hero-slider h1 { font-size: 2rem !important; }
    .cat-slider-item { flex: 0 0 160px; min-width: 160px; }
    .cat-avatar-box { width: 70px; height: 70px; }
    .category-card { min-height: 165px; }
}