:root {
    --bg-color: #f8fafc;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --primary-color: #10b981; /* Pastel Green */
    --primary-hover: #059669;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
}

/* =========================================
   MOBILE-FIRST BASE STYLES
   ========================================= */

/* Modal / Age Gate */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem; /* For mobile spacing */
}

.modal-content {
    background: var(--card-bg);
    padding: 2rem 1.5rem;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-content h2 {
    margin-bottom: 0.75rem;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.modal-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.modal-actions {
    display: flex;
    flex-direction: column; /* Stack vertically on mobile */
    gap: 1rem;
    justify-content: center;
}

.error-text {
    color: #ef4444 !important;
    margin-top: 1rem;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Buttons */
.btn-primary, .btn-secondary {
    width: 100%; /* Full width on mobile */
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: #f1f5f9;
    color: var(--text-primary);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    width: auto; /* Inline size for small buttons */
}

.btn-text {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-weight: 500;
    font-size: 0.875rem;
}

/* Navbar */
.navbar {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
    display: flex;
    flex-direction: column; /* Stack logo and auth on mobile */
    gap: 1rem;
    align-items: center;
    text-align: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

#user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Container */
.container {
    width: 100%;
    padding: 2rem 1rem;
}

.store-intro {
    margin-bottom: 2rem;
    text-align: center; /* Center align on mobile */
}

.store-intro h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.store-intro p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Products Grid */
.products-grid {
    display: flex;
    flex-direction: column; /* Stack cards vertically on mobile */
    gap: 1.5rem;
}

.product-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-image {
    width: 100%;
    height: 180px;
    background-color: #f1f5f9;
}

.product-details {
    padding: 1.25rem;
}

.product-title {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}

.botanical-info {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    width: fit-content;
}

.badge-indica {
    background-color: rgba(99, 102, 241, 0.1);
    color: #4f46e5;
}

.badge-sativa {
    background-color: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.ratios {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.product-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    margin-top: 1rem;
}

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

/* =========================================
   TABLET & DESKTOP STYLES
   ========================================= */
@media (min-width: 768px) {
    .modal-actions {
        flex-direction: row; /* Side-by-side buttons */
    }

    .btn-primary, .btn-secondary {
        width: auto;
    }

    .navbar {
        flex-direction: row;
        justify-content: space-between;
        padding: 1rem 2rem;
    }

    .container {
        padding: 3rem 2rem;
        max-width: 1200px;
        margin: 0 auto;
    }

    .store-intro {
        text-align: left;
    }

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

    .product-image {
        height: 200px;
    }

    .product-details {
        padding: 1.5rem;
    }
}
