.tesla-store-page {
  --store-blue: #4da8ff;
  --store-ink: #071014;
  --store-panel: #0e171b;
  --store-line: rgba(126, 157, 171, .2);
  background: #070b0d;
}

.store-shell {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.tesla-store-page .site-header .logo small {
  color: var(--text-muted, #b3bec5);
}

.tesla-store-main {
  max-width: none !important;
  padding: 0;
}

.tesla-store-main::before { display: none; }
.tesla-store-main p { max-width: none; }

.store-hero {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  isolation: isolate;
  border-bottom: 1px solid var(--store-line);
}

.store-hero > img {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  filter: saturate(.72) contrast(1.06);
}

.store-hero-shade {
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5,9,11,.96) 0%, rgba(5,9,11,.82) 42%, rgba(5,9,11,.2) 80%),
    linear-gradient(0deg, #070b0d 0%, transparent 42%);
}

.store-hero-content {
  display: flex;
  min-height: 680px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding-block: 100px;
}

.store-kicker {
  display: inline-block;
  margin-bottom: 17px;
  color: var(--heading-kicker, var(--store-blue));
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.store-hero .store-kicker {
  color: #5db8ff;
}

.store-hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(50px, 7.5vw, 98px);
  line-height: .96;
  letter-spacing: -.065em;
  color: #eef6fa;
}

.store-hero p {
  max-width: 620px;
  margin: 28px 0 35px;
  color: #c2cdd2;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.55;
}

.store-primary-cta {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  padding: 15px 18px;
  border-radius: 12px;
  background: var(--store-blue);
  color: #061015;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 14px 34px rgba(77,168,255,.2);
}

.store-primary-cta:hover { background: #78c0ff; }

.model-picker {
  display: grid;
  grid-template-columns: minmax(260px, .95fr) 1.3fr;
  gap: 70px;
  align-items: end;
  padding-block: 100px 84px;
  border-bottom: 1px solid var(--store-line);
}

.model-picker h2,
.store-section-heading h2,
.store-process > h2 {
  margin: 0;
  font-size: clamp(34px, 4.5vw, 58px);
  line-height: 1.03;
  letter-spacing: -.05em;
  color: var(--heading, #eef6fa);
}

.model-picker p { margin: 18px 0 0; color: #94a4ac; font-size: 14px; }

.model-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.model-options button {
  min-height: 118px;
  border: 1px solid var(--store-line);
  border-radius: 18px;
  background: linear-gradient(145deg, #101a1f, #0a1114);
  color: #eff6f8;
  cursor: pointer;
  transition: border-color .18s ease, transform .18s ease, background .18s ease;
}

.model-options button:hover { transform: translateY(-3px); border-color: rgba(77,168,255,.5); }
.model-options button.active { border-color: var(--store-blue); background: linear-gradient(145deg, rgba(77,168,255,.2), #0b1317); box-shadow: 0 18px 45px rgba(0,0,0,.2); }
.model-options span { display: block; color: #83949c; font-size: 9px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.model-options strong { display: block; margin-top: 7px; font-size: 35px; font-weight: 600; }
.model-picker .store-status { grid-column: 2; margin: -45px 0 0; color: var(--store-blue); }

.store-products-section { padding-block: 110px; }

.store-section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(250px, .6fr);
  gap: 70px;
  align-items: end;
  margin-bottom: 48px;
}

.store-section-heading > p { margin: 0; color: #899ba3; font-size: 13px; line-height: 1.55; }

.store-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
  align-items: start;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.product-card {
  overflow: hidden;
  border: 1px solid var(--store-line);
  border-radius: 20px;
  background: #0d1518;
  transition: transform .2s ease, border-color .2s ease;
}

.product-card:hover { transform: translateY(-4px); border-color: rgba(77,168,255,.42); }
.product-card.is-hidden { display: none; }

.product-visual {
  position: relative;
  display: flex;
  height: 205px;
  align-items: flex-end;
  justify-content: space-between;
  overflow: hidden;
  padding: 17px;
  background-position: center;
  background-size: cover;
  isolation: isolate;
}

.product-visual::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(0deg, rgba(5,9,11,.92), rgba(5,9,11,.08) 70%);
}

.visual-driver-screen { background-image: linear-gradient(135deg, rgba(36,77,106,.2), transparent), url('/workshop-diagnostics.webp'); background-position: 72% 45%; }
.visual-rear-screen { background-image: linear-gradient(135deg, rgba(36,77,106,.2), transparent), url('/workshop-electric.webp'); background-position: 28% 55%; }
.visual-front-camera { background-image: linear-gradient(135deg, rgba(36,77,106,.32), transparent), url('/hero-workshop.webp'); background-position: 68% 48%; }

.product-visual span {
  color: #dcecf3;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}


.product-content { padding: 22px; }
.product-content > small { color: var(--heading-kicker, var(--store-blue)); font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.product-content h3 { min-height: 52px; margin: 11px 0 9px; font-size: 22px; line-height: 1.12; letter-spacing: -.03em; color: var(--heading, #eef6fa); }
.product-content p { min-height: 62px; margin: 0; color: #8fa0a8; font-size: 12px; line-height: 1.5; }
.product-content > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 22px; }
.product-price { display: flex; flex-direction: column; gap: 3px; color: #dce8ee; }
.product-price strong { color: #f2f8fb; font-size: 15px; line-height: 1.1; }
.product-price small { color: #879aa3; font-size: 9px; line-height: 1.25; }
.product-price.product-offer strong { color: #78c0ff; }
.add-product { border: 1px solid rgba(77,168,255,.42); border-radius: 10px; padding: 9px 13px; background: rgba(77,168,255,.08); color: #eaf5fa; font-size: 11px; font-weight: 800; cursor: pointer; }
.add-product:hover { background: var(--store-blue); color: #061015; }
.add-product.added { border-color: #6dd5a3; color: #8ce7bd; }

.store-cart {
  position: sticky;
  top: 105px;
  padding: 24px;
  border: 1px solid rgba(77,168,255,.25);
  border-radius: 20px;
  background: linear-gradient(145deg, #111c21, #0a1114);
  box-shadow: 0 30px 70px rgba(0,0,0,.25);
}

.cart-heading { display: flex; align-items: center; justify-content: space-between; color: var(--heading-kicker, var(--store-blue)); font-size: 9px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.cart-heading strong { display: grid; min-width: 27px; height: 27px; place-items: center; border-radius: 8px; background: var(--store-blue); color: #061015; font-size: 11px; }
.store-cart h2 { margin: 17px 0 11px; font-size: 28px; letter-spacing: -.04em; color: var(--heading, #eef6fa); }
.store-cart > p { color: #899aa2; font-size: 12px; line-height: 1.5; }

#cart-items { display: grid; gap: 8px; margin: 20px 0; padding: 0; list-style: none; }
#cart-items li { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 10px 11px; border: 1px solid var(--store-line); border-radius: 11px; background: #0a1215; color: #dbe5e9; font-size: 11px; }
#cart-items button { border: 0; background: none; color: #7f9098; font-size: 17px; cursor: pointer; }
.cart-price-summary { display: grid; gap: 9px; margin: 18px 0; padding: 14px; border: 1px solid rgba(77,168,255,.24); border-radius: 13px; background: rgba(77,168,255,.055); }
.cart-price-summary[hidden] { display: none; }
.cart-price-summary strong, .cart-price-summary span { display: block; }
.cart-price-summary strong { color: #eef7fb; font-size: 13px; }
.cart-price-summary span { margin-top: -7px; color: #8fa2aa; font-size: 10px; }

#tesla-order-form { display: none; gap: 7px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--store-line); }
#tesla-order-form.is-visible { display: grid; }
#tesla-order-form label { margin-top: 6px; color: #9eacb2; font-size: 10px; font-weight: 750; }
#tesla-order-form input,
#tesla-order-form textarea { width: 100%; border: 1px solid var(--store-line); border-radius: 10px; padding: 10px 11px; background: #0a1215; color: #edf5f8; font: inherit; font-size: 12px; outline: none; }
#tesla-order-form input:focus,
#tesla-order-form textarea:focus { border-color: var(--store-blue); box-shadow: 0 0 0 3px rgba(77,168,255,.08); }
#tesla-order-form > button { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; border: 0; border-radius: 11px; padding: 12px 13px; background: var(--store-blue); color: #061015; font-size: 11px; font-weight: 850; cursor: pointer; }
#tesla-order-form > button:disabled { cursor: wait; opacity: .65; }
.tesla-email-fallback { margin-top: 4px; color: #78c0ff; font-size: 10px; font-weight: 750; }
.tesla-email-fallback[hidden] { display: none; }
#tesla-order-form > p { margin: 3px 0 0; color: #72838a; font-size: 9px; line-height: 1.4; }
#tesla-order-form .store-status { color: var(--store-blue); font-size: 10px; }

.store-process { padding-block: 95px; border-top: 1px solid var(--store-line); }
.store-process > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-top: 40px; }
.store-process article { min-height: 220px; padding: 27px; border: 1px solid var(--store-line); border-radius: 18px; background: #0c1417; }
.store-process h3 { margin: 0 0 10px; font-size: 22px; color: var(--heading, #eef6fa); }
.store-process p { margin: 0; color: #84969e; font-size: 12px; line-height: 1.5; }

.store-disclaimer { margin-bottom: 95px; padding: 25px 28px; border-left: 2px solid var(--store-blue); background: rgba(77,168,255,.04); }
.store-disclaimer h2 { margin: 0 0 7px; font-size: 16px; color: var(--heading, #eef6fa); }
.store-disclaimer p { margin: 0; color: #84969e; font-size: 11px; line-height: 1.5; }

@media (max-width: 960px) {
  .model-picker { grid-template-columns: 1fr; gap: 34px; }
  .model-picker .store-status { grid-column: auto; margin: 0; }
  .store-layout { grid-template-columns: 1fr; }
  .store-cart { position: static; }
}

@media (max-width: 680px) {
  .store-shell { width: min(100% - 28px, 1180px); }
  .store-hero, .store-hero-content { min-height: 590px; }
  .store-hero-content { justify-content: flex-end; padding-block: 80px 55px; }
  .store-hero-shade { background: linear-gradient(0deg,#070b0d 0%,rgba(5,9,11,.78) 58%,rgba(5,9,11,.2)); }
  .store-hero h1 { font-size: clamp(48px, 15vw, 70px); }
  .store-hero p { margin-block: 22px 28px; font-size: 16px; }
  .model-picker { padding-block: 75px 65px; }
  .model-options { grid-template-columns: repeat(2, 1fr); }
  .model-options button { min-height: 94px; }
  .store-products-section { padding-block: 78px; }
  .store-section-heading { grid-template-columns: 1fr; gap: 20px; }
  .product-grid { grid-template-columns: 1fr; }
  .product-visual { height: 220px; }
  .product-content h3, .product-content p { min-height: 0; }
  .store-cart { padding: 21px; }
  .store-process { padding-block: 75px; }
  .store-process > div { grid-template-columns: 1fr; }
  .store-process article { min-height: 180px; }
  .store-disclaimer { margin-bottom: 75px; }
}


@media (min-width: 681px) and (max-width: 960px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 961px) {
  .store-layout { display: block; }
  .product-grid { gap: 22px; }
  .store-cart { position: static; top: auto; margin-top: 24px; padding: 30px; }
  .store-cart.has-items {
    display: grid;
    grid-template-columns: minmax(260px, .75fr) minmax(0, 1.25fr);
    grid-template-rows: auto auto 1fr;
    column-gap: 42px;
  }
  .store-cart.has-items .cart-heading,
  .store-cart.has-items > h2,
  .store-cart.has-items > p,
  .store-cart.has-items #cart-items { grid-column: 1; }
  .store-cart.has-items #tesla-order-form {
    grid-column: 2;
    grid-row: 1 / 6;
    margin-top: 0;
    padding: 0 0 0 42px;
    border-top: 0;
    border-left: 1px solid var(--store-line);
  }
}

@media (max-width: 960px) { .store-cart { margin-top: 20px; } }
.store-cart.has-items { align-items: start; }

/* Tesla-butikken følger samme lagrede dagmodus som resten av nettstedet. */
:root[data-theme='light'] .tesla-store-page { --store-ink:#10242f; --store-panel:#fff; --store-line:rgba(48,80,94,.24); background:#f3f7f9; }
:root[data-theme='light'] .tesla-store-page .site-header .logo small { color: var(--text-muted, #1a3542); }
:root[data-theme='light'] .store-hero h1 { color: #eef6fa; }
:root[data-theme='light'] .store-hero .store-kicker { color: #5db8ff; }
:root[data-theme='light'] .store-hero p { color: #c2cdd2; }
:root[data-theme='light'] .model-picker p,
:root[data-theme='light'] .store-section-heading > p,
:root[data-theme='light'] .product-content p,
:root[data-theme='light'] .store-cart > p,
:root[data-theme='light'] .store-process p,
:root[data-theme='light'] .store-disclaimer p { color:var(--store-ink); }
:root[data-theme='light'] .model-options button,
:root[data-theme='light'] .product-card,
:root[data-theme='light'] .store-cart,
:root[data-theme='light'] .store-process article { background:#fff; color:#10242f; box-shadow:0 18px 45px rgba(24,54,68,.1); }
:root[data-theme='light'] .model-options button.active { background:linear-gradient(145deg,rgba(0,111,202,.13),#fff); }
:root[data-theme='light'] .model-options span { color:var(--store-ink); }
:root[data-theme='light'] .add-product { color:#004f91; background:rgba(0,111,202,.08); }
:root[data-theme='light'] #cart-items li,
:root[data-theme='light'] #tesla-order-form input,
:root[data-theme='light'] #tesla-order-form textarea { background:#f3f7f9; color:#10242f; }
:root[data-theme='light'] #tesla-order-form label { color:var(--store-ink); }
:root[data-theme='light'] .store-process h3,
:root[data-theme='light'] .store-disclaimer h2 { color: var(--heading, #061c2a); }

.tesla-store-page .header-cta.store-header-cart {
  gap: 6px;
}

:root[data-theme='light'] .product-price strong,
:root[data-theme='light'] .cart-price-summary strong { color:#061c2a; }
:root[data-theme='light'] .product-price small,
:root[data-theme='light'] .cart-price-summary span { color:#38515d; }
:root[data-theme='light'] .cart-price-summary { background:rgba(0,111,202,.06); }

/* Tesla-butikken følger samme lesbarhets- og trykkflatekrav som resten. */
.tesla-store-page { font-size: 16px; line-height: 1.6; }
.tesla-store-page :is(p, li, label) { font-size: 16px; line-height: 1.6; }
.tesla-store-page small { font-size: 13px; line-height: 1.5; }
.tesla-store-page :is(button, input, select, textarea) { min-height: 44px; font-size: 16px; }
.tesla-store-page .add-product { min-height: 44px; padding: 10px 16px; font-size: 14px; font-weight: 800; }
.tesla-store-page :is(a, button) { text-underline-offset: 3px; }
.tesla-store-page :is(.store-kicker, .model-options span, .product-content > span, .cart-heading, .cart-heading span) { font-size: 12px; line-height: 1.5; }
.tesla-store-page #tesla-order-form label { font-size: 14px; color: #c5d0d5; }
.tesla-store-page #tesla-order-form button { font-size: 14px; }
.tesla-store-page .tesla-email-fallback { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; }
.tesla-store-page #tesla-order-form p,
.tesla-store-page #tesla-order-form .store-status { font-size: 13px; line-height: 1.5; color: #aebdc4; }
.tesla-store-page .product-visual > span { font-size: 12px; line-height: 1.4; }
