/* IQP Farms Marketplace — Main Stylesheet */
:root {
  --bg-void:#030803; --bg-dark:#060e06; --bg-card:#0c170c; --bg-raised:#102010;
  --border:#1a3a1a; --border-light:#243c24;
  --green:#22c55e; --green-700:#15803d; --green-400:#4ade80; --green-d:#16a34a;
  --gold:#f59e0b; --red:#ef4444; --blue:#3b82f6;
  --text-primary:#f0fdf4; --text-secondary:#86efac; --text-muted:#4b7a4b;
  --font-display:'Syne',sans-serif; --font-body:'Inter',sans-serif;
  --radius:12px; --radius-lg:18px; --radius-xl:24px;
  --shadow:0 4px 20px rgba(0,0,0,.4); --transition:.18s ease;
}
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{font-family:var(--font-body);background:var(--bg-void);color:var(--text-primary);min-height:100vh;line-height:1.6}
a{color:inherit;text-decoration:none} img{max-width:100%;display:block} button{cursor:pointer;border:none;font-family:var(--font-body)}
.admin-bar{background:#7f1d1d;color:#fca5a5;text-align:center;padding:8px 16px;font-size:.8rem;font-weight:600}
#toast-container{position:fixed;top:24px;right:24px;z-index:9999;display:flex;flex-direction:column;gap:10px}
.toast{padding:14px 20px;border-radius:var(--radius);font-size:.88rem;font-weight:600;min-width:280px;max-width:360px;display:flex;align-items:center;gap:10px;animation:slideIn .3s ease;box-shadow:var(--shadow);border:1px solid rgba(255,255,255,.08)}
.toast-success{background:#052e16;border-color:#166534;color:#4ade80}
.toast-error{background:#450a0a;border-color:#991b1b;color:#fca5a5}
.toast-info{background:#0c1a0c;border-color:var(--border);color:var(--text-secondary)}
@keyframes slideIn{from{transform:translateX(120%);opacity:0}to{transform:translateX(0);opacity:1}}
.ticker-wrap{background:#060e06;border-bottom:1px solid var(--border);overflow:hidden;white-space:nowrap;height:36px;display:flex;align-items:center}
.ticker-track{display:inline-flex;animation:ticker 60s linear infinite}
.ticker-track:hover{animation-play-state:paused}
.ticker-item{display:inline-flex;align-items:center;gap:8px;padding:0 24px;font-size:.75rem;border-right:1px solid var(--border);height:36px}
.ticker-crop{font-weight:700;color:var(--text-secondary)} .ticker-price{color:var(--text-primary);font-weight:600}
.ticker-up{color:#4ade80;font-size:.72rem} .ticker-down{color:#f87171;font-size:.72rem}
.ticker-vol{color:var(--text-muted);font-size:.7rem}
@keyframes ticker{from{transform:translateX(0)}to{transform:translateX(-50%)}}
.site-header{background:rgba(3,8,3,.95);border-bottom:1px solid var(--border);position:sticky;top:0;z-index:200;backdrop-filter:blur(20px)}
.header-inner{max-width:1400px;margin:0 auto;padding:0 24px;display:flex;align-items:center;gap:20px;height:68px}
.logo{display:flex;flex-direction:column;flex-shrink:0}
.logo-main{font-family:var(--font-display);font-size:1.4rem;font-weight:900;color:var(--green);line-height:1}
.logo-sub{font-size:.6rem;color:var(--text-muted);letter-spacing:.08em;text-transform:uppercase}
.search-wrap{flex:1;max-width:480px;position:relative}
.search-wrap input{width:100%;padding:10px 16px 10px 42px;background:var(--bg-raised);border:1.5px solid var(--border);border-radius:50px;color:var(--text-primary);font-size:.88rem;outline:none;transition:var(--transition);font-family:var(--font-body)}
.search-wrap input:focus{border-color:var(--green);box-shadow:0 0 0 3px rgba(34,197,94,.12)}
.search-icon{position:absolute;left:14px;top:50%;transform:translateY(-50%);pointer-events:none}
.nav-links{display:flex;align-items:center;gap:2px;flex-shrink:0}
.nav-link{padding:7px 11px;border-radius:8px;font-size:.82rem;font-weight:500;color:var(--text-muted);transition:var(--transition);white-space:nowrap;display:flex;align-items:center;gap:4px}
.nav-link:hover,.nav-link.active{background:rgba(34,197,94,.1);color:var(--green)}
.cart-btn{background:var(--bg-raised);border:1.5px solid var(--border);border-radius:10px;padding:8px 14px;font-size:1.1rem;position:relative;transition:var(--transition);color:var(--text-primary)}
.cart-btn:hover{border-color:var(--green)}
.cart-count{position:absolute;top:-6px;right:-6px;background:var(--green);color:#022c22;border-radius:50%;width:18px;height:18px;font-size:.65rem;font-weight:800;display:flex;align-items:center;justify-content:center}
.user-menu{display:flex;align-items:center;gap:8px;background:var(--bg-raised);border:1.5px solid var(--border);border-radius:10px;padding:6px 12px;transition:var(--transition)}
.user-menu:hover{border-color:var(--green)}
.user-avatar{width:28px;height:28px;border-radius:50%;background:var(--green-700);color:#fff;font-weight:700;font-size:.8rem;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:10px 20px;border-radius:var(--radius);font-weight:600;font-size:.9rem;transition:var(--transition);font-family:var(--font-body);border:none;cursor:pointer;white-space:nowrap}
.btn-primary{background:linear-gradient(135deg,var(--green-700),#15803d);color:#fff}
.btn-primary:hover{opacity:.9;transform:translateY(-1px)}
.btn-outline{background:transparent;border:1.5px solid var(--border);color:var(--text-secondary)}
.btn-outline:hover{border-color:var(--green);color:var(--green)}
.btn-ghost{background:transparent;color:var(--text-muted)} .btn-ghost:hover{color:var(--green)}
.btn-danger{background:linear-gradient(135deg,#b91c1c,#991b1b);color:#fff}
.btn-sm{padding:6px 14px;font-size:.8rem} .btn-lg{padding:14px 28px;font-size:1rem} .w-100{width:100%}
.form-group{margin-bottom:18px}
.form-label{display:block;font-size:.75rem;font-weight:700;color:var(--text-secondary);margin-bottom:6px;text-transform:uppercase;letter-spacing:.05em}
.form-control{display:block;width:100%;padding:12px 16px;background:var(--bg-raised);border:1.5px solid var(--border);border-radius:var(--radius);color:var(--text-primary);font-size:.92rem;outline:none;transition:var(--transition);font-family:var(--font-body)}
.form-control:focus{border-color:var(--green);box-shadow:0 0 0 3px rgba(34,197,94,.1)}
.form-control::placeholder{color:var(--text-muted)}
.card{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius-lg);overflow:hidden;transition:var(--transition)}
.card:hover{border-color:var(--border-light);box-shadow:var(--shadow)}
.card-body{padding:20px}
.product-card{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius-lg);overflow:hidden;transition:var(--transition);display:flex;flex-direction:column}
.product-card:hover{border-color:var(--green-400);transform:translateY(-2px);box-shadow:0 8px 30px rgba(34,197,94,.1)}
.product-img{aspect-ratio:4/3;background:var(--bg-raised);display:flex;align-items:center;justify-content:center;font-size:4rem;overflow:hidden;position:relative}
.product-img img{width:100%;height:100%;object-fit:cover}
.product-badges{position:absolute;top:10px;left:10px;display:flex;gap:6px;flex-wrap:wrap}
.badge{padding:3px 10px;border-radius:20px;font-size:.68rem;font-weight:700}
.badge-organic{background:rgba(34,197,94,.2);color:#4ade80;border:1px solid rgba(34,197,94,.3)}
.badge-featured{background:rgba(245,158,11,.2);color:#fbbf24;border:1px solid rgba(245,158,11,.3)}
.badge-pending{background:rgba(251,191,36,.15);color:#fbbf24}
.badge-active{background:rgba(34,197,94,.15);color:#4ade80}
.product-info{padding:16px;flex:1;display:flex;flex-direction:column}
.product-name{font-weight:700;font-size:.95rem;color:var(--text-primary);margin-bottom:4px;line-height:1.3}
.product-origin{font-size:.75rem;color:var(--text-muted);margin-bottom:10px}
.product-price{font-family:var(--font-display);font-size:1.2rem;font-weight:800;color:var(--green);margin-bottom:4px}
.product-unit{font-size:.75rem;color:var(--text-muted)}
.product-rating{display:flex;align-items:center;gap:4px;font-size:.78rem;color:var(--text-muted);margin-bottom:12px}
.product-rating .stars{color:#f59e0b}
.product-actions{display:flex;gap:8px;margin-top:auto}
.product-actions .btn{flex:1}
.container{max-width:1400px;margin:0 auto;padding:0 24px}
.section{padding:80px 0} .section-sm{padding:40px 0}
.grid{display:grid;gap:24px}
.grid-2{grid-template-columns:repeat(2,1fr)} .grid-3{grid-template-columns:repeat(3,1fr)} .grid-4{grid-template-columns:repeat(4,1fr)}
.products-grid{grid-template-columns:repeat(auto-fill,minmax(240px,1fr))}
.flex{display:flex} .flex-center{display:flex;align-items:center;justify-content:center}
.flex-between{display:flex;align-items:center;justify-content:space-between}
.flex-gap-sm{gap:10px} .flex-gap{gap:16px} .flex-wrap{flex-wrap:wrap}
.hero{padding:100px 0 80px;background:radial-gradient(ellipse 80% 50% at 50% 30%,rgba(34,197,94,.08),transparent)}
.hero-title{font-family:var(--font-display);font-size:clamp(2.5rem,6vw,5rem);font-weight:900;line-height:1.05;margin-bottom:20px}
.hero-title .accent{color:var(--green)}
.hero-subtitle{font-size:1.1rem;color:var(--text-muted);max-width:560px;line-height:1.7;margin-bottom:36px}
.page-hero{padding:48px 0 32px;background:linear-gradient(to bottom,rgba(34,197,94,.04),transparent);border-bottom:1px solid var(--border)}
.headline{font-family:var(--font-display);font-size:clamp(1.8rem,4vw,2.8rem);font-weight:900}
.shop-layout{display:grid;grid-template-columns:260px 1fr;gap:28px;align-items:start}
.shop-sidebar{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius-xl);padding:24px;position:sticky;top:88px}
.filter-title{font-size:.75rem;font-weight:700;text-transform:uppercase;letter-spacing:.08em;color:var(--text-muted);margin-bottom:12px}
.cat-chip{display:block;padding:8px 12px;border-radius:8px;font-size:.85rem;font-weight:500;color:var(--text-muted);transition:var(--transition);cursor:pointer;margin-bottom:2px}
.cat-chip:hover,.cat-chip.active{background:rgba(34,197,94,.1);color:var(--green)}
.modal-overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,.7);z-index:1000;align-items:center;justify-content:center;backdrop-filter:blur(8px);padding:20px}
.modal-overlay.open{display:flex}
.modal{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius-xl);width:100%;max-width:480px;max-height:90vh;overflow-y:auto}
.modal-header{display:flex;align-items:center;justify-content:space-between;padding:20px 24px;border-bottom:1px solid var(--border)}
.modal-body{padding:24px}
.modal-close{background:var(--bg-raised);border:1px solid var(--border);border-radius:8px;padding:6px 10px;color:var(--text-muted);font-size:.9rem;transition:var(--transition)}
.modal-close:hover{color:var(--text-primary)}
.drawer-overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,.6);z-index:800}
.drawer-overlay.open{display:block}
.drawer{position:fixed;right:0;top:0;bottom:0;width:420px;max-width:100vw;background:var(--bg-card);border-left:1px solid var(--border);display:flex;flex-direction:column;transition:.3s ease;transform:translateX(100%);z-index:900}
.drawer-overlay.open .drawer{transform:translateX(0)}
.drawer-header{display:flex;align-items:center;justify-content:space-between;padding:20px 24px;border-bottom:1px solid var(--border)}
.drawer-body{flex:1;overflow-y:auto;padding:20px}
.drawer-footer{padding:20px 24px;border-top:1px solid var(--border)}
.scrollbar-thin::-webkit-scrollbar{width:4px} .scrollbar-thin::-webkit-scrollbar-thumb{background:var(--border);border-radius:2px}
.cart-item{display:flex;gap:12px;align-items:flex-start;padding:14px 0;border-bottom:1px solid var(--border)}
.cart-item:last-child{border-bottom:none}
.cart-item-img{width:60px;height:60px;background:var(--bg-raised);border-radius:10px;flex-shrink:0;display:flex;align-items:center;justify-content:center;font-size:1.8rem;overflow:hidden}
.qty-control{display:flex;align-items:center;border:1px solid var(--border);border-radius:8px;overflow:hidden;margin-top:6px;width:fit-content}
.qty-btn{width:28px;height:28px;background:var(--bg-raised);border:none;color:var(--text-secondary);cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:1rem}
.qty-btn:hover{background:rgba(34,197,94,.1);color:var(--green)}
.qty-val{width:32px;text-align:center;font-size:.85rem;font-weight:600;background:transparent;border:none;color:var(--text-primary);padding:4px}
.breadcrumb{display:flex;align-items:center;gap:6px;font-size:.8rem;color:var(--text-muted);margin-bottom:12px}
.breadcrumb a:hover{color:var(--green)} .sep{color:var(--border-light)}
.stat-card{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius-lg);padding:24px}
.stat-value{font-family:var(--font-display);font-size:2rem;font-weight:900;line-height:1}
.stat-label{font-size:.78rem;color:var(--text-muted);margin-top:4px}
.stat-up{color:#4ade80} .stat-down{color:#f87171}
.table-wrap{overflow-x:auto;border-radius:var(--radius-lg);border:1px solid var(--border)}
table{width:100%;border-collapse:collapse}
th,td{padding:12px 16px;text-align:left;font-size:.85rem}
th{background:var(--bg-raised);color:var(--text-muted);font-weight:700;font-size:.75rem;text-transform:uppercase;letter-spacing:.06em;border-bottom:1px solid var(--border)}
td{border-bottom:1px solid rgba(26,58,26,.5);color:var(--text-primary);vertical-align:middle}
tr:last-child td{border-bottom:none}
.section-title{font-family:var(--font-display);font-size:clamp(1.6rem,3vw,2.2rem);font-weight:900;line-height:1.1;margin-bottom:8px}
.section-subtitle{color:var(--text-muted);font-size:.95rem;line-height:1.6}
.section-head{margin-bottom:40px}
.footer{background:var(--bg-dark);border-top:1px solid var(--border);padding:64px 0 32px;margin-top:80px}
.footer-grid{display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:48px;margin-bottom:48px}
.footer-title{font-size:.75rem;font-weight:700;text-transform:uppercase;letter-spacing:.1em;color:var(--text-muted);margin-bottom:16px}
.footer-links{list-style:none}
.footer-links li{margin-bottom:8px}
.footer-links a{color:var(--text-muted);font-size:.88rem;transition:var(--transition)}
.footer-links a:hover{color:var(--green)}
.footer-bottom{border-top:1px solid var(--border);padding-top:24px;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;font-size:.78rem;color:var(--text-muted)}
.dash-layout{display:grid;grid-template-columns:240px 1fr;gap:28px;padding:40px 0}
.dash-sidebar{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius-xl);padding:20px;position:sticky;top:88px;height:fit-content}
.dash-avatar{width:64px;height:64px;background:var(--green-700);border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:1.6rem;font-weight:900;color:#fff;margin:0 auto 12px}
.dash-nav-item{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:10px;font-size:.88rem;font-weight:500;color:var(--text-muted);transition:var(--transition);margin-bottom:2px;cursor:pointer}
.dash-nav-item:hover,.dash-nav-item.active{background:rgba(34,197,94,.1);color:var(--green)}
.dash-panel{display:none} .dash-panel.active{display:block}
.text-green{color:var(--green)} .text-gold{color:var(--gold)} .text-red{color:var(--red)}
.text-muted{color:var(--text-muted)} .text-center{text-align:center}
.mt-8{margin-top:8px} .mt-12{margin-top:12px} .mt-16{margin-top:16px} .mt-24{margin-top:24px} .mt-32{margin-top:32px}
.mb-8{margin-bottom:8px} .mb-12{margin-bottom:12px} .mb-16{margin-bottom:16px} .mb-24{margin-bottom:24px}
.p-20{padding:20px} .p-24{padding:24px}
.hidden{display:none!important}
.loading{opacity:.5;pointer-events:none}
.spinner{display:inline-block;width:18px;height:18px;border:2px solid rgba(255,255,255,.3);border-top-color:#fff;border-radius:50%;animation:spin .7s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.alert{padding:14px 18px;border-radius:var(--radius);font-size:.88rem;margin-bottom:16px}
.alert-success{background:#052e16;border:1px solid #166534;color:#4ade80}
.alert-error{background:#450a0a;border:1px solid #991b1b;color:#fca5a5}
.alert-info{background:#0c1a0c;border:1px solid var(--border);color:var(--text-secondary)}
.pagination{display:flex;align-items:center;justify-content:center;gap:6px;margin-top:40px}
.page-btn{padding:8px 14px;border-radius:8px;background:var(--bg-raised);border:1px solid var(--border);color:var(--text-muted);font-size:.85rem;font-weight:600;transition:var(--transition)}
.page-btn:hover,.page-btn.active{background:var(--green-700);color:#fff;border-color:var(--green-700)}
@media(max-width:1100px){
  .nav-links{display:none}
  .shop-layout{grid-template-columns:1fr}
  .shop-sidebar{position:static}
  .footer-grid{grid-template-columns:1fr 1fr;gap:32px}
  .dash-layout{grid-template-columns:1fr}
  .dash-sidebar{position:static}
  .grid-4{grid-template-columns:repeat(2,1fr)}
  .grid-3{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:640px){
  .container{padding:0 16px}
  .grid-2,.grid-3,.grid-4{grid-template-columns:1fr}
  .footer-grid{grid-template-columns:1fr}
  .header-inner{padding:0 16px;height:58px}
  .search-wrap{display:none}
  .hero{padding:60px 0 40px}
  .drawer{width:100vw}
}
