/* ============================================================
   BIANCA'S STORE — Global Styles
   ============================================================ */

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

/* ── CSS Variables ── */
:root {
  --primary:       #7C3AED;
  --primary-dark:  #5B21B6;
  --primary-light: #EDE9FE;
  --accent:        #EC4899;
  --accent-light:  #FCE7F3;
  --success:       #10B981;
  --warning:       #F59E0B;
  --danger:        #EF4444;
  --text:          #111827;
  --text-muted:    #6B7280;
  --text-light:    #9CA3AF;
  --bg:            #F9FAFB;
  --bg-card:       #FFFFFF;
  --border:        #E5E7EB;
  --border-light:  #F3F4F6;
  --shadow-sm:     0 1px 3px rgba(0,0,0,.08);
  --shadow:        0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:     0 12px 40px rgba(124,58,237,.15);
  --radius:        14px;
  --radius-sm:     8px;
  --radius-lg:     20px;
  --transition:    all .2s ease;
  --font:          'Poppins', system-ui, sans-serif;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ── Gradient ── */
.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.gradient-bg {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
}

/* ── Layout ── */
.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.section   { padding: 64px 0; }

/* ── Navigation ── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
}
.nav-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav-logo {
  font-size: 1.25rem; font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav-logo img { height: 36px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a {
  font-size: .9rem; font-weight: 500; color: var(--text-muted);
  transition: var(--transition);
}
.nav-links a:hover { color: var(--primary); }

/* ── Hero ── */
.hero {
  padding: 80px 20px;
  text-align: center;
  background: linear-gradient(160deg, #F5F3FF 0%, #FDF2F8 100%);
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800; line-height: 1.15;
  margin-bottom: 16px;
}
.hero p {
  font-size: 1.15rem; color: var(--text-muted);
  max-width: 540px; margin: 0 auto 32px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: 50px; border: none;
  font-size: .95rem; font-weight: 600; transition: var(--transition);
  line-height: 1;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; box-shadow: 0 4px 14px rgba(124,58,237,.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(124,58,237,.45);
}
.btn-secondary {
  background: var(--primary-light); color: var(--primary);
}
.btn-secondary:hover { background: #DDD6FE; }
.btn-outline {
  background: transparent; color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover { background: var(--primary-light); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #DC2626; }
.btn-sm { padding: 8px 18px; font-size: .85rem; }
.btn-lg { padding: 16px 36px; font-size: 1.05rem; }
.btn-full { width: 100%; justify-content: center; }

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: var(--transition);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

/* ── Product Card ── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.product-card { cursor: pointer; }
.product-card .img-wrap {
  width: 100%; aspect-ratio: 16/9;
  background: var(--primary-light); overflow: hidden; position: relative;
}
.product-card .img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s ease;
}
.product-card:hover .img-wrap img { transform: scale(1.05); }
.product-card .badge {
  position: absolute; top: 10px; left: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; font-size: .72rem; font-weight: 700; padding: 4px 10px;
  border-radius: 50px; text-transform: uppercase; letter-spacing: .05em;
}
.product-card .body { padding: 18px; }
.product-card .category {
  font-size: .75rem; font-weight: 600; color: var(--primary);
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px;
}
.product-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.product-card .tagline { font-size: .875rem; color: var(--text-muted); margin-bottom: 14px; }
.product-card .footer {
  display: flex; align-items: center; justify-content: space-between;
}
.product-card .price { font-size: 1.2rem; font-weight: 800; color: var(--primary); }

/* ── Filter Pills ── */
.filter-pills {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-bottom: 32px;
}
.pill {
  padding: 8px 18px; border-radius: 50px; border: 2px solid var(--border);
  font-size: .85rem; font-weight: 600; color: var(--text-muted);
  background: var(--bg-card); cursor: pointer; transition: var(--transition);
}
.pill:hover  { border-color: var(--primary); color: var(--primary); }
.pill.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ── Forms ── */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block; font-size: .875rem; font-weight: 600;
  color: var(--text); margin-bottom: 6px;
}
.form-label span { color: var(--accent); margin-left: 2px; }
.form-control {
  width: 100%; padding: 11px 14px;
  border: 2px solid var(--border); border-radius: var(--radius-sm);
  font-size: .95rem; background: #fff; color: var(--text);
  transition: var(--transition); outline: none;
}
.form-control:focus { border-color: var(--primary); }
.form-control::placeholder { color: var(--text-light); }
textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control { cursor: pointer; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-hint { font-size: .78rem; color: var(--text-muted); margin-top: 4px; }

/* ── Toggle Switch ── */
.toggle-wrap { display: flex; align-items: center; gap: 10px; }
.toggle {
  position: relative; width: 44px; height: 24px;
  cursor: pointer;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: var(--border); border-radius: 50px;
  transition: .2s;
}
.toggle-slider::before {
  content: ''; position: absolute;
  width: 18px; height: 18px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.toggle input:checked + .toggle-slider { background: var(--primary); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }
.toggle-label { font-size: .9rem; font-weight: 500; }

/* ── Badges ── */
.tag {
  display: inline-block; padding: 3px 10px; border-radius: 50px;
  font-size: .75rem; font-weight: 600;
}
.tag-purple  { background: var(--primary-light); color: var(--primary); }
.tag-green   { background: #D1FAE5; color: #065F46; }
.tag-red     { background: #FEE2E2; color: #991B1B; }
.tag-yellow  { background: #FEF3C7; color: #92400E; }
.tag-gray    { background: var(--border-light); color: var(--text-muted); }

/* ── Stat Cards ── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius); border: 1px solid var(--border);
  padding: 20px; display: flex; flex-direction: column; gap: 4px;
}
.stat-card .stat-label {
  font-size: .78rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-muted);
}
.stat-card .stat-value {
  font-size: 1.8rem; font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-card .stat-sub { font-size: .8rem; color: var(--text-muted); }

/* ── Tables ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
  text-align: left; padding: 12px 16px;
  font-size: .78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-muted);
  border-bottom: 2px solid var(--border);
  background: var(--bg);
}
tbody td {
  padding: 14px 16px; font-size: .9rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg); }

/* ── Modal ── */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.5); backdrop-filter: blur(4px);
  align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff; border-radius: var(--radius-lg);
  width: 100%; max-width: 560px; max-height: 90vh;
  overflow-y: auto; padding: 32px;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  animation: slideUp .25s ease;
}
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.modal-title { font-size: 1.25rem; font-weight: 700; }
.modal-close {
  width: 32px; height: 32px; border: none; background: var(--border-light);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; color: var(--text-muted); transition: var(--transition);
}
.modal-close:hover { background: var(--border); color: var(--text); }

/* ── Alert ── */
.alert {
  padding: 14px 18px; border-radius: var(--radius-sm);
  font-size: .9rem; margin-bottom: 16px; display: flex; gap: 10px; align-items: flex-start;
}
.alert-success { background: #D1FAE5; color: #065F46; border-left: 4px solid var(--success); }
.alert-error   { background: #FEE2E2; color: #991B1B; border-left: 4px solid var(--danger); }
.alert-info    { background: var(--primary-light); color: var(--primary-dark); border-left: 4px solid var(--primary); }

/* ── Mini chart ── */
.chart-bars {
  display: flex; align-items: flex-end; gap: 6px;
  height: 80px;
}
.chart-bar-wrap {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.chart-bar {
  width: 100%; background: linear-gradient(180deg, var(--primary), var(--accent));
  border-radius: 4px 4px 0 0; min-height: 4px;
  transition: height .4s ease;
}
.chart-label { font-size: .65rem; color: var(--text-muted); font-weight: 600; }

/* ── Empty state ── */
.empty-state {
  text-align: center; padding: 60px 20px; color: var(--text-muted);
}
.empty-state .icon { font-size: 3rem; margin-bottom: 12px; }
.empty-state h3 { font-size: 1.1rem; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.empty-state p  { font-size: .9rem; margin-bottom: 20px; }

/* ── Footer ── */
footer {
  background: var(--text); color: rgba(255,255,255,.6);
  padding: 40px 20px; text-align: center; margin-top: 80px;
}
footer .footer-logo {
  font-size: 1.2rem; font-weight: 700; color: #fff; margin-bottom: 8px;
}
footer p { font-size: .85rem; }
footer .social-links { display: flex; justify-content: center; gap: 16px; margin-top: 16px; }
footer .social-links a { color: rgba(255,255,255,.5); transition: var(--transition); }
footer .social-links a:hover { color: #fff; }

/* ── Discount input ── */
.discount-row {
  display: flex; gap: 10px;
}
.discount-row .form-control { flex: 1; }
#discount-result {
  font-size: .85rem; margin-top: 8px; font-weight: 500;
}

/* ── PayPal wrapper ── */
#paypal-button-container { margin-top: 16px; }

/* ── Image placeholder ── */
.img-placeholder {
  width: 100%; aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

/* ── Admin sidebar ── */
.admin-layout {
  display: grid; grid-template-columns: 220px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: var(--text); color: #fff;
  padding: 0; position: sticky; top: 0; height: 100vh;
  overflow-y: auto;
}
.sidebar-logo {
  padding: 24px 20px;
  font-size: 1.1rem; font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-nav { padding: 16px 0; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px; font-size: .9rem; font-weight: 500;
  color: rgba(255,255,255,.65); transition: var(--transition);
  border-left: 3px solid transparent;
}
.sidebar-nav a:hover, .sidebar-nav a.active {
  color: #fff; background: rgba(255,255,255,.07);
  border-left-color: var(--primary);
}
.sidebar-nav a .icon { font-size: 1.1rem; width: 20px; text-align: center; }
.sidebar-footer { padding: 20px; border-top: 1px solid rgba(255,255,255,.08); margin-top: auto; }
.admin-content { padding: 32px; background: var(--bg); }
.admin-page { display: none; }
.admin-page.active { display: block; }

/* ── Page header ── */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px; flex-wrap: wrap; gap: 12px;
}
.page-header h1 { font-size: 1.6rem; font-weight: 800; }
.page-header p  { font-size: .9rem; color: var(--text-muted); margin-top: 2px; }

/* ── Success page ── */
.success-wrap {
  min-height: 100vh; display: flex; align-items: center;
  justify-content: center; padding: 40px 20px;
  background: linear-gradient(160deg, #F5F3FF, #FDF2F8);
}
.success-card {
  background: #fff; border-radius: var(--radius-lg);
  padding: 48px 40px; max-width: 480px; width: 100%;
  text-align: center; box-shadow: var(--shadow-lg);
}
.success-icon {
  width: 80px; height: 80px; border-radius: 50%; margin: 0 auto 20px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: #fff;
}
.success-card h1 { font-size: 1.75rem; font-weight: 800; margin-bottom: 10px; }
.success-card p  { color: var(--text-muted); margin-bottom: 24px; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .form-row { grid-template-columns: 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
  .admin-content { padding: 20px; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  table { font-size: .82rem; }
}
@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; }
  .hero { padding: 48px 20px; }
  .modal { padding: 20px; }
}
