/* ===== GLOBAL PREMIUM THEME ===== */
@import url("pages.css");
@import url("account.css");
@import url("responsive.css");

body {
  background: #f4f6f3;
}

.header {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(30, 86, 49, 0.06);
  box-shadow: 0 4px 24px rgba(15, 40, 24, 0.04);
}

.header.scrolled {
  box-shadow: 0 8px 32px rgba(15, 40, 24, 0.08);
}

.topbar {
  background: linear-gradient(90deg, #1e5631 0%, #2d6a3e 45%, #4a7ab5 100%);
  padding: 9px 0;
  font-size: 12px;
  letter-spacing: 0.06em;
}

.topbar span {
  position: relative;
  padding: 0 22px;
}

.topbar span + span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  transform: translateY(-50%);
}

.search {
  border: 1px solid #e2e8e0;
  border-radius: 999px;
  box-shadow: 0 4px 18px rgba(30, 86, 49, 0.05);
  transition: box-shadow 0.25s, border-color 0.25s;
}

.search:focus-within {
  border-color: rgba(140, 198, 63, 0.55);
  box-shadow: 0 8px 28px rgba(140, 198, 63, 0.14);
}

.search input {
  padding: 14px 18px;
}

.search button {
  width: 48px;
  height: 48px;
  margin: 4px;
  border-radius: 50%;
  background: linear-gradient(135deg, #9fd44a, #7cb532);
}

.ha {
  padding: 8px 10px;
  border-radius: 12px;
  transition: background 0.2s, transform 0.2s;
}

.ha:hover {
  background: #f0f6ea;
  transform: translateY(-1px);
}

.nav {
  border-top: 0;
  background: linear-gradient(180deg, #fff 0%, #fafbf9 100%);
}

.nav a,
.nav-item > span {
  position: relative;
  padding: 15px 14px;
}

.nav a::after,
.nav-item > a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 8px;
  height: 2px;
  border-radius: 2px;
  background: var(--lime);
  transform: scaleX(0);
  transition: transform 0.25s;
}

.nav a:hover::after,
.nav-item:hover > a::after {
  transform: scaleX(1);
}

.page-head {
  background: linear-gradient(120deg, #1e5631 0%, #2d6a3e 50%, #4a7ab5 100%);
  padding: 36px 0;
  position: relative;
  overflow: hidden;
}

.page-head::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.12), transparent 50%);
}

.page-head .container {
  position: relative;
  z-index: 1;
}

.page-head h1 {
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.page {
  padding: 36px 0 64px;
}

.card,
.auth-wrap,
.filters,
.pd,
.tabs,
.legal {
  box-shadow: 0 12px 36px rgba(30, 86, 49, 0.06);
  border: 1px solid rgba(30, 86, 49, 0.06);
}

.pcard {
  border: 1px solid rgba(30, 86, 49, 0.06);
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(30, 86, 49, 0.04);
  transition: box-shadow 0.25s, transform 0.25s;
}

.pcard:hover {
  box-shadow: 0 16px 40px rgba(30, 86, 49, 0.1);
  transform: translateY(-4px);
}

.pcard .pcard-media {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(180deg, #f8faf7, #eef2eb);
  margin-bottom: 12px;
}

.pcard .pcard-media .badge {
  z-index: 2;
}

.pcard .pcard-media .badge.off {
  right: 52px;
}

.pcard .pcard-img-link {
  display: block;
  overflow: hidden;
  border-radius: inherit;
}

.pcard .pcard-img-link img {
  display: block;
  width: 100%;
}

.pcard .brand-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 6px;
}

.pcard .rating {
  font-size: 11px;
  color: #f59e0b;
  font-weight: 700;
  margin-bottom: 8px;
}

.pcard .pcard-media .add-btn,
.pcard .pcard-media .fav-btn {
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: #fff;
  color: #1f3428;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  display: grid;
  place-items: center;
  padding: 0;
  margin: 0;
  cursor: pointer;
  z-index: 3;
  transition: opacity 0.25s, transform 0.25s, background 0.2s, color 0.2s;
}

.pcard .pcard-media .add-btn {
  right: 12px;
  bottom: 12px;
  opacity: 0;
  transform: translateY(6px);
}

.pcard .pcard-media .fav-btn {
  top: 12px;
  right: 12px;
  opacity: 0;
  transform: translateY(-6px);
}

.pcard .pcard-media .add-btn svg,
.pcard .pcard-media .fav-btn svg {
  width: 18px;
  height: 18px;
  display: block;
  transform: none;
  flex-shrink: 0;
}

.btn-fav-text svg {
  width: 18px;
  height: 18px;
  display: block;
  transform: none;
  flex-shrink: 0;
}

.pcard:hover .pcard-media .add-btn,
.pcard:hover .pcard-media .fav-btn {
  opacity: 1;
  transform: translateY(0);
}

.pcard .pcard-media .add-btn:hover {
  background: var(--lime);
  color: #fff;
}

.pcard .pcard-media .fav-btn:hover,
.pcard .pcard-media .fav-btn.on {
  background: #fff5f5;
  color: #e11d48;
}

.pcard .pcard-media .fav-btn.on svg {
  fill: currentColor;
}

.pcard .pcard-cart-btn {
  margin-top: 12px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 11px 14px;
  background: linear-gradient(135deg, #8cc63f, #6fa82e);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(140, 198, 63, 0.28);
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}

.pcard .pcard-cart-btn svg {
  width: 16px;
  height: 16px;
}

.pcard .pcard-cart-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 10px 22px rgba(140, 198, 63, 0.35);
}

@media (hover: none) {
  .pcard .pcard-media .add-btn,
  .pcard .pcard-media .fav-btn {
    opacity: 1;
    transform: none;
  }
}

.grid .pcard {
  min-width: 0;
  max-width: none;
}

.grid .pcard img {
  height: 180px;
}

.btn {
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(140, 198, 63, 0.25);
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.navy {
  box-shadow: 0 8px 20px rgba(44, 62, 80, 0.2);
}

.trust-item {
  background: #fff;
  border-radius: 18px;
  padding: 20px;
  border: 1px solid rgba(30, 86, 49, 0.06);
  box-shadow: 0 8px 24px rgba(30, 86, 49, 0.04);
}

.news {
  background: linear-gradient(180deg, #eef2f5 0%, #e8edf1 100%);
}

/* Product detail */
body[data-page="product"] .pd {
  box-shadow: 0 16px 48px rgba(30, 86, 49, 0.08);
  border-radius: 22px;
}

body[data-page="product"] .gallery img {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

body[data-page="product"] .pd h1 {
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.25;
  margin: 10px 0;
}

body[data-page="product"] .price {
  font-size: 28px;
  color: #15231a;
}

body[data-page="product"] .pd-actions .btn {
  min-width: 200px;
  width: auto;
}

body[data-page="product"] .pd-desc {
  color: #4b5563;
  line-height: 1.7;
  margin-bottom: 8px;
}

body[data-page="product"] .pd-trust {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

body[data-page="product"] .pd-trust span {
  font-size: 13px;
  color: var(--green);
  font-weight: 600;
}

/* Toast - top right */
.toast {
  top: 24px;
  right: 24px;
  left: auto;
  bottom: auto;
  transform: translateX(120%);
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 300px;
  max-width: 380px;
  padding: 16px 18px;
  background: #fff;
  color: #1f3428;
  border: 1px solid rgba(30, 86, 49, 0.08);
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(30, 86, 49, 0.18);
  font-weight: 600;
  font-size: 14px;
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

.toast.toast-error {
  border-color: rgba(239, 68, 68, 0.2);
}
.toast.toast-info {
  border-color: rgba(59, 130, 246, 0.2);
}
.toast.toast-error .toast-icon {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}
.toast.toast-info .toast-icon {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.toast-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8cc63f, #6fa82e);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 18px;
  flex-shrink: 0;
}

.toast-body strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
}

.toast-body span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.4;
}

/* Cart drawer */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 20, 0.45);
  backdrop-filter: blur(3px);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.cart-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 100vw);
  height: 100vh;
  background: #fff;
  z-index: 100;
  transform: translateX(105%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -12px 0 48px rgba(0, 0, 0, 0.12);
}

.cart-drawer.open {
  transform: translateX(0);
}

.cart-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}

.cart-drawer-head h3 {
  font-size: 18px;
  font-weight: 800;
  color: #1a3d28;
}

.cart-drawer-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #f3f5f2;
  font-size: 22px;
  line-height: 1;
  color: #555;
  transition: background 0.2s;
}

.cart-drawer-close:hover {
  background: #e8ede4;
}

.cart-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
}

.drawer-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
}

.drawer-item.is-new {
  background: #f4f9ef;
  margin: 0 -24px;
  padding: 14px 24px;
  border-bottom-color: #dcefd0;
}

.drawer-item img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
  background: #f3f5f2;
}

.drawer-item h4 {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 4px;
}

.drawer-item .qty-badge {
  font-size: 11px;
  color: var(--muted);
}

.drawer-item strong {
  font-size: 13px;
  white-space: nowrap;
}

.cart-drawer-foot {
  padding: 20px 24px 24px;
  border-top: 1px solid var(--line);
  background: #fafbf9;
}

.cart-drawer-foot .row {
  display: flex;
  justify-content: space-between;
  margin: 6px 0;
  font-size: 14px;
}

.cart-drawer-foot .total {
  font-size: 18px;
  font-weight: 800;
  margin: 10px 0 14px;
}

.cart-drawer-actions {
  display: grid;
  gap: 8px;
}

.cart-drawer-actions .btn.ghost {
  box-shadow: none;
}

.drawer-empty {
  text-align: center;
  padding: 40px 16px;
  color: var(--muted);
}

@media (max-width: 820px) {
  .toast {
    right: 12px;
    left: 12px;
    min-width: auto;
    max-width: none;
  }
}
