/* ============================================================
   RCC Store — brand styles on top of Bootstrap 5
   Palette: deep teal-green brand + warm amber accent
   ============================================================ */

:root {
  --brand: #0e7c66;
  --brand-dark: #0a5c4b;
  --brand-darker: #07423a;
  --brand-light: #e7f4f1;
  --accent: #f59e0b;
  --ink: #16241f;
  --line: #eef1f0;
}

body {
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: #fbfcfc;
}

a {
  text-decoration: none;
  color: var(--brand);
}
a:hover { color: var(--brand-dark); }

/* ---------- Buttons ---------- */
.btn-brand {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.btn-brand:hover,
.btn-brand:focus,
.btn-brand:active {
  background: var(--brand-dark) !important;
  border-color: var(--brand-dark) !important;
  color: #fff !important;
}
.btn-outline-brand {
  border: 1px solid var(--brand);
  color: var(--brand);
}
.btn-outline-brand:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.text-brand { color: var(--brand) !important; }
.bg-brand { background-color: var(--brand) !important; }

/* ---------- Announcement bar ---------- */
.announce-bar {
  background: var(--brand-darker);
  color: #d6ece7;
  letter-spacing: 0.2px;
}

/* ---------- Navbar ---------- */
.brand-logo {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--ink);
}
.brand-logo span { color: var(--brand); }
.navbar .nav-link { font-weight: 500; }
.search-form { max-width: 480px; position: relative; }
.cart-badge { font-size: 0.65rem; }

/* ---------- Search autocomplete ---------- */
.search-suggest {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  box-shadow: 0 0.75rem 1.5rem rgba(22, 36, 31, 0.12);
  z-index: 1060;
  max-height: 380px;
  overflow-y: auto;
}
.search-suggest-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.8rem;
  color: var(--ink);
  font-size: 0.92rem;
  border-bottom: 1px solid var(--line);
}
.search-suggest-item:last-child { border-bottom: 0; }
.search-suggest-item:hover { background: var(--brand-light); color: var(--brand-dark); }
.search-suggest-item img {
  width: 38px;
  height: 38px;
  object-fit: cover;
  border-radius: 0.35rem;
  background: #f2f5f4;
  flex-shrink: 0;
}
.suggest-price { color: var(--brand); font-weight: 600; white-space: nowrap; }

/* ---------- Wishlist ---------- */
.wishlist-btn-form { position: absolute; top: 0.6rem; right: 0.6rem; margin: 0; }
.wishlist-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  color: #8a9691;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: color 0.15s ease, transform 0.15s ease;
}
.wishlist-btn:hover { color: #e0245e; transform: scale(1.08); }
.wishlist-btn.active { color: #e0245e; border-color: #f3c2d2; background: #fdf1f5; }

/* ---------- Reviews ---------- */
.review-item { border-bottom: 1px solid var(--line); padding: 1rem 0; }
.review-item:last-child { border-bottom: 0; }
.rating-big { font-size: 3rem; font-weight: 700; line-height: 1; color: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(120deg, var(--brand) 0%, var(--brand-dark) 55%, var(--brand-darker) 100%);
  color: #fff;
}
.hero .lead { color: #d6ece7; }
.hero-icon {
  font-size: 11rem;
  color: rgba(255, 255, 255, 0.25);
}

/* ---------- Section headings ---------- */
.section-title {
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  position: relative;
  padding-bottom: 0.5rem;
}
.section-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 44px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
}

/* ---------- Value props (homepage strip) ---------- */
.value-prop {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
}
.value-prop i { color: var(--brand); }

/* ---------- Category cards ---------- */
.category-card {
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  color: var(--ink);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.category-card:hover {
  border-color: var(--brand);
  transform: translateY(-3px);
  box-shadow: 0 0.5rem 1rem rgba(14, 124, 102, 0.08);
  color: var(--brand);
}

/* ---------- Product cards ---------- */
.product-card {
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0.75rem 1.5rem rgba(22, 36, 31, 0.08);
}
.product-thumb {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #f2f5f4;
}
.product-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1.35;
  min-height: 2.6em;
}
.product-title:hover { color: var(--brand); }
.badge-sale {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}
.price-old {
  text-decoration: line-through;
  color: #9aa5a1;
}

/* ---------- Shop filters ---------- */
.filter-card { border: 1px solid var(--line); border-radius: 0.75rem; }
.filter-cats a {
  display: block;
  padding: 0.3rem 0;
  color: var(--ink);
}
.filter-cats a.active,
.filter-cats a:hover {
  color: var(--brand);
  font-weight: 600;
}
.filter-cats a.child {
  padding-left: 1rem;
  font-size: 0.92em;
}

/* ---------- Product page ---------- */
.main-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 0.75rem;
  background: #f2f5f4;
}
.thumb-img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 0.5rem;
  cursor: pointer;
  border: 2px solid transparent;
  background: #f2f5f4;
}
.thumb-img.active,
.thumb-img:hover { border-color: var(--brand); }

/* ---------- Cart ---------- */
.cart-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 0.5rem;
  background: #f2f5f4;
}
.cart-table a { color: var(--ink); }
.cart-table a:hover { color: var(--brand); }

/* ---------- Pagination ---------- */
.pagination .page-link { color: var(--brand); }
.pagination .page-item.active .page-link {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

/* ---------- Auth pages ---------- */
.auth-card {
  max-width: 460px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
}

/* ---------- Checkout ---------- */
.step-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  margin-right: 0.35rem;
}
.address-option { cursor: pointer; transition: border-color 0.15s ease; }
.address-option:hover { border-color: var(--brand) !important; }
.summary-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 0.4rem;
  background: #f2f5f4;
}
.coupon-applied {
  background: var(--brand-light);
  border: 1px dashed var(--brand);
}

/* ---------- Toasts ---------- */
.toast-container { z-index: 1090; }

/* ---------- Admin panel ---------- */
.admin-body { background: #f4f7f6; }
.admin-wrap { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 232px;
  flex-shrink: 0;
  background: var(--brand-darker);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.admin-brand { color: #fff; display: block; }
.admin-brand small { color: #8fb8ae; font-size: 0.7em; font-weight: 500; }
.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.9rem;
  border-radius: 0.5rem;
  color: #b9d4cd;
  font-weight: 500;
  font-size: 0.925rem;
}
.admin-nav-link:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.admin-nav-link.active { background: var(--brand); color: #fff; }
.admin-topbar { background: #fff; border-bottom: 1px solid var(--line); }
.admin-content { padding: 1.5rem; }
.admin-card { background: #fff; border: 1px solid var(--line); border-radius: 0.75rem; }
.stat-card { border-left: 4px solid var(--brand); }
.stat-card .stat-value { font-size: 1.5rem; font-weight: 700; }
.stat-card .stat-label { color: #6c7a75; font-size: 0.85rem; }
.table-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 0.4rem;
  background: #f2f5f4;
}
.admin-img-tile {
  width: 110px;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 0.4rem;
  background: #fff;
}
.admin-img-tile img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 0.35rem;
  background: #f2f5f4;
}
@media (max-width: 991.98px) {
  .admin-wrap { flex-direction: column; }
  .admin-sidebar { width: 100%; height: auto; position: static; }
  .admin-sidebar nav { flex-direction: row !important; flex-wrap: wrap; padding-bottom: 0.5rem; }
  .admin-sidebar .mt-auto { display: none; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: #0b1f1a;
  color: #b7c9c3;
}
.site-footer a { color: #b7c9c3; }
.site-footer a:hover { color: #fff; }
.site-footer h6 { color: #e3efeb; letter-spacing: 0.5px; }
.footer-logo { color: #fff; }
.footer-divider { border-color: #24423a; opacity: 1; }
