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

:root {
    /* Color Palette - Premium Dark Mode */
    --bg-dark: #0a0b10;
    --bg-surface: rgba(255, 255, 255, 0.03);
    --bg-card: rgba(255, 255, 255, 0.05);

    --accent-primary: #3b82f6;
    --accent-secondary: #8b5cf6;
    --accent-glow: rgba(59, 130, 246, 0.3);

    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;

    --border-glass: rgba(255, 255, 255, 0.1);
    --border-focus: rgba(59, 130, 246, 0.5);

    --input-bg: rgba(255, 255, 255, 0.07);
    --input-border: rgba(255, 255, 255, 0.15);
    --input-text: #f0f4ff;
    --input-placeholder: #64748b;

    --glass-blur: blur(12px);
    --shadow-soft: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 20px var(--accent-glow);

    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* ── LIGHT THEME ── */
body.light-theme {
    --bg-dark: #f0f4ff;
    --bg-surface: rgba(255, 255, 255, 0.7);
    --bg-card: rgba(255, 255, 255, 0.85);

    --accent-primary: #2563eb;
    --accent-secondary: #7c3aed;
    --accent-glow: rgba(37, 99, 235, 0.2);

    --text-main: #0f172a;
    --text-muted: #475569;
    --text-dim: #94a3b8;

    --border-glass: rgba(0, 0, 0, 0.08);
    --border-focus: rgba(37, 99, 235, 0.4);

    --input-bg: #ffffff;
    --input-border: #cbd5e1;
    --input-text: #0f172a;
    --input-placeholder: #94a3b8;

    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.15);

    background-image:
        radial-gradient(circle at 0% 0%, rgba(37, 99, 235, 0.06) 0, transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(124, 58, 237, 0.06) 0, transparent 50%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 0% 0%, rgba(59, 130, 246, 0.05) 0, transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(139, 92, 246, 0.05) 0, transparent 50%);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ── GLOBAL INPUT STYLES ── */
input,
textarea,
select {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-sm);
    color: var(--input-text);
    font-family: var(--font-body);
    font-size: 0.95rem;
    padding: 0.75rem 1rem;
    width: 100%;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
}

input::placeholder,
textarea::placeholder {
    color: var(--input-placeholder);
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

input[disabled],
textarea[disabled],
select[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

select option {
    background: var(--bg-dark);
    color: var(--input-text);
}

body.light-theme select option {
    background: #ffffff;
    color: #0f172a;
}

/* Scoped glass overrides — inputs inside .glass keep see-through style */
.glass input,
.glass textarea,
.glass select,
input.glass,
textarea.glass,
select.glass {
    background: var(--input-bg);
    border-color: var(--input-border);
    color: var(--input-text);
}

/* Theme toggle button */
.theme-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 100px;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.theme-toggle:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Glassmorphism Utilities */
.glass {
    background: var(--bg-surface);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-glass);
}

.glass-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-focus);
    box-shadow: var(--shadow-glow);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-card);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* Premium Buttons */
.btn-premium {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
}

.btn-primary:hover {
    box-shadow: var(--shadow-glow);
    transform: scale(1.02);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-main);
    border: 1px solid var(--border-glass);
}

.btn-secondary:hover {
    background: var(--border-glass);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Sticky Navigation */
.sticky-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 80px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-glass);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--text-main);
    letter-spacing: -0.04em;
}

.logo-accent {
    color: var(--accent-primary);
    position: relative;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--accent-primary);
}

.admin-link {
    color: var(--accent-secondary) !important;
}

/* Home Hero */
.home-hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    padding: 4rem 0;
}

.hero-content {
    max-width: 600px;
}

.badge-new {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: var(--accent-glow);
    color: var(--accent-primary);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.hero-content h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

/* Shop Layout */
.shop-layout {
    display: flex;
    gap: 3rem;
    padding: 3rem 0;
    align-items: flex-start;
}

.shop-sidebar {
    width: 320px;
    padding: 2rem;
    border-radius: var(--radius-lg);
    position: sticky;
    top: 100px;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.btn-text {
    background: none;
    border: none;
    color: var(--accent-primary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.filter-section {
    margin-bottom: 2.5rem;
}

.filter-section label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.search-box {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
}

.search-box input {
    background: transparent;
    border: none;
    color: var(--input-text);
    width: 100%;
    outline: none;
    padding: 0;
    font-size: 0.95rem;
}

.pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.pill-btn {
    padding: 0.5rem 1rem;
    border-radius: 100px;
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pill-btn:hover,
.pill-btn.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.price-slider-wrapper {
    padding-top: 1rem;
}

.slider {
    width: 100%;
    accent-color: var(--accent-primary);
}

.price-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.price-current {
    text-align: right;
    color: var(--text-main);
}

.price-current b {
    font-size: 1.1rem;
    color: var(--accent-primary);
}

/* Shop Layout */
.shop-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem;
    padding: 4rem 0;
    align-items: flex-start;
}

.shop-sidebar {
    padding: 2rem;
    border-radius: var(--radius-lg);
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 1rem;
}

.filter-section label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-dim);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.shop-content {
    flex-grow: 1;
}

.content-header {
    margin-bottom: 2rem;
}

.content-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.content-header p {
    color: var(--text-muted);
}

/* Loader */
.loader-wrapper {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    padding: 4rem;
}

.loader {
    width: 48px;
    height: 48px;
    border: 5px solid var(--bg-card);
    border-bottom-color: var(--accent-primary);
    border-radius: 50%;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.text-gradient {
    background: linear-gradient(to right, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Product Card Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.modern-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.card-image-wrapper {
    position: relative;
    height: 320px;
    overflow: hidden;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.modern-card:hover .card-image-wrapper img {
    transform: scale(1.1);
}

.card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-category {
    font-size: 0.75rem;
    color: var(--accent-primary);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.card-title {
    font-size: 1.25rem;
    color: var(--text-main);
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.card-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    font-family: var(--font-heading);
}

.card-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 0.75rem;
}

.btn-icon {
    width: 45px;
    height: 45px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    color: var(--text-main);
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-icon:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.hero-content p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

/* Section Styling */
.section-title {
    font-size: 2rem;
    margin: 4rem 0 2rem;
    text-align: center;
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 6rem 2rem;
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--border-glass);
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.no-results p {
    color: var(--text-muted);
}

/* Product View Layout */
.product-view {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    padding: 4rem 0;
}

.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.main-image {
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow: hidden;
}

.main-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.thumbnails {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.thumb-wrapper {
    width: 80px;
    height: 80px;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.thumb-wrapper.active {
    border-color: var(--accent-primary);
    background: var(--accent-glow);
}

.thumb-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-info-panel {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.breadcrumb {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 1rem;
}

.breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
}

.product-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    line-height: 1;
}

.product-meta {
    display: flex;
    gap: 0.75rem;
}

.badge {
    padding: 0.4rem 1rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-accent {
    background: var(--accent-primary);
    color: white;
}

.price-section {
    display: flex;
    align-items: baseline;
    gap: 1.5rem;
}

.price-display {
    font-size: 2.5rem;
    color: var(--accent-primary);
}

.stock-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.stock-indicator .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.available .dot {
    background: #10b981;
    box-shadow: 0 0 10px #10b981;
}

.unavailable .dot {
    background: #ef4444;
}

.product-pitch {
    padding: 1.5rem;
    border-radius: var(--radius-md);
    color: var(--text-muted);
}

.control-row {
    display: flex;
    gap: 1rem;
    height: 55px;
}

.qty-control {
    display: flex;
    align-items: center;
    border-radius: var(--radius-sm);
    padding: 0 0.5rem;
}

.qty-control button {
    background: none;
    border: none;
    color: var(--text-main);
    width: 30px;
    height: 100%;
    cursor: pointer;
    font-size: 1.2rem;
}

.qty-control input {
    background: transparent;
    border: none;
    color: var(--input-text);
    width: 40px;
    text-align: center;
    font-weight: 700;
    padding: 0;
}

.add-btn {
    flex-grow: 1;
    font-size: 1rem;
}

.large-icon {
    width: 55px;
    height: 55px;
}

.wishlist-toggle.active {
    color: #ef4444;
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.product-details-tabs {
    border-radius: var(--radius-md);
    overflow: hidden;
}

.tab-triggers {
    display: flex;
    background: rgba(255, 255, 255, 0.02);
}

.tab-btn {
    flex: 1;
    padding: 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.tab-btn.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.03);
}

.tab-panes {
    padding: 1.5rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.pane {
    display: none;
}

.pane.active {
    display: block;
    animation: fadeInUp 0.4s ease;
}

/* Admin Dashboard */
.admin-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: calc(100vh - 80px);
}

.admin-sidebar {
    background: rgba(255, 255, 255, 0.01);
    border-right: 1px solid var(--border-glass);
    padding: 2rem;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.admin-nav a {
    padding: 1rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: all 0.3s ease;
}

.admin-nav a:hover,
.admin-nav a.active {
    background: var(--bg-card);
    color: var(--accent-primary);
}

.admin-main {
    padding: 3rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.stat-card {
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent-primary);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-dim);
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: block;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-main);
}

.admin-table-wrapper {
    margin-top: 2rem;
    overflow-x: auto;
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
}

.modern-table th {
    text-align: left;
    padding: 1rem;
    color: var(--text-dim);
    font-size: 0.8rem;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-glass);
}

.message.sent {
    align-self: flex-end;
    background: var(--accent-primary);
    color: white;
    border-bottom-right-radius: 0.2rem;
}

.message.received {
    align-self: flex-start;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    color: var(--text-main);
    border-bottom-left-radius: 0.2rem;
}

.message-time {
    font-size: 0.7rem;
    opacity: 0.6;
    margin-top: 0.5rem;
    display: block;
    text-align: right;
}

.chat-input-wrapper {
    margin: 1.5rem 2rem;
    padding: 0.5rem 1rem;
    display: flex;
    gap: 1rem;
    border-radius: 100px;
}

.chat-input-wrapper input {
    background: transparent;
    border: none;
    color: var(--input-text);
    flex-grow: 1;
    outline: none;
    font-size: 0.95rem;
    padding: 0;
}