/* ============================================================
   Joshua's Technical Clothing – Main Stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:wght@300;400;500&display=swap');

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary:       #0f766e;
  --primary-dark:  #0d5c54;
  --primary-light: #14b8a6;
  --accent:        #06b6d4;
  --bg:            #0a0f1a;
  --bg-card:       #111827;
  --bg-elevated:   #1a2332;
  --text:          #f1f5f9;
  --text-muted:    #94a3b8;
  --border:        #1e3048;
  --success:       #10b981;
  --danger:        #ef4444;
  --warning:       #f59e0b;
  --radius:        10px;
  --radius-lg:     16px;
  --shadow:        0 4px 24px rgba(0,0,0,.4);
  --glow:          0 0 40px rgba(20,184,166,.15);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── TYPOGRAPHY ── */
h1,h2,h3,h4 { font-family: 'Syne', sans-serif; line-height: 1.15; }

.gradient-text {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── HEADER ── */
header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(10,15,26,.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 20px rgba(0,0,0,.5);
}

.header-inner {
  max-width: 1400px; margin: 0 auto;
  padding: .9rem 2rem;
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
}

.logo { text-decoration: none; }
.logo h1 {
  font-size: 1.4rem; font-weight: 800;
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.logo p { font-size: .75rem; color: var(--text-muted); }

header nav { display: flex; gap: 1.6rem; align-items: center; flex-wrap: wrap; }
header nav a {
  color: var(--text-muted); text-decoration: none; font-size: .9rem; font-weight: 500;
  transition: color .2s; position: relative;
}
header nav a:hover { color: var(--primary-light); }
header nav a::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 2px; background: var(--primary-light); transition: width .25s;
}
header nav a:hover::after { width: 100%; }

.cart-link { position: relative; display: flex; align-items: center; gap: .4rem; }
.cart-badge {
  display: none; position: absolute; top: -8px; right: -10px;
  width: 18px; height: 18px;
  background: var(--primary-light); color: white;
  border-radius: 50%; font-size: .7rem; font-weight: 700;
  align-items: center; justify-content: center;
}

/* ── MAIN ── */
main { flex: 1; max-width: 1400px; width: 100%; margin: 0 auto; padding: 3rem 2rem; }

/* ── HERO ── */
.hero {
  text-align: center; padding: 5rem 2rem;
  background: radial-gradient(ellipse at 50% 0%, rgba(15,118,110,.25) 0%, transparent 65%);
  border-radius: var(--radius-lg);
  margin-bottom: 4rem;
}
.hero h2 { font-size: clamp(2.2rem, 5vw, 4rem); font-weight: 800; margin-bottom: 1rem; }
.hero p  { font-size: 1.15rem; color: var(--text-muted); max-width: 560px; margin: 0 auto 2rem; }

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .8rem 1.8rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white; border: none; border-radius: var(--radius);
  font-weight: 600; font-size: .95rem; cursor: pointer;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(20,184,166,.35); }
.btn:active { transform: translateY(0); }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.btn-outline:hover { border-color: var(--primary-light); color: var(--primary-light); box-shadow: none; }

/* ── CARDS ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.card:hover {
  transform: translateY(-6px);
  border-color: var(--primary-light);
  box-shadow: var(--glow);
}
.card img { width: 100%; height: 260px; object-fit: cover; display: block; transition: transform .3s; }
.card:hover img { transform: scale(1.04); }
.card-body { padding: 1.2rem 1.4rem 1.4rem; }
.card-body h3 { font-size: 1.05rem; margin-bottom: .4rem; }
.card-price { font-size: 1.3rem; font-weight: 700; color: var(--primary-light); margin-bottom: 1rem; }

/* ── GRID ── */
.grid    { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.5rem; }
.grid-2  { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.grid-4  { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }

/* ── FORM ── */
.form-card {
  max-width: 480px; margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow);
}
.form-card h2 { margin-bottom: 1.8rem; font-size: 1.8rem; }
.form-group { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1.2rem; }
label { font-size: .85rem; color: var(--text-muted); font-weight: 500; }

input[type=text], input[type=email], input[type=password], input[type=number], select, textarea {
  width: 100%; padding: .8rem 1rem;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text); font-size: .95rem;
  font-family: inherit;
  transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(20,184,166,.12);
}
textarea { resize: vertical; min-height: 100px; }

.checkbox-row { display: flex; align-items: center; gap: .6rem; padding: .8rem 0; }
.checkbox-row input { width: auto; }

/* ── ACCOUNT LAYOUT ── */
.account-layout { display: grid; grid-template-columns: 220px 1fr; gap: 2rem; align-items: start; }
.sidebar {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem; position: sticky; top: 90px;
}
.sidebar h3 { font-size: .85rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1rem; }
.sidebar a {
  display: flex; align-items: center; gap: .6rem;
  padding: .65rem .8rem; color: var(--text-muted);
  text-decoration: none; border-radius: 8px;
  font-size: .9rem; transition: all .2s; margin-bottom: 2px;
}
.sidebar a:hover, .sidebar a.active { background: var(--bg-elevated); color: var(--primary-light); }
.panel {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 2rem;
}
.panel h2 { font-size: 1.5rem; margin-bottom: 1.5rem; }

/* ── ORDER CARDS ── */
.order-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem; margin-bottom: 1.2rem;
  transition: border-color .2s;
}
.order-card:hover { border-color: var(--primary-light); }
.order-number { font-size: 1.2rem; font-weight: 700; color: var(--primary-light); }
.status-badge {
  display: inline-block; padding: .3rem .9rem;
  border-radius: 999px; font-size: .8rem; font-weight: 600;
}
.status-ordered     { background: rgba(148,163,184,.15); color: #94a3b8; }
.status-processing  { background: rgba(245,158,11,.15);  color: #f59e0b; }
.status-shipped     { background: rgba(20,184,166,.2);   color: var(--primary-light); }
.status-out_for_delivery { background: rgba(6,182,212,.2); color: #06b6d4; }
.status-delivered   { background: rgba(16,185,129,.2);   color: var(--success); }

/* ── TRACKING TIMELINE ── */
.tracking-timeline {
  display: flex; align-items: center; gap: 0; margin: 2rem 0;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 2rem;
  overflow-x: auto;
}
.track-step { flex: 1; text-align: center; min-width: 80px; }
.track-step .icon {
  font-size: 2rem; margin-bottom: .5rem;
  opacity: .3; transition: opacity .3s;
}
.track-step.done .icon { opacity: 1; }
.track-step p { font-size: .8rem; color: var(--text-muted); }
.track-step.done p { color: var(--primary-light); font-weight: 600; }
.track-line { flex: 1; height: 2px; background: var(--border); min-width: 30px; }
.track-line.done { background: var(--primary-light); }

/* ── CART ── */
.cart-item {
  display: flex; align-items: center; gap: 1.2rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.2rem;
  margin-bottom: 1rem;
}
.cart-item img { width: 70px; height: 70px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.cart-item-info { flex: 1; }
.cart-item-info h4 { margin-bottom: .2rem; }
.cart-item-info p { font-size: .85rem; color: var(--text-muted); }
.cart-item-price { font-size: 1.1rem; font-weight: 700; color: var(--primary-light); white-space: nowrap; }

.cart-summary {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem;
}
.cart-summary-row { display: flex; justify-content: space-between; padding: .5rem 0; border-bottom: 1px solid var(--border); font-size: .95rem; }
.cart-summary-row:last-of-type { border-bottom: none; }
.cart-total { font-size: 1.5rem; font-weight: 800; color: var(--primary-light); }

.discount-row {
  display: flex; gap: .6rem; margin: 1rem 0;
}
.discount-row input { flex: 1; }
.discount-applied {
  background: rgba(16,185,129,.1); border: 1px solid var(--success);
  border-radius: var(--radius); padding: .6rem 1rem;
  color: var(--success); font-size: .9rem; margin: .5rem 0;
}

/* ── ADMIN TABLE ── */
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th {
  text-align: left; padding: .9rem 1rem;
  color: var(--primary-light); font-family: 'Syne', sans-serif; font-size: .85rem;
  border-bottom: 2px solid var(--border); text-transform: uppercase; letter-spacing: .06em;
}
.admin-table td { padding: .9rem 1rem; border-bottom: 1px solid var(--border); font-size: .9rem; }
.admin-table tr:hover { background: rgba(20,184,166,.04); }

/* ── CATEGORY CARDS ── */
.category-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 2.5rem;
  text-decoration: none; color: var(--text);
  text-align: center; font-family: 'Syne', sans-serif;
  font-size: 1.1rem; font-weight: 700;
  transition: all .25s; position: relative; overflow: hidden;
}
.category-card:hover {
  border-color: var(--primary-light); transform: translateY(-6px);
  box-shadow: var(--glow);
}
.category-card .cat-icon { font-size: 3rem; display: block; margin-bottom: .8rem; }

/* ── SUBSCRIBE SECTION ── */
.subscribe-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: var(--radius-lg); padding: 3rem 2rem; text-align: center; margin: 3rem 0;
}
.subscribe-section h3 { font-size: 1.8rem; margin-bottom: .8rem; color: white; }
.subscribe-section p  { color: rgba(255,255,255,.85); margin-bottom: 1.8rem; }
.subscribe-form { display: flex; gap: .8rem; max-width: 480px; margin: 0 auto; }
.subscribe-form input {
  flex: 1; background: white; border: none; color: #111; border-radius: var(--radius);
}
.subscribe-form input::placeholder { color: #888; }
.subscribe-form button { background: var(--bg); color: white; border: none; }

/* ── PAGE TITLE ── */
.page-title {
  font-size: 2.2rem; font-weight: 800; margin-bottom: 2rem;
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

/* ── ALERTS ── */
.alert { padding: .9rem 1.2rem; border-radius: var(--radius); margin-bottom: 1rem; font-size: .9rem; }
.alert-error   { background: rgba(239,68,68,.1);   border: 1px solid var(--danger);   color: var(--danger); }
.alert-success { background: rgba(16,185,129,.1);  border: 1px solid var(--success);  color: var(--success); }
.alert-info    { background: rgba(6,182,212,.1);   border: 1px solid var(--accent);   color: var(--accent); }

/* ── TOAST ── */
.toast {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius); padding: .9rem 1.4rem;
  display: flex; align-items: center; gap: .7rem;
  font-size: .9rem; box-shadow: var(--shadow);
  transform: translateY(20px); opacity: 0;
  transition: transform .35s, opacity .35s;
  z-index: 999; max-width: 340px;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast-success .toast-icon { color: var(--success); font-weight: 700; }
.toast-error   .toast-icon { color: var(--danger);  font-weight: 700; }

/* ── DISCOUNT CODE BADGE ── */
.code-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  background: rgba(16,185,129,.1); border: 1px solid var(--success);
  color: var(--success); border-radius: 999px;
  padding: .25rem .8rem; font-size: .8rem; font-weight: 600;
}

/* ── FOOTER ── */
footer {
  background: var(--bg-card); border-top: 1px solid var(--border);
  padding: 2rem; text-align: center;
  color: var(--text-muted); font-size: .85rem;
}
footer a { color: var(--primary-light); text-decoration: none; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .header-inner { flex-direction: column; gap: .8rem; padding: 1rem; }
  header nav { flex-wrap: wrap; gap: 1rem; justify-content: center; }
  main { padding: 1.5rem 1rem; }
  .hero { padding: 3rem 1rem; }
  .account-layout { grid-template-columns: 1fr; }
  .tracking-timeline { flex-direction: column; align-items: flex-start; }
  .track-line { width: 2px; height: 30px; }
  .subscribe-form { flex-direction: column; }
}

/* ── LOADING SPINNER ── */
.spinner {
  display: inline-block; width: 20px; height: 20px;
  border: 2px solid rgba(20,184,166,.3); border-top-color: var(--primary-light);
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── ANIMATIONS ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeInUp .5s ease both; }