/* =====================================================
   INDEX PAGE - Styles
   ===================================================== */

.section { padding: 40px 0; }
.section-gray { background: var(--light); }

/* Category Icons - Dark Color */
.category-card i {
    color: #232d41;
}
.category-card:hover i {
    color: var(--white);
}

/* No Image Placeholder */
.no-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e8e8e8 0%, #d0d0d0 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #999;
}
.no-image-placeholder i {
    font-size: 40px;
    margin-bottom: 8px;
    opacity: 0.7;
}
.no-image-placeholder span {
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.7;
}
.no-image-placeholder.product-placeholder {
    background: linear-gradient(135deg, #f0f4e8 0%, #dce8c8 100%);
    color: #7a9a4a;
}

/* Products */
.product-card .card-price {
    font-size: 18px;
}
.product-card .old-price {
    text-decoration: line-through;
    color: var(--gray);
    font-size: 14px;
    margin-right: 8px;
}
.card-badge.sale {
    background: var(--danger);
}

/* Compact CTA */
.cta-section-compact {
    padding: 30px 0;
}
.cta-card-compact {
    background: linear-gradient(135deg, var(--primary) 0%, var(--dark) 100%);
    border-radius: var(--radius);
    padding: 20px 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    color: var(--white);
}
.cta-icon {
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--secondary);
    flex-shrink: 0;
}
.cta-content-compact {
    flex: 1;
}
.cta-content-compact h3 {
    font-size: 18px;
    margin-bottom: 4px;
}
.cta-content-compact p {
    font-size: 13px;
    opacity: 0.85;
    margin: 0;
}
.cta-card-compact .btn {
    flex-shrink: 0;
}

/* Shop Grid & Cards - Same as shops.php */
.shops-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.shop-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}
.shop-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}
.shop-banner {
    position: relative;
    width: 100%;
    padding-bottom: 60%;
    overflow: hidden;
    background: var(--light);
}
.shop-banner img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.shop-banner-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}
.shop-logo-wrapper {
    display: flex;
    justify-content: center;
    margin-top: -35px;
    position: relative;
    z-index: 2;
}
.shop-logo {
    width: 70px;
    height: 70px;
    background: #fff !important;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border: 3px solid #fff !important;
}
.shop-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: calc(var(--radius) - 4px);
}
.shop-logo i {
    font-size: 28px;
    color: var(--gray);
}
.shop-info {
    padding: 15px;
    padding-top: 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
    text-align: center;
}
.shop-info h3 {
    font-size: 16px;
    margin-bottom: 8px;
    color: var(--primary);
    line-height: 1.3;
}
.shop-category {
    font-size: 13px;
    color: var(--secondary);
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.shop-category i {
    font-size: 12px;
}
.shop-stats {
    font-size: 12px;
    color: var(--gray);
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: auto;
    padding-top: 10px;
}
.shop-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* View All Arrow - hidden by default */
.view-arrow {
    display: none;
}

/* =====================================================
   DARK MODE
   ===================================================== */
[data-theme="dark"] .hero {
    background: linear-gradient(135deg, #1a1f2e 0%, #232d41 100%);
}

[data-theme="dark"] .hero h1,
[data-theme="dark"] .hero p {
    color: #e9ecef;
}

[data-theme="dark"] .hero-search input {
    background: #2d3548;
    border-color: #3d4758;
    color: #e9ecef;
}

[data-theme="dark"] .hero-search input::placeholder {
    color: #9ca3af;
}

[data-theme="dark"] .hero-search button {
    background: var(--secondary);
    color: #1a1f2e;
}

[data-theme="dark"] .section-gray {
    background: #1a1f2e;
}

[data-theme="dark"] .category-card {
    background: #232d41;
    border-color: #2d3548;
}

[data-theme="dark"] .category-card i {
    color: var(--secondary);
}

[data-theme="dark"] .category-card span {
    color: #e9ecef;
}

[data-theme="dark"] .category-card:hover {
    background: var(--secondary);
}

[data-theme="dark"] .category-card:hover i,
[data-theme="dark"] .category-card:hover span {
    color: #1a1f2e;
}

[data-theme="dark"] .card {
    background: #232d41;
    border-color: #2d3548;
}

[data-theme="dark"] .card-title {
    color: #e9ecef;
}

[data-theme="dark"] .card-price {
    color: var(--secondary);
}

[data-theme="dark"] .card-meta {
    color: #9ca3af;
}

[data-theme="dark"] .section-title {
    color: #e9ecef;
}

[data-theme="dark"] .no-image-placeholder {
    background: linear-gradient(135deg, #2d3548 0%, #3d4758 100%);
    color: #6c757d;
}

[data-theme="dark"] .no-image-placeholder.product-placeholder {
    background: linear-gradient(135deg, #2d3a2d 0%, #3d4a3d 100%);
    color: #8dc73f;
}

[data-theme="dark"] .shop-banner-placeholder {
    background: linear-gradient(135deg, #2d3548 0%, var(--secondary) 100%);
}

[data-theme="dark"] .shop-logo {
    background: #232d41;
    border: 1px solid #2d3548;
}

[data-theme="dark"] .shop-logo.no-logo {
    color: #6c757d;
}

[data-theme="dark"] .cta-card-compact {
    background: linear-gradient(135deg, #2d3548 0%, #1a1f2e 100%);
    border: 1px solid #3d4758;
}

[data-theme="dark"] .cta-content-compact h3 {
    color: #e9ecef;
}

[data-theme="dark"] .cta-content-compact p {
    color: #9ca3af;
}

[data-theme="dark"] .empty-state {
    color: #9ca3af;
}

[data-theme="dark"] .empty-state h3 {
    color: #e9ecef;
}

[data-theme="dark"] .btn-outline {
    border-color: #3d4758;
    color: #e9ecef;
}

[data-theme="dark"] .btn-outline:hover {
    background: #2d3548;
    border-color: var(--secondary);
}

/* Dark Mode Shop Cards */
[data-theme="dark"] .shop-card {
    background: var(--bg-card);
}
[data-theme="dark"] .shop-banner {
    background: var(--bg-secondary);
}
[data-theme="dark"] .shop-info h3 {
    color: var(--text-primary);
}
[data-theme="dark"] .shop-stats {
    color: var(--text-secondary);
}

/* =====================================================
   MOBILE RESPONSIVE
   ===================================================== */
@media (max-width: 768px) {
    /* View All - show arrow, hide text */
    .view-text {
        display: none;
    }
    .view-arrow {
        display: inline-block;
    }
    .btn-outline.btn-sm {
        width: 32px;
        height: 32px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
    }

    /* Hero Section - Smaller */
    .hero {
        padding: 30px 0;
    }
    .hero h1 {
        font-size: 22px;
        margin-bottom: 8px;
    }
    .hero p {
        font-size: 13px;
        margin-bottom: 15px;
    }

    /* Hero Search - Compact */
    .hero-search {
        max-width: 100%;
        padding: 0 10px;
    }
    .hero-search form {
        border-radius: 25px;
    }
    .hero-search input {
        padding: 10px 15px;
        font-size: 14px;
    }
    .hero-search button {
        padding: 10px 15px;
        font-size: 14px;
    }
    .hero-search button .search-text {
        display: none;
    }

    /* Section padding */
    .section {
        padding: 20px 0;
    }
    .section-header {
        margin-bottom: 12px;
    }
    .section-title {
        font-size: 16px;
    }

    /* 2x2 Grid on mobile */
    .grid-4 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }

    /* Smaller cards */
    .card-image {
        height: 130px;
    }
    .card-body {
        padding: 10px;
    }
    .card-title {
        font-size: 13px;
        margin-bottom: 4px;
        -webkit-line-clamp: 2;
    }
    .card-price {
        font-size: 14px !important;
    }
    .card-meta {
        font-size: 10px;
        gap: 6px;
        margin-top: 4px;
    }
    .card-meta span:last-child {
        display: none;
    }
    .card-badge {
        font-size: 9px;
        padding: 2px 6px;
    }

    /* No image placeholder mobile */
    .no-image-placeholder i {
        font-size: 28px;
        margin-bottom: 5px;
    }
    .no-image-placeholder span {
        font-size: 10px;
    }

    /* Products */
    .product-card .old-price {
        font-size: 11px;
        display: block;
        margin-bottom: 2px;
        margin-right: 0;
    }

    /* Categories - Horizontal Carousel + 15% bigger */
    .categories-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 10px;
        padding-bottom: 10px;
        margin: 0 -15px;
        padding-left: 15px;
        padding-right: 15px;
    }
    .categories-grid::-webkit-scrollbar {
        display: none;
    }
    .categories-grid {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    .category-card {
        flex: 0 0 auto;
        scroll-snap-align: start;
        padding: 14px 12px;
        min-width: 85px;
        width: auto;
    }
    .category-card i {
        font-size: 25px;
        margin-bottom: 7px;
    }
    .category-card span {
        font-size: 11.5px;
    }

    /* CTA compact */
    .cta-section-compact {
        padding: 15px 0;
    }
    .cta-card-compact {
        flex-direction: column;
        text-align: center;
        padding: 15px;
        gap: 12px;
    }
    .cta-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    .cta-content-compact h3 {
        font-size: 15px;
    }
    .cta-content-compact p {
        display: none;
    }
    .cta-card-compact .btn {
        width: 100%;
        padding: 10px 20px;
        font-size: 13px;
    }

    /* Shop cards */
    .shops-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .shop-logo-wrapper {
        margin-top: -25px;
    }
    .shop-logo {
        width: 50px;
        height: 50px;
        padding: 5px;
    }
    .shop-logo i {
        font-size: 20px;
    }
    .shop-info {
        padding: 10px;
        padding-top: 8px;
    }
    .shop-info h3 {
        font-size: 14px;
        margin-bottom: 5px;
    }
    .shop-category {
        font-size: 11px;
    }
    .shop-stats {
        font-size: 11px;
        padding-top: 5px;
    }
}

/* Extra small screens */
@media (max-width: 380px) {
    .hero {
        padding: 25px 0;
    }
    .hero h1 {
        font-size: 18px;
    }
    .hero p {
        font-size: 12px;
    }
    .hero-search input {
        padding: 8px 12px;
        font-size: 13px;
    }
    .hero-search button {
        padding: 8px 12px;
    }

    .grid-4 {
        gap: 6px;
    }
    .card-image {
        height: 110px;
    }
    .card-body {
        padding: 8px;
    }
    .card-title {
        font-size: 12px;
    }
    .card-price {
        font-size: 13px !important;
    }

    .no-image-placeholder i {
        font-size: 24px;
    }
    .no-image-placeholder span {
        font-size: 9px;
    }

    .categories-grid {
        gap: 8px;
    }
    .category-card {
        padding: 12px 10px;
        min-width: 75px;
    }
    .category-card i {
        font-size: 21px;
    }
    .category-card span {
        font-size: 10px;
    }
}
