@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --brand-color: #4F46E5;
    --brand-hover: #4338CA;
    --text-dark: #1F2937;
    --text-muted: #6B7280;
    --bg-light: #F9FAFB;
    --bg-white: #FFFFFF;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    -webkit-font-smoothing: antialiased;
}

/* Typography & Brand Utilities */
.text-brand { color: var(--brand-color) !important; }
.bg-brand { background-color: var(--brand-color) !important; }

/* Custom Buttons */
.btn-brand {
    background-color: var(--brand-color);
    color: var(--bg-white);
    font-weight: 500;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: none;
}

.btn-brand:hover {
    background-color: var(--brand-hover);
    color: var(--bg-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

/* Cards & Hover Effects */
.card-hover {
    border: none;
    border-radius: 16px;
    background-color: var(--bg-white);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px -3px rgba(0, 0, 0, 0.1);
}

/* Layout Utilities */
.section-padding { padding: 80px 0; }
.bg-white-section { background-color: var(--bg-white); }

/* Navigation */
.navbar {
    background-color: var(--bg-white);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
    padding: 1rem 0;
}
.navbar-brand { font-weight: 700; font-size: 1.5rem; letter-spacing: -0.5px; }

/* Icon Wrappers */
.icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background-color: rgba(79, 70, 229, 0.1);
    color: var(--brand-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

/* --- Added for Auth Page --- */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 2rem 0;
}

.auth-card {
    max-width: 480px;
    margin: 0 auto;
    padding: 2.5rem;
}

.nav-pills .nav-link {
    color: var(--text-muted);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-weight: 500;
}

.nav-pills .nav-link.active {
    background-color: rgba(79, 70, 229, 0.1);
    color: var(--brand-color);
}

.form-control {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid #E5E7EB;
}

.form-control:focus {
    border-color: var(--brand-color);
    box-shadow: 0 0 0 0.25rem rgba(79, 70, 229, 0.1);
}

.btn-social {
    border: 1px solid #E5E7EB;
    background: var(--bg-white);
    color: var(--text-dark);
    font-weight: 500;
    padding: 0.6rem;
    border-radius: 8px;
    transition: all 0.2s;
    width: 100%;
}

.btn-social:hover {
    background: var(--bg-light);
}



/* --- Added for Dashboard & App Layout --- */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
    background-color: var(--bg-light);
}

/* Sidebar Styles */
.sidebar {
    width: 260px;
    background-color: var(--bg-white);
    border-right: 1px solid #E5E7EB;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    padding: 1.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--brand-color);
    text-decoration: none;
    border-bottom: 1px solid #E5E7EB;
}

.sidebar-nav {
    padding: 1.5rem 1rem;
    flex-grow: 1;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
}

.sidebar-link:hover, .sidebar-link.active {
    background-color: rgba(79, 70, 229, 0.08);
    color: var(--brand-color);
}

.sidebar-link i {
    margin-right: 0.75rem;
    font-size: 1.2rem;
}

/* Main Content & Topbar */
.main-content {
    flex-grow: 1;
    min-width: 0; /* Prevents flexbox overflow */
    display: flex;
    flex-direction: column;
}

.topbar {
    background-color: var(--bg-white);
    border-bottom: 1px solid #E5E7EB;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #E5E7EB;
}

/* Custom Tables */
.table-custom th {
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #E5E7EB;
    padding-bottom: 1rem;
    border-top: none;
}

.table-custom td {
    padding: 1.25rem 0.5rem;
    vertical-align: middle;
    color: var(--text-dark);
    border-bottom: 1px solid #F3F4F6;
}

/* Soft Badges for Statuses */
.badge-soft-success { background-color: rgba(16, 185, 129, 0.1); color: #10B981; padding: 0.4em 0.8em; }
.badge-soft-warning { background-color: rgba(245, 158, 11, 0.1); color: #F59E0B; padding: 0.4em 0.8em; }
.badge-soft-secondary { background-color: rgba(107, 114, 128, 0.1); color: #6B7280; padding: 0.4em 0.8em; }


/* --- Added for Add Product Page --- */
/* Drag and Drop Zone */
.dropzone {
    border: 2px dashed #D1D5DB;
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    background-color: var(--bg-light);
    transition: all 0.3s ease;
    cursor: pointer;
}

.dropzone:hover, .dropzone.dragover {
    border-color: var(--brand-color);
    background-color: rgba(79, 70, 229, 0.05);
}

.dropzone-icon {
    font-size: 2.5rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.dropzone:hover .dropzone-icon, .dropzone.dragover .dropzone-icon {
    color: var(--brand-color);
}

/* Brand colored toggle switch */
.form-switch .form-check-input:checked {
    background-color: var(--brand-color);
    border-color: var(--brand-color);
}


/* --- Added for Storefront --- */
.storefront-nav {
    background-color: var(--bg-white);
    padding: 1rem 0;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* Store Banner */
.store-banner {
    background-color: var(--brand-color);
    color: var(--bg-white);
    padding: 4rem 2rem;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.store-banner::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, transparent 100%);
    pointer-events: none;
}

/* Category Filters */
.category-filters {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: none; /* Firefox */
}
.category-filters::-webkit-scrollbar { display: none; } /* Chrome/Safari */

.category-pill {
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-weight: 500;
    color: var(--text-muted);
    background-color: var(--bg-white);
    border: 1px solid #E5E7EB;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-pill:hover, .category-pill.active {
    background-color: var(--brand-color);
    color: var(--bg-white);
    border-color: var(--brand-color);
}

/* Product Cards */
.product-card {
    border: none;
    background: transparent;
}

.product-img-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background-color: #F3F4F6;
    margin-bottom: 1rem;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card:hover .product-img {
    transform: scale(1.05);
}

.quick-view-btn {
    position: absolute;
    bottom: -50px; /* Hidden below */
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    background-color: rgba(255, 255, 255, 0.95);
    color: var(--text-dark);
    font-weight: 600;
    opacity: 0;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.product-card:hover .quick-view-btn {
    bottom: 15px;
    opacity: 1;
}

.quick-view-btn:hover {
    background-color: var(--bg-white);
    color: var(--brand-color);
}

/* Cart Offcanvas */
.cart-item-img {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    object-fit: cover;
    background-color: #F3F4F6;
}

.qty-btn {
    width: 28px;
    height: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    background: #F3F4F6;
    border: none;
    color: var(--text-dark);
}
.qty-btn:hover { background: #E5E7EB; }

/* Animation for Cart Badge */
@keyframes pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}
.animate-pop { animation: pop 0.3s ease-in-out; }

/* --- Added for Product Detail Page --- */
.product-detail-img-wrapper {
    background-color: #F3F4F6;
    border-radius: 16px;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.qty-input-group {
    display: flex;
    align-items: center;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-white);
}

.qty-input-group .btn {
    border: none;
    background: transparent;
    padding: 0.5rem 1rem;
    color: var(--text-dark);
}

.qty-input-group .btn:hover {
    background-color: var(--bg-light);
}

.qty-input-group input {
    border: none;
    text-align: center;
    width: 50px;
    font-weight: 500;
    padding: 0;
    -moz-appearance: textfield; /* Hide arrows in Firefox */
}
.qty-input-group input::-webkit-outer-spin-button,
.qty-input-group input::-webkit-inner-spin-button {
    -webkit-appearance: none; /* Hide arrows in Chrome/Safari */
    margin: 0;
}


/* --- Added for Checkout Page --- */
/* Payment Method Radio Cards */
.payment-card {
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: var(--bg-white);
    display: flex;
    align-items: center;
}

.payment-card:hover {
    border-color: var(--brand-color);
    background-color: rgba(79, 70, 229, 0.02);
}

.payment-card .form-check-input {
    margin-top: 0;
    margin-right: 1rem;
    cursor: pointer;
}

.payment-card .form-check-input:checked {
    background-color: var(--brand-color);
    border-color: var(--brand-color);
}

/* We use a hidden radio button trick to style the whole card when selected */
.payment-card:has(input:checked) {
    border-color: var(--brand-color);
    background-color: rgba(79, 70, 229, 0.05);
    box-shadow: 0 0 0 1px var(--brand-color);
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

.checkout-summary-img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    background-color: #F3F4F6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* --- Added for Order Confirmation Page --- */
.success-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: rgba(16, 185, 129, 0.1);
    color: #10B981;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1.5rem auto;
    position: relative;
}

/* Pulsing animation for the success ring */
.success-icon-wrapper::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 50%;
    border: 2px solid #10B981;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

/* Floating Dashboard Button */
.floating-dashboard-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #6366f1; /* Your brand color */
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 1050; /* Keeps it above modals and offcanvas carts */
    transition: all 0.3s ease;
    text-decoration: none;
}

.floating-dashboard-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    color: white;
}