/**
 * SK Electrical Services - Main Styles
 * Modern, card-based layout with Dark/Light mode support.
 */

/* ─── Typography ─── */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
    /* Color Palette */
    --primary: #f59e0b;
    /* Amber 500 - Electrician Gold */
    --primary-glow: rgba(245, 158, 11, 0.5);
    --secondary: #3b82f6;
    /* Blue 500 */

    /* Dark Theme (Default) */
    --bg-main: #0a0a0c;
    --bg-card: #141417;
    --bg-card-hover: #1c1c21;
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --border: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(20, 20, 23, 0.8);
    --glass-blur: 12px;
    --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

[data-theme='light'] {
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: rgba(15, 23, 42, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
}

/* ─── Base Styles ─── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1,
h2,
h3,
h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 80px 0;
}

/* ─── Modern Utilities ─── */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border);
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), #fbbf24);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn-primary {
    background: var(--primary);
    color: #000;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px var(--primary-glow);
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--primary-glow);
}

.btn-outline {
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 10px 26px;
    border-radius: 50px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-outline:hover {
    background: var(--primary);
    color: #000;
}

.btn-whatsapp {
    background: #25d366;
    color: #fff;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* ─── Header ─── */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: 0.3s ease;
    padding: 16px 0;
}

.header.scrolled {
    padding: 12px 0;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: 0.3s;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* ─── Hero Section ─── */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 100px;
    background: radial-gradient(circle at 50% 50%, rgba(245, 158, 11, 0.05) 0%, transparent 70%);
}

.hero-content {
    text-align: center;
    max-width: 800px;
    z-index: 2;
}

.badge {
    background: rgba(245, 158, 11, 0.1);
    color: var(--primary);
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
    display: inline-block;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 24px;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-btns {
    display: flex;
    gap: 16px;
    justify-content: center;
}

/* Animated Blobs */
.blob {
    position: absolute;
    width: 500px;
    height: 500px;
    background: var(--primary);
    filter: blur(150px);
    opacity: 0.1;
    z-index: 1;
    border-radius: 50%;
    animation: move 20s infinite alternate;
}

.blob-1 {
    top: -100px;
    left: -100px;
}

.blob-2 {
    bottom: -100px;
    right: -100px;
    background: var(--secondary);
    opacity: 0.05;
}

@keyframes move {
    from {
        transform: translate(0, 0);
    }

    to {
        transform: translate(100px, 100px);
    }
}

/* ─── Grid Systems ─── */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-label {
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.75rem;
    display: block;
    margin-bottom: 12px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

/* ─── Cards (Services, Products, Projects) ─── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-glow);
    box-shadow: var(--shadow);
}

.card-img {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s ease;
}

.card:hover .card-img img {
    transform: scale(1.1);
}

.card-body {
    padding: 24px;
}

.card-category {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 8px;
}

.card-name {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.card-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.card-price {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-main);
}

/* ─── Search & Filters ─── */
.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.pills {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.pill {
    padding: 8px 20px;
    border-radius: 100px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    cursor: pointer;
    white-space: nowrap;
    font-weight: 500;
}

.pill.active {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
}

.search-input {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 12px 20px;
    border-radius: 12px;
    width: 100%;
    max-width: 300px;
    outline: none;
}

.search-input:focus {
    border-color: var(--primary);
}

/* ─── Testimonials ─── */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.testimonial-card {
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
}

.stars {
    color: #fbbf24;
    margin-bottom: 16px;
    display: flex;
    gap: 4px;
}

/* ─── Contact Section ─── */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contact-item {
    display: flex;
    gap: 20px;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}

.map-card {
    height: 400px;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--border);
}

/* ─── Theme Toggle ─── */
.theme-toggle {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
}

/* ─── Mobile Menu ─── */
.hamburger {
    display: none;
    cursor: pointer;
}

@media (max-width: 968px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: min(80%, 320px);
        height: 100vh;
        background: var(--bg-card);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 24px;
        transition: right 0.4s ease;
        z-index: 999;
        border-left: 1px solid var(--border);
        overflow-y: auto;
        padding: 20px;
    }

    .nav-links.active {
        right: 0;
    }

    .hamburger {
        display: flex;
        z-index: 1001;
        align-items: center;
        justify-content: center;
    }

    /* FIX BUG-06: Nav overlay backdrop */
    .nav-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 998;
        backdrop-filter: blur(2px);
    }
    .nav-overlay.active {
        display: block;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    /* FIX BUG-13: Hero buttons full width on mobile */
    .hero-btns {
        flex-direction: column;
        align-items: stretch;
    }
    .hero-btns a, .hero-btns button {
        justify-content: center;
        text-align: center;
    }
}

/* ─── Animations ─── */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: 0.8s ease-out;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.skeleton {
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    to {
        background-position-x: -200%;
    }
}

/* ─── E-Commerce Additions ─── */

/* Header Badges */
.nav-icon-btn {
    position: relative;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.nav-icon-btn:hover {
    color: var(--primary);
}

.nav-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--primary);
    color: #000;
    font-size: 0.7rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-main);
}

.header.scrolled .nav-badge {
    border-color: var(--glass-bg);
}

/* Common Page Layouts */
.page-header {
    text-align: center;
    padding: 120px 0 60px;
    background: radial-gradient(circle at 50% 0%, rgba(245, 158, 11, 0.05) 0%, transparent 70%);
}

.page-title {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.empty-state i {
    width: 64px;
    height: 64px;
    color: var(--text-muted);
    margin-bottom: 24px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 30px;
}

/* Cart Page */
.cart-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-bottom: 80px;
}

@media (max-width: 968px) {
    .cart-container {
        grid-template-columns: 1fr;
    }
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    align-items: center;
}

@media (max-width: 600px) {
    .cart-item {
        grid-template-columns: 80px 1fr;
    }
    .cart-item-actions {
        grid-column: 1 / -1;
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid var(--border);
    }
}

.cart-item-img {
    width: 100%;
    height: 100px;
    border-radius: 12px;
    object-fit: cover;
}

.cart-item-details h4 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.cart-item-category {
    font-size: 0.8rem;
    color: var(--primary);
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 8px;
}

.cart-item-price {
    font-weight: 600;
    color: var(--text-muted);
}

.qty-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 12px;
    border-radius: 50px;
    border: 1px solid var(--border);
    width: fit-content;
}

[data-theme='light'] .qty-controls {
    background: rgba(0, 0, 0, 0.05);
}

.qty-btn {
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.qty-btn:hover {
    color: var(--primary);
}

.cart-item-remove {
    background: none;
    border: none;
    color: #ef4444; /* red 500 */
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-remove:hover {
    background: rgba(239, 68, 68, 0.1);
}

.cart-summary {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 30px;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
    color: var(--text-muted);
}

.summary-row.total {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    color: var(--text-main);
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* Checkout Form */
.checkout-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 30px;
}

.form-section-title {
    font-size: 1.25rem;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

@media (max-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-input {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 14px 16px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

[data-theme='light'] .form-input {
    background: #fff;
}

.form-input:focus {
    border-color: var(--primary);
}

/* Payment Methods */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 30px;
}

.payment-method {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: 0.3s;
}

.payment-method.active {
    border-color: var(--primary);
    background: rgba(245, 158, 11, 0.05);
}

.payment-method-header {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

.payment-method-body {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    display: none;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.payment-method.active .payment-method-body {
    display: block;
}

.upi-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

.upi-qr-placeholder {
    width: 200px;
    height: 200px;
    background: #fff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-weight: 700;
    border: 2px dashed #ccc;
}

.bank-details p {
    margin-bottom: 8px;
}

.bank-details strong {
    color: var(--text-main);
}

/* Order Success State */
.order-success {
    text-align: center;
    padding: 80px 20px;
    display: none;
}

.order-success.active {
    display: block;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: rgba(37, 211, 102, 0.1);
    color: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
}

.success-icon i {
    width: 40px;
    height: 40px;
}

.order-id-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 16px 24px;
    border-radius: 12px;
    display: inline-block;
    margin: 24px 0 40px;
    font-family: monospace;
    font-size: 1.2rem;
    color: var(--primary);
}

/* ─── Cart Sidebar Styles (separate from cart page) ─── */
.cart-toggle {
    position: relative;
    background: transparent;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary);
    color: #000;
    font-size: 0.75rem;
    font-weight: bold;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: var(--bg-card);
    box-shadow: var(--shadow);
    z-index: 1001;
    transition: 0.4s ease;
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--border);
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: var(--primary);
}

.sidebar-cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sidebar-cart-item {
    display: flex;
    gap: 16px;
    align-items: center;
    background: var(--bg-main);
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.sidebar-cart-item-img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
}

.cart-item-details h4 {
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.cart-item-price {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 12px;
}

.qty-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-main);
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-btn {
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
}

.empty-cart {
    text-align: center;
    color: var(--text-muted);
    margin-top: 40px;
}

.cart-footer {
    padding: 24px;
    border-top: 1px solid var(--border);
    background: var(--bg-card);
}

/* Sidebar cart total summary line */
.sidebar-cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.25rem;
    font-weight: 700;
}

/* ─── Modal Styles ─── */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1002;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    width: 100%;
    max-width: 500px;
    border-radius: 24px;
    padding: 32px;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-main);
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--primary);
}

/* ─── Spin Animation (for loading icons) ─── */
@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
.spin { animation: spin 1s linear infinite; display: inline-block; }

/* ─── Slide Up Animation (for toast notifications) ─── */
@keyframes slideInUp {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

/* ─── Orders Page ─── */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}

.order-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 28px;
    transition: 0.3s;
}

.order-card:hover {
    border-color: var(--primary-glow);
    box-shadow: var(--shadow);
}

.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.order-card-id {
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 700;
}

.order-card-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.order-status-badge {
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.status-pending   { background: rgba(245,158,11,0.15); color: #f59e0b; }
.status-confirmed { background: rgba(59,130,246,0.15); color: #3b82f6; }
.status-delivered { background: rgba(34,197,94,0.15);  color: #22c55e; }
.status-cancelled { background: rgba(239,68,68,0.15);  color: #ef4444; }

.order-items-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.order-line-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.order-line-item:last-child { border-bottom: none; }

.order-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 2px solid var(--border);
    font-weight: 700;
    font-size: 1.1rem;
}

.order-address {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    line-height: 1.7;
}

/* ─── Admin Dashboard ─── */
.admin-layout {
    display: flex;
    min-height: calc(100vh - 80px);
}

.admin-sidebar {
    width: 220px;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    padding: 24px 12px;
    flex-shrink: 0;
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    transition: 0.2s;
    width: 100%;
    background: none;
    border: none;
    color: var(--text-main);
    text-align: left;
    font-family: inherit;
    margin-bottom: 4px;
}

.admin-nav-item:hover  { background: rgba(245,158,11,0.08); color: var(--primary); }
.admin-nav-item.active { background: rgba(245,158,11,0.14); color: var(--primary); }

.admin-main { flex: 1; padding: 32px; overflow-y: auto; }

.admin-panel { display: none; }
.admin-panel.active { display: block; }

.admin-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.admin-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px 24px;
}

.admin-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.admin-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.admin-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.admin-table-wrap {
    overflow-x: auto;
    border-radius: 16px;
    border: 1px solid var(--border);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.admin-table th {
    background: var(--bg-card-hover);
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}

.admin-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(245,158,11,0.03); }

.admin-action-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    font-family: inherit;
    transition: 0.2s;
    margin-right: 4px;
}

.admin-action-btn:hover        { border-color: var(--primary); color: var(--primary); }
.admin-action-btn.danger:hover { border-color: #ef4444; color: #ef4444; }

.admin-product-img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
}

/* Product Form Modal */
.product-form-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(4px);
    z-index: 1100;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.product-form-modal.active { display: flex; }

.product-form-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
}

.select-input {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 14px 16px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    width: 100%;
    transition: border-color 0.3s;
}

.select-input:focus { border-color: var(--primary); }

@media (max-width: 768px) {
    .admin-layout { flex-direction: column; }
    .admin-sidebar {
        width: 100%;
        min-height: auto;
        display: flex;
        overflow-x: auto;
        padding: 12px;
        gap: 8px;
    }
    .admin-nav-item { white-space: nowrap; flex-shrink: 0; }
    .admin-main { padding: 16px; }
}

/* ═══════════════════════════════════════════════════════════════════
   MOBILE RESPONSIVENESS FIXES — BUG-07, BUG-08, BUG-09, BUG-14
   ═══════════════════════════════════════════════════════════════════ */

/* FIX BUG-07: Product grid — smaller minimum for mobile */
@media (max-width: 600px) {
    .section-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 16px;
    }

    /* Single column on very small screens */
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .section-grid {
        grid-template-columns: 1fr;
    }
    .section-title { font-size: 1.8rem; }
    .page-title    { font-size: 1.8rem; }
    .hero h1       { font-size: 2rem; }
    .hero p        { font-size: 1rem; }
    .container     { padding: 0 16px; }
    .section       { padding: 48px 0; }
}

/* FIX BUG-08: Cart page responsive */
@media (max-width: 480px) {
    .cart-container {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    /* Cart item — single column on tiny screens */
    .cart-item {
        grid-template-columns: 80px 1fr;
        gap: 12px;
    }
    .cart-item-actions {
        grid-column: 1 / -1;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-top: 12px;
        border-top: 1px solid var(--border);
    }
    .cart-item-img {
        height: 80px;
    }

    .cart-summary {
        position: static;
    }
}

/* FIX BUG-09: Checkout form responsive */
@media (max-width: 768px) {
    .cart-container {
        grid-template-columns: 1fr;
    }
    .checkout-form {
        padding: 20px;
    }
    .form-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    /* Reset full-width override since we're already 1 column */
    .form-group.full-width {
        grid-column: 1;
    }
}

/* FIX BUG-14: Contact grid tablet */
@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .map-card {
        height: 280px;
    }
}

/* Wishlist & Orders responsive */
@media (max-width: 600px) {
    .orders-list {
        gap: 16px;
    }
    .order-card {
        padding: 16px;
    }
    .order-card-header {
        flex-direction: column;
        gap: 8px;
    }
}

/* Payment methods responsive */
@media (max-width: 480px) {
    .payment-method {
        padding: 12px;
    }
    .upi-qr-placeholder {
        width: 160px;
        height: 160px;
    }
    .place-order-btn,
    #place-order-btn {
        font-size: 1rem;
        padding: 14px;
    }
}

/* Page header responsive */
@media (max-width: 600px) {
    .page-header {
        padding: 90px 0 40px;
    }
    .page-subtitle {
        font-size: 0.95rem;
    }
}

/* Nav actions responsive — prevent overflow */
@media (max-width: 400px) {
    .nav-actions {
        gap: 8px;
    }
    .theme-toggle {
        width: 36px;
        height: 36px;
    }
}

/* Pill filters scrollable on mobile */
@media (max-width: 600px) {
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    .search-box {
        width: 100%;
    }
    .search-input {
        max-width: 100%;
    }
    .pills {
        scrollbar-width: none;
    }
    .pills::-webkit-scrollbar {
        display: none;
    }
}

/* Empty state responsive */
@media (max-width: 480px) {
    .empty-state {
        padding: 40px 16px;
    }
    .empty-state i {
        width: 48px;
        height: 48px;
    }
}

/* Card footer wrap on tiny cards */
@media (max-width: 300px) {
    .card-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .btn-outline {
        width: 100%;
        justify-content: center;
    }
}

/* Checkout success page responsive */
@media (max-width: 480px) {
    .order-id-box {
        font-size: 1rem;
        padding: 12px 16px;
        word-break: break-all;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   ADDITIONAL MOBILE FIXES — cart, wishlist, checkout touch targets
   ═══════════════════════════════════════════════════════════════════ */

/* Fix: cart summary sticky not working on short mobile screens */
@media (max-width: 768px) {
    .cart-summary {
        position: static;
        top: auto;
    }
}

/* Fix: ensure wishlist cards are readable on very small screens */
@media (max-width: 360px) {
    .card-body {
        padding: 16px;
    }
    .card-name {
        font-size: 1rem;
    }
    .card-price {
        font-size: 0.95rem;
    }
    .btn-outline {
        font-size: 0.8rem;
        padding: 8px 12px;
    }
}

/* Fix: prevent nav badge overlap on small nav areas */
@media (max-width: 360px) {
    .nav-actions {
        gap: 6px;
    }
    .nav-icon-btn {
        padding: 2px;
    }
}

/* Fix: checkout form section titles */
@media (max-width: 480px) {
    .form-section-title {
        font-size: 1rem;
    }
    .checkout-form {
        padding: 16px;
    }
}

/* Fix: payment method body text on mobile */
@media (max-width: 480px) {
    .payment-method-body {
        font-size: 0.85rem;
    }
    .bank-details p {
        font-size: 0.85rem;
        word-break: break-all;
    }
}

/* Fix: order card on very small screens */
@media (max-width: 380px) {
    .order-card {
        padding: 12px;
    }
    .order-card-id {
        font-size: 0.8rem;
    }
}
