/* Vexa storefront — marketplace layout (Trendyol/HB inspired, original) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --mp-orange: #F27A1A;
  --mp-orange-dark: #E05E00;
  --mp-orange-soft: #FFF4EB;
  --mp-purple: #7723DB;
  --mp-topbar: #F3F3F3;
  --mp-text: #1B1B1B;
  --mp-muted: #666666;
  --mp-border: #E6E6E6;
  --mp-bg: #F2F2F2;
  --mp-card: #FFFFFF;
  --mp-free: #0A9B4A;
  --mp-star: #FFC000;
  --mp-danger: #E11D48;
  --vx-indigo: #1B2A4A;
  --vx-cyan: #00D4C8;
  --mp-shadow: 0 2px 8px rgba(0,0,0,.06);
  --mp-shadow-hover: 0 8px 28px rgba(0,0,0,.12);
  --mp-radius: 8px;
  --mp-max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }

body.sf-body, body.storefront {
  background: var(--mp-bg) !important;
  color: var(--mp-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  margin: 0;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

/* ===== Top utility bar ===== */
.mp-topbar {
  background: var(--mp-topbar);
  border-bottom: 1px solid var(--mp-border);
  font-size: 12px;
  color: var(--mp-muted);
}
.mp-topbar-inner {
  max-width: var(--mp-max);
  margin: 0 auto;
  padding: 7px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.mp-topbar a { color: var(--mp-muted); text-decoration: none; }
.mp-topbar a:hover { color: var(--mp-orange); }
.mp-topbar-left, .mp-topbar-right { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.mp-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; border: 1px solid var(--mp-border);
  border-radius: 999px; padding: 2px 10px; font-size: 11px; font-weight: 600;
  color: var(--mp-orange);
}

/* ===== Header ===== */
.mp-header {
  background: #fff;
  border-bottom: 1px solid var(--mp-border);
  position: sticky; top: 0; z-index: 200;
}
.mp-header-inner {
  max-width: var(--mp-max);
  margin: 0 auto;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 200px minmax(280px, 1fr) auto;
  gap: 24px;
  align-items: center;
}
.mp-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--vx-indigo);
  font-weight: 800; font-size: 1.25rem; letter-spacing: -.03em;
}
.mp-logo img { height: 40px; width: auto; }
.mp-logo span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }

.mp-search {
  display: flex; width: 100%; max-width: 720px; margin: 0 auto;
  border: 2px solid var(--mp-orange);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  height: 44px;
}
.mp-search input {
  flex: 1; border: 0; outline: 0; padding: 0 16px;
  font-size: 14px; min-width: 0; font-family: inherit;
}
.mp-search input::placeholder { color: #9CA3AF; }
.mp-search button {
  border: 0; background: var(--mp-orange); color: #fff;
  padding: 0 28px; font-weight: 700; cursor: pointer; font-size: 14px;
  font-family: inherit; white-space: nowrap;
}
.mp-search button:hover { background: var(--mp-orange-dark); }

.mp-actions { display: flex; align-items: center; gap: 4px; }
.mp-action {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; text-decoration: none; color: var(--vx-indigo);
  font-size: 11px; font-weight: 600; padding: 6px 12px;
  border-radius: 8px; position: relative; min-width: 70px;
  transition: background .12s;
}
.mp-action:hover { background: var(--mp-orange-soft); color: var(--mp-orange); }
.mp-action .ico { font-size: 22px; line-height: 1; }
.mp-badge {
  position: absolute; top: 0; right: 10px;
  background: var(--mp-orange); color: #fff;
  font-size: 10px; font-weight: 800;
  min-width: 18px; height: 18px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 5px; box-shadow: 0 0 0 2px #fff;
}

/* ===== Category row ===== */
.mp-cats {
  background: #fff;
  border-bottom: 1px solid var(--mp-border);
  box-shadow: 0 1px 0 rgba(0,0,0,.02);
}
.mp-cats-inner {
  max-width: var(--mp-max); margin: 0 auto; padding: 0 8px;
  display: flex; gap: 0; overflow-x: auto; scrollbar-width: thin;
}
.mp-cats a {
  flex: 0 0 auto; padding: 13px 14px;
  text-decoration: none; color: var(--mp-text);
  font-size: 13px; font-weight: 600; white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: color .12s, border-color .12s;
}
.mp-cats a:first-child { font-weight: 800; }
.mp-cats a:hover, .mp-cats a.active {
  color: var(--mp-orange);
  border-bottom-color: var(--mp-orange);
}

/* ===== Shell ===== */
.mp-wrap {
  max-width: var(--mp-max);
  margin: 0 auto;
  padding: 16px;
}
.mp-flash { margin-bottom: 12px; }
.flash {
  padding: 12px 14px; border-radius: 8px; font-size: 14px; font-weight: 600;
  background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0;
}
.flash-error, .flash-danger { background: #FEF2F2; color: #991B1B; border-color: #FECACA; }
.flash-info { background: #EFF6FF; color: #1E40AF; border-color: #BFDBFE; }

/* ===== Hero carousel ===== */
.mp-hero {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
  background: var(--vx-indigo);
  min-height: 280px;
}
.mp-hero-track {
  display: flex;
  transition: transform .45s ease;
}
.mp-hero-slide {
  min-width: 100%;
  padding: 48px 56px;
  color: #fff;
  display: flex; flex-direction: column; justify-content: center;
  min-height: 280px;
  text-decoration: none;
  background-size: cover;
  background-position: center;
}
.mp-hero-slide h2 {
  margin: 0 0 10px; font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; letter-spacing: -.02em;
  max-width: 520px;
}
.mp-hero-slide p { margin: 0 0 18px; opacity: .92; font-size: 15px; max-width: 440px; }
.mp-hero-a { background: linear-gradient(120deg, #1B2A4A 0%, #2F4A7A 45%, #00A89E 120%); }
.mp-hero-b { background: linear-gradient(120deg, #5B1FA8 0%, #F27A1A 100%); }
.mp-hero-c { background: linear-gradient(120deg, #0B3D2E 0%, #0A9B4A 60%, #F27A1A 140%); }
.mp-hero-dots {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px; z-index: 2;
}
.mp-hero-dots button {
  width: 8px; height: 8px; border-radius: 999px; border: 0;
  background: rgba(255,255,255,.45); cursor: pointer; padding: 0;
}
.mp-hero-dots button.on { background: #fff; width: 22px; }

.mp-promo-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.mp-promo {
  background: #fff;
  border: 1px solid var(--mp-border);
  border-radius: 10px;
  padding: 16px 18px;
  display: flex; align-items: center; gap: 12px;
  text-decoration: none;
  transition: box-shadow .15s;
}
.mp-promo:hover { box-shadow: var(--mp-shadow); }
.mp-promo-ico {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; background: var(--mp-orange-soft); flex-shrink: 0;
}
.mp-promo strong { display: block; font-size: 13px; color: var(--vx-indigo); }
.mp-promo span { font-size: 12px; color: var(--mp-muted); }

/* ===== Sections ===== */
.mp-section { margin-bottom: 28px; }
.mp-section-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px; gap: 12px;
}
.mp-section-head h2 {
  margin: 0; font-size: 1.2rem; color: var(--vx-indigo); font-weight: 800;
  display: flex; align-items: center; gap: 10px;
}
.mp-section-head a {
  color: var(--mp-orange); text-decoration: none; font-weight: 700; font-size: 13px;
}
.mp-flash-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--mp-danger); color: #fff;
  font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 4px;
  letter-spacing: .02em; text-transform: uppercase;
}
.mp-countdown {
  font-variant-numeric: tabular-nums;
  background: #1B1B1B; color: #fff;
  font-size: 12px; font-weight: 700;
  padding: 4px 8px; border-radius: 4px;
}

/* ===== Product grid / cards ===== */
.mp-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}
.mp-grid-5 { grid-template-columns: repeat(5, 1fr); }
.mp-card {
  background: var(--mp-card);
  border: 1px solid var(--mp-border);
  border-radius: var(--mp-radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex; flex-direction: column;
  transition: box-shadow .15s ease, border-color .15s;
  position: relative;
}
.mp-card:hover {
  box-shadow: var(--mp-shadow-hover);
  border-color: #ddd;
}
.mp-card-img {
  aspect-ratio: 1;
  background: linear-gradient(145deg, #EEF2FF 0%, #F8FAFC 50%, #ECFEFF 100%);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  position: relative;
}
.mp-card-img img { width: 100%; height: 100%; object-fit: cover; }
.mp-ph {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; color: var(--vx-indigo); opacity: .45; user-select: none;
}
.mp-ph .ph-ico { font-size: 36px; line-height: 1; }
.mp-ph .ph-letter { font-size: 28px; font-weight: 800; }
.mp-badge-free {
  position: absolute; left: 8px; bottom: 8px;
  background: var(--mp-free); color: #fff;
  font-size: 10px; font-weight: 700;
  padding: 3px 7px; border-radius: 3px; z-index: 1;
}
.mp-badge-disc {
  position: absolute; top: 8px; left: 8px;
  background: var(--mp-orange); color: #fff;
  font-size: 11px; font-weight: 800;
  padding: 3px 7px; border-radius: 3px; z-index: 1;
}
.mp-card-body {
  padding: 10px 12px 12px;
  display: flex; flex-direction: column; gap: 4px; flex: 1;
}
.mp-brand {
  font-size: 11px; color: var(--mp-muted); font-weight: 700;
  text-transform: uppercase; letter-spacing: .03em;
}
.mp-title {
  font-size: 13px; font-weight: 500; line-height: 1.35; color: var(--mp-text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 2.7em; text-decoration: none;
}
.mp-title:hover { color: var(--mp-orange); }
.mp-stars { color: var(--mp-star); font-size: 12px; letter-spacing: 0.5px; }
.mp-stars span { color: var(--mp-muted); font-size: 11px; margin-left: 4px; letter-spacing: 0; }
.mp-price-row { margin-top: auto; padding-top: 6px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; }
.mp-price {
  font-size: 18px; font-weight: 800; color: var(--mp-text);
  letter-spacing: -.02em;
}
.mp-price.accent { color: var(--mp-orange); }
.mp-old {
  font-size: 12px; color: var(--mp-muted); text-decoration: line-through;
}
.mp-card-cta { margin-top: 8px; }
.mp-btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 6px; font-weight: 700; cursor: pointer;
  text-decoration: none; font-size: 13px; padding: 10px 16px;
  font-family: inherit; transition: background .12s, color .12s;
}
.mp-btn-orange { background: var(--mp-orange); color: #fff; }
.mp-btn-orange:hover { background: var(--mp-orange-dark); }
.mp-btn-purple { background: var(--mp-purple); color: #fff; }
.mp-btn-ghost {
  background: #fff; color: var(--vx-indigo);
  border: 1px solid var(--mp-border);
}
.mp-btn-ghost:hover { border-color: var(--mp-orange); color: var(--mp-orange); }
.mp-btn-block { width: 100%; }
.mp-btn-lg { padding: 14px 20px; font-size: 15px; }
.mp-btn-sm { padding: 7px 12px; font-size: 12px; }

/* Filters */
.mp-filters {
  background: #fff; border: 1px solid var(--mp-border);
  border-radius: 10px; padding: 12px 14px; margin-bottom: 16px;
  display: grid; grid-template-columns: 2fr 1.2fr 1.2fr 1fr 1fr auto;
  gap: 10px; align-items: end;
}
.mp-filters label {
  display: block; font-size: 11px; color: var(--mp-muted);
  margin-bottom: 4px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}
.mp-filters input, .mp-filters select {
  width: 100%; padding: 9px 11px; border: 1px solid var(--mp-border);
  border-radius: 6px; font-size: 13px; font-family: inherit; background: #fff;
}
.mp-filters input:focus, .mp-filters select:focus {
  outline: 2px solid #F27A1A55; border-color: var(--mp-orange);
}

/* PDP */
.mp-pdp {
  display: grid; grid-template-columns: 1fr 1fr; gap: 28px;
  background: #fff; border: 1px solid var(--mp-border);
  border-radius: 12px; padding: 24px;
}
.mp-gallery-main {
  aspect-ratio: 1; border-radius: 10px; overflow: hidden;
  background: linear-gradient(145deg, #EEF2FF, #ECFEFF);
  display: flex; align-items: center; justify-content: center;
}
.mp-gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.mp-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.mp-thumbs img {
  width: 68px; height: 68px; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--mp-border); cursor: pointer;
}
.mp-buybox h1 { margin: 0 0 8px; font-size: 1.4rem; line-height: 1.3; font-weight: 700; }
.mp-buybox .mp-price { font-size: 28px; color: var(--mp-orange); }
.mp-variants { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.mp-variant {
  border: 1px solid var(--mp-border); background: #fff;
  border-radius: 999px; padding: 8px 14px; font-size: 13px; cursor: pointer;
}
.mp-variant input { display: none; }
.mp-variant:has(input:checked), .mp-variant.active {
  border-color: var(--mp-orange); color: var(--mp-orange); font-weight: 700;
  background: var(--mp-orange-soft);
}
.mp-qty {
  display: inline-flex; align-items: center; border: 1px solid var(--mp-border);
  border-radius: 8px; overflow: hidden; margin: 12px 0;
}
.mp-qty input {
  width: 56px; border: 0; text-align: center; padding: 10px 0;
  font-size: 15px; font-weight: 700; font-family: inherit;
}
.mp-sticky-cart { display: none; }
.mp-tabs { margin-top: 20px; background: #fff; border: 1px solid var(--mp-border); border-radius: 12px; }
.mp-tab-nav { display: flex; border-bottom: 1px solid var(--mp-border); overflow-x: auto; }
.mp-tab-nav a {
  padding: 14px 18px; text-decoration: none; color: var(--mp-muted);
  font-weight: 700; font-size: 14px; border-bottom: 2px solid transparent; white-space: nowrap;
}
.mp-tab-nav a.active { color: var(--vx-indigo); border-bottom-color: var(--mp-orange); }
.mp-tab-panel { display: none; padding: 18px; font-size: 14px; line-height: 1.6; color: #333; }
.mp-tab-panel.active { display: block; }
.mp-thumbs img { cursor: pointer; }

/* Cart / checkout */
.mp-steps { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.mp-step {
  flex: 1; min-width: 120px; background: #fff; border: 1px solid var(--mp-border);
  border-radius: 8px; padding: 10px 12px; font-size: 13px; font-weight: 700;
  color: var(--mp-muted); text-align: center;
}
.mp-step.active { border-color: var(--mp-orange); color: var(--mp-orange); background: var(--mp-orange-soft); }
.mp-step.done { border-color: var(--mp-free); color: var(--mp-free); }
.mp-cart-layout { display: grid; grid-template-columns: 1.55fr 1fr; gap: 16px; }
.mp-line {
  display: grid; grid-template-columns: 80px 1fr auto; gap: 14px;
  padding: 16px 0; border-bottom: 1px solid var(--mp-border); align-items: center;
}
.mp-line-thumb {
  width: 80px; height: 80px; border-radius: 8px;
  background: linear-gradient(145deg, #EEF2FF, #ECFEFF);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; opacity: .5;
}
.mp-summary {
  background: #fff; border: 1px solid var(--mp-border); border-radius: 12px;
  padding: 18px; position: sticky; top: 88px; height: fit-content;
}
.mp-summary .row { display: flex; justify-content: space-between; margin: 8px 0; font-size: 14px; }
.mp-summary .total { font-size: 18px; font-weight: 800; color: var(--vx-indigo); margin-top: 8px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.field label { display: block; font-size: 12px; font-weight: 700; color: var(--mp-muted); margin-bottom: 4px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--mp-border);
  border-radius: 6px; font-size: 14px; font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid #F27A1A55; border-color: var(--mp-orange);
}

/* Footer */
.mp-footer {
  margin-top: 48px; background: #1A1A2E; color: #A0AEC0;
  padding: 40px 16px 20px; font-size: 13px;
}
.mp-footer-inner {
  max-width: var(--mp-max); margin: 0 auto;
  display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px;
}
.mp-footer h4 { color: #fff; margin: 0 0 12px; font-size: 14px; font-weight: 700; }
.mp-footer a { color: #94A3B8; text-decoration: none; display: block; margin: 6px 0; }
.mp-footer a:hover { color: var(--vx-cyan); }
.mp-footer p { margin: 0 0 8px; line-height: 1.5; }
.mp-pay-icons {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px;
}
.mp-pay-ico {
  background: #fff; color: var(--vx-indigo); font-size: 10px; font-weight: 800;
  padding: 6px 10px; border-radius: 4px; letter-spacing: .04em;
}
.mp-footer-bottom {
  max-width: var(--mp-max); margin: 28px auto 0; padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.1); text-align: center;
  color: #64748B; font-size: 12px;
}
.mp-trust {
  display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; font-size: 12px; color: #94A3B8;
}

/* Empty */
.mp-empty {
  background: #fff; border: 1px dashed var(--mp-border); border-radius: 12px;
  padding: 56px 24px; text-align: center;
}
.mp-empty h2 { margin: 0 0 8px; color: var(--vx-indigo); }
.mp-empty p { color: var(--mp-muted); margin: 0 0 18px; }

/* Responsive */
@media (max-width: 1100px) {
  .mp-grid { grid-template-columns: repeat(4, 1fr); }
  .mp-grid-5 { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 900px) {
  .mp-header-inner { grid-template-columns: 1fr; gap: 12px; }
  .mp-logo { justify-content: flex-start; }
  .mp-actions { justify-content: space-around; }
  .mp-promo-row { grid-template-columns: 1fr; }
  .mp-filters { grid-template-columns: 1fr 1fr; }
  .mp-pdp { grid-template-columns: 1fr; }
  .mp-cart-layout { grid-template-columns: 1fr; }
  .mp-footer-inner { grid-template-columns: 1fr 1fr; }
  .mp-grid, .mp-grid-5 { grid-template-columns: repeat(2, 1fr); }
  .mp-hero-slide { padding: 32px 24px; min-height: 220px; }
  .mp-sticky-cart {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 220;
    background: #fff; border-top: 1px solid var(--mp-border);
    padding: 10px 12px; gap: 10px; box-shadow: 0 -4px 20px rgba(0,0,0,.08);
  }
  body.sf-body { padding-bottom: 72px; }
}
@media (max-width: 480px) {
  .mp-grid, .mp-grid-5 { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .mp-footer-inner { grid-template-columns: 1fr; }
}
