/* ============================================================
   Pond Hair & Cosmetic — Custom Styles
   ============================================================ */

/* CSS Variables */
:root {
  --rose-gold:  #B76E79;
  --nude:       #F8EDEB;
  --champagne:  #D4AF37;
  --charcoal:   #2B2B2B;
  --white:      #FFFFFF;
  --success:    #16A34A;
  --transition: 0.3s ease;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Nunito Sans', sans-serif; color: var(--charcoal); background: #fff; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: var(--rose-gold); border-radius: 3px; }
.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }

/* ── Typography ─────────────────────────────────────────── */
.font-serif { font-family: 'Cormorant Garamond', Georgia, serif; }
h1,h2,h3 { font-family: 'Cormorant Garamond', Georgia, serif; }

/* ── Brand Colors as Utilities ──────────────────────────── */
.text-rose-gold    { color: var(--rose-gold); }
.bg-rose-gold      { background-color: var(--rose-gold); }
.border-rose-gold  { border-color: var(--rose-gold); }
.bg-nude           { background-color: var(--nude); }
.text-champagne    { color: var(--champagne); }
.bg-champagne      { background-color: var(--champagne); }
.text-charcoal     { color: var(--charcoal); }

/* ── Hero Slider ────────────────────────────────────────── */
.hero-slider { position: relative; overflow: hidden; }
.hero-slide  {
  position: absolute; inset: 0; opacity: 0;
  transition: opacity 0.8s ease-in-out;
  background-size: cover; background-position: center;
}
.hero-slide.active { opacity: 1; position: relative; }
.hero-slide-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(43,43,43,.75) 0%, rgba(183,110,121,.35) 60%, transparent 100%);
}
.hero-dots button {
  width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.5);
  transition: all .3s; border: none; cursor: pointer;
}
.hero-dots button.active { width: 24px; border-radius: 4px; background: #fff; }

/* ── Product Cards ──────────────────────────────────────── */
.product-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(183,110,121,.15);
}
.product-card-img {
  position: relative; overflow: hidden;
  aspect-ratio: 3/4; background: var(--nude);
}
.product-card-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s ease;
}
.product-card:hover .product-card-img img { transform: scale(1.06); }

.product-card-actions {
  position: absolute; right: 8px; top: 8px;
  display: flex; flex-direction: column; gap: 6px;
  opacity: 0; transform: translateX(8px);
  transition: all .3s ease;
}
.product-card:hover .product-card-actions { opacity: 1; transform: translateX(0); }

.action-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: white; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
  transition: all .2s; color: #666;
}
.action-btn:hover { background: var(--rose-gold); color: white; }
.action-btn.wishlisted { background: var(--rose-gold); color: white; }

.add-to-cart-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: var(--charcoal); color: white;
  text-align: center; padding: 10px; font-size: .8rem;
  font-weight: 600; letter-spacing: .05em; cursor: pointer;
  transform: translateY(100%); transition: transform .3s ease;
}
.product-card:hover .add-to-cart-overlay { transform: translateY(0); }

.badge-discount {
  position: absolute; top: 8px; left: 8px;
  background: #E53E3E; color: white;
  font-size: .65rem; font-weight: 700; padding: 2px 7px;
  border-radius: 20px; z-index: 2;
}
.badge-new { background: var(--success); }
.badge-trending { background: var(--champagne); color: var(--charcoal); }

/* ── Category Cards ─────────────────────────────────────── */
.category-card {
  border-radius: 20px; overflow: hidden;
  position: relative; cursor: pointer;
  transition: transform .35s cubic-bezier(.34,1.56,.64,1), box-shadow .35s ease;
  background: var(--nude);
  aspect-ratio: 1/1.1;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
}
.category-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 20px 40px rgba(183,110,121,.2);
}
.category-card-icon {
  font-size: 3rem; margin-bottom: 8px;
  transition: transform .35s ease;
}
.category-card:hover .category-card-icon { transform: scale(1.15) rotate(-5deg); }
.category-card-bg {
  position: absolute; inset: 0;
  transition: transform .5s ease;
}
.category-card:hover .category-card-bg { transform: scale(1.08); }

/* ── Swiper Overrides ───────────────────────────────────── */
.swiper-button-next, .swiper-button-prev {
  color: var(--rose-gold) !important;
  background: white;
  width: 40px !important; height: 40px !important;
  border-radius: 50%; box-shadow: 0 4px 12px rgba(0,0,0,.1);
}
.swiper-button-next::after, .swiper-button-prev::after { font-size: 14px !important; font-weight: 700; }
.swiper-pagination-bullet-active { background: var(--rose-gold) !important; }

/* ── Buttons ────────────────────────────────────────────── */
.btn-primary {
  background: var(--rose-gold); color: white;
  padding: .65rem 1.5rem; border-radius: 50px;
  font-weight: 600; font-size: .875rem;
  transition: all .25s; border: 2px solid var(--rose-gold);
  cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.btn-primary:hover { background: #a05966; border-color: #a05966; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(183,110,121,.4); }

.btn-outline {
  background: transparent; color: var(--rose-gold);
  padding: .65rem 1.5rem; border-radius: 50px;
  font-weight: 600; font-size: .875rem;
  transition: all .25s; border: 2px solid var(--rose-gold);
  cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.btn-outline:hover { background: var(--rose-gold); color: white; }

.btn-dark {
  background: var(--charcoal); color: white;
  padding: .65rem 1.5rem; border-radius: 50px;
  font-weight: 600; font-size: .875rem;
  transition: all .25s; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-dark:hover { background: #444; transform: translateY(-1px); }

/* ── Forms ──────────────────────────────────────────────── */
.form-input {
  width: 100%; padding: .75rem 1rem;
  border: 2px solid #E5E7EB; border-radius: 12px;
  font-size: .875rem; transition: border-color .25s, box-shadow .25s;
  background: #FAFAFA; color: var(--charcoal);
  outline: none;
}
.form-input:focus { border-color: var(--rose-gold); box-shadow: 0 0 0 3px rgba(183,110,121,.1); background: #fff; }
.form-input::placeholder { color: #9CA3AF; }

.form-label { font-size: .8rem; font-weight: 600; color: #374151; margin-bottom: 5px; display: block; }
.form-error { font-size: .75rem; color: #EF4444; margin-top: 4px; }

/* ── Section Headers ────────────────────────────────────── */
.section-header { text-align: center; margin-bottom: 2.5rem; }
.section-header h2 { font-size: 2rem; font-weight: 700; color: var(--charcoal); margin-bottom: .5rem; }
.section-header p  { color: #6B7280; font-size: .95rem; }
.section-divider   { width: 60px; height: 3px; background: linear-gradient(90deg, var(--rose-gold), var(--champagne)); border-radius: 2px; margin: .75rem auto; }

/* ── Toast Notifications ────────────────────────────────── */
#toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  display: flex; flex-direction: column; gap: 12px; pointer-events: none;
}
.toast {
  background: #1F2937; color: white;
  padding: 14px 20px; border-radius: 12px;
  font-size: .85rem; display: flex; align-items: center; gap: 10px;
  min-width: 250px; max-width: 360px;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
  animation: slideInRight .35s ease forwards;
  pointer-events: all;
}
.toast.success { border-left: 4px solid var(--success); }
.toast.error   { border-left: 4px solid #EF4444; }
.toast.warning { border-left: 4px solid var(--champagne); }
.toast.info    { border-left: 4px solid #3B82F6; }
.toast.hiding  { animation: slideOutRight .3s ease forwards; }
@keyframes slideInRight  { from { transform: translateX(110%); opacity:0; } to { transform: translateX(0); opacity:1; } }
@keyframes slideOutRight { from { transform: translateX(0); opacity:1; } to { transform: translateX(110%); opacity:0; } }

/* ── Cart Drawer ────────────────────────────────────────── */
#cart-drawer {
  position: fixed; right: 0; top: 0; bottom: 0; width: 380px; max-width: 95vw;
  background: white; z-index: 9998; box-shadow: -8px 0 40px rgba(0,0,0,.15);
  transform: translateX(100%); transition: transform .35s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column;
}
#cart-drawer.open { transform: translateX(0); }
#cart-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 9997; display: none; }
#cart-overlay.open { display: block; }

/* ── Rating Stars ───────────────────────────────────────── */
.star-rating { display: flex; gap: 2px; }
.star-rating svg.filled { color: #F59E0B; fill: #F59E0B; }
.star-rating svg.empty  { color: #D1D5DB; fill: #D1D5DB; }

/* ── Glassmorphism Card ─────────────────────────────────── */
.glass-card {
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 20px;
}

/* ── Testimonial Card ───────────────────────────────────── */
.testimonial-card {
  background: white; border-radius: 20px;
  padding: 1.75rem; box-shadow: 0 4px 20px rgba(0,0,0,.06);
  border: 1px solid rgba(183,110,121,.1);
  position: relative;
}
.testimonial-card::before {
  content: '"'; font-family: Georgia, serif; font-size: 5rem;
  position: absolute; top: -10px; left: 20px;
  color: var(--rose-gold); opacity: .15; line-height: 1;
}

/* ── Why Us Icons ───────────────────────────────────────── */
.why-icon-box {
  width: 72px; height: 72px; border-radius: 20px;
  background: linear-gradient(135deg, var(--nude), rgba(183,110,121,.15));
  display: flex; align-items: center; justify-content: center;
  transition: all .35s; margin: 0 auto 1rem;
}
.why-us-card:hover .why-icon-box {
  background: linear-gradient(135deg, var(--rose-gold), #d9868f);
  transform: rotate(-5deg) scale(1.05);
}
.why-us-card:hover .why-icon-box svg { color: white; }

/* ── Gallery Grid ───────────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}
.gallery-item {
  aspect-ratio: 1; overflow: hidden; position: relative;
  cursor: pointer;
}
.gallery-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s ease, filter .4s;
}
.gallery-item:hover img { transform: scale(1.08); filter: brightness(.85); }
.gallery-item-overlay {
  position: absolute; inset: 0; background: rgba(183,110,121,.5);
  opacity: 0; display: flex; align-items: center; justify-content: center;
  transition: opacity .35s;
}
.gallery-item:hover .gallery-item-overlay { opacity: 1; }

/* ── Dark Mode ──────────────────────────────────────────── */
.dark body        { background: #111827; color: #F9FAFB; }
.dark .product-card { background: #1F2937; }
.dark .form-input   { background: #374151; border-color: #4B5563; color: #F9FAFB; }

/* ── Quantity Input ─────────────────────────────────────── */
.qty-input-wrap {
  display: flex; align-items: center;
  border: 2px solid #E5E7EB; border-radius: 12px; overflow: hidden;
}
.qty-btn {
  width: 36px; height: 36px; background: #F3F4F6;
  border: none; cursor: pointer; font-size: 1.1rem; font-weight: 700;
  color: var(--charcoal); transition: background .2s;
  display: flex; align-items: center; justify-content: center;
}
.qty-btn:hover { background: var(--nude); color: var(--rose-gold); }
.qty-input {
  width: 48px; height: 36px; border: none; outline: none;
  text-align: center; font-size: .9rem; font-weight: 600;
  background: white;
}

/* ── Loading Spinner ────────────────────────────────────── */
.spinner {
  display: inline-block; width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: white; border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Progress Steps ─────────────────────────────────────── */
.progress-step {
  display: flex; align-items: center; gap: 8px; flex: 1;
}
.progress-step-circle {
  width: 32px; height: 32px; border-radius: 50%;
  background: #E5E7EB; color: #9CA3AF;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700; flex-shrink: 0;
  transition: all .3s;
}
.progress-step.active   .progress-step-circle { background: var(--rose-gold); color: white; }
.progress-step.done     .progress-step-circle { background: var(--success); color: white; }
.progress-step-line { flex: 1; height: 2px; background: #E5E7EB; }
.progress-step.done ~ .progress-step-line { background: var(--success); }

/* ── Range Slider ───────────────────────────────────────── */
input[type=range] { -webkit-appearance: none; width: 100%; height: 4px; border-radius: 2px; background: #E5E7EB; outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--rose-gold); cursor: pointer; }

/* ── Admin Table ────────────────────────────────────────── */
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { background: #F9FAFB; padding: .75rem 1rem; text-align: left; font-size: .75rem; font-weight: 600; text-transform: uppercase; color: #6B7280; letter-spacing: .05em; }
.admin-table td { padding: .875rem 1rem; border-bottom: 1px solid #F3F4F6; vertical-align: middle; font-size: .875rem; }
.admin-table tr:hover td { background: #FAFAFA; }

/* ── Responsive Fixes ───────────────────────────────────── */
@media (max-width: 640px) {
  .section-header h2 { font-size: 1.6rem; }
  .hero-slide { min-height: 60vh; }
  #cart-drawer { width: 100vw; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── Animations ─────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp .6s ease both; }

@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(183,110,121,.4); }
  70%  { box-shadow: 0 0 0 10px rgba(183,110,121,0); }
  100% { box-shadow: 0 0 0 0 rgba(183,110,121,0); }
}
.pulse-ring { animation: pulse-ring 2s infinite; }
