/*
Theme Name: CoffeeCraft (TT5 Child)
Theme URI: https://coffeecraft.dk/
Description: Twenty Twenty-Five child theme for CoffeeCraft. Block-theme (FSE) oriented: templates/parts/patterns/theme.json.
Author: CoffeeCraft
Template: twentytwentyfive
Version: 0.1.3
Text Domain: coffeecraft

   All global design tokens (colors, fonts, sizes, spacing, backgrounds)
   are defined in theme.json — the single source of truth.

   This file contains ONLY:
   1. CSS custom properties mapped from theme.json (for use in custom components)
   2. Custom component styles (.cc-*) that don't map to WordPress blocks
   3. WooCommerce widget/plugin overrides
*/

/* ── CSS Custom Properties (mirrors theme.json for custom components) ── */
:root {
    --color-primary: #c7a17a;
    --color-text-dark: #30271c;
    --color-text-gray: #666;
    --color-text-gray-light: #cfcfcf;
    --color-border: #e2e2e2;
    --color-bg-light: #faf8f3;
    --color-bg-dark: #4c4c4c;
    --color-bg-header: #eae7de;
    --font-heading: 'Oswald', sans-serif;
    --font-price: 'Merriweather', serif;
    --font-body: 'Open Sans', sans-serif;
    --font-ui: 'DM Sans', sans-serif;
}

main {
    margin-top: 30px;
}

/* ── Fluid horisontal padding (erstatter hardkodede inline 40px) ──
   clamp(min, preferred, max):
   - 320px viewport: 5vw = 16px  → bruger min 1rem (16px)
   - 800px viewport: 5vw = 40px  → rammer loftet
   Én regel i stedet for en breakpoint-override med !important.
── */
.cc-main-content,
.cc-footer,
.wc-blocks-header-pattern {
    padding-left: clamp(1rem, 5vw, 40px);
    padding-right: clamp(1rem, 5vw, 40px);
}

.cc-main-content {
    padding-top: 2rem;
    padding-bottom: 4rem;
}

/* Header utility links above the product navigation */
.cc-top-menu {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    justify-content: flex-end;
    margin: 0 auto 8px;
    max-width: var(--wp--style--global--wide-size, 1200px);
    width: 100%;
}

.cc-top-menu a {
    color: var(--color-text-dark);
    font-family: var(--font-ui);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.2;
    opacity: 0.82;
    text-decoration: none;
}

.cc-top-menu a:hover,
.cc-top-menu a:focus {
    color: var(--color-primary);
    opacity: 1;
    text-decoration: none;
}

.cc-top-menu a + a {
    border-left: 1px solid rgba(48, 39, 28, 0.22);
    padding-left: 0.9rem;
}

/* Homepage: header overlays the hero */
.home header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.admin-bar.home header {
    top: 32px;
}

.home header,
.home header a,
.home header .top-logo,
.home header .cc-nav__link,
.home header .wp-block-site-title a,
.home header .wp-block-search__input,
.home header .wp-block-search__button {
    color: #fff !important;
}

/* Undtag mobile drawer fra forsidereglens hvide tekst */
.home .cc-mobile-drawer,
.home .cc-mobile-drawer a,
.home .cc-mobile-drawer .top-logo,
.home .cc-mobile-nav__link,
.home .cc-mobile-nav__sub-link,
.home .cc-mobile-drawer__close {
    color: var(--color-text-dark) !important;
}

.home .wc-block-mini-cart__badge {
    background-color: transparent;
}

.home .cc-top-menu a {
    border-color: rgba(255, 255, 255, 0.36);
    color: #fff !important;
    opacity: 0.9;
}

.home .cc-top-menu a:hover,
.home .cc-top-menu a:focus {
    color: var(--color-primary) !important;
    opacity: 1;
}

.home header .wp-block-search__input {
    border: none !important;
}

.home .wp-block-cover {
    margin-top: -30px;
    padding-top: 10rem !important;
    text-align: center;
}

/* Radial vignette: soft blur on hero edges, center stays sharp */
.home .wp-block-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    backdrop-filter: blur(50px);
    mask-image: radial-gradient(ellipse 70% 60% at center,
            transparent 20%,
            black 100%);
    -webkit-backdrop-filter: blur(50px);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at center,
            transparent 20%,
            black 100%);
}

.home .wp-block-cover__background {
    background-color: #000 !important;
}

/* Sørg for at hero-indhold (tekst, knapper) ligger over blur-pseudo-elementet */
.home .wp-block-cover__inner-container {
    position: relative;
    z-index: 2 !important;
}

/* Header logo */
.top-logo {
    font-family: var(--font-heading);
    font-size: 2em;
    text-transform: uppercase;
    margin-bottom: 0;
    letter-spacing: 0.04em;
    font-weight: 200;
    text-decoration: none;
}

.top-logo:hover {
    color: var(--color-text-dark);
}

.top-logo span {
    font-weight: 400;
}

/* Hovedmenu */
.hovedmenu-container {
    margin-top: 0;
}

/* ── Price typography (WooCommerce) ── */
.price,
.woocommerce-Price-amount,
.amount {
    font-family: var(--font-price);
}

/* ── Search block compactness ── */
.wc-blocks-header-pattern .wp-block-search__input {
    padding: 0.4em 0.7em;
    font-size: 0.82rem;
    max-width: 180px;
    height: auto;
    border: 1px solid var(--color-border);
}

.home .wc-blocks-header-pattern .wp-block-search__input {
    border: none !important;
}

.wc-blocks-header-pattern .wp-block-search__button {
    padding: 0.4em 0.6em;
}

/* ── Components: Buttons ── */
.cc-btn {
    font-family: var(--font-ui);
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.cc-btn--primary {
    background-color: var(--color-primary);
    color: var(--color-text-dark);
}

.cc-btn--primary:hover {
    opacity: 0.9;
}

.cc-btn--ghost {
    background-color: transparent;
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
}

/* ── Global button: tekst altid hvid
   Slår WP's .has-cc-text-color { color: #30271c !important } (0,1,0)
   med (0,2,0) specificitet.
── */
.wp-element-button.wp-block-button__link,
.wp-block-button__link {
    color: #fff !important;
}

/* ── Global button :hover
   Specificitet (0,1,1) slår WP's auto-genererede
   .has-cc-primary-background-color { !important } på (0,1,0).
── */
.wp-element-button:hover,
.wp-block-button__link:hover {
    background-color: color-mix(in srgb, var(--wp--preset--color--cc-primary) 80%, #000) !important;
    color: #fff !important;
    border-color: transparent;
    opacity: 1;
}

/* ── Components: Cards ── */
.cc-card {
    background-color: #fff;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1.5rem;
}

/* Hero */
.home-hero h1 {
    font-size: 5rem !important;
    max-width: 1200px;
    font-weight: 300;
}

.home-hero p {
    max-width: 1200px;
    font-weight: 700;
    margin-bottom: 60px;
}

.home-hero .wp-block-buttons {
    justify-content: center;
}

.home-hero .wp-block-button__link {
    color: #fff !important;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 1rem;
    padding: 1.1rem 2rem;
}

/* ── WooCommerce Sidebar ── */
.single-product .cc-sidebar .cc-sidebar__section:first-child {
    margin-top: 56px;
}

.cc-sidebar .widget {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--color-border);
}

.cc-sidebar .widget:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.cc-sidebar .widget-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.cc-sidebar .product_list_widget {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cc-sidebar .product_list_widget li {
    padding: 0.75rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cc-sidebar .product_list_widget li:last-child {
    border-bottom: none;
}

.cc-sidebar .product_list_widget img {
    border-radius: 6px;
    width: 60px;
    height: auto;
    object-fit: cover;
}

/* ── Neutralise WP's ugly focus outline (keep keyboard a11y) ── */
:where(.wp-site-blocks :focus),
:where(.wp-site-blocks :focus):not(:focus-visible) {
    outline: none !important;
}

/* ── Dynamic WooCommerce Navigation ── */
.cc-nav {
    width: 100%;
    margin-bottom: -16px !important;
}

.cc-nav__list {
    display: flex;
    align-items: center;
    gap: 0;
    list-style: none;
    padding: 0;
    margin: 0;
}

.cc-nav__item {
    position: relative;
    flex-shrink: 0;
}

.cc-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 1rem 1.1rem 1rem 0;
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-text-dark);
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s ease;
    letter-spacing: 0.1em;
}

.cc-nav__link:hover {
    color: var(--color-primary);
}

/* CSS-only dropdown triangle */
.cc-nav__item--has-sub>.cc-nav__link::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    transition: transform 0.2s ease;
}

.cc-nav__item--has-sub>.cc-nav__link[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

/* Dropdown panel */
.cc-nav__sub {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 100;
    min-width: 310px;
    background: #fff;
    border-top: 2px solid var(--color-primary);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    padding: 0.5rem 0;
    margin: 0;
    list-style: none;
}

.cc-nav__sub.is-open {
    display: block;
}

.home .cc-nav__sub {
    background-color: rgb(0 0 0 / 90%);
}

.cc-nav__sub-item {
    list-style: none;
}

.cc-nav__sub-link,
.cc-sidebar__cat-link {
    display: block;
    padding: 0.5rem 1.25rem;
    font-family: var(--font-heading);
    text-transform: uppercase;
    color: var(--color-text-gray);
    font-weight: 400;
    text-decoration: none;
    white-space: normal;
    transition: background-color 0.15s ease, color 0.15s ease;
    letter-spacing: 0.1em;
    font-size: 0.9em;
}

.cc-sidebar__cat-link {
    padding: 0.5rem 0 0.5rem 0;
}

.cc-nav__sub-link:hover {
    color: var(--color-primary);
}

/* ── WooCommerce Product Grid ── */
.woocommerce-result-count,
.woocommerce-ordering select,
.woocommerce .woocommerce-breadcrumb,
.sku_wrapper {
    font-family: var(--font-price);
    font-size: 0.85rem;
    font-style: italic;
    color: var(--color-text-gray);
    font-weight: 200;
    margin-bottom: 2rem;
}

.woocommerce-ordering select {
    border: none;
    background: transparent;
    outline: none;
    cursor: pointer;
    max-width: 140px;
    margin-bottom: 0;
}

.woocommerce-loop-product__link br {
    display: none;
}

.woocommerce-loop-product__link:hover {
    color: var(--color-text-dark);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title,
.cc-sidebar__title {
    font-size: 1.3em;
    text-transform: uppercase;
    margin-bottom: 0;
    letter-spacing: 0.04em;
}

.woocommerce ul.products li.product .price {
    color: var(--color-primary);
    font-size: 1.125rem;
}

.woocommerce ul.products li.product .price>del {
    color: var(--color-text-gray) !important;
}

.woocommerce ul.products li.product .price,
.woocommerce ul.products li.product .price ins {
    font-weight: 400;
}

.star-rating,
.woocommerce p.stars a {
    color: var(--color-primary) !important;
}

.woocommerce-loop-product__link+p {
    margin-top: 0;
}

/* Sale badge (moved into image wrapper by JS) */
.onsale {
    position: absolute !important;
    top: 0;
    left: 0 !important;
    right: auto !important;
    z-index: 5;
    margin: 0 !important;
    padding: 0.1rem 1.1rem !important;
    background: var(--color-primary) !important;
    color: #fff !important;
    font-size: 11px !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 0 !important;
    line-height: 1.4;
}

.product-template-default .onsale {
    left: 15px !important;
    top: 15px !important;
}

/* Gallery er position-context for badget efter JS-flytning.
   Skjul badget indtil JS har flyttet det ind i galleriet,
   så det ikke overlapper mobil-H1 under indlæsning. */
.product-template-default .woocommerce-product-gallery {
    position: relative;
}
.product-template-default > .onsale {
    display: none;
}
.product-template-default .woocommerce-product-gallery > .onsale {
    display: block;
}

/* Image wrapper for hover-reveal button (created by JS) */
.cc-product-img-wrap {
    position: relative;
    overflow: hidden;
}

.cc-product-img-wrap__btn {
    position: absolute !important;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    display: block !important;
    margin: 0 !important;
    padding: 0.75rem 1rem !important;
    background: var(--color-primary) !important;
    color: #fff !important;
    font-family: 'Open Sans', var(--font-body), sans-serif !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-align: center;
    text-decoration: none;
    border: none !important;
    border-radius: 0 !important;
    cursor: pointer;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.cc-product-img-wrap:hover .cc-product-img-wrap__btn,
li.product:hover .cc-product-img-wrap__btn {
    opacity: 1;
    transform: translateY(0);
}

/* ── WooCommerce Product Tabs (vertical / side layout) ── */
.woocommerce div.product .woocommerce-tabs.wc-tabs-wrapper {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.woocommerce div.product .woocommerce-tabs ul.tabs {
    flex: 0 0 180px;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    list-style: none;
    border-bottom: none;
}

.woocommerce div.product .woocommerce-tabs ul.tabs::before,
.woocommerce div.product .woocommerce-tabs ul.tabs::after {
    display: none;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li {
    margin: 0;
    padding: 0;
    border: none !important;
    border-radius: 0;
    background-color: transparent !important;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li a {
    display: block;
    padding: 0.75rem 1rem;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--color-text-gray);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li a:hover {
    color: var(--color-primary);
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
    color: var(--color-primary);
    font-weight: 600;
    border-left-color: var(--color-primary);
}

.woocommerce div.product .woocommerce-tabs .wc-tab {
    flex: 1;
    min-width: 0;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li::after,
.woocommerce div.product .woocommerce-tabs ul.tabs li::before {
    display: none !important;
}

.woocommerce div.product .woocommerce-tabs .wc-tab h2 {
    display: block;
}

.wc-tab p {
    margin-top: 0;
}

/* Archive title above product columns (mobile only — hidden on desktop) */
.cc-archive-title {
    display: none;
}

/* ── Category Sidebar (shortcode) ── */
.cc-sidebar__section {
    margin-bottom: 4rem;
}

.cc-sidebar__title,
.related .products>h2 {
    font-family: var(--font-heading);
    margin: 0 0 1rem 0;
    color: var(--color-text-dark);
    border-bottom: 3px solid var(--color-border);
    padding-bottom: 20px;
}

/* Subcategory list */
.cc-sidebar__cat-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cc-sidebar__cat-item {
    list-style: none;
}

.cc-sidebar__cat-link:hover {
    color: var(--color-primary);
}

.cc-sidebar__cat-link.is-active {
    color: var(--color-primary);
    font-weight: 600;
}

.cc-sidebar__cat-item:last-child .cc-sidebar__cat-link {
    border-bottom: none;
}

.cc-sidebar__cat-count {
    display: none !important;
}

/* Sidebar cards (shared: reviews + recently viewed) */
.cc-sidebar__review,
.cc-sidebar__product {
    display: flex;
    gap: 0.75rem;
    padding: 0.6rem 0;
    text-decoration: none;
    color: var(--color-text-dark);
    transition: opacity 0.2s ease;
}

.cc-sidebar__review:hover,
.cc-sidebar__product:hover {
    opacity: 0.8;
}

.cc-sidebar__review:last-child {
    border-bottom: none;
}

.cc-sidebar__review-thumb img,
.cc-sidebar__product-thumb img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
}

.cc-sidebar__review-body,
.cc-sidebar__product-body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.cc-sidebar__review-stars {
    font-size: 0.75rem;
    color: var(--color-primary);
    letter-spacing: 0.05em;
}

.cc-sidebar__review-product,
.cc-sidebar__product-name {
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cc-sidebar__product-name {
    font-weight: 500;
    font-size: 0.8rem;
}

.cc-sidebar__review-text {
    font-size: 0.72rem;
    color: var(--color-text-gray);
    line-height: 1.4;
}

.cc-sidebar__review-author {
    font-size: 0.7rem;
    color: var(--color-text-gray);
    font-style: italic;
}

.cc-sidebar__product-price {
    font-family: var(--font-price);
    font-size: 0.78rem;
    color: var(--color-primary);
}

/* Mini cart widget */
.cc-sidebar__cart-empty {
    font-size: 0.85rem;
    color: var(--color-text-gray);
    margin: 0;
}

.cc-sidebar__cart-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.cc-sidebar__cart-count {
    font-size: 0.85rem;
    font-weight: 500;
}

.cc-sidebar__cart-total {
    font-family: var(--font-price);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-primary);
}

.cc-sidebar__cart-link {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-primary);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.cc-sidebar__cart-link:hover {
    opacity: 0.8;
}

/* Product page */
.posted_in {
    display: none;
}

/* Hide "added to cart" success notice on product page (errors still visible) */
.single-product .wc-block-components-notice-banner.is-success {
    display: none !important;
}

.wc-block-components-drawer__close {
    outline-color: transparent !important;
    box-shadow: none !important;
}

.woocommerce div.product form.cart {
    display: flex;
    align-items: center;
}

.woocommerce div.product form.cart .quantity {
    display: flex !important;
    align-items: center;
    gap: 0;
}

.cc-qty-btn {
    width: 50px;
    height: 50px;
    border: none;
    background: transparent;
    font-size: 1.4rem;
    font-weight: 200;
    color: var(--color-text-dark);
    cursor: pointer;
    transition: color 0.2s ease;
    align-items: center;
    justify-content: center;
}

.cc-qty-btn:hover {
    color: var(--color-primary);
}

.woocommerce div.product form.cart .quantity input.qty {
    width: 50px;
    height: 50px;
    text-align: center;
    font-size: 1rem;
    font-weight: 800;
    background: var(--color-bg-header);
    -moz-appearance: textfield;
    appearance: textfield;
    border: none;
    padding: 0 !important;
    margin: 0;
}

.woocommerce div.product form.cart .quantity input.qty::-webkit-inner-spin-button,
.woocommerce div.product form.cart .quantity input.qty::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.woocommerce div.product form.cart button.single_add_to_cart_button {
    background-color: var(--color-primary) !important;
    color: #fff !important;
    font-weight: 800;
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: opacity 0.2s ease;
    letter-spacing: 2.5px;
    padding: 14px 20px;
    font-size: 0.8rem;
    line-height: 1.7em;
    text-transform: uppercase;
}

.woocommerce div.product form.cart button.single_add_to_cart_button:hover {
    background-color: color-mix(in srgb, var(--wp--preset--color--contrast) 80%, #000) !important;
    opacity: 1;
}

/* Desktop: hide the above-gallery duplicate title */
.cc-mobile-product-title {
    display: none;
}

.product_title {
    font-size: 1.4rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0 !important;
}

.woocommerce div.product .price {
    font-size: 2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-primary);
}

.woocommerce div.product p.price del,
.woocommerce div.product span.price del {
    color: var(--color-text-gray-light);
    opacity: 1;
}

.woocommerce-review-link {
    color: var(--color-text-gray);
}

/* ── Stock Status Badges (single product page) ── */
.woocommerce div.product p.stock {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    font-family: var(--font-ui);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 0.35em 1em;
    border-radius: 999px;
    margin: 0.5rem 0 1rem;
    line-height: 1.4;
}

.woocommerce div.product p.stock.in-stock {
    display: none;
}

.woocommerce div.product p.stock.out-of-stock {
    background-color: #fce4ec;
    color: #c62828;
    border: 1px solid #f8bbd0;
}

/* Single product gallery: keep thumbs in one horizontal slider row */
.woocommerce div.product div.images .flex-control-thumbs {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    margin-top: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.woocommerce div.product div.images .flex-control-thumbs li {
    float: none;
    width: 72px;
    min-width: 72px;
    margin: 0;
    scroll-snap-align: start;
}

.woocommerce div.product div.images .flex-control-thumbs li img {
    display: block;
    width: 100%;
    height: auto;
}

.cc-thumb-slider-rail {
    display: grid;
    grid-template-columns: 30px 1fr 30px;
    align-items: center;
    gap: 6px;
}

.cc-thumb-slider-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid var(--color-border);
    background: #fff;
    color: var(--color-text-dark);
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    transition: background-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.cc-thumb-slider-btn:hover:not(:disabled) {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

.cc-thumb-slider-btn:disabled {
    opacity: 0.35;
    cursor: default;
}

@media (max-width: 767px) {
    .woocommerce div.product div.images .flex-control-thumbs li {
        width: 64px;
        min-width: 64px;
    }

    .cc-thumb-slider-rail {
        grid-template-columns: 26px 1fr 26px;
        gap: 4px;
    }

    .cc-thumb-slider-btn {
        width: 26px;
        height: 26px;
    }
}

/* ── Footer ── */
.cc-footer {
    background-color: black;
}

.cc-footer__title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 1rem;
    color: white;
}

.cc-footer__title span {
    font-weight: 200;
}

.cc-footer__text {
    font-size: 0.85rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.75rem;
}

.cc-footer__text--small {
    font-size: 0.75rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.4);
}

.cc-footer__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cc-footer__list li {
    margin-bottom: 0.5rem;
}

.cc-footer__list a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s ease;
}

.cc-footer__list a:hover {
    color: white;
}

.cc-footer__divider {
    opacity: 0.3;
    margin: 2rem 0 1rem;
}

.cc-footer__copy {
    color: rgba(255, 255, 255, 0.4);
    margin: 0;
}

.cc-footer__legal a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color 0.2s ease;
}

.cc-footer__legal a:hover {
    color: var(--color-primary);
}

/* ══════════════════════════════════════════════════
   MOBILE MENU  (hamburger + drawer)
   Breakpoint: max-width 767px
══════════════════════════════════════════════════ */

/* Hamburger button — hidden on desktop */
.cc-hamburger {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--color-text-dark);
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
}

.cc-hamburger__icon {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 22px;
}

.cc-hamburger__bar {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform 0.22s ease, opacity 0.22s ease;
    transform-origin: center;
}

.cc-hamburger[aria-expanded="true"] .cc-hamburger__bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.cc-hamburger[aria-expanded="true"] .cc-hamburger__bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.cc-hamburger[aria-expanded="true"] .cc-hamburger__bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* White bars on transparent hero header */
.home header .cc-hamburger {
    color: #fff;
}

/* Body scroll lock */
body.cc-menu-open {
    overflow: hidden;
}

/* Overlay */
.cc-mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 199;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.cc-mobile-overlay.is-visible {
    display: block;
    opacity: 1;
}

/* Drawer panel */
.cc-mobile-drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 200;
    width: min(300px, 85vw);
    background: #fff;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.cc-mobile-drawer.is-open {
    transform: translateX(0);
}

/* Drawer header (logo + close) */
.cc-mobile-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-bg-header);
    flex-shrink: 0;
}

.cc-mobile-drawer__logo {
    font-size: 1.4rem;
}

.cc-mobile-drawer__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    color: var(--color-text-dark);
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
    margin-right: -0.5rem;
}

/* Mobile nav list */
.cc-mobile-nav__list {
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
    flex: 1;
}

.cc-mobile-nav__item {
    border-bottom: 1px solid var(--color-border);
}

.cc-mobile-nav__item:last-child {
    border-bottom: none;
}

/* Row: link text left, expand-toggle right */
.cc-mobile-nav__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cc-mobile-nav__link {
    display: block;
    flex: 1;
    padding: 0.9rem 1.25rem;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-dark);
    text-decoration: none;
    touch-action: manipulation;
}

.cc-mobile-nav__link:hover {
    color: var(--color-primary);
}

/* Accordion toggle button */
.cc-mobile-nav__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--color-text-gray);
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
    transition: transform 0.2s ease, color 0.2s ease;
}

.cc-mobile-nav__toggle[aria-expanded="true"] {
    transform: rotate(180deg);
    color: var(--color-primary);
}

/* Sub-list (accordion) */
.cc-mobile-nav__sub {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    background: var(--color-bg-light);
    transition: max-height 0.25s ease;
}

.cc-mobile-nav__sub.is-open {
    max-height: 600px;
}

.cc-mobile-nav__sub-item {
    border-top: 1px solid var(--color-border);
}

.cc-mobile-nav__sub-link {
    display: block;
    padding: 0.75rem 1.25rem 0.75rem 2rem;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--color-text-gray);
    text-decoration: none;
    touch-action: manipulation;
}

.cc-mobile-nav__sub-link:hover {
    color: var(--color-primary);
}

.cc-mobile-service-links {
    border-top: 1px solid var(--color-border);
    display: grid;
    gap: 0.2rem;
    margin: 1rem 0 0;
    padding: 1rem 0 0;
}

.cc-mobile-service-links a {
    color: var(--color-text-dark);
    font-family: var(--font-ui);
    font-size: 0.95rem;
    font-weight: 700;
    padding: 0.55rem 0;
    text-decoration: none;
}

.cc-mobile-service-links a:hover,
.cc-mobile-service-links a:focus {
    color: var(--color-primary);
    text-decoration: none;
}

/* ── Desktop/mobil header rows: show/hide ── */

/* Mobil-rækken og søgefelt skjult på desktop */
.cc-header-mobile {
    display: none !important;
}

.cc-mobile-search {
    display: none !important;
}

/* Profilikon skjules globalt — konto-flow håndteres via WC checkout */
.wc-block-customer-account,
.wp-block-woocommerce-customer-account {
    display: none !important;
}

/* Neutralisér WP's :where(.is-layout-constrained) > * margin-block-start
   inden i header — de løber ind i hinanden og giver uønsket top-margin */
.wc-blocks-header-pattern>* {
    margin-block-start: 0 !important;
}

/* Mini-cart i mobil-header: stak ikon ovenpå pris */
.cc-header-mobile .wc-block-mini-cart__button {
    flex-direction: column;
    align-items: center;
    gap: 1px;
    line-height: 1;
}

.cc-header-mobile .wc-block-mini-cart__amount {
    font-size: 0.62rem;
    line-height: 1;
}

/* Logo centreret i mobil-rækken */
.cc-header-mobile__logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.4rem;
    pointer-events: auto;
}

/* Positionen kræver at mobil-rækken er relative */
.cc-header-mobile.wp-block-group {
    position: relative;
}

/* ── Checkout: Deaktiver Landevælger (sættes fast til Danmark) ── */
.wc-block-components-address-form__country.wc-block-components-country-input {
    pointer-events: none !important;
    opacity: 0.3;
    background-color: var(--color-bg-light);
    cursor: not-allowed;
}

/* ── Responsive: vis mobil-layout, skjul desktop-layout ── */
@media (max-width: 767px) {

    /* Sticky header på alle sider undtagen forsiden.
       .home header { position: absolute } vinder fortsat og lader hero
       strække sig op under headeren. */
    body:not(.home) header {
        position: sticky;
        top: 0;
        z-index: 100;
        background: #fff;
    }

    .admin-bar header {
        top: 46px;
        /* WP admin-bar er 46px høj på mobil */
    }

    /* <main> — fjern margin-top og padding-top fra WP's site-blocks-regel og vores egen */
    main {
        margin-top: 0 !important;
        margin-block-start: 0 !important;
        padding-top: 0 !important;
    }

    .woocommerce .woocommerce-breadcrumb {
        margin-bottom: 1rem;
    }

    /* Vis hamburger og mobil-header */
    .cc-hamburger {
        display: flex;
    }

    .cc-header-mobile {
        display: flex !important;
    }

    /* Skjul desktop-header og navigationsbar */
    .cc-header-desktop {
        display: none !important;
    }

    .hovedmenu-container {
        display: none !important;
    }

    .cc-top-menu {
        display: none !important;
    }

    /* ── Mobil søgefelt ── */
    .cc-mobile-search {
        display: block !important;
        overflow: hidden;
        max-height: 60px;
        opacity: 1;
        transition: max-height 0.25s ease, padding 0.25s ease, opacity 0.2s ease;
    }

    /* Skjules ved scroll-ned (klasse sat af JS) */
    .cc-mobile-search.is-hidden {
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
        opacity: 0;
    }

    .cc-mobile-search .wp-block-search {
        width: 100%;
    }

    .cc-mobile-search .wp-block-search__inside-wrapper {
        width: 100%;
        display: flex;
    }

    .cc-mobile-search .wp-block-search__input {
        flex: 1;
        width: 100%;
        max-width: none;
        padding: 0.55em 0.75em;
        font-size: 0.9rem;
        background: #ffffff4d;
        margin-top: 12px;
    }

    .home .cc-mobile-search .wp-block-search__input::placeholder {
        color: rgba(255, 255, 255, 0.7);
    }

    .cc-mobile-search .wp-block-search__button {
        padding: 0.55em 0.85em;
        border-radius: 0;
        background: var(--color-primary);
        color: #fff;
        border: none;
    }

    /* ── Kategori-grid på mobil: skjul slide-up knap, hele kortet er link ── */
    .cc-product-img-wrap__btn {
        display: none !important;
    }

    .woocommerce ul.products li.product {
        position: relative;
    }

    .woocommerce ul.products li.product a.woocommerce-loop-product__link::after {
        content: '';
        position: absolute;
        inset: 0;
        z-index: 5;
    }

    /* ── Archive title + column reorder på kategorisider ── */
    .cc-archive-title {
        display: block;
        font-size: 1.4rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        margin: 0 0 1rem;
    }

    .tax-product_cat .cc-sidebar__section:first-child .cc-sidebar__title,
    .post-type-archive-product .cc-sidebar__section:first-child .cc-sidebar__title {
        display: none;
    }

    /* Sidebar kolonne EFTER produkter på mobil — kun på kategori-/shop-sider */
    .tax-product_cat .cc-main-content .wp-block-columns,
    .post-type-archive-product .cc-main-content .wp-block-columns {
        flex-direction: column;
    }

    .tax-product_cat .cc-main-content .wp-block-columns .wp-block-column:first-child,
    .post-type-archive-product .cc-main-content .wp-block-columns .wp-block-column:first-child {
        order: 2;
        width: 100% !important;
        flex-basis: 100% !important;
    }

    .tax-product_cat .cc-main-content .wp-block-columns .wp-block-column:last-child,
    .post-type-archive-product .cc-main-content .wp-block-columns .wp-block-column:last-child {
        order: 1;
        width: 100% !important;
        flex-basis: 100% !important;
    }

    /* ── Single product: title above gallery on mobile ── */
    .cc-mobile-product-title {
        display: block;
        padding: 0 0 1rem !important;
    }

    .woocommerce div.product .summary .product_title {
        display: none;
    }

    /* ── Product tabs: switch from vertical sidebar to horizontal on mobile ── */
    .woocommerce div.product .woocommerce-tabs.wc-tabs-wrapper {
        flex-direction: column;
        gap: 0;
    }

    .woocommerce div.product .woocommerce-tabs ul.tabs {
        flex: none;
        flex-direction: row;
        margin-bottom: 1.5rem;
    }

    .woocommerce div.product .woocommerce-tabs ul.tabs li a {
        border-left: none;
        border-bottom: 3px solid transparent;
        padding: 0.6rem 1.2rem;
    }

    .woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
        border-left: none;
        border-bottom-color: var(--color-primary);
    }
}

/* ── Checkout Terms & Privacy Modal ── */
.cc-terms-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cc-terms-modal.is-open {
    pointer-events: auto;
    opacity: 1;
}

.cc-terms-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
}

.cc-terms-modal__content {
    position: relative;
    background: #fff;
    width: 100%;
    max-width: 750px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 8px;
    overflow: hidden;
}

.cc-terms-modal.is-open .cc-terms-modal__content {
    transform: translateY(0);
}

.cc-terms-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid var(--color-border);
    flex-shrink: 0;
    background: var(--color-bg-light);
}

.cc-terms-modal__title {
    margin: 0;
    font-size: 1.2rem;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
}

.cc-terms-modal__close {
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    color: var(--color-text-gray);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.cc-terms-modal__close:hover {
    color: var(--color-primary);
}

.cc-terms-modal__body {
    padding: 2rem 1.75rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--color-text-dark);
}

.cc-terms-modal__body h1,
.cc-terms-modal__body h2,
.cc-terms-modal__body h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-family: var(--font-heading);
}

.cc-terms-modal__body h1:first-child,
.cc-terms-modal__body h2:first-child {
    margin-top: 0;
}

.cc-terms-modal__body p {
    margin-bottom: 1rem;
}

body.cc-modal-open {
    overflow: hidden; /* Forhindrer scroll af baggrunden under modal */
}

.cc-terms-modal__loading {
    text-align: center;
    color: var(--color-text-gray);
    font-style: italic;
    padding: 2rem;
}
/* -- Footer: Social icons + Trust rating -- */
.cc-footer__social {
    display: flex;
    gap: 0.65rem;
    margin-bottom: 1.5rem;
}

.cc-footer__social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #222234;
    color: #fff;
    text-decoration: none;
    transition: background 0.2s;
    flex-shrink: 0;
}

.cc-footer__social-btn:hover {
    background: #3a3a52;
}

.cc-footer__trust {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.cc-footer__stars-wrap {
    position: relative;
    display: inline-block;
    font-size: 1.75rem;
    line-height: 1;
}

.cc-footer__stars-bg {
    color: #444;
    letter-spacing: 2px;
}

.cc-footer__stars-fg {
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    white-space: nowrap;
    color: #00b67a;
    letter-spacing: 2px;
}

.cc-footer__trust-text {
    font-size: 0.8rem;
    color: #aaa;
    margin: 0;
}

/* ── Mini-cart Checkout Flow overrides ── */
/* Skjul "Gå til kassen" for at tvinge kunder forbi kurven */
.wc-block-mini-cart__footer-actions .wc-block-mini-cart__footer-checkout {
    display: none !important;
}

/* Gør "Vis kurv" til den primære CTA (fuld bredde, primær farve og store bogstaver) */
.wc-block-mini-cart__footer-actions .wc-block-mini-cart__footer-cart {
    width: 100% !important;
    background-color: var(--color-primary) !important;
    color: #fff !important;
    font-weight: 800 !important;
    border: none !important;
    border-radius: 0 !important;
    letter-spacing: 2.5px !important;
    padding: 14px 20px !important;
    font-size: 0.8rem !important;
    line-height: 1.7em !important;
    text-transform: uppercase !important;
    justify-content: center !important;
}

.wc-block-mini-cart__footer-actions .wc-block-mini-cart__footer-cart:hover {
    background-color: color-mix(in srgb, var(--wp--preset--color--contrast) 80%, #000) !important;
    opacity: 1 !important;
}

/* Skjul antal varer i mini-cart overskriften (fx "(emner: 3)") */
.wp-block-woocommerce-mini-cart-title-items-counter-block {
    display: none !important;
}

/* ── Kategori-beskrivelse (top): nulstil heading-margin ── */
.cc-category-description-top h1,
.cc-category-description-top h2 {
    margin-top: 0;
}
