/* ============================================================
   johnQ Trading – Main Stylesheet
   ============================================================ */

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 300;
  color: #b8c5d3;
  background: #0d1822;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ---------- Layout ---------- */
.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Accent / Brand colour ---------- */
.accent           { color: #c86567; }
.q-prefix         { color: #c86567; }
.section-heading  { color: #c86567; font-size: 1.75rem; font-weight: 400; margin-bottom: 28px; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #0d1822;
  border-bottom: 1px solid #1f2a36;
  box-shadow: 0 1px 0 rgba(0,0,0,.3);
}

.header-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 24px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  text-decoration: none;
}
.logo-img { width: 36px; height: 36px; object-fit: contain; }
.logo-text {
  font-size: 1.1rem;
  font-weight: 500;
  color: #e6ecf2;
  white-space: nowrap;
}
.logo-john { color: #c86567; }

/* Nav */
.main-nav { margin-left: auto; }
.main-nav ul { display: flex; gap: 4px; align-items: center; }
.main-nav a {
  display: block;
  padding: 6px 12px;
  font-size: 0.9rem;
  color: #b8c5d3;
  border-radius: 3px;
  transition: color .15s;
  white-space: nowrap;
}
.main-nav a:hover, .main-nav a.active { color: #c86567; text-decoration: none; }

/* Dropdown */
.nav-more { position: relative; }
.dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: #1c2935;
  border: 1px solid #2a3744;
  box-shadow: 0 4px 12px rgba(0,0,0,.4);
  min-width: 140px;
  border-radius: 4px;
  z-index: 200;
}
.dropdown li a { padding: 10px 16px; font-size: 0.875rem; }
.nav-more:hover .dropdown { display: block; }

/* Header right */
.header-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

.social-icon {
  color: #b8c5d3;
  display: flex;
  align-items: center;
  transition: color .15s;
}
.social-icon:hover { color: #c86567; text-decoration: none; }

.btn-login {
  padding: 7px 20px;
  border: 1px solid #c86567;
  color: #c86567;
  border-radius: 3px;
  font-size: 0.875rem;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.btn-login:hover { background: #c86567; color: #fff; text-decoration: none; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #b8c5d3;
  border-radius: 2px;
  transition: .2s;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  background: linear-gradient(135deg, #0f1923 0%, #18242f 100%);
  color: #fff;
  padding: 72px 0 64px;
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-bg svg { width: 100%; height: 100%; display: block; }
.hero-content { position: relative; z-index: 1; max-width: 820px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
  color: #b8c5d3; margin-bottom: 22px; font-weight: 500;
}
.eyebrow-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #c86567; box-shadow: 0 0 10px rgba(200,101,103,.6);
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 300; line-height: 1.15; letter-spacing: -.02em;
  color: #fff; margin-bottom: 20px;
}
.hero h1 .accent { color: #c86567; font-weight: 400; }

.hero-sub {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  color: #9eadbd; max-width: 560px; margin-bottom: 36px; font-weight: 300;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: 6px;
  font-size: .92rem; font-weight: 500;
  transition: transform .15s, background .15s, border-color .15s;
  text-decoration: none;
}
.btn-primary { background: #c86567; color: #fff; border: 1px solid #c86567; }
.btn-primary:hover { background: #b85356; transform: translateY(-1px); text-decoration: none; }

.btn-ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.25); }
.btn-ghost:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.4); text-decoration: none; }

.btn-play {
  width: 0; height: 0; border-style: solid;
  border-width: 5px 0 5px 8px;
  border-color: transparent transparent transparent currentColor;
}

.hero-trust { font-size: .8rem; color: #6b7a8a; }

@media (max-width: 600px) {
  .hero { padding: 48px 0 44px; }
  .btn { padding: 12px 22px; }
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: 48px 0; }
.section:nth-child(even) { background: #14202b; }

/* ============================================================
   PRODUCTS
   ============================================================ */
.products-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px 48px;
}

.product-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #1c2935;
  border: 1px solid #2a3744;
  border-radius: 8px;
  padding: 16px;
  transition: border-color .2s, transform .2s;
}
.product-card:hover { border-color: #3a4858; transform: translateY(-2px); }

/* Media */
.product-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* YouTube thumbnail link */
.yt-thumb-link {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  text-decoration: none;
}
.yt-thumb-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.yt-thumb-link:hover .play-btn { background: rgba(200,0,0,.95); }

/* Video placeholder (YouTube embed on click) */
.video-placeholder {
  position: relative;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.video-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 40px;
  background: rgba(180, 0, 0, .9);
  border-radius: 10px;
  pointer-events: none;
}
.play-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 55%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 9px 0 9px 18px;
  border-color: transparent transparent transparent #fff;
}
.yt-badge {
  position: absolute;
  bottom: 8px;
  right: 10px;
  background: rgba(0,0,0,.6);
  color: #fff;
  font-size: 0.7rem;
  padding: 3px 7px;
  border-radius: 3px;
}

/* Info */
.product-name {
  font-size: 1rem;
  font-weight: 500;
  color: #e6ecf2;
  margin-top: 4px;
}
.product-info p { font-size: 0.9rem; color: #b8c5d3; line-height: 1.6; }
.link-more {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.875rem;
  color: #c86567;
  font-weight: 400;
}
.link-more:hover { text-decoration: underline; }

.coming-soon-tag { font-size: 0.8rem; color: #6b7a8a; font-weight: 300; }

/* ============================================================
   ABOUT
   ============================================================ */
.about-section p { margin-bottom: 14px; font-size: 0.95rem; }
.about-section a { color: #c86567; }
.about-section a:hover { text-decoration: underline; }
.about-section .btn-subscribe { color: #fff; }
.about-section .btn-subscribe:hover { text-decoration: none; }

.subscribe-wrap { margin-top: 28px; }
.btn-subscribe {
  display: inline-block;
  padding: 11px 36px;
  background: #c86567;
  color: #fff;
  border-radius: 30px;
  font-size: 0.95rem;
  font-weight: 400;
  transition: background .15s;
}
.btn-subscribe:hover { background: #b55558; text-decoration: none; }
.subscribe-note {
  margin-top: 12px;
  font-size: 0.8rem;
  color: #9eadbd;
}
.subscribe-legal {
  margin-top: 6px;
  font-size: 0.75rem;
  color: #6b7a8a;
}
.subscribe-legal a { color: #9eadbd; }

/* ============================================================
   RESOURCES
   ============================================================ */
.resources-section p { font-size: 0.95rem; }
.resources-section a { color: #c86567; }

/* ============================================================
   RESOURCES LOGOS
   ============================================================ */
.resources-logos {
  display: flex;
  align-items: center;
  gap: 48px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.resources-logos a { display: flex; align-items: center; }
.resources-logos img {
  height: 48px;
  width: auto;
  object-fit: contain;
  opacity: .85;
  transition: opacity .15s;
}
.resources-logos a:hover img { opacity: 1; }

/* ============================================================
   RISK DISCLOSURE
   ============================================================ */
.disclosure-section { background: #0d1822; }
.disclosure-heading {
  font-size: 1rem;
  font-weight: 600;
  color: #e6ecf2;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.disclosure-body {
  font-size: 0.78rem;
  color: #9eadbd;
  line-height: 1.7;
}
.disclosure-body p { margin-bottom: 12px; }
.disclosure-body ol {
  list-style: decimal;
  padding-left: 20px;
  margin-bottom: 12px;
}
.disclosure-body ol li { margin-bottom: 8px; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: #0a1218;
  color: #b8c5d3;
  padding: 32px 0;
  border-top: 1px solid #1f2a36;
}
.footer-inner { text-align: center; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  margin-bottom: 16px;
}
.footer-links a {
  color: #b8c5d3;
  font-size: 0.8rem;
  transition: color .15s;
}
.footer-links a:hover { color: #fff; text-decoration: none; }
.footer-copy { font-size: 0.75rem; color: #6b7a8a; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: #0d1822;
    border-top: 1px solid #1f2a36;
    padding: 12px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,.4);
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav a { padding: 12px 24px; border-radius: 0; font-size: 1rem; }
  .dropdown {
    display: none !important; /* flatten on mobile */
  }
  .nav-toggle { display: flex; }

  .products-grid { grid-template-columns: 1fr; }

  .hero h1 { font-size: 1.3rem; }
}

@media (max-width: 480px) {
  .header-inner { padding: 0 16px; }
  .container { padding: 0 16px; }
  .btn-login { display: none; }
}

/* ============================================================
   SHOP PRODUCT (PURCHASE) PAGE
   ============================================================ */
.shop-breadcrumb {
  display: flex;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid #2a3744;
  font-size: .85rem;
  color: #6b7a8a;
}
.shop-breadcrumb a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #b8c5d3;
}
.shop-breadcrumb a:hover { color: #c86567; text-decoration: none; }
.shop-breadcrumb .crumb-sep { margin: 0 10px; color: #2a3744; }
.shop-breadcrumb .crumb-current { color: #6b7a8a; }

.shop-product {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
  padding: 40px 0 16px;
}
.shop-product-gallery {
  background: #0a1218;
  border: 1px solid #2a3744;
  border-radius: 8px;
  overflow: hidden;
}
.shop-product-gallery img { width: 100%; display: block; }

.shop-product-eyebrow {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: #6b7a8a;
  margin-bottom: 12px;
  font-weight: 500;
}
.shop-product-title {
  font-size: 2.2rem;
  font-weight: 400;
  color: #e6ecf2;
  letter-spacing: -.01em;
  margin-bottom: 14px;
}
.shop-product-title .q-prefix { color: #c86567; }
.shop-product-price {
  font-size: 2rem;
  color: #c86567;
  font-weight: 500;
  margin-bottom: 18px;
}
.shop-product-blurb {
  font-size: 1rem;
  color: #b8c5d3;
  line-height: 1.7;
  margin-bottom: 24px;
}
.trial-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(86, 188, 138, .08);
  border: 1px solid rgba(86, 188, 138, .35);
  border-radius: 6px;
  font-size: .88rem;
  color: #e6ecf2;
  line-height: 1.55;
  margin-bottom: 24px;
}
.trial-banner svg { flex-shrink: 0; color: #5fc78f; margin-top: 2px; }
.trial-banner code {
  background: rgba(86, 188, 138, .18);
  color: #5fc78f;
  padding: 2px 8px;
  border-radius: 3px;
  font-family: Consolas, 'SF Mono', monospace;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .03em;
}
.shop-product-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}
.qty-selector {
  display: flex;
  align-items: center;
  background: #1c2935;
  border: 1px solid #2a3744;
  border-radius: 6px;
  overflow: hidden;
}
.qty-selector button {
  background: transparent;
  border: none;
  color: #b8c5d3;
  font-size: 1.1rem;
  width: 38px;
  height: 46px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.qty-selector button:hover { background: #2a3744; color: #e6ecf2; }
.qty-selector .qty-value {
  min-width: 36px;
  text-align: center;
  color: #e6ecf2;
  font-weight: 500;
  font-size: .95rem;
}
.btn-add-cart {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 24px;
  background: #c86567;
  color: #fff;
  border-radius: 6px;
  font-size: .95rem;
  font-weight: 500;
  text-decoration: none;
  transition: background .15s, transform .15s;
  height: 46px;
}
.btn-add-cart:hover { background: #b85356; transform: translateY(-1px); text-decoration: none; }
.more-details-link {
  display: inline-block;
  font-size: .88rem;
  color: #c86567;
  margin-bottom: 28px;
}
.more-details-link:hover { text-decoration: underline; }

.shop-product-specs {
  border-top: 1px solid #2a3744;
  padding-top: 20px;
}
.spec-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 11px 0;
  border-bottom: 1px solid #1f2a36;
  font-size: .88rem;
  gap: 16px;
}
.spec-row:last-child { border-bottom: none; }
.spec-row > span:first-child {
  color: #6b7a8a;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .72rem;
}
.spec-row > span:last-child { color: #e6ecf2; text-align: right; }

.related-products {
  padding: 56px 0 64px;
  border-top: 1px solid #1f2a36;
  margin-top: 40px;
}
.related-heading {
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #6b7a8a;
  margin-bottom: 24px;
  font-weight: 500;
}
.related-products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.mini-product-card {
  display: block;
  background: #1c2935;
  border: 1px solid #2a3744;
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  transition: border-color .2s, transform .2s;
}
.mini-product-card:hover {
  border-color: #3a4858;
  transform: translateY(-2px);
  text-decoration: none;
}
.mini-product-card .mini-img {
  background: #0a1218;
  aspect-ratio: 4/3;
  overflow: hidden;
}
.mini-product-card .mini-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mini-product-card .mini-info { padding: 12px 14px; }
.mini-product-card .mini-name {
  font-size: .9rem;
  color: #e6ecf2;
  font-weight: 500;
  margin-bottom: 4px;
}
.mini-product-card .mini-price {
  font-size: .82rem;
  color: #c86567;
  font-weight: 500;
}

@media(max-width: 720px) {
  .shop-product { grid-template-columns: 1fr; gap: 32px; padding-top: 28px; }
  .shop-product-title { font-size: 1.8rem; }
  .related-products-grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   CART DRAWER
   ============================================================ */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s, visibility .3s;
  z-index: 9000;
}
.cart-overlay[aria-hidden="false"] { opacity: 1; visibility: visible; }

.cart-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(420px, 100%);
  background: #14202b;
  color: #e6ecf2;
  border-left: 1px solid #2a3744;
  box-shadow: -8px 0 32px rgba(0,0,0,.5);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .3s ease-out;
  z-index: 9001;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
.cart-drawer[aria-hidden="false"] { transform: translateX(0); }

.cart-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid #2a3744;
  flex-shrink: 0;
}
.cart-drawer-header h2 {
  font-size: 1.05rem;
  font-weight: 500;
  color: #e6ecf2;
  margin: 0;
}
.cart-drawer-header .cart-count {
  color: #6b7a8a;
  font-weight: 400;
  font-size: .9rem;
  margin-left: 4px;
}
.cart-close {
  background: none;
  border: none;
  color: #b8c5d3;
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color .15s, background .15s;
}
.cart-close:hover { color: #fff; background: #1f2a36; }

.cart-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 22px;
}

.cart-empty {
  text-align: center;
  padding: 64px 20px 32px;
  color: #6b7a8a;
}
.cart-empty-icon {
  font-size: 2.4rem;
  margin-bottom: 12px;
  opacity: .35;
}
.cart-empty p { font-size: .95rem; margin: 0; }

.cart-items { list-style: none; padding: 0; margin: 0; }
.cart-item {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid #1f2a36;
}
.cart-item:last-child { border-bottom: none; }
.cart-item-img {
  background: #0a1218;
  border: 1px solid #2a3744;
  border-radius: 4px;
  overflow: hidden;
  width: 70px;
  height: 70px;
}
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cart-item-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cart-item-row1 {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.cart-item-name { font-weight: 500; font-size: .92rem; color: #e6ecf2; }
.cart-item-remove {
  background: none;
  border: none;
  color: #6b7a8a;
  cursor: pointer;
  padding: 2px 4px;
  display: flex;
  transition: color .15s;
  border-radius: 3px;
}
.cart-item-remove:hover { color: #c86567; background: rgba(200,101,103,.08); }
.cart-item-price { font-size: .85rem; color: #b8c5d3; display: flex; align-items: center; gap: 6px; }
.cart-item-trial {
  font-size: .62rem;
  background: rgba(86,188,138,.2);
  color: #5fc78f;
  padding: 2px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 600;
}
.cart-item-row2 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
}
.cart-item-line-total { font-weight: 500; color: #e6ecf2; font-size: .9rem; }

.qty-selector.small { border-radius: 4px; }
.qty-selector.small button { width: 30px; height: 32px; font-size: 1rem; }
.qty-selector.small .qty-value { min-width: 24px; font-size: .85rem; }

.cart-drawer-footer {
  border-top: 1px solid #2a3744;
  padding: 16px 22px 20px;
  flex-shrink: 0;
  background: #111d27;
}
.cart-drawer-footer:empty { display: none; }

.cart-promo { margin-bottom: 16px; }
.cart-promo summary {
  cursor: pointer;
  font-size: .85rem;
  color: #c86567;
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  user-select: none;
  padding: 6px 0;
}
.cart-promo summary::-webkit-details-marker { display: none; }
.cart-promo summary::marker { display: none; }
.cart-promo summary:hover { text-decoration: underline; }
.cart-promo[open] summary { color: #5fc78f; }
.promo-input {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.promo-input input {
  flex: 1;
  background: #0d1822;
  border: 1px solid #2a3744;
  border-radius: 4px;
  padding: 9px 12px;
  color: #e6ecf2;
  font-size: .85rem;
  font-family: inherit;
}
.promo-input input:focus { outline: none; border-color: #c86567; }
.promo-input button {
  background: #1c2935;
  border: 1px solid #2a3744;
  color: #b8c5d3;
  padding: 9px 14px;
  border-radius: 4px;
  font-size: .85rem;
  cursor: pointer;
  transition: background .15s, color .15s;
  font-family: inherit;
}
.promo-input button:hover { background: #2a3744; color: #fff; }

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 14px 0;
  border-top: 1px solid #2a3744;
  margin-bottom: 14px;
  font-size: .9rem;
  color: #9eadbd;
}
.cart-total strong { font-size: 1.4rem; color: #e6ecf2; font-weight: 500; }

.btn-checkout {
  width: 100%;
  padding: 13px;
  background: #c86567;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: .95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, transform .15s;
  font-family: inherit;
}
.btn-checkout:hover { background: #b85356; transform: translateY(-1px); }

body.cart-open { overflow: hidden; }

@media (max-width: 480px) {
  .cart-drawer { width: 100%; }
}

/* ============================================================
   CART PAGE
   ============================================================ */
.cart-page-wrap { padding: 32px 0 64px; }

.cart-page-title {
  font-size: 2rem;
  font-weight: 400;
  color: #e6ecf2;
  margin-bottom: 8px;
  letter-spacing: -.01em;
}
.cart-page-note-hint {
  font-size: .85rem;
  color: #6b7a8a;
  margin-bottom: 28px;
}

#cartPageContent {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
  align-items: start;
}

/* Empty state */
.cart-page-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: #6b7a8a;
}
.cart-page-empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: #14202b;
  border: 1px solid #2a3744;
  color: #6b7a8a;
  margin-bottom: 22px;
}
.cart-page-empty h2 {
  font-size: 1.6rem;
  color: #e6ecf2;
  font-weight: 400;
  margin-bottom: 10px;
}
.cart-page-empty p { font-size: .95rem; margin-bottom: 24px; }

.cart-page-main { min-width: 0; }

.cart-page-items { list-style: none; padding: 0; margin: 0 0 24px; }
.cart-page-item {
  display: grid;
  grid-template-columns: 90px 1fr auto auto auto;
  align-items: center;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid #1f2a36;
}
.cart-page-item:first-child { border-top: 1px solid #2a3744; }

.cart-page-img {
  width: 90px;
  height: 90px;
  background: #0a1218;
  border: 1px solid #2a3744;
  border-radius: 6px;
  overflow: hidden;
}
.cart-page-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

.cart-page-info { min-width: 0; }
.cart-page-item-name {
  font-size: 1rem;
  font-weight: 500;
  color: #e6ecf2;
  margin-bottom: 4px;
}
.cart-page-item-price {
  font-size: .85rem;
  color: #b8c5d3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cart-page-line-total {
  font-size: 1rem;
  font-weight: 500;
  color: #e6ecf2;
  min-width: 80px;
  text-align: right;
}

.cart-page-remove {
  background: none;
  border: none;
  color: #6b7a8a;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  display: inline-flex;
  transition: color .15s, background .15s;
}
.cart-page-remove:hover { color: #c86567; background: rgba(200,101,103,.08); }

.cart-page-promo,
.cart-page-note {
  margin-bottom: 14px;
  padding: 14px 18px;
  background: #14202b;
  border: 1px solid #2a3744;
  border-radius: 8px;
}
.cart-page-promo summary,
.cart-page-note summary {
  cursor: pointer;
  font-size: .9rem;
  color: #c86567;
  display: flex;
  align-items: center;
  gap: 10px;
  list-style: none;
  user-select: none;
}
.cart-page-promo summary::-webkit-details-marker,
.cart-page-note summary::-webkit-details-marker { display: none; }
.cart-page-promo summary:hover,
.cart-page-note summary:hover { text-decoration: underline; }
.cart-page-promo[open] summary { color: #5fc78f; }
.cart-page-promo .promo-input { margin-top: 12px; }

.cart-page-note textarea {
  width: 100%;
  margin-top: 12px;
  padding: 12px 14px;
  background: #0d1822;
  border: 1px solid #2a3744;
  border-radius: 6px;
  color: #e6ecf2;
  font-size: .9rem;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
  outline: none;
}
.cart-page-note textarea:focus { border-color: #c86567; }

/* Summary sidebar */
.cart-page-summary {
  background: #14202b;
  border: 1px solid #2a3744;
  border-radius: 10px;
  padding: 24px;
  position: sticky;
  top: 84px;
}
.cart-page-summary h2 {
  font-size: 1rem;
  font-weight: 500;
  color: #e6ecf2;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 14px 0;
  font-size: 1.1rem;
  color: #e6ecf2;
  border-top: 1px solid #2a3744;
}
.summary-row > span:last-child { font-weight: 500; font-size: 1.4rem; }
.summary-note {
  font-size: .75rem;
  color: #6b7a8a;
  margin-bottom: 20px;
  line-height: 1.5;
}
.btn-checkout-large {
  display: block;
  width: 100%;
  padding: 14px;
  background: #c86567;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: .95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, transform .15s;
  font-family: inherit;
  text-decoration: none;
  text-align: center;
}
.btn-checkout-large:hover { background: #b85356; transform: translateY(-1px); text-decoration: none; }
.secure-checkout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: .75rem;
  color: #6b7a8a;
  margin-top: 12px;
}

/* Login modal (cart.js handleCheckout) */
.login-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s, visibility .25s;
  z-index: 9100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-modal-overlay[aria-hidden="false"] { opacity: 1; visibility: visible; }
.login-modal {
  width: 100%;
  max-width: 420px;
  background: #1c2935;
  border: 1px solid #2a3744;
  border-radius: 10px;
  padding: 36px 32px 28px;
  position: relative;
}
.login-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  color: #6b7a8a;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}
.login-modal-close:hover { color: #fff; background: #1f2a36; }
.login-modal h2 {
  font-size: 1.6rem;
  font-weight: 400;
  color: #e6ecf2;
  margin-bottom: 8px;
  text-align: center;
}
.login-modal-sub {
  font-size: .9rem;
  color: #9eadbd;
  text-align: center;
  margin-bottom: 24px;
}
.login-modal-sub a { color: #c86567; }
.login-modal label {
  display: block;
  margin-bottom: 16px;
  font-size: .72rem;
  color: #6b7a8a;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 500;
}
.login-modal input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  background: #0d1822;
  border: 1px solid #2a3744;
  border-radius: 6px;
  font-size: .9rem;
  color: #e6ecf2;
  font-family: inherit;
  outline: none;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}
.login-modal input:focus { border-color: #c86567; }
.login-forgot {
  display: inline-block;
  font-size: .82rem;
  color: #b8c5d3;
  margin-bottom: 14px;
}
.login-forgot:hover { color: #c86567; }

@media (max-width: 880px) {
  #cartPageContent { grid-template-columns: 1fr; }
  .cart-page-summary { position: static; }
  .cart-page-item {
    grid-template-columns: 70px 1fr auto;
    grid-template-rows: auto auto;
    gap: 12px 14px;
  }
  .cart-page-img { grid-row: 1 / 3; }
  .cart-page-line-total { grid-column: 2 / 4; text-align: left; font-size: .9rem; color: #b8c5d3; }
  .cart-page-remove { grid-column: 3; grid-row: 1; }
}

/* ============================================================
   CART PAGE
   ============================================================ */
.cart-page-title {
  font-size: 1.8rem;
  color: #e6ecf2;
  font-weight: 400;
  margin-bottom: 6px;
  letter-spacing: -.01em;
}
.cart-page-note {
  color: #c86567;
  font-size: .9rem;
  margin-bottom: 28px;
}
.cart-page-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: start;
}
.cart-page-items {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  border-top: 1px solid #2a3744;
}
.cart-page-item {
  display: grid;
  grid-template-columns: 80px 1fr auto auto auto;
  gap: 18px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid #2a3744;
}
.cart-page-img {
  width: 80px;
  height: 80px;
  border-radius: 4px;
  overflow: hidden;
  background: #0a1218;
  border: 1px solid #2a3744;
}
.cart-page-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cart-page-info { min-width: 0; }
.cart-page-item-name {
  font-size: 1rem;
  color: #e6ecf2;
  font-weight: 500;
  margin: 0 0 4px;
}
.cart-page-item-price { font-size: .88rem; color: #b8c5d3; display: flex; align-items: center; gap: 6px; }
.cart-page-line-total {
  font-size: 1rem;
  font-weight: 500;
  color: #e6ecf2;
  min-width: 70px;
  text-align: right;
}
.cart-page-remove {
  background: none;
  border: none;
  color: #6b7a8a;
  cursor: pointer;
  padding: 8px;
  display: flex;
  border-radius: 4px;
  transition: color .15s, background .15s;
}
.cart-page-remove:hover { color: #c86567; background: rgba(200,101,103,.08); }

.cart-page-promo, .cart-page-note {
  border: 1px solid #2a3744;
  border-radius: 6px;
  padding: 14px 18px;
  margin-bottom: 14px;
  background: #1c2935;
}
.cart-page-promo summary,
.cart-page-note summary {
  cursor: pointer;
  font-size: .88rem;
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  user-select: none;
  color: #c86567;
}
.cart-page-promo summary::-webkit-details-marker,
.cart-page-note summary::-webkit-details-marker { display: none; }
.cart-page-promo summary:hover,
.cart-page-note summary:hover { text-decoration: underline; }
.cart-page-promo[open] summary { color: #5fc78f; }
.cart-page-note[open] summary { color: #b8c5d3; }
.cart-page-promo .promo-input { margin-top: 12px; }
.cart-page-note textarea {
  width: 100%;
  margin-top: 12px;
  background: #0d1822;
  border: 1px solid #2a3744;
  border-radius: 4px;
  padding: 10px 12px;
  color: #e6ecf2;
  font-family: inherit;
  font-size: .9rem;
  min-height: 90px;
  resize: vertical;
}
.cart-page-note textarea:focus { outline: none; border-color: #c86567; }

.cart-page-summary {
  background: #1c2935;
  border: 1px solid #2a3744;
  border-radius: 8px;
  padding: 24px;
  position: sticky;
  top: 84px;
}
.cart-page-summary h2 {
  font-size: 1.05rem;
  font-weight: 500;
  color: #e6ecf2;
  margin: 0 0 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #2a3744;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 1rem;
  margin-bottom: 16px;
}
.summary-row span:first-child { color: #b8c5d3; }
.summary-row span:last-child { color: #e6ecf2; font-weight: 500; font-size: 1.2rem; }
.summary-note {
  font-size: .78rem;
  color: #6b7a8a;
  line-height: 1.55;
  margin-bottom: 18px;
}
.btn-checkout-large {
  width: 100%;
  padding: 14px;
  background: #c86567;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, transform .15s;
  font-family: inherit;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}
.btn-checkout-large:hover { background: #b85356; transform: translateY(-1px); text-decoration: none; }
.secure-checkout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: .78rem;
  color: #6b7a8a;
  margin-top: 14px;
  margin-bottom: 0;
}

.cart-page-empty {
  text-align: center;
  padding: 80px 20px;
  color: #6b7a8a;
}
.cart-page-empty-icon { color: #2a3744; margin-bottom: 16px; display: flex; justify-content: center; }
.cart-page-empty h2 { font-size: 1.4rem; color: #b8c5d3; font-weight: 400; margin-bottom: 8px; }
.cart-page-empty p { font-size: .95rem; margin-bottom: 24px; }

@media (max-width: 720px) {
  .cart-page-layout { grid-template-columns: 1fr; gap: 28px; }
  .cart-page-summary { position: static; }
  .cart-page-item {
    grid-template-columns: 60px 1fr auto;
    grid-template-areas:
      "img info remove"
      "img qty  total";
    row-gap: 8px;
    column-gap: 12px;
  }
  .cart-page-img { grid-area: img; width: 60px; height: 60px; }
  .cart-page-info { grid-area: info; }
  .cart-page-item .qty-selector { grid-area: qty; }
  .cart-page-line-total { grid-area: total; min-width: auto; }
  .cart-page-remove { grid-area: remove; align-self: start; }
}

/* ============================================================
   LOGIN MODAL
   ============================================================ */
.login-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 20px 40px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s, visibility .25s;
  z-index: 9500;
  overflow-y: auto;
}
.login-modal-overlay[aria-hidden="false"] { opacity: 1; visibility: visible; }

.login-modal {
  background: #14202b;
  border: 1px solid #2a3744;
  border-radius: 10px;
  padding: 40px 36px 32px;
  width: 100%;
  max-width: 420px;
  position: relative;
  box-shadow: 0 12px 48px rgba(0,0,0,.6);
}
.login-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  color: #b8c5d3;
  font-size: 1.6rem;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 4px;
  line-height: 1;
  transition: color .15s, background .15s;
}
.login-modal-close:hover { color: #fff; background: #1f2a36; }

.login-modal h2 {
  font-size: 1.8rem;
  color: #e6ecf2;
  font-weight: 400;
  margin: 0 0 8px;
  text-align: center;
  letter-spacing: -.01em;
}
.login-modal-sub {
  text-align: center;
  font-size: .9rem;
  color: #b8c5d3;
  margin-bottom: 28px;
}
.login-modal-sub a { color: #c86567; }
.login-modal form { display: flex; flex-direction: column; gap: 14px; }
.login-modal label {
  font-size: .78rem;
  color: #9eadbd;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 500;
}
.login-modal input[type="email"],
.login-modal input[type="password"] {
  background: #0d1822;
  border: 1px solid #2a3744;
  border-radius: 4px;
  padding: 11px 14px;
  color: #e6ecf2;
  font-size: .95rem;
  font-family: inherit;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 300;
}
.login-modal input:focus { outline: none; border-color: #c86567; }
.login-forgot {
  font-size: .82rem;
  color: #b8c5d3;
  margin: 4px 0 8px;
  align-self: flex-start;
  text-decoration: underline;
}
.login-forgot:hover { color: #c86567; }
