/* ====== Google Font ====== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

:root {
  --brand: #16a34a;
  --brand-dark: #0f7a37;
  --accent: #7c3aed;
  --accent-2: #f59e0b;
  --bg-light: #f8f9fc;
  --card-light: #ffffff;
  --text-light: #1f2937;

  --bg-dark: #0f1117;
  --card-dark: #1a1d27;
  --text-dark: #e5e7eb;
  --border-dark: #2a2e3a;
}

* { font-family: 'Poppins', sans-serif; }

body {
  background-color: var(--bg-light);
  color: var(--text-light);
  transition: background-color .3s ease, color .3s ease;
}

/* ============ DARK MODE ============ */
body.dark-mode {
  background-color: var(--bg-dark);
  color: var(--text-dark);
}
body.dark-mode .navbar {
  background-color: var(--card-dark) !important;
  border-bottom: 1px solid var(--border-dark);
}
body.dark-mode .card {
  background-color: var(--card-dark);
  border: 1px solid var(--border-dark);
  color: var(--text-dark);
}
body.dark-mode .form-control {
  background-color: #11141c;
  border-color: var(--border-dark);
  color: var(--text-dark);
}
body.dark-mode .form-control::placeholder { color: #8b8f9c; }
body.dark-mode .dropdown-menu {
  background-color: var(--card-dark);
  border-color: var(--border-dark);
}
body.dark-mode .dropdown-item { color: var(--text-dark); }
body.dark-mode .dropdown-item:hover { background-color: var(--border-dark); }
body.dark-mode footer { background-color: #0a0c11 !important; }
body.dark-mode small.text-dark,
body.dark-mode h6 { color: var(--text-dark) !important; }

/* ============ NAVBAR ============ */
.navbar {
  backdrop-filter: blur(10px);
}
.navbar-brand {
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.form-control {
  border-radius: 50px;
  padding-left: 18px;
}

/* Theme toggle button */
#themeToggle {
  border: none;
  background: transparent;
  font-size: 1.3rem;
  cursor: pointer;
  transition: transform .2s;
}
#themeToggle:hover { transform: rotate(20deg) scale(1.1); }

/* ============ HERO ============ */
.hero-banner {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 60px 40px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
  color: #fff;
}
.hero-banner::before {
  content: "";
  position: absolute;
  top: -50%; right: -10%;
  width: 400px; height: 400px;
  background: rgba(255,255,255,0.12);
  border-radius: 50%;
}
.hero-banner h1 {
  font-weight: 800;
  font-size: 2.6rem;
}
.hero-banner p { opacity: .95; }


/* ============ SECTION TITLES ============ */
.section-title {
  font-weight: 700;
  font-size: 1.5rem;
  position: relative;
  padding-left: 14px;
  margin-bottom: 1.5rem;
}
.section-title::before {
  content: "";
  position: absolute;
  left: 0; top: 4px;
  height: 22px; width: 6px;
  background: linear-gradient(180deg, var(--brand), var(--accent));
  border-radius: 10px;
}

/* ============ CARDS ============ */
.card {
  border-radius: 16px;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.12);
}
.card-img-top {
  transition: transform .4s ease;
}
.card:hover .card-img-top {
  transform: scale(1.06);
}
.price-tag {
  font-weight: 700;
  color: var(--brand);
}
body.dark-mode .price-tag { color: #4ade80; }

/* ============ BUTTONS ============ */
.btn-success {
  background: linear-gradient(90deg, var(--brand), var(--brand-dark));
  border: none;
  border-radius: 50px;
  font-weight: 600;
}
.btn-success:hover {
  background: linear-gradient(90deg, var(--brand-dark), var(--brand));
}
.btn-outline-light-custom {
  border-radius: 50px;
  border: 2px solid #fff;
  color: #fff;
  font-weight: 600;
  transition: all .2s;
}
.btn-outline-light-custom:hover {
  background: #fff;
  color: var(--brand);
}

/* ============ FOOTER ============ */
footer {
  background: #111827 !important;
}
footer h5, footer h6 { font-weight: 700; }
footer a { text-decoration: none; transition: color .2s; }
footer a:hover { color: var(--brand) !important; }
.social-icon {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  transition: background .2s, transform .2s;
}
.social-icon:hover {
  background: var(--brand);
  transform: translateY(-3px);
}

/* ============ MODULE DROPDOWN ============ */
.dropdown-menu { border-radius: 14px; border: none; }
.dropdown-menu .border-success {
  border-color: var(--brand) !important;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  .hero-banner h1 { font-size: 1.8rem; }
  .hero-banner { padding: 40px 20px; }
}

/* ============ SECTION TITLES ============ */
.section-title {
  font-weight: 700;
  font-size: 1.5rem;
  position: relative;
  padding-left: 14px;
  margin-bottom: 1.5rem;
}
.section-title::before {
  content: "";
  position: absolute;
  left: 0; top: 4px;
  height: 22px; width: 6px;
  background: linear-gradient(180deg, var(--brand), var(--accent));
  border-radius: 10px;
}

/* ============ CARDS ============ */
.card {
  border-radius: 16px;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.12);
}
.card-img-top {
  transition: transform .4s ease;
}
.card:hover .card-img-top {
  transform: scale(1.06);
}
.price-tag {
  font-weight: 700;
  color: var(--brand);
}
body.dark-mode .price-tag { color: #4ade80; }

/* ============ BUTTONS ============ */
.btn-success {
  background: linear-gradient(90deg, var(--brand), var(--brand-dark));
  border: none;
  border-radius: 50px;
  font-weight: 600;
}
.btn-success:hover {
  background: linear-gradient(90deg, var(--brand-dark), var(--brand));
}
.btn-outline-light-custom {
  border-radius: 50px;
  border: 2px solid #fff;
  color: #fff;
  font-weight: 600;
  transition: all .2s;
}
.btn-outline-light-custom:hover {
  background: #fff;
  color: var(--brand);
}

/* ============ FOOTER ============ */
footer {
  background: #111827 !important;
}
footer h5, footer h6 { font-weight: 700; }
footer a { text-decoration: none; transition: color .2s; }
footer a:hover { color: var(--brand) !important; }
.social-icon {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  transition: background .2s, transform .2s;
}
.social-icon:hover {
  background: var(--brand);
  transform: translateY(-3px);
}

/* ============ MODULE DROPDOWN ============ */
.dropdown-menu { border-radius: 14px; border: none; }
.dropdown-menu .border-success {
  border-color: var(--brand) !important;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  .hero-banner h1 { font-size: 1.8rem; }
  .hero-banner { padding: 40px 20px; }
}

/* ============ SECTION TITLES ============ */
.section-title {
  font-weight: 700;
  font-size: 1.5rem;
  position: relative;
  padding-left: 14px;
  margin-bottom: 1.5rem;
}
.section-title::before {
  content: "";
  position: absolute;
  left: 0; top: 4px;
  height: 22px; width: 6px;
  background: linear-gradient(180deg, var(--brand), var(--accent));
  border-radius: 10px;
}

/* ============ CARDS ============ */
.card {
  border-radius: 16px;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.12);
}
.card-img-top {
  transition: transform .4s ease;
}
.card:hover .card-img-top {
  transform: scale(1.06);
}
.price-tag {
  font-weight: 700;
  color: var(--brand);
}
body.dark-mode .price-tag { color: #4ade80; }

/* ============ BUTTONS ============ */
.btn-success {
  background: linear-gradient(90deg, var(--brand), var(--brand-dark));
  border: none;
  border-radius: 50px;
  font-weight: 600;
}
.btn-success:hover {
  background: linear-gradient(90deg, var(--brand-dark), var(--brand));
}
.btn-outline-light-custom {
  border-radius: 50px;
  border: 2px solid #fff;
  color: #fff;
  font-weight: 600;
  transition: all .2s;
}
.btn-outline-light-custom:hover {
  background: #fff;
  color: var(--brand);
}

/* ============ FOOTER ============ */
footer {
  background: #111827 !important;
}
footer h5, footer h6 { font-weight: 700; }
footer a { text-decoration: none; transition: color .2s; }
footer a:hover { color: var(--brand) !important; }
.social-icon {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  transition: background .2s, transform .2s;
}
.social-icon:hover {
  background: var(--brand);
  transform: translateY(-3px);
}

/* ============ MODULE DROPDOWN ============ */
.dropdown-menu { border-radius: 14px; border: none; }
.dropdown-menu .border-success {
  border-color: var(--brand) !important;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  .hero-banner h1 { font-size: 1.8rem; }
  .hero-banner { padding: 40px 20px; }
}

/* ============ PRODUCT PAGE ============ */
.product-gallery #mainImg {
  width: 100%; height: 400px; object-fit: contain; border-radius: 12px;
}
.product-gallery .thumb {
  width: 70px; height: 70px; object-fit: cover; border-radius: 10px;
  cursor: pointer; border: 2px solid transparent; opacity: .7; transition: .2s;
}
.product-gallery .thumb.active, .product-gallery .thumb:hover {
  border-color: var(--brand); opacity: 1;
}
.product-gallery:hover { transform: none; }
.product-title { font-weight: 800; font-size: 2rem; }
.product-desc { line-height: 1.8; opacity: .85; }
.store-badge { background: rgba(124,58,237,.12); color: var(--accent); font-weight: 600; padding: 8px 14px; border-radius: 50px; }
.discount-badge { background: linear-gradient(90deg, #ef4444, var(--accent-2)); border-radius: 50px; padding: 6px 12px; }

/* Quantity box */
.qty-box {
  display: inline-flex; align-items: center; border: 2px solid #e5e7eb;
  border-radius: 50px; overflow: hidden;
}
.qty-box button {
  border: none; background: transparent; width: 42px; height: 42px;
  font-size: 1.2rem; font-weight: 700; color: var(--brand);
}
.qty-box button:hover { background: rgba(22,163,74,.1); }
.qty-box input {
  width: 50px; border: none; text-align: center; font-weight: 600;
  background: transparent; color: inherit; -moz-appearance: textfield;
}
.qty-box input::-webkit-outer-spin-button,
.qty-box input::-webkit-inner-spin-button { -webkit-appearance: none; }
.qty-box-sm button { width: 34px; height: 34px; }
body.dark-mode .qty-box { border-color: var(--border-dark); }

/* ============ CART PAGE ============ */
.cart-item:hover { transform: none; box-shadow: 0 6px 16px rgba(0,0,0,.08); }
.cart-item img { width: 80px; height: 80px; object-fit: cover; border-radius: 12px; }
.btn-remove { background: rgba(239,68,68,.1); border-radius: 50%; width: 38px; height: 38px; }
.btn-remove:hover { background: rgba(239,68,68,.25); }
.summary-card { position: sticky; top: 90px; }
.summary-card:hover { transform: none; }
body.dark-mode hr { border-color: var(--border-dark); opacity: 1; }
body.dark-mode .alert-success { background: rgba(22,163,74,.15); color: #4ade80; border-color: rgba(22,163,74,.3); }
body.dark-mode .alert-warning { background: rgba(245,158,11,.15); color: #fbbf24; border-color: rgba(245,158,11,.3); }
