/* ==========================================================================
   ZITEO Store Frontend Styles
   ========================================================================== */

:root {
    --primary: #25D366;
    --primary-dark: #128C7E;
    --dark: #0f172a;
    --light: #f8fafc;
    --gray: #64748b;
    --gray-light: #e2e8f0;
    --white: #ffffff;
    --danger: #ef4444;
    
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --radius: 12px;
    --radius-sm: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-family);
    font-size: 14px;
    line-height: 1.6;
    color: var(--dark);
    background: var(--light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container { max-width: 1000px; margin: 0 auto; padding: 0 16px; }

/* ==========================================================================
   Header
   ========================================================================== */

.store-header {
    background: var(--white);
    padding: 16px 0;
    border-bottom: 1px solid var(--gray-light);
    position: sticky;
    top: 0;
    z-index: 100;
}

.store-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.store-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
}

.whatsapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--primary);
    color: var(--white);
    text-decoration: none;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.875rem;
    transition: background 0.2s;
}

.whatsapp-btn:hover {
    background: var(--primary-dark);
}

/* ==========================================================================
   Main Content
   ========================================================================== */

.store-main {
    flex: 1;
    padding: 24px 0;
}

.empty-store {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray);
}

/* ==========================================================================
   Products Grid
   ========================================================================== */

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.product-image {
    aspect-ratio: 1;
    background: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-image {
    font-size: 3rem;
    color: var(--gray-light);
}

.sold-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--danger);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.product-info {
    padding: 12px;
}

.product-info h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    margin-bottom: 10px;
}

.price-strike {
    text-decoration: line-through;
    color: var(--gray);
    font-size: 0.8rem;
    margin-right: 6px;
}

.price-current {
    font-weight: 700;
    color: var(--primary);
    font-size: 1rem;
}

.buy-btn {
    display: block;
    width: 100%;
    padding: 10px;
    background: var(--primary);
    color: var(--white);
    text-align: center;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.buy-btn:hover {
    background: var(--primary-dark);
}

.buy-btn.disabled {
    background: var(--gray-light);
    color: var(--gray);
    cursor: not-allowed;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.store-footer {
    background: var(--white);
    padding: 16px 0;
    text-align: center;
    border-top: 1px solid var(--gray-light);
}

.store-footer p {
    color: var(--gray);
    font-size: 0.75rem;
}

.store-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .store-name {
        font-size: 1rem;
    }
    
    .whatsapp-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}
