/* ============================================================================
   MythicCraft Shop — główny arkusz stylów
   Motyw: premium gaming, fiolet + czerń, subtelne efekty glow i animacje
   ============================================================================ */

:root{
  --bg:            #08070c;
  --bg-alt:        #0d0c14;
  --panel:         #131219;
  --panel-2:       #191722;
  --panel-3:       #201d2c;
  --border:        #26232f;
  --border-light:  #332f40;

  --text:          #f1f0f6;
  --text-muted:    #a09cb0;
  --text-faint:    #6d6980;

  --purple:        #8b5cf6;
  --purple-dark:   #5b21b6;
  --purple-deep:   #3b1470;
  --purple-glow:   #a855f7;
  --purple-soft:   rgba(139,92,246,.14);

  --success:       #34d399;
  --danger:        #f87171;
  --warning:       #fbbf24;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;

  --shadow-glow: 0 0 0 1px rgba(168,85,247,.15), 0 10px 40px rgba(139,92,246,.15);
  --shadow-card: 0 10px 30px rgba(0,0,0,.35);

  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Rajdhani', 'Inter', system-ui, sans-serif;
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img{ max-width: 100%; display: block; }
a{ color: inherit; text-decoration: none; }
ul{ margin: 0; padding: 0; list-style: none; }
button{ font-family: inherit; }
h1,h2,h3,h4{ font-family: var(--font-display); margin: 0 0 .5em; font-weight: 700; letter-spacing: .01em; }

.container{ max-width: 1240px; margin: 0 auto; padding: 0 24px; }

.skip-link{
  position: absolute; left: -999px; top: 0; background: var(--purple); color: #fff;
  padding: 10px 16px; z-index: 1000; border-radius: 0 0 8px 0;
}
.skip-link:focus{ left: 0; }

/* Background ambient glow */
body::before{
  content:'';
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(680px 420px at 12% -8%, rgba(139,92,246,.16), transparent 60%),
    radial-gradient(560px 380px at 100% 12%, rgba(88,28,135,.18), transparent 55%),
    radial-gradient(600px 500px at 50% 110%, rgba(76,29,149,.12), transparent 55%);
}

/* ---------------------------------------------------------------------------
   Buttons
   --------------------------------------------------------------------------- */
.btn{
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: 12px; border: none; cursor: pointer;
  font-weight: 700; font-size: .95rem; letter-spacing: .01em;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease, background .18s ease;
  white-space: nowrap;
}
.btn-primary{
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  color: #fff; box-shadow: 0 8px 28px rgba(139,92,246,.35);
}
.btn-primary:hover{ filter: brightness(1.12); transform: translateY(-2px); box-shadow: 0 12px 34px rgba(168,85,247,.45); }
.btn-primary:active{ transform: translateY(0); }
.btn-outline{
  background: transparent; color: var(--text); border: 1.5px solid var(--border-light);
}
.btn-outline:hover{ border-color: var(--purple); color: #fff; box-shadow: 0 0 0 3px var(--purple-soft); }
.btn-ghost{ background: var(--panel-2); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover{ background: var(--panel-3); }
.btn-block{ width: 100%; }
.btn-sm{ padding: 9px 16px; font-size: .85rem; border-radius: 10px; }
.btn-lg{ padding: 16px 34px; font-size: 1.05rem; border-radius: 14px; }
.btn:disabled{ opacity: .5; cursor: not-allowed; transform: none !important; }
.btn-danger{ background: rgba(248,113,113,.12); color: #fca5a5; border: 1px solid rgba(248,113,113,.35); }
.btn-danger:hover{ background: rgba(248,113,113,.2); }

/* ---------------------------------------------------------------------------
   Header
   --------------------------------------------------------------------------- */
.site-header{
  position: sticky; top: 0; z-index: 200;
  background: rgba(8,7,12,.78); backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.header-inner{ display: flex; align-items: center; gap: 28px; height: 76px; }
.brand{ display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; flex-shrink: 0; }
.brand-mark{
  display:flex; align-items:center; justify-content:center; width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, var(--purple), var(--purple-dark)); box-shadow: 0 0 20px rgba(139,92,246,.5);
  font-size: 1.1rem;
}
.brand-name{ background: linear-gradient(135deg, #fff, #d8c9ff); -webkit-background-clip:text; background-clip:text; color: transparent; }

.main-nav{ display: flex; align-items: center; gap: 6px; flex: 1; }
.main-nav > a, .nav-dropdown > a{
  padding: 10px 16px; border-radius: 10px; color: var(--text-muted); font-weight: 600; font-size: .93rem;
  transition: .15s; display: inline-flex; align-items: center; gap: 6px;
}
.main-nav > a:hover, .nav-dropdown > a:hover{ color: #fff; background: var(--panel-2); }
.nav-dropdown{ position: relative; }
.nav-dropdown-panel{
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 200px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 8px;
  box-shadow: var(--shadow-card); opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: .18s;
}
.nav-dropdown:hover .nav-dropdown-panel, .nav-dropdown:focus-within .nav-dropdown-panel{
  opacity: 1; visibility: visible; transform: translateY(0);
}
.nav-dropdown-panel a{ display: block; padding: 9px 12px; border-radius: 8px; font-size: .88rem; color: var(--text-muted); font-weight: 500; }
.nav-dropdown-panel a:hover{ background: var(--purple-soft); color: #fff; }

.header-actions{ display: flex; align-items: center; gap: 10px; }
.header-link{ display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-radius: 10px; color: var(--text-muted); font-size: .85rem; font-weight: 600; }
.header-link:hover{ color: #fff; background: var(--panel-2); }
.cart-toggle{
  position: relative; display:flex; align-items:center; justify-content:center; width: 44px; height: 44px;
  border-radius: 12px; background: var(--panel-2); border: 1px solid var(--border); color: var(--text); cursor: pointer; transition: .18s;
}
.cart-toggle:hover{ border-color: var(--purple); box-shadow: 0 0 0 3px var(--purple-soft); }
.cart-count{
  position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  background: linear-gradient(135deg, var(--purple-glow), var(--purple-dark)); color: #fff; font-size: .68rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 0 10px rgba(168,85,247,.6);
}
.nav-toggle{ display: none; flex-direction: column; justify-content: center; gap: 5px; width: 40px; height: 40px; background: none; border: none; cursor: pointer; }
.nav-toggle span{ display: block; height: 2px; width: 22px; background: var(--text); border-radius: 2px; transition: .25s; }
.nav-toggle.active span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2){ opacity: 0; }
.nav-toggle.active span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

/* Breadcrumbs */
.breadcrumbs{ border-bottom: 1px solid var(--border); background: var(--bg-alt); }
.breadcrumbs-inner{ display: flex; align-items: center; gap: 8px; padding: 12px 24px; font-size: .82rem; color: var(--text-faint); flex-wrap: wrap; }
.breadcrumbs a{ color: var(--text-muted); }
.breadcrumbs a:hover{ color: var(--purple-glow); }
.crumb-sep{ opacity: .4; }
.crumb-current{ color: var(--text); }

/* ---------------------------------------------------------------------------
   Hero
   --------------------------------------------------------------------------- */
.hero{
  position: relative; padding: 100px 0 90px; overflow: hidden;
  background:
    radial-gradient(900px 500px at 80% -10%, rgba(139,92,246,.25), transparent 60%),
    radial-gradient(700px 460px at 0% 100%, rgba(91,33,182,.22), transparent 55%);
}
.hero-grid-lines{
  position: absolute; inset: 0; opacity: .25; pointer-events: none;
  background-image: linear-gradient(rgba(139,92,246,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(139,92,246,.12) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, #000 30%, transparent 75%);
}
.hero-inner{ position: relative; text-align: center; max-width: 780px; margin: 0 auto; }
.hero-badge{
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px;
  background: var(--purple-soft); border: 1px solid rgba(139,92,246,.4); color: #d8c4ff; font-size: .82rem; font-weight: 600;
  margin-bottom: 26px; animation: fadeInUp .6s ease both;
}
.hero-badge .dot{ width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 8px var(--success); }
.hero h1{
  font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: 1.05; margin-bottom: 18px;
  animation: fadeInUp .7s ease both; animation-delay: .05s;
}
.hero h1 .accent{ background: linear-gradient(135deg, var(--purple-glow), #d8b4fe 50%, var(--purple)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-tagline{ font-size: 1.2rem; color: var(--text-muted); margin-bottom: 10px; font-weight: 500; animation: fadeInUp .7s ease both; animation-delay: .1s; }
.hero-desc{ color: var(--text-faint); max-width: 560px; margin: 0 auto 36px; animation: fadeInUp .7s ease both; animation-delay: .15s; }
.hero-actions{ display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; animation: fadeInUp .7s ease both; animation-delay: .2s; }
.hero-stats{ display: flex; gap: 48px; justify-content: center; margin-top: 60px; flex-wrap: wrap; animation: fadeInUp .7s ease both; animation-delay: .28s; }
.hero-stat{ text-align: center; }
.hero-stat .num{ font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: #fff; }
.hero-stat .label{ font-size: .8rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: .05em; }

@keyframes fadeInUp{ from{ opacity: 0; transform: translateY(18px);} to{ opacity: 1; transform: translateY(0);} }
@keyframes fadeIn{ from{ opacity:0 } to{ opacity:1 } }
@keyframes pulseGlow{ 0%,100%{ box-shadow: 0 0 20px rgba(168,85,247,.35);} 50%{ box-shadow: 0 0 34px rgba(168,85,247,.6);} }
@keyframes floatY{ 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(-8px);} }

.reveal{ opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible{ opacity: 1; transform: translateY(0); }

/* ---------------------------------------------------------------------------
   Section headings
   --------------------------------------------------------------------------- */
.section{ padding: 84px 0; }
.section-tight{ padding: 56px 0; }
.section-head{ text-align: center; max-width: 620px; margin: 0 auto 48px; }
.section-eyebrow{ color: var(--purple-glow); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: .78rem; margin-bottom: 10px; display: block; }
.section-head h2{ font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
.section-head p{ color: var(--text-muted); }

/* ---------------------------------------------------------------------------
   Mode cards (tryby gry)
   --------------------------------------------------------------------------- */
.mode-grid{ display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 22px; }
.mode-card{
  position: relative; background: linear-gradient(160deg, var(--panel), var(--panel-2));
  border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 30px 24px; text-align: center;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; overflow: hidden;
}
.mode-card::before{
  content:''; position: absolute; inset: 0; opacity: 0; transition: opacity .3s;
  background: radial-gradient(220px 160px at 50% 0%, rgba(168,85,247,.25), transparent 70%);
}
.mode-card:hover{ transform: translateY(-6px); border-color: rgba(168,85,247,.5); box-shadow: var(--shadow-glow); }
.mode-card:hover::before{ opacity: 1; }
.mode-icon{
  width: 68px; height: 68px; margin: 0 auto 18px; border-radius: 18px; display: flex; align-items: center; justify-content: center;
  font-size: 2rem; background: linear-gradient(135deg, rgba(139,92,246,.25), rgba(91,33,182,.15)); border: 1px solid rgba(168,85,247,.3);
  position: relative; z-index: 1;
}
.mode-card h3{ font-size: 1.25rem; margin-bottom: 8px; position: relative; z-index: 1; }
.mode-card p{ color: var(--text-muted); font-size: .88rem; min-height: 42px; position: relative; z-index: 1; }
.mode-card .btn{ margin-top: 16px; position: relative; z-index: 1; }
.mode-card-link{ display:block; }

/* ---------------------------------------------------------------------------
   Category tabs
   --------------------------------------------------------------------------- */
.category-tabs{ display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 42px; }
.category-tab{
  padding: 10px 20px; border-radius: 999px; border: 1px solid var(--border); background: var(--panel-2);
  color: var(--text-muted); font-weight: 600; font-size: .88rem; transition: .18s; display: inline-flex; align-items: center; gap: 8px;
}
.category-tab:hover{ border-color: rgba(168,85,247,.5); color: #fff; }
.category-tab.active{
  background: linear-gradient(135deg, var(--purple), var(--purple-dark)); color: #fff; border-color: transparent;
  box-shadow: 0 6px 18px rgba(139,92,246,.4);
}

/* ---------------------------------------------------------------------------
   Product grid & cards
   --------------------------------------------------------------------------- */
.product-grid{ display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.product-card{
  position: relative; background: linear-gradient(165deg, var(--panel), var(--panel-2));
  border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; display: flex; flex-direction: column;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.product-card:hover{ transform: translateY(-5px); border-color: rgba(168,85,247,.45); box-shadow: var(--shadow-glow); }
.product-card-top{ display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; }
.product-icon-wrap{
  width: 60px; height: 60px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 1.7rem;
  background: linear-gradient(135deg, rgba(139,92,246,.22), rgba(91,33,182,.12)); border: 1px solid rgba(168,85,247,.28); flex-shrink:0;
}
.icon-img{ width: 100%; height: 100%; object-fit: cover; border-radius: 16px; }
.icon-glyph{ line-height: 1; }
.product-badges{ display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.badge{ font-size: .66rem; font-weight: 800; letter-spacing: .04em; padding: 4px 9px; border-radius: 999px; text-transform: uppercase; white-space: nowrap; }
.badge-promo{ background: linear-gradient(135deg,#f97316,#ef4444); color: #fff; box-shadow: 0 0 12px rgba(249,115,22,.5); }
.badge-new{ background: linear-gradient(135deg,#34d399,#059669); color: #fff; }
.badge-bestseller{ background: linear-gradient(135deg,var(--purple-glow),var(--purple-dark)); color: #fff; }
.product-card h3{ font-size: 1.08rem; margin-bottom: 6px; }
.product-desc{ color: var(--text-muted); font-size: .85rem; margin-bottom: 18px; flex: 1; }
.product-price-row{ display: flex; align-items: baseline; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.price-current{ font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: #fff; }
.price-old{ font-size: .92rem; color: var(--text-faint); text-decoration: line-through; }
.price-discount{ font-size: .74rem; font-weight: 800; color: #fca5a5; background: rgba(248,113,113,.12); padding: 2px 8px; border-radius: 6px; }
.promo-countdown{ font-size: .72rem; color: var(--warning); margin: -10px 0 14px; font-weight: 600; }

/* ---------------------------------------------------------------------------
   FAQ accordion
   --------------------------------------------------------------------------- */
.faq-list{ max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item{ background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.faq-question{
  width: 100%; text-align: left; background: none; border: none; color: var(--text); padding: 20px 24px;
  display: flex; align-items: center; justify-content: space-between; cursor: pointer; font-weight: 700; font-size: 1rem; gap: 16px;
}
.faq-question:hover{ color: var(--purple-glow); }
.faq-question .chev{ transition: transform .25s; flex-shrink: 0; color: var(--purple-glow); }
.faq-item.open .faq-question .chev{ transform: rotate(180deg); }
.faq-answer{ max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-answer-inner{ padding: 0 24px 20px; color: var(--text-muted); font-size: .92rem; line-height: 1.7; }

/* ---------------------------------------------------------------------------
   Footer
   --------------------------------------------------------------------------- */
.site-footer{ background: var(--bg-alt); border-top: 1px solid var(--border); margin-top: 60px; }
.footer-grid{ display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding: 64px 24px 40px; }
.footer-col h3{ font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-faint); margin-bottom: 16px; }
.footer-col ul{ display: flex; flex-direction: column; gap: 11px; }
.footer-col a{ color: var(--text-muted); font-size: .9rem; }
.footer-col a:hover{ color: var(--purple-glow); }
.footer-brand p{ color: var(--text-faint); font-size: .88rem; max-width: 280px; margin: 14px 0 18px; }
.server-ip-badge{ display: inline-flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; font-size: .82rem; }
.server-ip-badge code{ color: var(--purple-glow); font-weight: 700; }
.copy-btn{ background: none; border: none; color: var(--text-faint); cursor: pointer; font-size: 1rem; }
.copy-btn:hover{ color: var(--purple-glow); }
.payment-badges{ display: flex; flex-wrap: wrap; gap: 8px; }
.payment-badge{ font-size: .74rem; padding: 6px 10px; border-radius: 8px; background: var(--panel); border: 1px solid var(--border); color: var(--text-muted); }
.footer-contact-email{ margin-top: 14px; font-size: .85rem; color: var(--text-muted); }
.footer-bottom{ border-top: 1px solid var(--border); padding: 20px 0; text-align: center; color: var(--text-faint); font-size: .82rem; }

/* ---------------------------------------------------------------------------
   Cart panel (slide-out)
   --------------------------------------------------------------------------- */
.cart-overlay{ position: fixed; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(2px); z-index: 300; opacity: 0; visibility: hidden; transition: .25s; }
.cart-overlay.active{ opacity: 1; visibility: visible; }
.cart-panel{
  position: fixed; top: 0; right: 0; height: 100vh; width: min(420px, 100vw); background: var(--panel);
  border-left: 1px solid var(--border); z-index: 301; display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .3s cubic-bezier(.16,1,.3,1);
}
.cart-panel.active{ transform: translateX(0); }
.cart-panel-header{ display: flex; align-items: center; justify-content: space-between; padding: 22px 24px; border-bottom: 1px solid var(--border); }
.cart-panel-header h2{ font-size: 1.15rem; margin: 0; }
.cart-panel-close{ background: var(--panel-2); border: 1px solid var(--border); color: var(--text); width: 36px; height: 36px; border-radius: 10px; cursor: pointer; display:flex; align-items:center; justify-content:center; }
.cart-panel-body{ flex: 1; overflow-y: auto; padding: 18px 24px; }
.cart-panel-footer{ padding: 20px 24px 26px; border-top: 1px solid var(--border); }
.cart-loading, .cart-empty{ text-align: center; color: var(--text-faint); padding: 60px 0; }
.cart-empty .icon{ font-size: 2.6rem; margin-bottom: 12px; }

.cart-line{ display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.cart-line:last-child{ border-bottom: none; }
.cart-line-icon{ width: 52px; height: 52px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0; }
.cart-line-info{ flex: 1; min-width: 0; }
.cart-line-info h4{ font-size: .92rem; margin: 0 0 4px; font-weight: 700; }
.cart-line-price{ font-size: .85rem; color: var(--text-muted); }
.cart-line-price .old{ text-decoration: line-through; color: var(--text-faint); margin-right: 6px; }
.cart-line-actions{ display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.qty-control{ display: flex; align-items: center; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.qty-control button{ width: 26px; height: 26px; background: var(--panel-2); border: none; color: var(--text); cursor: pointer; }
.qty-control span{ width: 30px; text-align: center; font-size: .85rem; font-weight: 700; }
.cart-line-remove{ background: none; border: none; color: var(--text-faint); cursor: pointer; font-size: .78rem; margin-left: auto; }
.cart-line-remove:hover{ color: var(--danger); }

.cart-summary-row{ display: flex; justify-content: space-between; font-size: .9rem; color: var(--text-muted); margin-bottom: 8px; }
.cart-summary-row.total{ font-size: 1.1rem; font-weight: 800; color: #fff; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--border); }
.coupon-form{ display: flex; gap: 8px; margin: 14px 0; }
.coupon-form input{ flex: 1; }

/* ---------------------------------------------------------------------------
   Forms
   --------------------------------------------------------------------------- */
.field{ margin-bottom: 18px; }
.field label{ display: block; font-size: .84rem; font-weight: 600; color: var(--text-muted); margin-bottom: 7px; }
.field .hint{ font-size: .76rem; color: var(--text-faint); margin-top: 6px; }
.field .error-text{ font-size: .78rem; color: var(--danger); margin-top: 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=date], input[type=datetime-local], textarea, select{
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-alt); color: var(--text);
  font-size: .93rem; font-family: inherit; transition: .16s;
}
textarea{ resize: vertical; min-height: 100px; }
input:focus, textarea:focus, select:focus{ outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px var(--purple-soft); }
input.field-error, textarea.field-error{ border-color: var(--danger); }
.checkbox-field{ display: flex; align-items: center; gap: 10px; }
.checkbox-field input{ width: auto; }
fieldset{ border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin: 0 0 20px; }
legend{ padding: 0 8px; font-weight: 700; font-size: .92rem; color: var(--purple-glow); }

/* ---------------------------------------------------------------------------
   Panels / cards generic
   --------------------------------------------------------------------------- */
.panel{ background: linear-gradient(165deg, var(--panel), var(--panel-2)); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 30px; }
.panel-header{ display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; gap: 16px; flex-wrap: wrap; }

/* Steps indicator (checkout) */
.steps-indicator{ display: flex; justify-content: center; gap: 6px; margin-bottom: 44px; flex-wrap: wrap; }
.steps-indicator .step{ display: flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--border); font-size: .82rem; font-weight: 600; color: var(--text-faint); }
.steps-indicator .step.active{ background: linear-gradient(135deg, var(--purple), var(--purple-dark)); color: #fff; border-color: transparent; }
.steps-indicator .step.done{ color: var(--purple-glow); border-color: rgba(168,85,247,.4); }
.steps-indicator .sep{ width: 24px; height: 1px; background: var(--border); align-self: center; }

/* Order status badges */
.status-badge{ display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: .76rem; font-weight: 700; }
.status-pending{ background: rgba(251,191,36,.15); color: var(--warning); }
.status-paid{ background: rgba(52,211,153,.15); color: var(--success); }
.status-processing{ background: rgba(139,92,246,.18); color: var(--purple-glow); }
.status-completed{ background: rgba(52,211,153,.2); color: #6ee7b7; }
.status-cancelled{ background: rgba(148,148,166,.15); color: var(--text-faint); }
.status-error{ background: rgba(248,113,113,.15); color: var(--danger); }

/* Order tracker */
.order-tracker{ display: flex; justify-content: space-between; margin: 40px 0; position: relative; }
.order-tracker::before{ content:''; position: absolute; top: 17px; left: 5%; right: 5%; height: 2px; background: var(--border); z-index: 0; }
.order-tracker .tnode{ position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1; }
.order-tracker .tdot{ width: 36px; height: 36px; border-radius: 50%; background: var(--panel-2); border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 800; color: var(--text-faint); }
.order-tracker .tnode.done .tdot{ background: linear-gradient(135deg, var(--purple), var(--purple-dark)); border-color: transparent; color: #fff; box-shadow: 0 0 14px rgba(139,92,246,.5); }
.order-tracker .tlabel{ font-size: .74rem; color: var(--text-faint); text-align: center; }
.order-tracker .tnode.done .tlabel{ color: var(--text); }

/* Toasts */
.toast-container{ position: fixed; top: 90px; right: 20px; z-index: 500; display: flex; flex-direction: column; gap: 10px; max-width: 340px; }
.toast{
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; display: flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow-card); animation: toastIn .3s ease both; font-size: .87rem; font-weight: 600;
}
.toast.success{ border-color: rgba(52,211,153,.4); }
.toast.success .toast-icon{ color: var(--success); }
.toast.error{ border-color: rgba(248,113,113,.4); }
.toast.error .toast-icon{ color: var(--danger); }
.toast.info .toast-icon{ color: var(--purple-glow); }
.toast-icon{ font-size: 1.1rem; flex-shrink: 0; }
.toast.hide{ animation: toastOut .25s ease forwards; }
@keyframes toastIn{ from{ opacity:0; transform: translateX(30px);} to{ opacity:1; transform: translateX(0);} }
@keyframes toastOut{ to{ opacity:0; transform: translateX(30px);} }

/* Skeleton loading */
.skeleton{ background: linear-gradient(90deg, var(--panel-2) 25%, var(--panel-3) 37%, var(--panel-2) 63%); background-size: 400% 100%; animation: skeleton 1.4s ease infinite; border-radius: 10px; }
@keyframes skeleton{ 0%{ background-position: 100% 50%; } 100%{ background-position: 0 50%; } }
.skeleton-card{ height: 280px; border-radius: var(--radius-lg); }

/* Empty state */
.empty-state{ text-align: center; padding: 70px 20px; color: var(--text-faint); }
.empty-state .icon{ font-size: 3rem; margin-bottom: 14px; }
.empty-state h3{ color: var(--text); }

/* Utility */
.text-center{ text-align: center; }
.mt-0{ margin-top: 0; }
.section-cta{ text-align: center; margin-top: 40px; }
.spinner{ width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin{ to{ transform: rotate(360deg); } }

/* Recent purchases ticker */
.ticker-wrap{ border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-alt); padding: 12px 0; overflow: hidden; }
.ticker{ display: flex; gap: 40px; white-space: nowrap; animation: tickerScroll 30s linear infinite; }
.ticker-item{ display: flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--text-muted); }
.ticker-item .dotpulse{ width: 6px; height: 6px; border-radius: 50%; background: var(--success); box-shadow: 0 0 8px var(--success); }
@keyframes tickerScroll{ from{ transform: translateX(0);} to{ transform: translateX(-50%);} }

/* ---------------------------------------------------------------------------
   Responsive
   --------------------------------------------------------------------------- */
@media (max-width: 980px){
  .footer-grid{ grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px){
  .header-link-label{ display: none; }
  .main-nav{
    position: fixed; top: 76px; left: 0; right: 0; bottom: 0; background: var(--bg);
    flex-direction: column; align-items: stretch; padding: 20px; gap: 4px; overflow-y: auto;
    transform: translateX(100%); transition: transform .3s ease; z-index: 199;
  }
  .main-nav.active{ transform: translateX(0); }
  .main-nav > a, .nav-dropdown > a{ padding: 16px; font-size: 1.05rem; border-bottom: 1px solid var(--border); border-radius: 0; }
  .nav-dropdown-panel{ position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; background: var(--panel-2); margin: 4px 0 4px 12px; display: none; }
  .nav-dropdown.mobile-open .nav-dropdown-panel{ display: block; }
  .nav-toggle{ display: flex; }
  .hero{ padding: 70px 0 60px; }
  .hero-stats{ gap: 28px; }
  .cart-panel{ width: 100vw; }
}

@media (max-width: 640px){
  .container{ padding: 0 16px; }
  .product-grid{ grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: 14px; }
  .product-card{ padding: 16px; }
  .mode-grid{ grid-template-columns: repeat(2, 1fr); }
  .mode-card{ padding: 20px 14px; }
  .footer-grid{ grid-template-columns: 1fr; gap: 32px; padding: 48px 20px 30px; }
  .hero-actions .btn{ width: 100%; }
  .order-tracker{ flex-wrap: wrap; gap: 16px; }
  .order-tracker::before{ display: none; }
}
