/* =====================================================================
   BeautyShopKE — Main Stylesheet
   Design language: premium Kenyan beauty e-commerce.
   Palette: blush pink, soft lavender, warm gold, ivory white.
   Type: Playfair Display (headings) + Poppins (body/UI).
   ===================================================================== */

:root {
  /* ---- Brand palette ---- */
  --color-blush: #f7c9d8;
  --color-pink: #e88aab;
  --color-pink-deep: #d35b87;
  --color-lavender: #c9bbe8;
  --color-lavender-deep: #9b85c9;
  --color-gold: #cda45e;
  --color-gold-light: #e9d7b3;
  --color-ivory: #fffaf5;
  --color-white: #ffffff;
  --color-charcoal: #2c2430;
  --color-text: #4a4350;
  --color-text-muted: #8a8190;

  /* ---- Gradients ---- */
  --gradient-hero: linear-gradient(135deg, #f7c9d8 0%, #e6cdee 50%, #c9bbe8 100%);
  --gradient-gold: linear-gradient(120deg, #cda45e 0%, #e9d7b3 50%, #cda45e 100%);
  --gradient-soft: linear-gradient(180deg, #fffaf5 0%, #fdf0f4 100%);

  /* ---- Type ---- */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;

  /* ---- Radii / Shadows ---- */
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-soft: 0 8px 30px rgba(211, 91, 135, 0.10);
  --shadow-card: 0 4px 18px rgba(44, 36, 48, 0.08);
  --shadow-gold: 0 6px 20px rgba(205, 164, 94, 0.25);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-ivory);
  font-weight: 400;
  line-height: 1.65;
}

h1, h2, h3, h4, h5, h6, .font-display {
  font-family: var(--font-display);
  color: var(--color-charcoal);
  font-weight: 600;
}

a { text-decoration: none; color: var(--color-pink-deep); }
a:hover { color: var(--color-pink); }

::selection { background: var(--color-blush); color: var(--color-charcoal); }

/* ---------------------------------------------------------------------
   Mobile search bar (sits where the old announcement bar used to be)
   --------------------------------------------------------------------- */
.mobile-search-bar {
  background: rgba(255, 250, 245, 0.96);
  border-bottom: 1px solid rgba(205, 164, 94, 0.18);
}
.mobile-search-bar .search-form { max-width: 100%; }

/* ---------------------------------------------------------------------
   Navbar
   --------------------------------------------------------------------- */
.main-navbar {
  background: rgba(255, 250, 245, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(205, 164, 94, 0.18);
  padding: 0.85rem 0;
  z-index: 1030;
}

.mobile-cart-link {
  font-size: 1.35rem;
  color: var(--color-charcoal) !important;
  padding: 0.25rem 0.4rem !important;
}

.brand-text {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--color-charcoal);
  letter-spacing: 0.01em;
}
.brand-accent { color: var(--color-pink-deep); }
.brand-ke {
  color: var(--color-gold);
  font-size: 0.95rem;
  vertical-align: super;
  font-family: var(--font-body);
  font-weight: 600;
}

.main-navbar .nav-link {
  color: var(--color-charcoal);
  font-weight: 500;
  font-size: 0.94rem;
  padding: 0.5rem 0.9rem !important;
  transition: color 0.2s ease;
}
.main-navbar .nav-link:hover { color: var(--color-pink-deep); }

.icon-nav .nav-link { font-size: 1.2rem; padding: 0.5rem 0.6rem !important; }

.search-form {
  background: var(--color-white);
  border: 1px solid rgba(205, 164, 94, 0.3);
  border-radius: 50px;
  padding: 0.15rem 0.15rem 0.15rem 1rem;
  max-width: 320px;
}
.search-form input {
  border: none;
  background: transparent;
  font-size: 0.9rem;
  box-shadow: none !important;
}
.search-form button {
  background: var(--color-pink-deep);
  color: white;
  border-radius: 50px;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border: none;
}

.cart-badge {
  position: absolute;
  top: -2px; right: -6px;
  background: var(--color-pink-deep);
  color: white;
  font-size: 0.6rem;
  padding: 0.25em 0.5em;
  min-width: 18px;
}

/* Collapsible categories filter card */
.category-toggle { cursor: pointer; }
.category-toggle-icon { transition: transform 0.2s ease; }
.category-toggle[aria-expanded="true"] .category-toggle-icon { transform: rotate(180deg); }

.dropdown-menu { border-radius: var(--radius-md); border: 1px solid rgba(205,164,94,0.15); }
.dropdown-item:hover, .dropdown-item:focus { background: var(--color-blush); color: var(--color-charcoal); }

/* ---------------------------------------------------------------------
   Buttons
   --------------------------------------------------------------------- */
.btn {
  border-radius: 50px;
  font-weight: 500;
  font-size: 0.92rem;
  padding: 0.6rem 1.6rem;
  transition: all 0.25s ease;
}

.btn-brand {
  background: var(--color-pink-deep);
  color: white;
  border: none;
}
.btn-brand:hover { background: var(--color-pink); color: white; transform: translateY(-1px); box-shadow: var(--shadow-soft); }

.btn-gold {
  background: var(--gradient-gold);
  color: var(--color-charcoal);
  border: none;
  font-weight: 600;
}
.btn-gold:hover { box-shadow: var(--shadow-gold); transform: translateY(-1px); color: var(--color-charcoal); }

.btn-outline-brand {
  background: transparent;
  color: var(--color-pink-deep);
  border: 1.5px solid var(--color-pink-deep);
}
.btn-outline-brand:hover { background: var(--color-pink-deep); color: white; }

.btn-lavender {
  background: var(--color-lavender-deep);
  color: white;
  border: none;
}
.btn-lavender:hover { background: var(--color-lavender); color: var(--color-charcoal); }

.btn-sm { padding: 0.4rem 1.1rem; font-size: 0.82rem; }

/* ---------------------------------------------------------------------
   Hero
   --------------------------------------------------------------------- */
.hero-section {
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
  padding: 5.5rem 0 6rem;
}
.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% 20%, rgba(255,255,255,0.35), transparent 45%),
              radial-gradient(circle at 10% 90%, rgba(255,255,255,0.25), transparent 40%);
}
.hero-content { position: relative; z-index: 2; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(205,164,94,0.4);
  color: var(--color-pink-deep);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.4rem 1rem;
  border-radius: 50px;
  margin-bottom: 1.25rem;
}
.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.12;
  margin-bottom: 1.1rem;
}
.hero-title em {
  font-style: italic;
  color: var(--color-pink-deep);
  position: relative;
}
.hero-subtitle {
  font-size: 1.08rem;
  color: var(--color-text);
  max-width: 460px;
  margin-bottom: 2rem;
}
.hero-image-wrap {
  position: relative;
  display: flex;
  justify-content: center;
}
.hero-image-wrap img {
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(155, 133, 201, 0.35);
  max-height: 460px;
  object-fit: cover;
  width: 100%;
}
.hero-badge-float {
  position: absolute;
  bottom: -18px;
  left: -18px;
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.2rem;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.hero-badge-float i { font-size: 1.6rem; color: var(--color-gold); }

/* ---------------------------------------------------------------------
   Category pills / cards
   --------------------------------------------------------------------- */
@media (min-width: 992px) {
  .category-col { flex: 0 0 auto; width: 20%; }
}
.category-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 1.8rem 1rem;
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  height: 100%;
  border: 1px solid rgba(205,164,94,0.1);
}
.category-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-soft);
}
.category-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--gradient-hero);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.6rem;
  color: var(--color-charcoal);
}
.category-card h6 { margin-bottom: 0.2rem; font-size: 1rem; }
.category-card small { color: var(--color-text-muted); }

/* ---------------------------------------------------------------------
   Section headings
   --------------------------------------------------------------------- */
.section-heading { text-align: center; margin-bottom: 2.5rem; }
.section-eyebrow {
  color: var(--color-gold);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
  display: block;
  margin-bottom: 0.4rem;
}
.section-title { font-size: clamp(1.7rem, 3vw, 2.4rem); margin-bottom: 0.5rem; }
.section-divider {
  width: 70px; height: 3px;
  background: var(--gradient-gold);
  border-radius: 2px;
  margin: 0.8rem auto 0;
}

/* ---------------------------------------------------------------------
   Product cards
   --------------------------------------------------------------------- */
.product-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  height: 100%;
  position: relative;
  border: 1px solid rgba(0,0,0,0.04);
}
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-soft); }

.product-thumb-wrap {
  position: relative;
  background: var(--gradient-soft);
  aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.product-thumb-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.product-card:hover .product-thumb-wrap img { transform: scale(1.06); }
.product-thumb-placeholder {
  font-size: 2.5rem;
  color: var(--color-lavender-deep);
  opacity: 0.5;
}

.badge-discount {
  position: absolute; top: 10px; left: 10px;
  background: var(--color-pink-deep);
  color: white;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.3em 0.65em;
  border-radius: 50px;
}
.badge-stock-low {
  position: absolute; top: 10px; right: 10px;
  background: var(--color-gold);
  color: var(--color-charcoal);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.3em 0.6em;
  border-radius: 50px;
}
.badge-out-of-stock {
  position: absolute; inset: 0;
  background: rgba(44,36,48,0.55);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.wishlist-btn {
  position: absolute; bottom: 10px; right: 10px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  display: flex; align-items: center; justify-content: center;
  color: var(--color-pink-deep);
  border: none;
  transition: all 0.2s ease;
  z-index: 2;
}
.wishlist-btn:hover { background: var(--color-pink-deep); color: white; }
.wishlist-btn.active { background: var(--color-pink-deep); color: white; }

.product-card-body { padding: 1.1rem 1.2rem 1.3rem; }
.product-category-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-lavender-deep);
  font-weight: 600;
}
.product-name {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--color-charcoal);
  margin: 0.3rem 0 0.4rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}
.product-rating { font-size: 0.8rem; color: var(--color-gold); margin-bottom: 0.4rem; }
.product-rating .text-muted { font-size: 0.78rem; }

.price-current { font-weight: 700; color: var(--color-pink-deep); font-size: 1.08rem; }
.price-compare { text-decoration: line-through; color: var(--color-text-muted); font-size: 0.85rem; margin-left: 0.4rem; }

/* ---------------------------------------------------------------------
   Filter sidebar
   --------------------------------------------------------------------- */
.filter-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  box-shadow: var(--shadow-card);
}
.filter-card h6 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-charcoal);
  margin-bottom: 0.8rem;
}
.filter-category-link {
  display: flex; justify-content: space-between;
  padding: 0.45rem 0;
  color: var(--color-text);
  font-size: 0.9rem;
  border-bottom: 1px dashed rgba(0,0,0,0.06);
}
.filter-category-link.active, .filter-category-link:hover { color: var(--color-pink-deep); }

/* ---------------------------------------------------------------------
   Product detail page
   --------------------------------------------------------------------- */
.product-gallery-main {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--gradient-soft);
  aspect-ratio: 1/1;
  display: flex; align-items: center; justify-content: center;
}
.product-gallery-main img { width: 100%; height: 100%; object-fit: cover; }

.stock-pill {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.85rem; font-weight: 500;
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
}
.stock-pill.in-stock { background: rgba(120, 180, 140, 0.15); color: #3e8b58; }
.stock-pill.low-stock { background: rgba(205,164,94,0.15); color: var(--color-gold); }
.stock-pill.out-stock { background: rgba(211, 91, 135, 0.12); color: var(--color-pink-deep); }

.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 50px;
  overflow: hidden;
}
.qty-stepper button {
  background: var(--color-blush);
  border: none;
  width: 38px; height: 38px;
  font-weight: 600;
  color: var(--color-charcoal);
}
.qty-stepper input {
  width: 50px; text-align: center;
  border: none;
  font-weight: 600;
}
.qty-stepper input:focus { outline: none; box-shadow: none; }

.review-card { border-bottom: 1px solid rgba(0,0,0,0.06); padding: 1.2rem 0; }
.review-stars { color: var(--color-gold); font-size: 0.9rem; }
.verified-badge { font-size: 0.7rem; color: #3e8b58; background: rgba(62,139,88,0.1); padding: 0.15em 0.6em; border-radius: 50px; }

/* ---------------------------------------------------------------------
   Cart / Checkout
   --------------------------------------------------------------------- */
.cart-item-row { display: flex; gap: 1rem; padding: 1.1rem 0; border-bottom: 1px solid rgba(0,0,0,0.06); align-items: center; }
.cart-item-thumb { width: 84px; height: 84px; border-radius: var(--radius-sm); object-fit: cover; background: var(--gradient-soft); }

.summary-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  box-shadow: var(--shadow-card);
  position: sticky;
  top: 100px;
}
.summary-card hr { border-color: rgba(0,0,0,0.08); }

.payment-pulse {
  width: 90px; height: 90px;
  border-radius: 50%;
  background: var(--gradient-hero);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.5rem;
  animation: pulse 1.8s ease-in-out infinite;
}
.payment-pulse i { font-size: 2.2rem; color: var(--color-charcoal); }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(232,138,171,0.5); }
  70% { box-shadow: 0 0 0 18px rgba(232,138,171,0); }
  100% { box-shadow: 0 0 0 0 rgba(232,138,171,0); }
}

/* ---------------------------------------------------------------------
   Forms
   --------------------------------------------------------------------- */
.form-control, .form-select {
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0,0,0,0.12);
  padding: 0.65rem 0.9rem;
  font-size: 0.92rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--color-pink-deep);
  box-shadow: 0 0 0 0.2rem rgba(232,138,171,0.18);
}
.form-label { font-weight: 500; font-size: 0.88rem; color: var(--color-charcoal); }

.auth-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 2.5rem;
  max-width: 460px;
  margin: 3rem auto;
}
.auth-side-panel {
  background: var(--gradient-hero);
  border-radius: var(--radius-lg);
  display: flex; flex-direction: column; justify-content: center;
  padding: 3rem;
  height: 100%;
}
.auth-divider {
  display: flex; align-items: center; text-align: center;
  color: var(--color-charcoal); opacity: 0.6; font-size: 0.85rem;
}
.auth-divider::before, .auth-divider::after {
  content: ""; flex: 1; border-bottom: 1px solid #e2d9dd;
}
.auth-divider span { padding: 0 0.9rem; }
.btn-google {
  display: flex; align-items: center; justify-content: center;
  background: var(--color-white);
  border: 1px solid #dadce0;
  color: #3c4043;
  font-weight: 500;
  border-radius: var(--radius-md, 10px);
  padding: 0.6rem 1rem;
  transition: box-shadow 0.15s ease, background 0.15s ease;
}
.btn-google:hover, .btn-google:focus {
  background: #f8f9fa;
  color: #3c4043;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

/* ---------------------------------------------------------------------
   Footer
   --------------------------------------------------------------------- */
.site-footer {
  background: var(--color-charcoal);
  color: rgba(255,255,255,0.75);
  margin-top: 4rem;
}
.footer-brand { font-size: 1.4rem; color: white; }
.footer-text { font-size: 0.88rem; color: rgba(255,255,255,0.6); }
.footer-heading { color: var(--color-gold-light); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 1rem; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0.55rem; font-size: 0.88rem; color: rgba(255,255,255,0.65); }
.footer-links a { color: rgba(255,255,255,0.65); }
.footer-links a:hover { color: var(--color-gold-light); }
.footer-divider { border-color: rgba(255,255,255,0.1); margin: 2rem 0 1.5rem; }
.footer-copy { color: rgba(255,255,255,0.45); font-size: 0.8rem; }
.social-icons a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: white;
  margin-right: 0.5rem;
  transition: background 0.2s ease;
}
.social-icons a:hover { background: var(--color-pink-deep); }

/* ---------------------------------------------------------------------
   Admin panel
   --------------------------------------------------------------------- */
.admin-sidebar {
  background: var(--color-charcoal);
  min-height: 100vh;
  padding: 1.5rem 1rem;
  color: rgba(255,255,255,0.8);
}
.admin-sidebar .brand-text { color: white; font-size: 1.3rem; }
.admin-sidebar a.nav-link {
  color: rgba(255,255,255,0.65);
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}
.admin-sidebar a.nav-link i { width: 20px; margin-right: 0.5rem; }
.admin-sidebar a.nav-link.active, .admin-sidebar a.nav-link:hover {
  background: rgba(232,138,171,0.18);
  color: var(--color-blush);
}
.admin-content { padding: 2rem; background: var(--gradient-soft); min-height: 100vh; }

.stat-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  height: 100%;
}
.stat-card .stat-icon {
  width: 50px; height: 50px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}
.stat-card .stat-value { font-size: 1.7rem; font-weight: 700; color: var(--color-charcoal); font-family: var(--font-display); }
.stat-card .stat-label { font-size: 0.82rem; color: var(--color-text-muted); }

.admin-table { background: white; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-card); }
.admin-table thead { background: var(--gradient-soft); }
.admin-table th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-text-muted); border-bottom: none; }
.admin-table td { vertical-align: middle; font-size: 0.9rem; }

.thumb-sm { width: 48px; height: 48px; border-radius: var(--radius-sm); object-fit: cover; background: var(--gradient-soft); }

/* ---------------------------------------------------------------------
   Misc utility
   --------------------------------------------------------------------- */
.bg-soft-pink { background-color: var(--color-blush) !important; }
.bg-soft-lavender { background-color: var(--color-lavender) !important; }
.text-brand { color: var(--color-pink-deep) !important; }
.text-gold { color: var(--color-gold) !important; }
.rounded-xl { border-radius: var(--radius-lg) !important; }
.shadow-soft { box-shadow: var(--shadow-soft) !important; }

.empty-state { text-align: center; padding: 4rem 1rem; }
.empty-state i { font-size: 3.5rem; color: var(--color-lavender-deep); opacity: 0.5; margin-bottom: 1rem; }

.page-banner {
  background: var(--gradient-hero);
  padding: 3rem 0;
  text-align: center;
  margin-bottom: 3rem;
}

@media (min-width: 992px) {
  .category-col { flex: 0 0 auto; width: 20%; }
}

/* Responsive tweaks */
@media (max-width: 991.98px) {
  .search-form { max-width: 100%; margin-top: 0.75rem; }
  .summary-card { position: static; }
  .hero-section { padding: 3rem 0 4rem; text-align: center; }
  .hero-subtitle { margin-left: auto; margin-right: auto; }
  .hero-image-wrap { margin-top: 2.5rem; }
}

@media (max-width: 575.98px) {
  .auth-card { padding: 1.6rem; margin: 1.5rem auto; }
  .admin-content { padding: 1rem; }
}
