/* =========================================
   SHOP PAGE STYLES
   ========================================= */

/* Sticky Tabs */
.shop-tabs-container {
    position: sticky;
    top: 60px; /* Below the app header */
    background: var(--bg-light);
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

.category-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 12px 0 12px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.category-tabs::-webkit-scrollbar { display: none; }

.cat-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 50px;
    border: 2px solid var(--border-color);
    background: var(--white);
    font-family: var(--font-main);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.cat-tab i { font-size: 1.1rem; }

.cat-tab:hover { border-color: var(--primary-color); color: var(--primary-color); }

.cat-tab.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
    box-shadow: 0 4px 10px rgba(242, 16, 16, 0.25);
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    padding-bottom: 20px;
}

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

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

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

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

.product-card-img {
    width: 100%;
    height: 140px;
    background: var(--bg-light);
    position: relative;
    overflow: hidden;
}

.product-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.product-card-img .product-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-tag.food { background: #fef3c7; color: #b45309; }
.product-tag.shop { background: #dbeafe; color: #1d4ed8; }
.product-tag.default { background: #f3f4f6; color: #374151; }

.product-card-img .out-of-stock {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
    font-size: 0.85rem;
}

.product-card-body {
    padding: 12px;
}

.product-card-body h4 {
    font-size: 0.88rem;
    color: var(--dark-blue);
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-body .product-vendor {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.product-card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    font-size: 1rem;
    font-weight: 800;
    color: var(--primary-color);
}

.product-order-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary-color);
    border: none;
    color: var(--white);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.product-order-btn:hover {
    background: var(--primary-hover);
    transform: scale(1.1);
}

/* Vendor/Shop Banners */
.vendors-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 20px;
}

.vendor-banner {
    display: flex;
    align-items: center;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    cursor: pointer;
}

.vendor-banner:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.vendor-banner-img {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #ff6b6b, var(--primary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 2.5rem;
}

.vendor-banner-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vendor-banner-body {
    padding: 16px;
    flex: 1;
}

.vendor-banner-body h3 {
    font-size: 1.1rem;
    color: var(--dark-blue);
    margin-bottom: 4px;
}

.vendor-banner-body .vendor-cat {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    background: var(--bg-light);
    color: var(--text-muted);
    margin-bottom: 6px;
}

.vendor-banner-body .vendor-addr {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.vendor-banner-arrow {
    padding: 0 20px;
    color: var(--text-muted);
    font-size: 1.2rem;
}

.vendor-banner:hover .vendor-banner-arrow {
    color: var(--primary-color);
    transform: translateX(4px);
}

/* Empty Shop */
.empty-shop {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-shop i {
    font-size: 3rem;
    opacity: 0.3;
    display: block;
    margin-bottom: 12px;
}

.empty-shop p { font-size: 0.9rem; line-height: 1.6; }

/* ===== PRODUCT DETAIL MODAL ===== */
.product-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,2,42,0.6);
    backdrop-filter: blur(6px);
    z-index: 3000;
    justify-content: center;
    align-items: flex-end;
    padding: 0;
}

.product-modal-overlay.show {
    display: flex;
    animation: fadeIn 0.25s ease;
}

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

.product-modal {
    background: var(--white);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    border-radius: 24px 24px 0 0;
    overflow-y: auto;
    animation: slideUp 0.35s cubic-bezier(0.34,1.56,0.64,1);
    position: relative;
}

@media (min-width: 768px) {
    .product-modal-overlay { align-items: center; padding: 20px; }
    .product-modal { border-radius: 24px; }
}

@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.product-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.4);
    color: var(--white);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    transition: background 0.2s;
}

.product-modal-close:hover { background: rgba(0,0,0,0.6); }

.product-modal-img {
    width: 100%;
    height: 240px;
    background: var(--bg-light);
    overflow: hidden;
}

.product-modal-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-modal-body {
    padding: 24px;
}

.product-modal-cat {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #fef3c7;
    color: #b45309;
    margin-bottom: 10px;
}

.product-modal-body h2 {
    font-size: 1.4rem;
    color: var(--dark-blue);
    margin-bottom: 6px;
}

.product-modal-vendor {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.product-modal-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
}

.product-modal-price {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.product-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-whatsapp {
    background: #25D366;
    color: var(--white);
    border: none;
}

.btn-whatsapp:hover {
    background: #1fb855;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* Beautiful Search Bar Styling */
.search-input-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    padding: 12px 16px 12px 42px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--dark-blue);
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 4px 20px rgba(242, 16, 16, 0.08);
}

.search-icon {
    position: absolute;
    left: 14px;
    font-size: 1.25rem;
    color: var(--text-muted);
    transition: color 0.3s ease;
    pointer-events: none;
}

.search-input:focus + .search-icon {
    color: var(--primary-color);
}

.clear-search-btn {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: color 0.2s ease, transform 0.2s ease;
}

.clear-search-btn:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}
