/* ============================================================
   Vishal Beej Bhandar - Global Stylesheet
   Theme: Greenish-Pink | Light + Dark mode
   ============================================================ */

:root {
  /* Brand colors derived from logo */
  --green-900: #1E3120;
  --green-700: #2f5233;
  --green-600: #3d7a44;
  --green-500: #4f9e57;
  --olive: #768C37;
  --olive-light: #97ad52;

  /* Pink accents */
  --pink-600: #d6457f;
  --pink-500: #e85d92;
  --pink-400: #f47fab;
  --pink-200: #ffd0e2;

  /* Gradient */
  --grad-main: linear-gradient(120deg, #2f5233 0%, #4f9e57 45%, #e85d92 100%);
  --grad-soft: linear-gradient(120deg, #eafbe7 0%, #fbe6f0 100%);

  /* Light theme tokens */
  --bg: #f7fbf4;
  --bg-alt: #ffffff;
  --bg-card: #ffffff;
  --surface: #ffffff;
  --text: #1c2b1e;
  --text-soft: #5a6b5c;
  --border: #e4ece0;
  --shadow: 0 8px 30px rgba(30, 49, 32, 0.08);
  --shadow-lg: 0 18px 50px rgba(30, 49, 32, 0.14);
  --header-bg: rgba(255, 255, 255, 0.85);
  --primary: var(--green-600);
  --primary-dark: var(--green-700);
  --accent: var(--pink-500);
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1240px;
}

[data-theme="dark"] {
  --bg: #0f1711;
  --bg-alt: #14201700;
  --bg-card: #18241b;
  --surface: #18241b;
  --text: #eaf3e9;
  --text-soft: #a7b9a8;
  --border: #26352a;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.55);
  --header-bg: rgba(15, 23, 17, 0.85);
  --primary: var(--green-500);
  --primary-dark: var(--olive-light);
  --accent: var(--pink-400);
  --grad-soft: linear-gradient(120deg, #16241a 0%, #2a1622 100%);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background .3s ease, color .3s ease;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: 'Poppins', 'Inter', sans-serif; line-height: 1.2; font-weight: 700; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 26px; border-radius: 50px; border: none;
  font-weight: 600; font-size: .95rem; cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  font-family: inherit;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--grad-main); color: #fff; box-shadow: 0 8px 22px rgba(232, 93, 146, .28); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(232, 93, 146, .4); }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-pink { background: var(--accent); color: #fff; }
.btn-pink:hover { filter: brightness(1.08); transform: translateY(-2px); }
.btn-sm { padding: 8px 16px; font-size: .85rem; }
.btn-block { width: 100%; justify-content: center; }

/* ---------- Header / Navbar ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(14px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  transition: background .3s ease;
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px; gap: 18px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 46px; width: auto; }
.brand-name { font-family: 'Poppins'; font-weight: 700; font-size: 1.15rem; color: var(--green-700); letter-spacing: .2px; white-space: nowrap; }
[data-theme="dark"] .brand-name { color: var(--olive-light); }
.brand-name small { display: block; font-size: .62rem; font-weight: 500; letter-spacing: 2px; color: var(--accent); text-transform: uppercase; }

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-links a {
  padding: 9px 14px; border-radius: 30px; font-weight: 500; font-size: .92rem;
  color: var(--text-soft); transition: all .2s ease; position: relative;
  white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { color: var(--primary); background: rgba(79,158,87,.1); }

.nav-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); cursor: pointer; font-size: 1rem;
  display: grid; place-items: center; transition: all .2s ease; position: relative;
}
.icon-btn:hover { color: var(--primary); border-color: var(--primary); transform: translateY(-2px); }
.cart-count {
  position: absolute; top: -5px; right: -5px; background: var(--accent); color: #fff;
  font-size: .65rem; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px;
  display: grid; place-items: center; padding: 0 4px;
}
.hamburger { display: none; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--green-900); color: #d8e6d8; margin-top: 80px;
  padding: 56px 0 24px;
}
[data-theme="dark"] .site-footer { background: #0b110c; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 36px; }
.footer-col h4 { color: #fff; margin-bottom: 16px; font-size: 1.05rem; }
.footer-col p, .footer-col li { color: #aec3ae; font-size: .9rem; margin-bottom: 9px; list-style: none; }
.footer-col a { color: #aec3ae; transition: color .2s; }
.footer-col a:hover { color: var(--pink-400); }
.footer-brand img { height: 54px; margin-bottom: 14px; filter: brightness(0) invert(1); opacity:.95; }
.footer-social { display: flex; gap: 12px; margin-top: 14px; }
.footer-social a { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.1); display: grid; place-items: center; color: #fff; transition: all .2s; }
.footer-social a:hover { background: var(--accent); transform: translateY(-3px); }
.footer-bottom { text-align: center; margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.12); color: #8ba18b; font-size: .85rem; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 48px; }
.section-head .eyebrow { color: var(--accent); font-weight: 700; letter-spacing: 2px; text-transform: uppercase; font-size: .8rem; }
.section-head h2 { font-size: 2.3rem; margin: 10px 0 12px; }
.section-head p { color: var(--text-soft); font-size: 1.02rem; }
.gradient-text { background: var(--grad-main); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Product Card ---------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px; }
.product-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: transform .25s ease, box-shadow .25s ease; display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.product-card .pc-img { position: relative; aspect-ratio: 1/1; overflow: hidden; background: var(--grad-soft); }
.product-card .pc-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.product-card:hover .pc-img img { transform: scale(1.06); }
.pc-badge { position: absolute; top: 12px; left: 12px; background: var(--accent); color: #fff; font-size: .7rem; font-weight: 700; padding: 4px 10px; border-radius: 20px; }
.pc-brand-tag { position: absolute; top: 12px; right: 12px; background: rgba(255,255,255,.92); color: var(--green-700); font-size: .68rem; font-weight: 700; padding: 4px 9px; border-radius: 6px; }
.pc-body { padding: 16px; display: flex; flex-direction: column; flex: 1; }
.pc-cat { font-size: .72rem; color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.pc-name { font-size: 1.02rem; font-weight: 600; margin: 5px 0; color: var(--text); }
.pc-desc { font-size: .85rem; color: var(--text-soft); margin-bottom: 10px; flex: 1; }
.pc-rating { color: #f5a623; font-size: .8rem; margin-bottom: 8px; }
.pc-price { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.pc-price .now { font-size: 1.2rem; font-weight: 700; color: var(--green-700); }
[data-theme="dark"] .pc-price .now { color: var(--olive-light); }
.pc-price .was { font-size: .85rem; color: var(--text-soft); text-decoration: line-through; }
.pc-price .off { font-size: .72rem; color: var(--accent); font-weight: 700; }
.pc-actions { display: flex; gap: 8px; }
.pc-actions .btn { flex: 1; justify-content: center; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.input, .form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font-family: inherit; font-size: .95rem; transition: border .2s, box-shadow .2s;
}
.input:focus, .form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,158,87,.15);
}
.form-group textarea { resize: vertical; min-height: 110px; }

/* ---------- Cards / Panels ---------- */
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--green-700); color: #fff; padding: 14px 20px; border-radius: 12px; box-shadow: var(--shadow-lg);
  font-size: .9rem; display: flex; align-items: center; gap: 10px; animation: toastIn .3s ease; min-width: 240px;
}
.toast.error { background: var(--pink-600); }
.toast.info { background: var(--olive); }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }

/* ---------- Modal ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(10,16,11,.6); backdrop-filter: blur(4px); z-index: 1000; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.open { display: flex; animation: fadeIn .25s ease; }
.modal { background: var(--bg-card); border-radius: 20px; padding: 32px; max-width: 460px; width: 100%; box-shadow: var(--shadow-lg); position: relative; animation: modalIn .3s ease; max-height: 92vh; overflow-y: auto; }
.modal-close { position: absolute; top: 16px; right: 16px; background: none; border: none; font-size: 1.4rem; color: var(--text-soft); cursor: pointer; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(20px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- Page hero ---------- */
.page-hero { background: var(--grad-soft); padding: 60px 0 50px; text-align: center; border-bottom: 1px solid var(--border); }
.page-hero h1 { font-size: 2.6rem; margin-bottom: 10px; }
.page-hero p { color: var(--text-soft); max-width: 560px; margin: 0 auto; }
.breadcrumb { font-size: .85rem; color: var(--text-soft); margin-bottom: 16px; }
.breadcrumb a:hover { color: var(--primary); }

/* ---------- Spinner ---------- */
.spinner { width: 38px; height: 38px; border: 4px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 1s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

.empty-state { text-align: center; padding: 60px 20px; color: var(--text-soft); }
.empty-state i { font-size: 3rem; color: var(--border); margin-bottom: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .nav-links {
    position: fixed; top: 72px; right: 0; width: 280px; height: calc(100vh - 72px);
    flex-direction: column; align-items: stretch; gap: 4px; padding: 20px;
    background: var(--bg-card); border-left: 1px solid var(--border);
    transform: translateX(100%); transition: transform .3s ease; box-shadow: var(--shadow-lg);
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { padding: 14px 16px; border-radius: 12px; }
  .hamburger { display: grid; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .section-head h2 { font-size: 1.8rem; }
  .page-hero h1 { font-size: 2rem; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .pc-body { padding: 12px; }
}
