/* /shop.dermatopics.in/shop_style.css - Naya Modern Look (FIXED) */

/* === 1. Basic Setup & Color Variables === */
:root {
    --color-primary: #007bff;     /* Blue */
    --color-primary-dark: #0056b3;
    --color-text: #333;
    --color-text-light: #666;
    --color-bg: #f8f9fa;         /* Light Gray Background */
    --color-card-bg: #ffffff;    /* White cards */
    --color-border: #e9ecef;     /* Light border */
    --color-success: #28a745;
    --color-error: #dc3545;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 10px rgba(0,0,0,0.08);
    --border-radius: 8px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
}

/* === 2. Header === */
.header {
    background-color: var(--color-card-bg);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-left {
    display: flex;
    align-items: center;
}
.header-left h1 {
    font-size: 1.5rem;
    margin: 0;
    color: var(--color-primary); /* Title ko bhi blue kar diya */
}

/* --- YEH AAPKA PEHLA FIX HAI (Gray Box) --- */
/* Mobile menu button ko desktop par chhupa dein */
.menu-toggle {
    display: none;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px; /* --- YEH AAPKA TEESRA FIX HAI (Space) --- */
}
.header-right span {
    color: var(--color-text-light);
    font-size: 0.9rem;
    margin-right: 10px;
}

/* --- YEH AAPKA DOOSRA FIX HAI (Blue Button) --- */
.btn {
    background-color: var(--color-primary);
    color: white !important;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover {
    background-color: var(--color-primary-dark);
    box-shadow: var(--shadow-sm);
}
/* Fallback (agar purana class 'logout-btn' use ho raha hai) */
.logout-btn {
    background-color: var(--color-primary) !important;
    color: white !important;
    padding: 8px 16px !important;
    border-radius: var(--border-radius) !important;
    text-decoration: none !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    margin-left: 0 !important; /* Puraana margin reset */
}

/* === 3. Category Navbar === */
.navbar {
    background-color: var(--color-card-bg);
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    border-bottom: 1px solid var(--color-border);
    -webkit-overflow-scrolling: touch;
}
.navbar ul {
    list-style-type: none;
    margin: 0;
    padding: 0 1rem;
    display: inline-flex;
}
.navbar a {
    display: block;
    color: var(--color-text-light);
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: color 0.2s ease, border-bottom-color 0.2s ease;
}
.navbar a:hover {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

/* === 4. Content & Product Grid === */
.content {
    max-width: 1200px;
    margin: 2rem auto; 
    padding: 0 1.5rem;
}
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); 
    gap: 1.5rem; 
}
.product-card {
    background-color: var(--color-card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}
.product-card img {
    max-width: 100%;
    height: 180px; 
    object-fit: contain;
    margin-bottom: 1rem;
}
.product-card h3 {
    font-size: 1.1rem;
    margin: 0.5rem 0;
    color: var(--color-text);
}
.product-card .details {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-bottom: 1rem;
    flex-grow: 1;
}
.product-card .price {
    font-size: 1.25rem;
    color: #B12704; 
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.product-card .stock {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-bottom: 1rem;
}
.add-to-cart-form {
    display: flex;
    justify-content: space-between; 
    align-items: center;
    margin-top: auto;
    gap: 10px;
}
.add-to-cart-form input[type="number"] {
    width: 65px;
    text-align: center;
    padding: 8px;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
}
.add-to-cart-btn {
    background-color: var(--color-primary);
    color: white;
    border: none;
    padding: 10px 12px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    flex-grow: 1; 
    transition: background-color 0.2s ease;
}
.add-to-cart-btn:hover {
    background-color: var(--color-primary-dark);
}
.add-to-cart-btn:disabled {
    background-color: #aaa;
    cursor: not-allowed;
}

/* === 5. Cart & Notification === */
.cart-section {
    margin-top: 3rem;
    background: var(--color-card-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    color: white;
    box-shadow: var(--shadow-md);
    display: none;
}
.notification.success { background-color: var(--color-success); }
.notification.error { background-color: var(--color-error); }

/* === 6. Mobile Responsive === */
@media (max-width: 768px) {
    .header {
        padding: 1rem;
        flex-wrap: wrap; 
    }
    .header-left h1 {
        font-size: 1.25rem;
    }
    .header-right {
        gap: 8px;
        span { display: none; } 
    }
    .btn {
        padding: 6px 12px;
        font-size: 0.85rem;
    }

    /* Mobile par menu toggle dikhayein (agar aap use karna chahte hain) */
    /* .menu-toggle { display: block; margin-right: 15px; } */

    .navbar ul {
        padding: 0 0.5rem; 
    }
    .navbar a {
        padding: 12px 14px;
    }

    .content {
        margin: 1rem auto; 
        padding: 0 1rem;
        margin-left: 0 !important; /* Mobile view fix */
    }
    .product-grid {
        grid-template-columns: 1fr; /* Mobile par 1 column */
        gap: 1rem;
    }
    .product-card img {
        height: 160px;
    }
    .cart-section {
        padding: 1rem;
    }
}