@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
    --saffron: #E8651A;
    --saffron-dark: #C4510D;
    --saffron-light: #FFF3E8;
    --cream: #FAF6F0;
    --charcoal: #1A1A1A;
    --bark: #3D2B1F;
    --muted: #7A6A60;
    --border: #E8DDD5;
    --white: #FFFFFF;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--white);
    color: var(--charcoal);
    overflow-x: hidden;
}

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ── NAVBAR ── */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0;
}
.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}
.logo {
    font-family: 'DM Serif Display', serif;
    font-size: 22px;
    color: var(--bark);
    letter-spacing: 0.5px;
    text-decoration: none;
}
.logo span { color: var(--saffron); }
.nav-links { display: flex; list-style: none; gap: 8px; align-items: center; }
.nav-links a {
    text-decoration: none;
    color: var(--muted);
    font-weight: 500;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s;
}
.nav-links a:hover, .nav-links a.active {
    color: var(--saffron);
    background: var(--saffron-light);
}
.nav-cta {
    background: var(--saffron) !important;
    color: #fff !important;
    border-radius: 6px !important;
}
.nav-cta:hover { background: var(--saffron-dark) !important; }

/* ── HERO ── */
.hero {
    background: var(--cream);
    padding: 100px 0 80px;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    right: -100px;
    top: -100px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(232,101,26,0.08) 0%, transparent 70%);
    border-radius: 50%;
}
.hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--saffron-light);
    color: var(--saffron);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 100px;
    margin-bottom: 24px;
}
.hero-eyebrow::before { content: '●'; font-size: 8px; }
.hero h1 {
    font-family: 'DM Serif Display', serif;
    font-size: 54px;
    line-height: 1.15;
    color: var(--bark);
    margin-bottom: 20px;
}
.hero h1 em { color: var(--saffron); font-style: italic; }
.hero-desc {
    font-size: 17px;
    color: var(--muted);
    line-height: 1.8;
    margin-bottom: 36px;
    max-width: 480px;
}
.hero-btns { display: flex; gap: 12px; align-items: center; }
.btn-primary {
    background: var(--saffron);
    color: #fff;
    padding: 14px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-block;
}
.btn-primary:hover { background: var(--saffron-dark); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(232,101,26,0.3); }
.btn-ghost {
    color: var(--bark);
    padding: 14px 24px;
    font-weight: 500;
    font-size: 15px;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    background: transparent;
    border: 1.5px solid var(--border);
    display: inline-block;
}
.btn-ghost:hover { border-color: var(--saffron); color: var(--saffron); }

.hero-visual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    position: relative;
}
.hero-visual-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
}
.hero-visual-card:nth-child(2) { margin-top: 32px; }
.hero-visual-card:nth-child(3) { margin-top: -32px; }

/* ── STATS BAND ── */
.stats-band {
    background: var(--bark);
    padding: 48px 0;
}
.stats-band .container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}
.stat-cell {
    text-align: center;
    padding: 0 20px;
    border-right: 1px solid rgba(255,255,255,0.12);
}
.stat-cell:last-child { border-right: none; }
.stat-cell h2 {
    font-family: 'DM Serif Display', serif;
    font-size: 42px;
    color: var(--saffron);
    margin-bottom: 6px;
}
.stat-cell p { color: rgba(255,255,255,0.65); font-size: 14px; font-weight: 400; letter-spacing: 0.5px; }

/* ── FEATURES ── */
.features { padding: 100px 0; }
.section-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--saffron);
    margin-bottom: 14px;
}
.section-title {
    font-family: 'DM Serif Display', serif;
    font-size: 38px;
    color: var(--bark);
    margin-bottom: 16px;
    line-height: 1.25;
}
.section-sub { color: var(--muted); font-size: 16px; line-height: 1.7; max-width: 520px; }
.features-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}
.features-cards { display: flex; flex-direction: column; gap: 20px; }
.feature-card {
    display: flex;
    gap: 20px;
    padding: 28px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--cream);
    transition: all 0.3s;
}
.feature-card:hover { border-color: var(--saffron); transform: translateX(6px); box-shadow: 0 8px 32px rgba(232,101,26,0.08); }
.feature-icon {
    width: 52px;
    height: 52px;
    background: var(--saffron-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}
.feature-card h3 { font-size: 16px; font-weight: 600; color: var(--bark); margin-bottom: 6px; }
.feature-card p { font-size: 14px; color: var(--muted); line-height: 1.6; }

/* ── PRODUCT PAGE ── */
.product-banner {
    background: var(--bark);
    padding: 70px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.product-banner::after {
    content: 'JANAKI FOODS';
    position: absolute;
    font-family: 'DM Serif Display', serif;
    font-size: 160px;
    color: rgba(255,255,255,0.03);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    white-space: nowrap;
    letter-spacing: 10px;
}
.product-banner h1 {
    font-family: 'DM Serif Display', serif;
    font-size: 48px;
    color: #fff;
    margin-bottom: 10px;
}
.product-banner p { color: rgba(255,255,255,0.55); font-size: 15px; letter-spacing: 0.5px; }

.product-grid-2x2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    padding: 60px 0;
}
.product-card {
    background: var(--white);
    border-radius: 16px;
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}
.product-card:hover { box-shadow: 0 16px 48px rgba(0,0,0,0.1); transform: translateY(-4px); }
.product-img {
    height: 260px;
    background: var(--cream);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.product-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.product-card:hover .product-img img { transform: scale(1.04); }
.product-img-placeholder {
    font-size: 80px;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cream);
}
.product-info { padding: 28px; flex: 1; display: flex; flex-direction: column; }
.product-info h3 {
    font-family: 'DM Serif Display', serif;
    font-size: 22px;
    color: var(--bark);
    margin-bottom: 8px;
}
.product-info p { font-size: 14px; color: var(--muted); line-height: 1.6; flex: 1; margin-bottom: 20px; }
.product-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    background: var(--saffron-light);
    color: var(--saffron);
    padding: 4px 10px;
    border-radius: 100px;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.order-btn {
    background: var(--bark);
    color: #fff;
    border: none;
    padding: 13px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}
.order-btn:hover { background: var(--saffron); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(232,101,26,0.25); }

/* ── MODAL ── */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(26,26,26,0.75);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);

}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-content {
    background: #fff;
    padding: 44px;
    border-radius: 16px;
    width: 90%;
    max-width: 440px;
    position: relative;
    animation: slideUp 0.3s ease;
}
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.modal-icon { font-size: 36px; margin-bottom: 12px; }
.modal-content h2 {
    font-family: 'DM Serif Display', serif;
    font-size: 26px;
    color: var(--bark);
    margin-bottom: 8px;
}
.modal-content h3 {
    font-family: 'DM Serif Display', serif;
    font-size: 22px;
    color: var(--bark);
    margin-bottom: 8px;
}
.modal-content > p { color: var(--muted); font-size: 14px; margin-bottom: 24px; line-height: 1.6; }
.close-popup {
    position: absolute;
    top: 18px; right: 22px;
    font-size: 22px;
    cursor: pointer;
    color: var(--muted);
    line-height: 1;
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
    background: transparent;
    border: none;
}
.close-popup:hover { background: var(--cream); color: var(--charcoal); }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 12px; font-weight: 600; color: var(--bark); margin-bottom: 6px; letter-spacing: 0.3px; text-transform: uppercase; }
form input, form select {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: var(--charcoal);
    outline: none;
    transition: border-color 0.2s;
    background: var(--cream);
    margin-bottom: 14px;
}
form input:focus, form select:focus { border-color: var(--saffron); background: #fff; }
.form-group input, .form-group select { margin-bottom: 0; }
#selectedProductText {
    display: inline-block;
    color: var(--saffron);
    font-weight: 600;
    font-size: 14px;
    background: var(--saffron-light);
    padding: 6px 14px;
    border-radius: 6px;
    margin-bottom: 20px;
}

/* ── FOOTER ── */
footer {
    background: var(--charcoal);
    padding: 40px 0;
    text-align: center;
}
footer p { color: rgba(255,255,255,0.4); font-size: 13px; }
footer a { color: var(--saffron); text-decoration: none; }

/* ── ADMIN ── */
.admin-body { background: #F5F7FA; min-height: 100vh; font-family: 'DM Sans', sans-serif; }
.admin-navbar {
    background: var(--bark);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 16px rgba(0,0,0,0.2);
}
.admin-logo { font-family: 'DM Serif Display', serif; font-size: 20px; color: #fff; }
.admin-logo span { color: var(--saffron); }
.admin-badge {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: rgba(232,101,26,0.2);
    color: var(--saffron);
    padding: 4px 12px;
    border-radius: 100px;
}
.admin-main { padding: 40px 32px; max-width: 1300px; margin: 0 auto; }
.admin-header { margin-bottom: 32px; }
.admin-header h1 { font-family: 'DM Serif Display', serif; font-size: 32px; color: var(--bark); margin-bottom: 4px; }
.admin-header p { color: var(--muted); font-size: 14px; }
.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}
.admin-stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #E8EDF2;
    transition: box-shadow 0.2s;
}
.admin-stat-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.06); }
.admin-stat-card .label { font-size: 12px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.admin-stat-card .value { font-family: 'DM Serif Display', serif; font-size: 36px; color: var(--bark); line-height: 1; margin-bottom: 4px; }
.admin-stat-card .sub { font-size: 12px; color: var(--muted); }
.admin-stat-card.accent { background: var(--bark); border-color: var(--bark); }
.admin-stat-card.accent .label { color: rgba(255,255,255,0.5); }
.admin-stat-card.accent .value { color: var(--saffron); }
.admin-stat-card.accent .sub { color: rgba(255,255,255,0.4); }

.admin-table-section {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #E8EDF2;
    overflow: hidden;
}
.table-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #E8EDF2;
    flex-wrap: wrap;
    gap: 12px;
}
.table-toolbar h2 { font-size: 16px; font-weight: 600; color: var(--bark); }
.toolbar-actions { display: flex; gap: 10px; align-items: center; }
.admin-search {
    padding: 9px 14px;
    border: 1.5px solid #E8EDF2;
    border-radius: 8px;
    font-size: 13px;
    font-family: 'DM Sans', sans-serif;
    outline: none;
    transition: border-color 0.2s;
    width: 200px;
}
.admin-search:focus { border-color: var(--saffron); }
.btn-refresh {
    background: var(--saffron);
    color: #fff;
    border: none;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.btn-refresh:hover { background: var(--saffron-dark); }
.btn-export {
    background: var(--cream);
    color: var(--bark);
    border: 1.5px solid var(--border);
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    transition: all 0.2s;
}
.btn-export:hover { border-color: var(--saffron); color: var(--saffron); }
table { width: 100%; border-collapse: collapse; }
thead th {
    background: #F9FAFB;
    padding: 12px 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--muted);
    text-align: left;
    border-bottom: 1px solid #E8EDF2;
}
tbody tr { border-bottom: 1px solid #F3F4F6; transition: background 0.15s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: #FAFBFC; }
tbody td { padding: 16px 20px; font-size: 14px; color: var(--charcoal); vertical-align: middle; }
.product-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 100px;
    background: var(--saffron-light);
    color: var(--saffron);
}
.qty-badge {
    font-weight: 700;
    color: var(--bark);
}
.status-pill {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 100px;
}
.status-new { background: #E8F5E9; color: #2E7D32; }
.status-pending { background: #FFF8E1; color: #F57F17; }
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--muted);
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state p { font-size: 15px; }
.loading-row td { text-align: center; padding: 50px; color: var(--muted); font-size: 14px; }
.spinner {
    display: inline-block;
    width: 20px; height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--saffron);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

.filter-bar {
    display: flex;
    gap: 8px;
    padding: 16px 24px;
    border-bottom: 1px solid #E8EDF2;
    overflow-x: auto;
}
.filter-chip {
    padding: 6px 16px;
    border-radius: 100px;
    border: 1.5px solid #E8EDF2;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    background: #fff;
    color: var(--muted);
    transition: all 0.2s;
    font-family: 'DM Sans', sans-serif;
}
.filter-chip.active, .filter-chip:hover {
    border-color: var(--saffron);
    color: var(--saffron);
    background: var(--saffron-light);
}
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-top: 1px solid #E8EDF2;
    font-size: 13px;
    color: var(--muted);
}
.page-btns { display: flex; gap: 6px; }
.page-btn {
    width: 32px; height: 32px;
    border-radius: 6px;
    border: 1.5px solid #E8EDF2;
    background: #fff;
    font-size: 13px;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    color: var(--muted);
    transition: all 0.2s;
    display: flex; align-items: center; justify-content: center;
}
.page-btn:hover, .page-btn.active { border-color: var(--saffron); color: var(--saffron); background: var(--saffron-light); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
    .hero-inner { grid-template-columns: 1fr; gap: 40px; }
    .hero h1 { font-size: 40px; }
    .hero-visual { display: none; }
    .features-layout { grid-template-columns: 1fr; gap: 40px; }
    .product-grid-2x2 { grid-template-columns: 1fr; }
    .admin-stats { grid-template-columns: 1fr 1fr; }
    .stats-band .container { grid-template-columns: 1fr; gap: 24px; }
    .stat-cell { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.12); padding: 20px; }
    .stat-cell:last-child { border-bottom: none; }
}
@media (max-width: 600px) {
    .admin-main { padding: 24px 16px; }
    .admin-stats { grid-template-columns: 1fr; }
    .admin-navbar { padding: 0 16px; }
    .hero { padding: 60px 0; }
    .hero h1 { font-size: 32px; }
}