/* =========================================================
   Akvarie Shoppen – lyst, rent butikstema.
   Låner fra portfoliet: mono-labels (// ...), kort med hover-løft,
   scroll-reveal og fokusstil. Egen identitet: lys havbund, dyb teal
   og koral som købsfarve. Stardom til logo og store overskrifter.
   ========================================================= */

:root {
    --bg: #F1F5F6;
    --surface: #FFFFFF;
    --surface-2: #F7FAFA;
    --line: #DCE5E8;
    --line-strong: #C5D3D7;
    --ink: #0E2A33;
    --ink-soft: #4F6973;
    --primary: #0B5563;
    --primary-ink: #083F49;
    --primary-tint: #E2EFF1;
    --coral: #F2643F;
    --coral-ink: #D94C28;
    --success: #1F8A5B;

    --font-display: "Stardom", Georgia, serif;
    --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

    --radius: 14px;
    --radius-sm: 8px;
    --wrap: 1200px;
    --gutter: clamp(16px, 4vw, 40px);
    --space: clamp(32px, 5vw, 56px);
    --shadow: 0 1px 2px rgba(14, 42, 51, .05), 0 8px 24px -12px rgba(14, 42, 51, .18);
    --shadow-lift: 0 2px 4px rgba(14, 42, 51, .06), 0 18px 40px -16px rgba(14, 42, 51, .28);
    --ease: cubic-bezier(.2, .7, .2, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-ink); }

:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { margin: 0 0 .5em; line-height: 1.15; color: var(--ink); }
h1, h2 { font-family: var(--font-display); font-weight: 400; letter-spacing: .01em; }
h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.05rem; font-weight: 600; }

p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

main { flex: 1; }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.eyebrow {
    display: inline-block;
    margin: 0 0 12px;
    font-family: var(--font-mono);
    font-size: .72rem;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--primary);
}

.eyebrow::before { content: "// "; color: var(--coral); }

.lead { max-width: 56ch; font-size: 1.1rem; color: var(--ink-soft); }

.section { padding-block: var(--space); }

/* ---------- Topbar + header ---------- */
.shop-notice {
    background: var(--primary-ink);
    color: #CFE6EA;
    font-family: var(--font-mono);
    font-size: .72rem;
    letter-spacing: .08em;
    text-align: center;
    padding: 8px var(--gutter);
}

.shop-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .92);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.shop-header__inner {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 68px;
}

.shop-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 1.35rem;
    white-space: nowrap;
}

.shop-logo:hover { color: var(--primary); }

.shop-logo__mark {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    color: #fff;
    background: var(--primary);
    border-radius: 10px;
}

.shop-logo__mark svg { width: 22px; height: 22px; }

.shop-nav {
    display: flex;
    gap: 4px;
    margin-right: auto;
}

.shop-nav a {
    padding: 8px 12px;
    color: var(--ink-soft);
    font-size: .92rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
}

.shop-nav a:hover,
.shop-nav a.active { color: var(--ink); background: var(--primary-tint); }

.shop-back {
    font-family: var(--font-mono);
    font-size: .75rem;
    letter-spacing: .06em;
    color: var(--ink-soft);
    white-space: nowrap;
}

.cart-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    color: #fff;
    background: var(--ink);
    border-radius: 999px;
    font-size: .9rem;
    font-weight: 600;
    transition: background-color .2s var(--ease);
}

.cart-link:hover { color: #fff; background: var(--primary); }
.cart-link svg { width: 18px; height: 18px; }

.cart-badge {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    font-family: var(--font-mono);
    font-size: .72rem;
    color: var(--ink);
    background: #fff;
    border-radius: 999px;
}

.cart-badge[hidden] { display: none; }

/* ---------- Knapper og små elementer ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    font-family: var(--font-sans);
    font-size: .95rem;
    font-weight: 600;
    line-height: 1;
    color: #fff;
    background: var(--primary);
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    transition: background-color .2s var(--ease), transform .15s var(--ease), box-shadow .2s var(--ease);
}

.btn:hover { color: #fff; background: var(--primary-ink); }
.btn:active { transform: translateY(1px); }

.btn--buy { background: var(--coral); }
.btn--buy:hover { background: var(--coral-ink); box-shadow: 0 8px 20px -8px rgba(242, 100, 63, .6); }

.btn--ghost { color: var(--ink); background: transparent; border-color: var(--line-strong); }
.btn--ghost:hover { color: var(--ink); background: var(--surface); border-color: var(--ink-soft); }

.btn--block { width: 100%; }
.btn--lg { padding: 16px 26px; font-size: 1rem; }

.btn:disabled,
.btn.product-btn--disabled {
    color: var(--ink-soft);
    background: var(--line);
    box-shadow: none;
    cursor: not-allowed;
    pointer-events: none;
}

.btn.add-to-cart-btn--added { color: #fff; background: var(--success); }

.chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-family: var(--font-mono);
    font-size: .68rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--primary);
    background: var(--primary-tint);
    border-radius: 999px;
}

.price {
    font-family: var(--font-mono);
    font-weight: 500;
    color: var(--ink);
    white-space: nowrap;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: .78rem;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.badge-soldout {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 10px;
    font-family: var(--font-mono);
    font-size: .68rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #fff;
    background: var(--ink);
    border-radius: 999px;
}

/* ---------- Butikkens forside ---------- */
.shop-hero { padding-block: clamp(40px, 6vw, 72px) var(--space); }

.shop-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: clamp(28px, 5vw, 64px);
    align-items: center;
}

.shop-hero__image {
    position: relative;
    margin: 0;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: calc(var(--radius) + 6px);
    box-shadow: var(--shadow-lift);
}

.shop-hero__image img { width: 100%; height: 100%; object-fit: cover; }

.shop-hero__perks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
    font-size: .9rem;
    color: var(--ink-soft);
}

.shop-hero__perks li::before { content: "✓ "; color: var(--success); font-weight: 700; }

.shop-content { max-width: 68ch; color: var(--ink-soft); }

.shop-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
}

.shop-toolbar h2 { margin: 0; }

.shop-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.shop-filter-pills { display: flex; flex-wrap: wrap; gap: 6px; }

.shop-filter-pill {
    padding: 8px 14px;
    font-family: var(--font-sans);
    font-size: .88rem;
    font-weight: 500;
    color: var(--ink-soft);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    cursor: pointer;
    transition: all .2s var(--ease);
}

.shop-filter-pill:hover { color: var(--ink); border-color: var(--line-strong); }
.shop-filter-pill.is-active { color: #fff; background: var(--ink); border-color: var(--ink); }

.shop-search {
    position: relative;
}

.shop-search svg {
    position: absolute;
    left: 14px;
    top: 50%;
    width: 16px;
    height: 16px;
    color: var(--ink-soft);
    transform: translateY(-50%);
    pointer-events: none;
}

.shop-search input {
    width: 240px;
    padding: 10px 14px 10px 38px;
    font: inherit;
    font-size: .92rem;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
}

.shop-search input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-tint); }

.shop-empty {
    padding: 40px;
    text-align: center;
    color: var(--ink-soft);
    background: var(--surface);
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
}

.shop-empty[hidden] { display: none; }

/* ---------- Produktkort ---------- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}

.product-card[hidden] { display: none; }

.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: transparent; }

.product-card__media {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--surface-2);
}

.product-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.product-card:hover .product-card__media img { transform: scale(1.04); }

.product-card--soldout .product-card__media img { filter: grayscale(.6); opacity: .7; }

.product-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
}

.product-card__title { margin: 0; font-size: 1rem; line-height: 1.35; }
.product-card__title a { color: var(--ink); }
.product-card__title a:hover { color: var(--primary); }

.product-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 6px;
}

.product-card__foot .btn { padding: 9px 14px; font-size: .85rem; }

/* ---------- Produktside ---------- */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 28px;
    padding: 0;
    list-style: none;
    font-family: var(--font-mono);
    font-size: .75rem;
    letter-spacing: .06em;
    color: var(--ink-soft);
}

.breadcrumb li + li::before { content: "/"; margin-right: 8px; color: var(--line-strong); }
.breadcrumb a { color: var(--ink-soft); }
.breadcrumb a:hover { color: var(--primary); }

.product-detail {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: clamp(28px, 5vw, 64px);
    align-items: start;
}

.product-detail__media {
    position: relative;
    margin: 0;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: calc(var(--radius) + 6px);
}

.product-detail__media img { width: 100%; height: 100%; object-fit: cover; }

.product-detail__info { padding-top: 8px; }
.product-detail__info h1 { margin: 14px 0 12px; font-size: clamp(2rem, 4.5vw, 3rem); }

.product-detail__price { margin: 0 0 24px; font-size: 1.6rem; }

.product-detail__desc { margin-bottom: 28px; color: var(--ink-soft); font-size: 1.02rem; }

.product-detail__perks {
    display: grid;
    gap: 10px;
    margin: 28px 0 0;
    padding: 20px;
    list-style: none;
    font-size: .92rem;
    color: var(--ink-soft);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.product-detail__perks li { display: flex; gap: 10px; }
.product-detail__perks svg { flex-shrink: 0; width: 18px; height: 18px; color: var(--primary); }

/* ---------- Paneler (kurv, checkout, bekræftelse) ---------- */
.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.page-head { padding-block: clamp(36px, 5vw, 56px) 0; }
.page-head h1 { margin-bottom: 8px; }
.page-head .lead { margin-bottom: 0; }

.cart-layout,
.checkout-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
    align-items: start;
}

.cart-layout[hidden],
.checkout-layout[hidden] { display: none; }

.summary {
    position: sticky;
    top: 92px;
    padding: 24px;
}

.summary h2 { font-size: 1.5rem; margin-bottom: 16px; }

.summary-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    font-size: .95rem;
    color: var(--ink-soft);
    border-bottom: 1px solid var(--line);
}

.summary-row span:last-child { font-family: var(--font-mono); color: var(--ink); }

.summary-row--total {
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--ink);
    border-bottom: 0;
}

.summary-note { margin: 14px 0 0; font-size: .8rem; color: var(--ink-soft); text-align: center; }

.empty-state {
    padding: 56px 24px;
    text-align: center;
    color: var(--ink-soft);
}

.empty-state[hidden] { display: none; }
.empty-state svg { width: 40px; height: 40px; margin: 0 auto 16px; color: var(--line-strong); }

/* Kurvens linjer genereres af webshop.js */
.cart-items { padding: 8px 24px; }
.cart-items:empty { display: none; }

.cart-item {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto auto auto;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
}

.cart-item:last-child { border-bottom: 0; }

.cart-item-image {
    width: 72px;
    height: 72px;
    object-fit: cover;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
}

.cart-item-details p { margin: 0; }
.cart-item-title { font-weight: 600; }
.cart-item-price { font-family: var(--font-mono); font-size: .8rem; color: var(--ink-soft); }

.cart-item-qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
}

.cart-qty-btn {
    width: 34px;
    height: 34px;
    font-size: 1rem;
    color: var(--ink);
    background: none;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
}

.cart-qty-btn:hover { background: var(--primary-tint); }

.cart-qty-value { min-width: 24px; font-family: var(--font-mono); text-align: center; }

.cart-item-line-total { margin: 0; font-family: var(--font-mono); font-weight: 500; }

.cart-remove-btn {
    width: 32px;
    height: 32px;
    color: var(--ink-soft);
    background: none;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
}

.cart-remove-btn:hover { color: var(--coral-ink); background: #FDEDE8; }

/* Checkout */
.checkout-form { padding: 28px; }
.checkout-form h2 { font-size: 1.5rem; margin-bottom: 20px; }

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

.form-group { display: grid; gap: 6px; }
.form-group--full { grid-column: 1 / -1; }

.form-group label { font-size: .85rem; font-weight: 600; color: var(--ink); }

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    font: inherit;
    font-size: .95rem;
    color: var(--ink);
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    transition: border-color .2s, box-shadow .2s, background-color .2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    background: var(--surface);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-tint);
}

.form-group input:user-invalid { border-color: var(--coral); }

.form-note {
    margin: 20px 0;
    padding: 12px 14px;
    font-size: .85rem;
    color: var(--primary-ink);
    background: var(--primary-tint);
    border-radius: var(--radius-sm);
}

.checkout-summary-item,
.confirmation-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 0;
    font-size: .92rem;
}

.checkout-summary-item-price,
.confirmation-item span:last-child { font-family: var(--font-mono); }

/* Bekræftelse */
.confirmation {
    max-width: 560px;
    margin: 0 auto;
    padding: clamp(28px, 5vw, 48px);
    text-align: center;
}

.confirmation__icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    color: #fff;
    background: var(--success);
    border-radius: 999px;
}

.confirmation__icon svg { width: 30px; height: 30px; }

.confirmation__order {
    display: inline-block;
    margin: 4px 0 20px;
    padding: 6px 12px;
    font-family: var(--font-mono);
    font-size: .85rem;
    background: var(--primary-tint);
    border-radius: 999px;
}

.confirmation__order[hidden],
.confirmation-items[hidden],
.confirmation-total[hidden] { display: none; }

.confirmation-items {
    margin: 0 0 12px;
    padding: 12px 0;
    text-align: left;
    border-block: 1px solid var(--line);
}

.confirmation-total { margin-bottom: 20px; font-family: var(--font-mono); font-weight: 600; }

.confirmation__note { font-size: .88rem; color: var(--ink-soft); }

/* ---------- Footer ---------- */
.shop-footer {
    margin-top: var(--space);
    border-top: 1px solid var(--line);
    background: var(--surface);
}

.shop-footer__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-block: 24px;
    font-size: .85rem;
    color: var(--ink-soft);
}

.shop-footer p { margin: 0; }

/* ---------- Scroll reveal (samme som portfoliet) ---------- */
.js [data-reveal] {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .5s var(--ease), transform .5s var(--ease);
    transition-delay: calc(var(--i, 0) * 60ms);
}

.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- Responsivt ---------- */
@media (max-width: 1024px) {
    .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .cart-layout, .checkout-layout { grid-template-columns: 1fr; }
    .summary { position: static; }
}

@media (max-width: 860px) {
    .shop-nav, .shop-back { display: none; }
    .shop-header__inner { justify-content: space-between; }
    .shop-hero__grid, .product-detail { grid-template-columns: 1fr; }
    .shop-hero__image { order: -1; }
}

@media (max-width: 640px) {
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .product-card__body { padding: 12px; }
    .product-card__foot { flex-direction: column; align-items: stretch; }
    .shop-search, .shop-search input { width: 100%; }
    .shop-filters { width: 100%; }
    .form-grid { grid-template-columns: 1fr; }
    .cart-item { grid-template-columns: 60px minmax(0, 1fr) auto; }
    .cart-item-image { width: 60px; height: 60px; grid-row: span 2; }
    .cart-item-qty { grid-column: 2; }
    .cart-item-line-total { grid-column: 3; grid-row: 1; }
    .cart-remove-btn { grid-column: 3; grid-row: 2; justify-self: end; }
    .cart-link span:not(.cart-badge) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: .001ms !important; animation-duration: .001ms !important; }
    .js [data-reveal] { opacity: 1; transform: none; }
}
