/* ====================================================================
   TTAJ STORE - COMPLETE RESPONSIVE CSS
   Works on Desktop, Tablet, and Mobile
   ==================================================================== */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: #f4f7fc;
    color: #1e293b;
    line-height: 1.5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3 {
    font-weight: 600;
    color: #0a66b9;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

/* Header */
header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #0a66b9;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    width: 32px;
    height: 32px;
}

/* Navigation */
nav {
    display: flex;
    gap: 24px;
}

nav a {
    text-decoration: none;
    color: #334155;
    font-weight: 500;
    transition: color 0.2s;
}

nav a:hover {
    color: #0a66b9;
}

/* Mobile Menu */
.menu-icon {
    display: none;
    font-size: 1.8rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #0a66b9;
}

.mobile-menu {
    display: none;
    flex-direction: column;
    background: white;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    z-index: 99;
    border-top: 1px solid #e2e8f0;
}

.mobile-menu a {
    padding: 12px 0;
    text-decoration: none;
    color: #334155;
    font-weight: 500;
    border-bottom: 1px solid #e2e8f0;
}

.mobile-menu a:last-child {
    border-bottom: none;
}

.mobile-menu.open {
    display: flex;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #0a66b9 0%, #084a8a 100%);
    color: white;
    text-align: center;
    padding: 60px 20px;
    border-radius: 0 0 32px 32px;
    margin-bottom: 40px;
}

.hero h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.hero .highlight {
    color: #facc15;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.btn-primary {
    background: #f7931a;
    color: #1e293b;
    padding: 12px 28px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: transform 0.2s, background 0.2s;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: #e67e22;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid #0a66b9;
    color: #0a66b9;
    padding: 10px 24px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 500;
    display: inline-block;
    transition: all 0.2s;
}

.btn-outline:hover {
    background: #0a66b9;
    color: white;
}

/* Products Section */
.products-section, .stores-section {
    padding: 40px 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #e2e8f0;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
}

.product-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.product-card .info {
    padding: 16px;
}

.product-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: #0a66b9;
}

.product-card p {
    color: #475569;
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 12px;
}

.product-card .price {
    font-weight: bold;
    color: #f7931a;
    font-size: 1.2rem;
    margin-bottom: 12px;
}

.product-card .buy-now-btn {
    background: #0a66b9;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 500;
    width: 100%;
    transition: background 0.2s;
}

.product-card .buy-now-btn:hover {
    background: #084a8a;
}

.product-card .rating {
    margin-top: 12px;
    font-size: 0.8rem;
    color: #64748b;
}

.product-card .rating i {
    cursor: pointer;
    margin-right: 2px;
}

/* Stores Grid */
.stores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.store-card {
    background: white;
    border-radius: 24px;
    padding: 20px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #e2e8f0;
}

.store-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
}

.store-card img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
}

.store-card h3 {
    color: #0a66b9;
    margin-bottom: 8px;
}

.store-card p {
    color: #475569;
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.store-meta {
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 15px;
}

.store-card .btn-outline {
    display: inline-block;
    background: #0a66b9;
    color: white;
    padding: 8px 20px;
    border-radius: 40px;
    text-decoration: none;
    font-size: 0.85rem;
}

/* Search Section */
.search-section {
    background: white;
    padding: 20px 0;
    border-bottom: 1px solid #e2e8f0;
}

.search-container {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 12px;
    padding: 0 20px;
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    border: 1px solid #cbd5e1;
    border-radius: 48px;
    font-size: 0.95rem;
    outline: none;
}

.search-input:focus {
    border-color: #0a66b9;
}

.search-btn {
    background: #0a66b9;
    color: white;
    border: none;
    padding: 0 24px;
    border-radius: 48px;
    cursor: pointer;
    font-weight: 600;
}

.category-filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
    flex-wrap: wrap;
    padding: 0 20px;
}

.category-btn {
    background: #e2e8f0;
    border: none;
    padding: 6px 16px;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.category-btn.active {
    background: #0a66b9;
    color: white;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    border-radius: 24px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content h3 {
    margin-bottom: 20px;
    color: #0a66b9;
}

.modal-content input,
.modal-content textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    font-family: inherit;
}

.close-modal {
    float: right;
    font-size: 28px;
    cursor: pointer;
    color: #94a3b8;
}

/* Footer */
footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-col h3 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

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

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: #94a3b8;
    text-decoration: none;
}

.footer-col ul li a:hover {
    color: #facc15;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-links a {
    color: white;
    font-size: 1.2rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #1e293b;
    font-size: 0.8rem;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: white;
    padding: 12px 24px;
    border-radius: 48px;
    z-index: 10001;
    text-align: center;
    font-size: 14px;
    white-space: nowrap;
    max-width: 90%;
    white-space: normal;
    word-break: break-word;
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

.loading-spinner i {
    font-size: 2rem;
    margin-bottom: 10px;
}

/* Error & Empty Messages */
.error-message,
.empty-message {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

.error-message {
    color: #dc2626;
}

/* ========== RESPONSIVE DESIGN (MOBILE) ========== */
@media (max-width: 768px) {
    /* Header */
    .menu-icon {
        display: block;
    }
    
    nav.desktop-nav {
        display: none;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    /* Hero */
    .hero {
        padding: 40px 16px;
    }
    
    .hero h1 {
        font-size: 1.6rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .btn-primary {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    /* Sections */
    .products-section,
    .stores-section {
        padding: 30px 0;
    }
    
    h2 {
        font-size: 1.4rem;
        margin-bottom: 20px;
    }
    
    /* Grids */
    .products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .stores-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* Product Card */
    .product-card img {
        height: 160px;
    }
    
    .product-card h3 {
        font-size: 1rem;
    }
    
    /* Category Filters */
    .category-filters {
        gap: 8px;
    }
    
    .category-btn {
        padding: 4px 12px;
        font-size: 0.7rem;
    }
    
    /* Search */
    .search-container {
        padding: 0 16px;
    }
    
    .search-input {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .search-btn span {
        display: none;
    }
    
    .search-btn i {
        font-size: 1.2rem;
    }
    
    .search-btn {
        padding: 0 16px;
    }
    
    /* Modal */
    .modal-content {
        padding: 20px;
        width: 95%;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    /* Store Card */
    .store-card {
        padding: 16px;
    }
    
    .store-card img {
        width: 60px;
        height: 60px;
    }
    
    .store-card h3 {
        font-size: 1rem;
    }
    
    /* Toast */
    .toast {
        font-size: 12px;
        padding: 10px 20px;
        bottom: 16px;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stores-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }
    
    .hero h1 {
        font-size: 1.3rem;
    }
    
    .product-card .price {
        font-size: 1rem;
    }
    
    .category-btn {
        padding: 4px 10px;
        font-size: 0.65rem;
    }
}


/* ===== PRODUCTS & STORES GRID ===== */
.products-grid, .stores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* ===== PRODUCT CARD ===== */
.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    transition: transform 0.2s;
}
.product-card:hover { transform: translateY(-5px); }
.product-card img { width: 100%; height: 180px; object-fit: cover; }
.product-card h3, .product-card p, .product-card .price { padding: 0 16px; }
.product-card h3 { margin-top: 12px; color: #0a66b9; }
.product-card p { color: #475569; font-size: 0.9rem; margin: 8px 0; }
.product-card .price { font-weight: bold; color: #0a66b9; font-size: 1.2rem; margin-bottom: 12px; }
.product-card .buy-btn { margin: 0 16px 16px; width: calc(100% - 32px); background: #0a66b9; color: white; border: none; padding: 10px; border-radius: 40px; cursor: pointer; }

/* ===== STORE CARD ===== */
.store-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    border: 1px solid #e2e8f0;
}
.store-card img { width: 60px; height: 60px; border-radius: 50%; margin-bottom: 10px; }
.store-card h3 { color: #0a66b9; margin-bottom: 8px; }
.store-card p { color: #475569; font-size: 0.85rem; margin-bottom: 10px; }
.store-meta { font-size: 0.7rem; color: #64748b; margin-bottom: 12px; }
.store-link { display: inline-block; background: #0a66b9; color: white; padding: 6px 16px; border-radius: 40px; text-decoration: none; font-size: 0.8rem; }

.loading-spinner, .error-message, .empty-message { text-align: center; padding: 40px; color: #64748b; }
