/* ============================================
   Loop Collective — C2C Clothing Marketplace
   Design System & Global Styles
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700;900&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  --cream:     #F7F3EE;
  --warm-white:#FDFAF6;
  --charcoal:  #1A1A1A;
  --ink:       #2D2D2D;
  --muted:     #7A7268;
  --border:    #E8E0D5;
  --accent:    #C8501A;
  --accent-lt: #F0E8E2;
  --gold:      #B8922A;
  --green:     #2A7A4B;
  --green-lt:  #E8F4ED;
  --red:       #C0392B;
  --red-lt:    #FDECEA;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,.10);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.14);
  --radius:    12px;
  --radius-sm: 8px;
  --transition: all .22s cubic-bezier(.4,0,.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ── */
h1,h2,h3,h4,h5 {
  font-family: 'Playfair Display', serif;
  color: var(--charcoal);
  line-height: 1.2;
}
h1 { font-size: clamp(2rem, 5vw, 3.6rem); font-weight: 900; }
h2 { font-size: clamp(1.5rem, 3vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.4rem; font-weight: 600; }
p  { color: var(--muted); }
a  { color: inherit; text-decoration: none; }

/* ── Navbar ── */
.navbar-loop {
  background: var(--warm-white);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 68px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}
.navbar-loop .navbar-brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--charcoal);
  letter-spacing: -0.5px;
}
.navbar-loop .navbar-brand span { color: var(--accent); }
.nav-link-custom {
  font-weight: 500;
  font-size: .9rem;
  color: var(--muted) !important;
  padding: .4rem .85rem !important;
  border-radius: 20px;
  transition: var(--transition);
  letter-spacing: .02em;
}
.nav-link-custom:hover, .nav-link-custom.active {
  color: var(--charcoal) !important;
  background: var(--accent-lt);
}
.btn-nav-sell {
  background: var(--charcoal);
  color: #fff !important;
  font-weight: 600;
  font-size: .85rem;
  padding: .45rem 1.2rem !important;
  border-radius: 24px;
  letter-spacing: .03em;
  transition: var(--transition);
}
.btn-nav-sell:hover { background: var(--accent); transform: translateY(-1px); }

/* ── Buttons ── */
.btn-primary-custom {
  background: var(--charcoal);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: .9rem;
  padding: .7rem 1.8rem;
  letter-spacing: .03em;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}
.btn-primary-custom:hover { background: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-md); }

.btn-outline-custom {
  background: transparent;
  color: var(--charcoal);
  border: 1.5px solid var(--charcoal);
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: .9rem;
  padding: .65rem 1.6rem;
  letter-spacing: .03em;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}
.btn-outline-custom:hover { background: var(--charcoal); color: #fff; transform: translateY(-2px); }

.btn-accent { background: var(--accent) !important; }
.btn-accent:hover { background: #a83e13 !important; }

/* ── Cards ── */
.product-card {
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.product-card .img-wrap {
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--border);
  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-condition {
  position: absolute;
  top: 12px; left: 12px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(4px);
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 600;
  padding: .25rem .7rem;
  color: var(--charcoal);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.product-card .wishlist-btn {
  position: absolute;
  top: 10px; right: 10px;
  width: 34px; height: 34px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(4px);
  border: none;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: .9rem;
}
.product-card .wishlist-btn:hover { background: #fff; transform: scale(1.1); }
.product-card .card-body-custom { padding: 1rem 1.1rem 1.2rem; }
.product-card .brand-label { font-size: .72rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.product-card .item-name { font-family: 'Playfair Display', serif; font-size: 1rem; font-weight: 600; color: var(--charcoal); margin: .2rem 0 .5rem; line-height: 1.3; }
.product-card .price-row { display: flex; align-items: center; justify-content: space-between; }
.product-card .price { font-size: 1.1rem; font-weight: 700; color: var(--accent); }
.product-card .size-tag { font-size: .78rem; color: var(--muted); background: var(--cream); border-radius: 4px; padding: .15rem .5rem; }

/* ── Hero ── */
.hero-section {
  background: var(--charcoal);
  min-height: 88vh;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.hero-section::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-tag { display: inline-block; background: var(--accent); color: #fff; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: .35rem 1rem; border-radius: 20px; margin-bottom: 1.5rem; }
.hero-section h1 { color: #fff; }
.hero-section h1 em { font-style: normal; color: var(--accent); }
.hero-section p { color: rgba(255,255,255,.6); font-size: 1.05rem; max-width: 440px; }
.hero-stats { display: flex; gap: 2.5rem; margin-top: 2.5rem; }
.hero-stat-num { font-family: 'Playfair Display', serif; font-size: 2rem; font-weight: 900; color: #fff; }
.hero-stat-label { font-size: .78rem; color: rgba(255,255,255,.5); text-transform: uppercase; letter-spacing: .06em; }
.hero-img-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 10px;
  height: 520px;
}
.hero-img-grid .img-tile {
  background: #333;
  border-radius: 10px;
  overflow: hidden;
}
.hero-img-grid .img-tile:first-child { grid-row: span 2; }
.hero-img-grid .img-tile img { width:100%; height:100%; object-fit:cover; opacity:.9; }

/* ── Sections ── */
.section-pad { padding: 5rem 0; }
.section-label {
  font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .14em;
  color: var(--accent); margin-bottom: .6rem; display: block;
}
.divider-line { width: 48px; height: 3px; background: var(--accent); border-radius: 2px; margin: 1rem 0 2.5rem; }

/* ── Category Pills ── */
.category-strip { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 2rem; }
.cat-pill {
  border: 1.5px solid var(--border);
  border-radius: 24px;
  padding: .4rem 1.1rem;
  font-size: .84rem;
  font-weight: 500;
  color: var(--muted);
  background: var(--warm-white);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.cat-pill:hover, .cat-pill.active {
  background: var(--charcoal);
  color: #fff;
  border-color: var(--charcoal);
}

/* ── Filter Sidebar ── */
.filter-sidebar {
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: sticky;
  top: 88px;
}
.filter-sidebar h6 { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: .8rem; }
.filter-check .form-check-label { font-size: .88rem; color: var(--ink); }
.price-range-input { width: 100%; accent-color: var(--accent); }

/* ── Dashboard Layout ── */
.dash-layout { display: flex; min-height: 100vh; }
.dash-sidebar {
  width: 256px;
  background: var(--charcoal);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  display: flex; flex-direction: column;
  overflow-y: auto;
  z-index: 100;
}
.dash-sidebar .brand {
  padding: 1.5rem 1.6rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  font-weight: 900;
  color: #fff;
}
.dash-sidebar .brand span { color: var(--accent); }
.dash-nav { padding: 1.2rem .8rem; flex: 1; }
.dash-nav-label { font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.3); padding: .8rem .8rem .4rem; }
.dash-nav-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .65rem .9rem;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,.65);
  font-size: .9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: .15rem;
}
.dash-nav-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.dash-nav-item.active { background: var(--accent); color: #fff; }
.dash-nav-item i { width: 18px; text-align: center; font-size: .95rem; }
.dash-nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  padding: .1rem .5rem;
  border-radius: 10px;
}
.dash-main { margin-left: 256px; flex: 1; background: var(--cream); min-height: 100vh; }
.dash-topbar {
  background: var(--warm-white);
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
}
.dash-topbar h4 { font-size: 1.1rem; margin: 0; color: var(--charcoal); }
.dash-content { padding: 2rem; }
.dash-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem;
  cursor: pointer;
}

/* ── Stat Cards ── */
.stat-card {
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-md); }
.stat-card .stat-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; margin-bottom: 1rem;
}
.stat-card .stat-num { font-family: 'Playfair Display', serif; font-size: 1.9rem; font-weight: 900; color: var(--charcoal); }
.stat-card .stat-label { font-size: .82rem; color: var(--muted); font-weight: 500; }
.stat-card .stat-change { font-size: .78rem; font-weight: 600; }
.stat-card .stat-change.up { color: var(--green); }
.stat-card .stat-change.down { color: var(--red); }

/* ── Table ── */
.table-custom {
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.table-custom table { margin: 0; }
.table-custom thead th {
  background: var(--cream);
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  border: none;
  padding: .9rem 1.2rem;
}
.table-custom tbody td { padding: .9rem 1.2rem; border-color: var(--border); vertical-align: middle; font-size: .9rem; }
.table-custom tbody tr:hover { background: var(--cream); }

/* ── Status Badges ── */
.badge-status {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .74rem; font-weight: 600;
  padding: .25rem .7rem;
  border-radius: 20px;
  text-transform: capitalize;
}
.badge-status::before { content:''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-active   { color: var(--green); background: var(--green-lt); }
.status-pending  { color: var(--gold);  background: #FDF5E0; }
.status-sold     { color: var(--muted); background: var(--cream); }
.status-rejected { color: var(--red);   background: var(--red-lt); }
.status-shipped  { color: #1A6EB5;      background: #EBF3FC; }

/* ── Forms ── */
.form-group-custom { margin-bottom: 1.4rem; }
.form-label-custom { font-size: .82rem; font-weight: 600; color: var(--charcoal); margin-bottom: .5rem; display: block; letter-spacing: .02em; }
.form-input-custom {
  width: 100%;
  background: var(--warm-white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .72rem 1rem;
  font-family: 'DM Sans', sans-serif;
  font-size: .92rem;
  color: var(--charcoal);
  transition: var(--transition);
  outline: none;
}
.form-input-custom:focus { border-color: var(--charcoal); box-shadow: 0 0 0 3px rgba(26,26,26,.08); }
.form-input-custom::placeholder { color: var(--muted); }
select.form-input-custom { cursor: pointer; }
.input-icon-wrap { position: relative; }
.input-icon-wrap .icon { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .9rem; }
.input-icon-wrap .form-input-custom { padding-left: 2.4rem; }

/* ── Auth Pages ── */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cream);
  padding: 2rem;
}
.auth-card {
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem 2.8rem;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
}
.auth-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--charcoal);
  text-align: center;
  margin-bottom: 2rem;
}
.auth-logo span { color: var(--accent); }
.auth-divider { display: flex; align-items: center; gap: 1rem; margin: 1.5rem 0; }
.auth-divider span { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.auth-divider::before, .auth-divider::after { content:''; flex:1; height: 1px; background: var(--border); }
.role-tabs { display: flex; gap: .5rem; margin-bottom: 2rem; background: var(--cream); border-radius: 10px; padding: .3rem; }
.role-tab {
  flex: 1; text-align: center; padding: .5rem;
  border-radius: 8px; font-size: .86rem; font-weight: 600;
  cursor: pointer; transition: var(--transition); color: var(--muted);
}
.role-tab.active { background: var(--warm-white); color: var(--charcoal); box-shadow: var(--shadow-sm); }

/* ── Product Page ── */
.product-gallery { display: grid; grid-template-columns: 80px 1fr; gap: 12px; }
.gallery-thumbs { display: flex; flex-direction: column; gap: 8px; }
.thumb { aspect-ratio: 1; border-radius: 8px; overflow: hidden; border: 2px solid transparent; cursor: pointer; transition: var(--transition); }
.thumb.active, .thumb:hover { border-color: var(--charcoal); }
.thumb img { width:100%; height:100%; object-fit:cover; }
.gallery-main { aspect-ratio: 4/5; border-radius: var(--radius); overflow: hidden; background: var(--border); }
.gallery-main img { width:100%; height:100%; object-fit:cover; }
.seller-mini-card {
  display: flex; align-items: center; gap: 1rem;
  background: var(--cream);
  border-radius: var(--radius-sm);
  padding: .9rem 1.1rem;
  margin: 1.2rem 0;
}
.seller-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color:#fff; display:flex; align-items:center; justify-content:center; font-weight:700; }
.rating-stars { color: var(--gold); font-size: .85rem; }

/* ── Checkout / Cart ── */
.cart-item {
  display: flex; gap: 1rem; align-items: flex-start;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.cart-item:last-child { border-bottom: none; }
.cart-img { width: 80px; height: 100px; border-radius: 8px; object-fit: cover; background: var(--border); flex-shrink: 0; }
.order-summary-box {
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: sticky;
  top: 88px;
}

/* ── Toast ── */
.toast-loop {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 9999;
  background: var(--charcoal); color: #fff;
  border-radius: 10px; padding: .85rem 1.4rem;
  font-size: .88rem; font-weight: 500;
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: .6rem;
  transform: translateY(100px); opacity: 0;
  transition: all .3s cubic-bezier(.4,0,.2,1);
  max-width: 320px;
}
.toast-loop.show { transform: translateY(0); opacity: 1; }
.toast-loop.success i { color: #5FD17A; }
.toast-loop.error i { color: #FF6B6B; }

/* ── Footer ── */
.footer-main {
  background: #000;
  color: rgba(255,255,255,0.75);
  text-align: center;
  padding: 5rem 1rem 2rem;
}

.footer-brand {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 1rem;
}

.footer-description {
  max-width: 600px;
  margin: 0 auto 2rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.8;
}

.footer-socials {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.footer-socials a {
  color: #fff;
  font-size: 1.4rem;
  transition: all 0.3s ease;
}

.footer-socials a:hover {
  color: var(--accent);
  transform: translateY(-3px);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 2rem;
  padding-top: 1.5rem;
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
}

/* ── Utilities ── */
.text-accent { color: var(--accent) !important; }
.bg-cream { background: var(--cream) !important; }
.bg-warm { background: var(--warm-white) !important; }
.border-custom { border: 1px solid var(--border) !important; }
.rounded-custom { border-radius: var(--radius) !important; }
.shadow-custom { box-shadow: var(--shadow-md) !important; }
.fw-600 { font-weight: 600 !important; }
.serif { font-family: 'Playfair Display', serif !important; }
.img-placeholder { background: linear-gradient(135deg, #E8E0D5 0%, #D5C9BC 100%); display:flex; align-items:center; justify-content:center; color: var(--muted); font-size: 2rem; }

/* ── Animations ── */
@keyframes fadeUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
.fade-up  { animation: fadeUp .5s ease forwards; }
.fade-in  { animation: fadeIn .4s ease forwards; }

/* ── Responsive ── */
@media (max-width: 991px) {
  .dash-sidebar { transform: translateX(-100%); transition: transform .3s ease; }
  .dash-sidebar.open { transform: translateX(0); }
  .dash-main { margin-left: 0; }
  .hero-img-grid { display: none; }
}
@media (max-width: 576px) {
  .auth-card { padding: 1.8rem 1.5rem; }
  .dash-content { padding: 1rem; }
}