/* ==========================================
   GHOTI MARKET - Professional Shop Page CSS
   ========================================== */

:root {
    --primary-color: #FF6B35;
    --primary-hover: #e55a24;
    --secondary-color: #0F172A;
    --bg-color: #F8FAFC;
    --card-bg: #FFFFFF;
    --text-main: #1E293B;
    --text-muted: #64748B;
    --border-color: #E2E8F0;
    --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.05);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Hind Siliguri', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    padding-bottom: 90px; /* Space for bottom nav */
    -webkit-tap-highlight-color: transparent;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Progress Bar */
#progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background-color: var(--primary-color);
    width: 0%;
    z-index: 1100;
    transition: width 0.2s ease, opacity 0.4s ease;
}

/* Header Styles */
.app-header {
    background-color: var(--card-bg);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--border-color);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-logo {
    height: 36px;
    object-fit: contain;
}

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

.header-actions button, .header-actions a {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--secondary-color);
    cursor: pointer;
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.header-actions button:hover, .header-actions a:hover {
    background-color: var(--bg-color);
    color: var(--primary-color);
}

.badge-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background-color: var(--primary-color);
    border-radius: 50%;
}

/* Collapsible Search Bar */
.header-search-bar {
    max-height: 0;
    overflow: hidden;
    background-color: var(--card-bg);
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 16px;
    border-bottom: 1px solid transparent;
}

.header-search-bar.active {
    max-height: 70px;
    padding: 12px 16px;
    border-bottom-color: var(--border-color);
}

.search-input-wrapper {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrapper i {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
}

.search-input-wrapper input {
    width: 100%;
    padding: 10px 40px 10px 42px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 15px;
    outline: none;
    background-color: var(--bg-color);
    transition: var(--transition);
}

.search-input-wrapper input:focus {
    border-color: var(--primary-color);
    background-color: var(--card-bg);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
}

#clear-search-btn {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
}

/* Main Container */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px;
}

.page-title-section {
    margin-bottom: 24px;
    text-align: center;
}

.page-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--secondary-color);
}

.page-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Shop Grid Layout */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (min-width: 768px) {
    .shop-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (min-width: 1024px) {
    .shop-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
    }
}

/* Shop Card Design */
.shop-card {
    background-color: var(--card-bg);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.shop-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(255, 107, 53, 0.3);
}

.shop-banner-wrapper {
    width: 100%;
    height: 110px;
    background-color: #E2E8F0;
    position: relative;
    overflow: hidden;
}

@media (min-width: 768px) {
    .shop-banner-wrapper {
        height: 130px;
    }
}

.shop-banner {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.shop-card:hover .shop-banner {
    transform: scale(1.05);
}

.shop-card-body {
    padding: 0 14px 14px 14px;
    position: relative;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.shop-logo-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--card-bg);
    background-color: var(--card-bg);
    box-shadow: var(--shadow-sm);
    margin-top: -28px;
    margin-bottom: 8px;
    position: relative;
    z-index: 2;
}

.shop-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.shop-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.shop-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.3;
}

.verified-badge {
    color: #0284C7;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
}

.shop-category {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
    margin-bottom: auto;
}

/* Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-up {
    animation: fadeUp 0.4s ease forwards;
    opacity: 0;
}

/* Loading Skeleton */
.shop-skeleton-card {
    background-color: var(--card-bg);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.skeleton-banner {
    width: 100%;
    height: 120px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.skeleton-body {
    padding: 14px;
}

.skeleton-logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e0e0e0;
    margin-top: -35px;
    margin-bottom: 10px;
    border: 3px solid #fff;
}

.skeleton-text {
    height: 14px;
    background: #e0e0e0;
    border-radius: 4px;
    margin-bottom: 8px;
}

.skeleton-text.title {
    width: 80%;
}

.skeleton-text.subtitle {
    width: 50%;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

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

.load-more-btn {
    background-color: var(--secondary-color);
    color: #fff;
    border: none;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.load-more-btn:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Empty & Error State */
.empty-state, .error-state {
    text-align: center;
    padding: 48px 16px;
    grid-column: 1 / -1;
    background: var(--card-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.empty-state i {
    font-size: 48px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 18px;
    color: var(--secondary-color);
    margin-bottom: 6px;
}

.empty-state p {
    font-size: 14px;
    color: var(--text-muted);
}

/* Back To Top Button */
#back-to-top {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 42px;
    height: 42px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 999;
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#back-to-top:hover {
    background-color: var(--primary-hover);
}

/* Bottom Navigation (Home matching) */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--card-bg);
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 65px;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 6px -1px rgba(15, 23, 42, 0.04);
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 11px;
    gap: 4px;
    flex-grow: 1;
    height: 100%;
    transition: var(--transition);
}

.nav-item i {
    font-size: 18px;
}

.nav-item.active, .nav-item:hover {
    color: var(--primary-color);
}

/* Footer Section */
.app-footer {
    background-color: var(--secondary-color);
    color: #fff;
    padding: 40px 16px 20px 16px;
    margin-top: 40px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 768px) {
    .footer-content {
        grid-template-columns: 2fr 1fr;
    }
}

.footer-brand img {
    height: 35px;
    margin-bottom: 12px;
}

.footer-brand p {
    font-size: 14px;
    color: #94A3B8;
    line-height: 1.5;
    max-width: 400px;
}

.footer-links h4 {
    font-size: 16px;
    margin-bottom: 12px;
    color: #F8FAFC;
}

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

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

.footer-links ul li a {
    font-size: 14px;
    color: #94A3B8;
    transition: var(--transition);
}

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

.footer-bottom {
    max-width: 1200px;
    margin: 30px auto 0 auto;
    padding-top: 20px;
    border-top: 1px solid #1E293B;
    text-align: center;
    font-size: 13px;
    color: #94A3B8;
}
/* --- Bottom Nav --- */
.bottom-nav { position: fixed; bottom: 0; left: 0; width: 100%; height: 70px; background: rgba(255,255,255,0.9); backdrop-filter: blur(15px); display: flex; justify-content: space-around; align-items: center; border-top: 1px solid var(--glass-border); z-index: 1000; padding-bottom: env(safe-area-inset-bottom); }
.nav-item { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: var(--text-sub); font-size: 10px; font-weight: 800; transition: 0.3s; flex: 1; }
.nav-item i { font-size: 20px; margin-bottom: 4px; transition: 0.3s; }
.nav-item.active { color: var(--primary); }
.nav-item.active i { transform: translateY(-3px); }
