/*
Theme Name: CheapJungle
Theme URI: https://cheapjungle.dk
Author: Cheap Jungle ApS
Description: Eget, licensfrit block-tema til CheapJungle.dk ("Jungle Fresh"). Bygget på WordPress' og WooCommerce' egne blokke – ingen betalte afhængigheder. Skrifter (Bricolage Grotesque, Inter) ligger lokalt i temaet under SIL Open Font License.
Version: 1.1.0
Requires at least: 6.6
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: cheapjungle
*/

/* ---------- Logo ---------- */
.cj-logo { display: flex; align-items: center; gap: 14px; text-decoration: none !important; }
.cj-logo__mark { width: 64px; height: 64px; border-radius: 20px; background: var(--wp--preset--color--lime); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.cj-logo__word { font-family: var(--wp--preset--font-family--display); font-weight: 800; font-size: 44px; letter-spacing: -1.5px; line-height: 1; color: var(--wp--preset--color--jungle); }
.cj-logo__word span { color: var(--wp--preset--color--leaf); }
.cj-footer .cj-logo__word { color: #fff; font-size: 34px; }
.cj-footer .cj-logo__word span { color: var(--wp--preset--color--lime); }

/* ---------- Header ---------- */
.cj-header-main { gap: 20px 40px; }
.cj-header-main .wp-block-search { flex: 1 1 380px; min-width: 0; }
.cj-header-main .wp-block-search__inside-wrapper { border: 0; padding: 0; }
.cj-header-main .wp-block-search__input { height: 52px; border: 2px solid var(--wp--preset--color--jungle); border-right: 0; border-radius: 26px 0 0 26px; padding: 0 22px; font-size: 16px; background: #fff; }
.cj-header-main .wp-block-search__button { height: 52px; margin: 0; border-radius: 0 26px 26px 0; padding: 0 26px; background: var(--wp--preset--color--jungle); color: #fff; }
.cj-icons { gap: 8px; }
.cj-icons .wc-block-customer-account__account-icon,
.cj-icons .wc-block-mini-cart__button { color: var(--wp--preset--color--jungle); }
.cj-icons .wp-block-woocommerce-customer-account a,
.cj-icon-btn { width: 48px; height: 48px; border-radius: 24px; display: flex !important; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--wp--preset--color--line); color: var(--wp--preset--color--jungle); padding: 0 !important; }
.cj-icons .wc-block-mini-cart__button { height: 48px; padding: 0 18px; border-radius: 24px; background: var(--wp--preset--color--lime); font-weight: 700; }
.cj-icons .wc-block-mini-cart__badge { background: var(--wp--preset--color--jungle); color: var(--wp--preset--color--lime); }
.cj-catnav .wp-block-navigation-item__content { font-weight: 600; }
.cj-catnav .cj-sale-link > a { color: var(--wp--preset--color--sale) !important; }
.cj-catnav .wp-block-navigation__submenu-container { border: 1px solid var(--wp--preset--color--line) !important; border-radius: 12px; padding: 6px 0; }
.cj-catnav .wp-block-navigation__submenu-container .wp-block-navigation-item__content { font-weight: 500; padding: 8px 16px; }

/* ---------- Hero ---------- */
.cj-hero { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.cj-hero__main { position: relative; overflow: hidden; border-radius: 32px; min-height: 460px; display: flex; flex-direction: column; justify-content: flex-end; }
.cj-hero__main > * { position: relative; }
.cj-hero__main::before { content: ""; position: absolute; right: -70px; top: -50px; width: 440px; height: 440px; opacity: .35;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232f9a5c' stroke-width='.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10Z'/%3E%3Cpath d='M2 21c0-3 1.85-5.36 5.08-6C9.5 14.52 12 13 13 12'/%3E%3C/svg%3E"); }
.cj-pill { display: inline-block; background: var(--wp--preset--color--lime); color: var(--wp--preset--color--jungle); font-weight: 700; font-size: 14px; padding: 6px 14px; border-radius: 999px; }
.cj-hero .is-style-outline .wp-block-button__link { border: 2px solid #3d8a5e; color: #fff; background: transparent; }
.cj-hero__side { display: flex; flex-direction: column; gap: 20px; }
.cj-card-link { flex: 1; min-height: 200px; border-radius: 32px; padding: 32px; text-decoration: none !important; display: flex; flex-direction: column; justify-content: space-between; color: var(--wp--preset--color--ink) !important; transition: transform .2s ease; }
.cj-card-link:hover { transform: translateY(-3px); }
.cj-card-link small { font-size: 14px; font-weight: 600; }
.cj-card-link strong { font-family: var(--wp--preset--font-family--display); font-weight: 800; font-size: 34px; line-height: 1; letter-spacing: -0.02em; }
@media (max-width: 900px) { .cj-hero { grid-template-columns: 1fr; } }

/* ---------- Fordele ---------- */
.cj-perks { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.cj-perk { display: flex; align-items: center; gap: 14px; background: #fff; border-radius: 20px; padding: 18px 22px; border: 1px solid var(--wp--preset--color--line); font-weight: 600; }
.cj-perk span { width: 40px; height: 40px; border-radius: 12px; background: var(--wp--preset--color--mint); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }

/* ---------- Kategorier ---------- */
.cj-cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.cj-cat { border-radius: 24px; padding: 24px; min-height: 140px; text-decoration: none !important; color: var(--wp--preset--color--ink) !important; display: flex; flex-direction: column; justify-content: space-between; transition: transform .2s ease; }
.cj-cat:hover { transform: translateY(-3px); }
.cj-cat strong { font-family: var(--wp--preset--font-family--display); font-weight: 800; font-size: 24px; letter-spacing: -0.01em; }
.cj-cat small { font-size: 14px; color: #3d4a41; }

/* ---------- Sektionstitler ---------- */
.cj-section-head h2 { margin: 0; }
.cj-section-head a { font-weight: 600; }

/* ---------- Produktkort ---------- */
.wc-block-product-template .wc-block-product,
.wc-block-product-template > li {
  background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: 24px; padding: 14px !important;
  display: flex; flex-direction: column; gap: 8px; transition: box-shadow .2s ease, transform .2s ease;
}
.wc-block-product-template .wc-block-product:hover,
.wc-block-product-template > li:hover { box-shadow: 0 10px 28px rgba(20, 70, 44, .10); transform: translateY(-3px); }
.wc-block-components-product-image, .wc-block-components-product-image img { border-radius: 16px; }
.wc-block-components-product-image img { background: #eef0e6; }
.wc-block-components-product-sale-badge, .onsale {
  background: var(--wp--preset--color--sale) !important; color: #fff !important; border: 0 !important; border-radius: 999px !important; font-weight: 700 !important; text-transform: none !important;
}
.wc-block-components-product-price { font-family: var(--wp--preset--font-family--display); font-weight: 800; font-size: 22px; color: var(--wp--preset--color--ink); }
.wc-block-components-product-price del { font-family: var(--wp--preset--font-family--body); font-size: 14px; font-weight: 400; color: #6b766e; }
.wc-block-components-product-price ins { text-decoration: none; color: var(--wp--preset--color--sale); }
.wc-block-product-template .wp-block-button__link, .wc-block-components-product-button__button {
  border-radius: 999px !important; background: var(--wp--preset--color--jungle) !important; color: #fff !important; font-weight: 700; width: 100%;
}
.wc-block-product-template .wp-block-woocommerce-product-button { margin-top: auto; }

/* Enkelt produkt */
.single-product .wp-block-post-title { font-family: var(--wp--preset--font-family--display); font-size: var(--wp--preset--font-size--x-large); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.single-product .wc-block-components-product-price { font-size: 32px; }
.single-product .single_add_to_cart_button, .single-product .wc-block-components-product-button__button { border-radius: 999px !important; background: var(--wp--preset--color--jungle) !important; color: #fff !important; padding: 14px 28px !important; }
.woocommerce-product-gallery img { border-radius: 24px; }

/* ---------- Footer ---------- */
.cj-footer a { color: #cfe0d4 !important; text-decoration: none; }
.cj-footer a:hover { color: #fff !important; text-decoration: underline; }
.cj-footer ul { list-style: none; padding: 0; margin: 0; }
.cj-footer li { margin: 0 0 .5rem; }

/* ---------- Mobil ---------- */
@media (max-width: 781px) {
  .cj-header-main { gap: 14px; }
  .cj-header-main .wp-block-search { order: 3; flex: 1 1 100%; }
  .cj-logo__mark { width: 48px; height: 48px; border-radius: 14px; }
  .cj-logo__mark svg { width: 28px; height: 28px; }
  .cj-logo__word { font-size: 32px; }
  .cj-hero__main { min-height: 380px; border-radius: 24px; }
}
