/* DRUVO UK — premium dark marketplace theme */
:root {
  --bg-base: #07080f;
  --bg-elevated: #0f1220;
  --bg-card: #141829;
  --bg-input: #1a1f33;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f4f6fb;
  --text-muted: #9aa3b8;
  --accent: #7c5cff;
  --accent-hover: #9278ff;
  --accent-blue: #3b82f6;
  --success: #22c55e;
  --danger: #ef4444;
  --sale: #f59e0b;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --max-width: 1200px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: radial-gradient(ellipse at top, #12162a 0%, var(--bg-base) 55%);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.container { width: min(var(--max-width), calc(100% - 2rem)); margin: 0 auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(16px);
  background: rgba(7, 8, 15, 0.85);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 0;
}
.logo {
  font-size: 1.35rem; font-weight: 800; letter-spacing: 0.04em;
  background: linear-gradient(135deg, #fff, var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nav-desktop { display: none; gap: 1.25rem; margin-left: 1rem; flex: 1; }
.nav-desktop a { color: var(--text-muted); font-size: 0.95rem; }
.nav-desktop a:hover, .nav-desktop a.active { color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 0.75rem; margin-left: auto; }
.search-form { display: none; position: relative; }
.search-form input {
  width: 220px; padding: 0.6rem 0.9rem; border-radius: 999px;
  border: 1px solid var(--border); background: var(--bg-input); color: var(--text);
}
.icon-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--bg-card); color: var(--text);
  cursor: pointer;
}
.cart-count {
  position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px;
  border-radius: 999px; background: var(--accent); color: #fff;
  font-size: 0.7rem; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.menu-toggle { display: inline-flex; }
.mobile-nav {
  display: none; flex-direction: column; gap: 0.75rem;
  padding: 0 0 1rem; border-top: 1px solid var(--border);
}
.mobile-nav.open { display: flex; }
.mobile-nav a { padding: 0.5rem 0; color: var(--text-muted); }

@media (max-width: 599px) {
  .header-inner { flex-wrap: wrap; }
  .search-form { display: flex !important; width: 100%; order: 3; }
  .search-form input { width: 100%; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem; }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cart-item { grid-template-columns: 64px 1fr; }
  .cart-item > div:last-child { grid-column: 2; }
  .hero-actions .btn { flex: 1 1 100%; }
}

@media (min-width: 900px) {
  .nav-desktop, .search-form { display: flex; }
  .menu-toggle { display: none; }
  .mobile-nav { display: none !important; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 1.25rem; border-radius: 999px; border: none; cursor: pointer;
  font-weight: 600; transition: transform 0.15s, background 0.15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-blue)); color: #fff; }
.btn-secondary { background: var(--bg-card); color: var(--text); border: 1px solid var(--border); }
.btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Hero */
.hero {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2rem, 4vw, 3rem);
  display: grid; gap: 2rem; align-items: center;
}
.hero-copy h1 { font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.05; margin: 0 0 1rem; }
.hero-copy p { color: var(--text-muted); font-size: 1.05rem; max-width: 540px; margin: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.hero-card {
  border-radius: calc(var(--radius) + 6px); overflow: hidden;
  border: 1px solid var(--border); box-shadow: var(--shadow);
  min-height: 280px; max-height: 520px; background: var(--bg-card);
}
.hero-card img { width: 100%; height: 100%; min-height: 280px; object-fit: cover; }

@media (min-width: 900px) {
  .hero { grid-template-columns: 1.05fr 0.95fr; gap: 2.5rem; }
  .hero-card { min-height: 420px; }
}

/* Sections */
.section { padding: clamp(2.5rem, 5vw, 3.5rem) 0; }
.section + .section { border-top: 1px solid var(--border); }
.section-head {
  display: flex; align-items: end; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.75rem;
}
.section-head h2 { margin: 0; font-size: clamp(1.35rem, 2.5vw, 1.6rem); }
.section-head p { margin: 0.25rem 0 0; color: var(--text-muted); font-size: 0.95rem; }
.link-arrow { color: var(--accent); font-weight: 600; white-space: nowrap; }

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: 1.25rem;
}
.product-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex; flex-direction: column; height: 100%;
}
.product-card a { display: flex; flex-direction: column; height: 100%; }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.product-card-image {
  aspect-ratio: 4/5; overflow: hidden; background: #0a0d18;
  position: relative; flex-shrink: 0;
}
.product-card-image img {
  width: 100%; height: 100%; object-fit: cover; object-position: center top;
}
.product-card-image img.is-placeholder { object-fit: contain; padding: 1.5rem; background: #0a0d18; }
.product-card-body {
  padding: 1rem 1rem 1.15rem; display: flex; flex-direction: column;
  flex: 1; gap: 0.35rem;
}
.product-card-body h3 {
  margin: 0; font-size: 1rem; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 2.7em;
}
.product-meta { color: var(--text-muted); font-size: 0.85rem; margin: 0; }
.price-row { display: flex; align-items: center; gap: 0.5rem; margin-top: auto; }
.price { font-weight: 700; }
.price-was { color: var(--text-muted); text-decoration: line-through; font-size: 0.9rem; }
.badge {
  display: inline-block; padding: 0.2rem 0.55rem; border-radius: 999px;
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
}
.badge-new { background: rgba(59,130,246,0.15); color: #93c5fd; }
.badge-sale { background: rgba(245,158,11,0.15); color: #fcd34d; }
.badge-oos { background: rgba(239,68,68,0.15); color: #fca5a5; }
.card-badges { position: absolute; top: 0.75rem; left: 0.75rem; display: flex; gap: 0.35rem; }

/* Category cards */
.category-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem;
}
.category-card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  min-height: 200px; border: 1px solid var(--border);
}
.category-card img {
  width: 100%; height: 100%; object-fit: cover; min-height: 200px;
}
.category-card img.is-placeholder { object-fit: contain; padding: 2rem; background: #0a0d18; }
.category-card span {
  position: absolute; inset: auto 0 0 0; padding: 1rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.85)); font-weight: 700;
}

/* Shop layout */
.shop-layout { display: grid; gap: 1.5rem; padding: 2rem 0 3rem; }
.filters {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem;
}
.filters h3 { margin: 0 0 1rem; font-size: 1rem; }
.filter-group { margin-bottom: 1rem; }
.filter-group label { display: block; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.35rem; }
.filter-group select, .filter-group input {
  width: 100%; padding: 0.65rem 0.75rem; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg-input); color: var(--text);
}
.filter-check { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.5rem; }

@media (min-width: 900px) {
  .shop-layout { grid-template-columns: 260px 1fr; align-items: start; }
  .filters { position: sticky; top: 88px; }
}

/* Product detail */
.product-detail { display: grid; gap: 2rem; padding: 2rem 0 3rem; }
.gallery-main {
  aspect-ratio: 4/5; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); background: var(--bg-card);
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 0.75rem; margin-top: 0.75rem; }
.gallery-thumbs button {
  width: 72px; height: 90px; border-radius: 10px; overflow: hidden;
  border: 2px solid transparent; padding: 0; cursor: pointer; background: none;
}
.gallery-thumbs button.active { border-color: var(--accent); }
.product-info h1 { margin: 0 0 0.5rem; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.product-info .lead { color: var(--text-muted); margin-bottom: 1rem; }
.variant-group { margin: 1.25rem 0; }
.variant-group label { display: block; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.variant-options { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.variant-btn {
  padding: 0.55rem 0.9rem; border-radius: 999px; border: 1px solid var(--border);
  background: var(--bg-input); color: var(--text); cursor: pointer;
}
.variant-btn.active { border-color: var(--accent); background: rgba(124,92,255,0.15); }
.variant-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.qty-row { display: flex; align-items: center; gap: 0.75rem; margin: 1.25rem 0; }
.qty-control {
  display: inline-flex; align-items: center; border: 1px solid var(--border);
  border-radius: 999px; overflow: hidden;
}
.qty-control button, .qty-control input {
  border: none; background: var(--bg-input); color: var(--text);
  width: 40px; height: 40px; text-align: center;
}
.qty-control input { width: 48px; }
.stock-note { font-size: 0.9rem; color: var(--text-muted); }
.stock-note.in-stock { color: var(--success); }

@media (min-width: 900px) {
  .product-detail { grid-template-columns: 1fr 1fr; }
}

/* Cart & checkout */
.page-header { padding: 2rem 0 1rem; }
.page-header h1 { margin: 0; font-size: 2rem; }
.cart-layout, .checkout-layout {
  display: grid; gap: 1.5rem; padding-bottom: 3rem;
}
.summary-card, .content-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem;
}
.cart-item {
  display: grid; grid-template-columns: 80px 1fr auto; gap: 1rem;
  padding: 1rem 0; border-bottom: 1px solid var(--border);
}
.cart-item img { width: 80px; height: 100px; object-fit: cover; border-radius: 10px; background: #0a0d18; }
.cart-item img.is-placeholder { object-fit: contain; padding: 0.35rem; }
.cart-qty-row { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin: 0.5rem 0; }
.cart-qty-row .qty-control input { width: 44px; font-size: 0.9rem; }
.summary-row { display: flex; justify-content: space-between; margin: 0.5rem 0; color: var(--text-muted); }
.summary-row.total { color: var(--text); font-weight: 700; font-size: 1.1rem; margin-top: 1rem; }
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-muted); }
.form-grid { display: grid; gap: 1rem; }
.form-grid.two { grid-template-columns: 1fr; }
.form-field label { display: block; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.35rem; }
.form-field input, .form-field textarea, .form-field select {
  width: 100%; padding: 0.75rem; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg-input); color: var(--text);
}
.notice {
  padding: 1rem; border-radius: 12px; border: 1px solid rgba(124,92,255,0.35);
  background: rgba(124,92,255,0.08); color: #ddd6fe; margin: 1rem 0;
}

@media (min-width: 900px) {
  .cart-layout, .checkout-layout { grid-template-columns: 1.2fr 0.8fr; align-items: start; }
  .form-grid.two { grid-template-columns: 1fr 1fr; }
}

/* Legal / content pages */
.prose { max-width: 760px; margin: 0 auto; padding: 2rem 0 3rem; }
.prose h1 { margin-top: 0; }
.prose h2 { margin-top: 2rem; font-size: 1.2rem; }
.prose p, .prose li { color: #d6dbe8; }
.prose a { color: #a78bfa; text-decoration: underline; }

/* Footer */
.site-footer {
  margin-top: auto; border-top: 1px solid var(--border);
  background: rgba(10, 12, 22, 0.95); padding: 3rem 0 1.5rem;
}
.footer-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 2rem;
}
.footer-grid h4 { margin: 0 0 0.75rem; font-size: 0.95rem; }
.footer-grid a, .footer-grid p { display: block; color: var(--text-muted); font-size: 0.9rem; margin: 0.35rem 0; }
.footer-grid a:hover { color: var(--text); }
.footer-bottom {
  margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--border);
  color: var(--text-muted); font-size: 0.85rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem;
}

/* Account */
.account-grid { display: grid; gap: 1rem; padding-bottom: 3rem; }
.order-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem;
}
.order-card header { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }


/* DRUVO Chat */
.druvo-chat-root {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 1200;
}
.druvo-chat-launcher {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 1.1rem; border-radius: 999px; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--accent-blue));
  color: #fff; font-weight: 600; box-shadow: 0 12px 32px rgba(124, 92, 255, 0.35);
}
.druvo-chat-launcher:hover { filter: brightness(1.05); }
.druvo-chat-launcher-label { font-size: 0.9rem; }
.druvo-chat-panel {
  position: absolute; right: 0; bottom: calc(100% + 0.75rem);
  width: min(380px, calc(100vw - 2rem)); height: min(520px, calc(100vh - 6rem));
  display: flex; flex-direction: column;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px); box-shadow: 0 20px 50px rgba(0,0,0,0.45);
  overflow: hidden;
}
.druvo-chat-header {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 0.75rem;
  padding: 1rem 1rem 0.75rem; border-bottom: 1px solid var(--border);
  background: rgba(124, 92, 255, 0.08);
}
.druvo-chat-header h2 { margin: 0; font-size: 1rem; }
.druvo-chat-subtitle { margin: 0.2rem 0 0; font-size: 0.8rem; color: var(--text-muted); }
.druvo-chat-close { color: var(--text-muted); }
.druvo-chat-messages {
  flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 0.65rem;
}
.druvo-chat-bubble {
  max-width: 88%; padding: 0.75rem 0.9rem; border-radius: 14px; font-size: 0.92rem; line-height: 1.45;
}
.druvo-chat-bubble--assistant {
  align-self: flex-start; background: var(--bg-card); border: 1px solid var(--border); color: var(--text);
}
.druvo-chat-bubble--user {
  align-self: flex-end; background: linear-gradient(135deg, var(--accent), var(--accent-blue)); color: #fff;
}
.druvo-chat-typing { opacity: 0.7; font-style: italic; }
.druvo-chat-form {
  display: grid; grid-template-columns: 1fr auto; gap: 0.5rem;
  padding: 0.75rem; border-top: 1px solid var(--border); background: var(--bg-card);
}
.druvo-chat-form textarea {
  resize: none; min-height: 42px; max-height: 120px;
  padding: 0.65rem 0.75rem; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg-input); color: var(--text);
  font-family: inherit; font-size: 0.9rem;
}
.druvo-chat-send { padding: 0.65rem 1rem; white-space: nowrap; }

@media (max-width: 640px) {
  .druvo-chat-root { right: 0.75rem; bottom: 0.75rem; left: 0.75rem; }
  .druvo-chat-launcher-label { display: none; }
  .druvo-chat-panel {
    position: fixed; inset: 0; width: 100%; height: 100%; max-height: none;
    border-radius: 0; bottom: 0;
  }
  .druvo-chat-root.druvo-chat-open .druvo-chat-launcher { display: none; }
  .druvo-chat-launcher { position: fixed; right: 0.75rem; bottom: 0.75rem; z-index: 1201; }
}

