* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
body {
    background: #f5f7fb;
    color: #1a1e2b;
}
@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,300;400;500;600;700&display=swap');

/* ========== NAVBAR ========== */
.navbar {
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
}
.logo {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #3a7bd5, #00d2ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hamburger {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #2c3e66;
}
.nav-links {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    flex-wrap: wrap;
}
.nav-link {
    background: none;
    border: none;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.5rem 1rem;
    transition: 0.2s;
    border-radius: 30px;
    color: #2c3e66;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.nav-link i {
    margin-right: 4px;
}
.nav-link:hover, .nav-link.active {
    background: #eef2ff;
}
.cart-count {
    background: #e53e3e;
    color: white;
    border-radius: 50%;
    padding: 0 6px;
    font-size: 0.7rem;
    margin-left: 4px;
}
.auth-btn, .admin-login-btn {
    background: #2c3e66;
    color: white;
}
.auth-btn:hover, .admin-login-btn:hover {
    background: #1e2a4a;
}
.logout-btn {
    background: #f1f3f7;
    color: #4a5568;
}
.user-greeting {
    font-size: 0.85rem;
    font-weight: 500;
    background: #eef2ff;
    padding: 6px 12px;
    border-radius: 30px;
}
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* ========== LOADING SPINNER (Google/YouTube style) ========== */
.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.loading-container {
    text-align: center;
    padding: 40px;
}

/* ========== SEARCH BAR ========== */
.search-bar {
    background: white;
    border-radius: 50px;
    padding: 10px 20px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.search-bar i {
    color: #2c7da0;
    font-size: 1.2rem;
}
.search-bar input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 1rem;
    background: transparent;
}

/* ========== PRODUCT GRID ========== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.8rem;
    margin-top: 1.5rem;
}
.product-card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
    transition: all 0.25s;
    cursor: pointer;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 30px -12px rgba(0,0,0,0.15);
}
.product-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: #f0f2f5;
}
.product-info {
    padding: 1.2rem;
}
.product-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}
.product-price {
    font-weight: 700;
    color: #2c7da0;
    font-size: 1.3rem;
    margin: 0.5rem 0;
}
.product-desc {
    font-size: 0.85rem;
    color: #5a6874;
    margin-bottom: 1rem;
    line-height: 1.4;
}
.add-cart-btn {
    background: #2c3e66;
    color: white;
    border: none;
    padding: 0.6rem;
    width: 100%;
    border-radius: 40px;
    font-weight: 500;
    cursor: pointer;
}
.add-cart-btn:hover {
    background: #1f2c4b;
}
.add-cart-btn.disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

/* ========== STOCK BADGE ========== */
.stock-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin: 8px 0;
}
.stock-instock {
    background: #e9f7e1;
    color: #2e7d32;
}
.stock-lowstock {
    background: #fff3e0;
    color: #ed6c02;
}
.stock-outofstock {
    background: #ffebee;
    color: #c62828;
}
.product-stock-detail {
    font-size: 1rem;
    margin: 10px 0;
}

/* ========== PRODUCT DETAIL PAGE ========== */
.product-detail-container {
    max-width: 1200px;
    margin: 0 auto;
}
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    background: white;
    border-radius: 28px;
    padding: 2rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
}
.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.main-image {
    background: #f5f7fb;
    border-radius: 20px;
    overflow: hidden;
}
.main-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
    max-height: 400px;
}
.thumbnail-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.thumbnail-list img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: 0.2s;
}
.thumbnail-list img:hover {
    border-color: #2c7da0;
}
.product-info-detail {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.product-price-detail {
    font-size: 2rem;
    font-weight: 700;
    color: #2c7da0;
}
.product-description-full {
    line-height: 1.6;
    color: #4a5568;
}

/* ========== SIMILAR PRODUCTS ========== */
.similar-products-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #edf2f7;
}
.similar-products-section h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}
.similar-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}
.similar-product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.2s;
    cursor: pointer;
}
.similar-product-card:hover {
    transform: translateY(-4px);
}
.similar-product-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}
.similar-product-info {
    padding: 0.8rem;
}
.similar-product-title {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}
.similar-product-price {
    color: #2c7da0;
    font-weight: 700;
    font-size: 1rem;
    margin: 0.5rem 0;
}
.similar-add-cart-btn {
    background: #2c3e66;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 30px;
    width: 100%;
    font-size: 0.8rem;
    cursor: pointer;
}
.similar-add-cart-btn:hover {
    background: #1f2c4b;
}

/* ========== CART TABLE ========== */
.cart-table {
    width: 100%;
    background: white;
    border-radius: 28px;
    overflow-x: auto;
    display: block;
}
.cart-table th, .cart-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #edf2f7;
}
.cart-item-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 12px;
}
.qty-input {
    width: 70px;
    padding: 6px;
    border-radius: 12px;
    border: 1px solid #cbd5e0;
}
.remove-item {
    color: #e53e3e;
    cursor: pointer;
}
.cart-total {
    text-align: right;
    margin-top: 1.5rem;
    font-size: 1.4rem;
    font-weight: 700;
}

/* ========== BUTTONS ========== */
.btn-primary, .checkout-btn {
    background: #0f172a;
    color: white;
    padding: 10px 24px;
    border: none;
    border-radius: 40px;
    font-size: 1rem;
    cursor: pointer;
}
.btn-google {
    background: #4285F4;
    color: white;
    padding: 10px 20px;
    border-radius: 40px;
    border: none;
    width: 100%;
    margin-top: 10px;
    cursor: pointer;
}

/* ========== FORMS ========== */
input, textarea, select {
    width: 100%;
    padding: 12px;
    margin: 8px 0 16px;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    font-size: 1rem;
}
.form-group {
    margin-bottom: 1rem;
}
label {
    font-weight: 500;
    color: #2c3e66;
}

/* ========== CHECKOUT ========== */
.checkout-container {
    max-width: 700px;
    margin: 0 auto;
}
.checkout-summary {
    background: white;
    border-radius: 28px;
    padding: 1rem;
    margin-bottom: 2rem;
}

/* ========== ORDERS ========== */
.orders-list, .orders-admin-list {
    background: white;
    border-radius: 28px;
    padding: 1rem;
}
.order-card {
    border: 1px solid #edf2f7;
    border-radius: 20px;
    padding: 1rem;
    margin-bottom: 1rem;
}
.order-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}
.status-placed {
    background: #e9f7e1;
    color: #2e7d32;
}
.status-pending {
    background: #fff3e0;
    color: #ed6c02;
}
.status-confirmed {
    background: #e3f2fd;
    color: #0a58ca;
}

/* ========== ADMIN PANEL ========== */
.admin-section {
    margin-bottom: 2rem;
}
.admin-form {
    background: white;
    padding: 1.8rem;
    border-radius: 28px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.admin-products-list {
    background: white;
    border-radius: 28px;
    overflow-x: auto;
    padding: 1rem;
}
table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eef2ff;
}
.delete-product {
    color: #e53e3e;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 1rem;
}
.update-stock {
    background: #2c3e66;
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 20px;
    cursor: pointer;
}

/* ========== MODALS ========== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.modal.active {
    display: flex;
}
.modal-content {
    background: white;
    max-width: 450px;
    width: 90%;
    padding: 2rem;
    border-radius: 32px;
    position: relative;
}
.close-modal, .close-admin-modal, .close-profile-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 1.8rem;
    cursor: pointer;
}
.auth-message {
    color: #e53e3e;
    margin-top: 12px;
    font-size: 0.85rem;
}
.google-signin {
    margin-top: 10px;
}

/* ========== CUSTOMER CARE PAGE ========== */
.customer-care-container {
    max-width: 1000px;
    margin: 0 auto;
}
.care-card {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    margin: 2rem 0;
}
.care-option {
    background: white;
    border-radius: 28px;
    padding: 2rem;
    text-align: center;
    flex: 1;
    min-width: 250px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.2s;
}
.care-option:hover {
    transform: translateY(-4px);
}
.care-option i {
    color: #2c7da0;
    margin-bottom: 1rem;
}
.call-btn, .email-btn {
    display: inline-block;
    background: #2c3e66;
    color: white;
    padding: 10px 20px;
    border-radius: 40px;
    text-decoration: none;
    margin: 1rem 0;
    font-weight: 500;
}
.call-btn:hover, .email-btn:hover {
    background: #1e2a4a;
}
.faq-section {
    background: white;
    border-radius: 28px;
    padding: 2rem;
    margin-top: 2rem;
}
.faq-item {
    border-bottom: 1px solid #edf2f7;
    padding: 1rem 0;
}
.faq-item:last-child {
    border-bottom: none;
}
.faq-item strong {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e66;
}

/* ========== POLICIES PAGE ========== */
.policies-container {
    max-width: 1000px;
    margin: 0 auto;
}
.policy-card {
    background: white;
    border-radius: 28px;
    padding: 1.8rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.policy-card h3 {
    margin-bottom: 1rem;
    color: #2c7da0;
}
.policy-card ul {
    padding-left: 1.5rem;
    margin-top: 0.5rem;
}
.policy-card li {
    margin: 0.5rem 0;
    line-height: 1.5;
}
.policy-card p {
    line-height: 1.6;
    color: #4a5568;
}

/* ========== RESPONSIVE (HAMBURGER + MOBILE) ========== */
@media (max-width: 768px) {
    .hamburger {
        display: block;
        position: absolute;
        right: 1.5rem;
        top: 1.2rem;
    }
    .navbar {
        position: relative;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: center;
        gap: 0.8rem;
        padding: 1rem 0;
        background: white;
        border-radius: 20px;
        margin-top: 0.5rem;
    }
    .nav-links.active {
        display: flex;
    }
    .nav-link, .admin-login-btn, .auth-btn, .logout-btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    .product-detail {
        grid-template-columns: 1fr;
    }
    .similar-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}
