/*
Theme Name: Kaffekungen
Description: Lättviktigt premiumtema för Kaffekungen.se
Version: 1.4.1
Author: Kaffekungen
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: kaffekungen
*/
:root{--ink:#211813;--gold:#c29a61;--cream:#f6f0e7;--paper:#f2e8da;--muted:#817367;--line:#dfd1bf}
*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font-family:system-ui,-apple-system,sans-serif}a{color:inherit;text-decoration:none}.wrap{width:min(1160px,calc(100% - 36px));margin:auto}
.top{background:#1b120e;color:#d9b879;text-align:center;padding:10px 12px;font-size:10px;letter-spacing:.19em;font-weight:700;border-bottom:1px solid #493322}
body > header{position:sticky;top:0;background:rgba(31,21,16,.98);color:#f7f0e5;border-bottom:1px solid #62492f;z-index:50;box-shadow:0 8px 24px rgba(20,12,8,.12)}.nav{height:82px;display:flex;align-items:center;justify-content:space-between;gap:24px}.brand{font:700 27px Georgia;letter-spacing:-1px;color:#fbf4e9;display:flex;align-items:center}.crown{display:inline-grid;place-items:center;background:linear-gradient(145deg,#d9b879,#a8793e);color:#241710;width:40px;height:40px;border-radius:50%;margin-right:10px;font-size:20px;box-shadow:0 0 0 1px #e6c98d66}.menu{display:flex;align-items:center;gap:clamp(14px,2vw,27px);font-size:12px;letter-spacing:.045em;font-weight:650}.menu a{color:#eee2d0;padding:10px 0;border-bottom:1px solid transparent;transition:color .18s,border-color .18s}.menu a:hover,.menu a:focus-visible{color:#e0bb79;border-color:#c29a61}.toggle{display:none;background:transparent;color:#e8d3ad;border:1px solid #8a6a43;border-radius:6px;padding:8px 11px;font-size:20px}
.hero{position:relative;overflow:hidden;background:radial-gradient(ellipse at 78% 45%,#4a2d1d 0%,#2a1b14 36%,#1b120e 75%);color:#f7f0e5;border-bottom:1px solid #6b4d2e}.hero:before{content:"";position:absolute;inset:18px;border:1px solid rgba(201,160,91,.16);pointer-events:none}.hero:after{content:"";position:absolute;width:420px;height:420px;border:1px solid rgba(201,160,91,.11);border-radius:50%;right:7%;top:-180px;box-shadow:0 0 0 28px rgba(201,160,91,.035),0 0 0 58px rgba(201,160,91,.025);pointer-events:none}.hero-in{position:relative;z-index:1;min-height:390px;display:grid;grid-template-columns:1.05fr .95fr;align-items:center;gap:35px;padding:54px 0}.eyebrow{font-size:10px;letter-spacing:.22em;text-transform:uppercase;color:#d5ad6a;font-weight:800}.hero h1{font:500 clamp(42px,5vw,64px)/1.02 Georgia;margin:13px 0 18px;letter-spacing:-.025em}.hero h1 em{color:#d7b16e;font-style:italic}.hero p{color:#d1c1af;line-height:1.8;max-width:490px;font-size:14px;margin:0 0 14px}.btn{display:inline-block;background:linear-gradient(135deg,#e1c184,#bd8d4e);color:#21150e!important;padding:14px 21px;font-size:10px;font-weight:850;letter-spacing:.1em;margin:10px 9px 0 0;border:1px solid #e4c78f;box-shadow:0 5px 16px #0003;transition:transform .18s,filter .18s}.btn:hover{transform:translateY(-2px);filter:brightness(1.06)}.btn.alt{background:transparent;color:#f5ead8!important;border-color:#98754a;box-shadow:none}.cupart{height:270px;display:grid;place-items:center;position:relative}.cupart:before{content:"";position:absolute;width:285px;height:285px;border:1px solid rgba(218,180,112,.25);border-radius:50%;box-shadow:0 0 0 18px rgba(218,180,112,.04),0 0 0 38px rgba(218,180,112,.025)}.cup{width:180px;height:135px;border-radius:16px 16px 80px 80px;background:linear-gradient(145deg,#f7eee2,#bca48b);position:relative;transform:rotate(-7deg);box-shadow:0 30px 40px #0006,inset -18px -12px 30px #321b0e40}.cup:after{content:"";position:absolute;right:-55px;top:25px;width:68px;height:65px;border:14px solid #d7c4ad;border-left:0;border-radius:0 60px 60px 0}.coffee{position:absolute;top:-7px;left:8px;right:8px;height:30px;border-radius:50%;background:radial-gradient(ellipse,#3b2115,#180d08 68%,#d4b28b 73%)}.cup b{position:absolute;top:52px;left:0;right:0;text-align:center;color:#5d3c2b;font:700 20px Georgia}
.trust{background:#f1e8da;border-bottom:1px solid #ddcdb7;box-shadow:inset 0 1px #fff8}.trustin{display:grid;grid-template-columns:repeat(3,1fr);gap:15px;text-align:center;padding:18px 0;font-size:11px;color:#6c5c50}.trust strong{display:block;color:var(--ink);margin-bottom:4px}
section{padding:62px 0}.head{display:flex;justify-content:space-between;align-items:end;gap:15px;margin-bottom:24px}.head h2{font:500 34px Georgia;margin:8px 0 0}.head p{font-size:12px;color:var(--muted)}.cats{display:grid;grid-template-columns:repeat(4,1fr);gap:13px}.cat{background:linear-gradient(145deg,#fffdf8 0%,#fbf5eb 100%);border:1px solid #d9c7ae;padding:22px;min-height:168px;display:flex;flex-direction:column;justify-content:space-between;box-shadow:0 4px 14px rgba(58,38,22,.055);transition:transform .2s,box-shadow .2s,border-color .2s}.cat:hover{transform:translateY(-3px);box-shadow:0 13px 28px rgba(48,30,18,.13);border-color:#bd9258}.cat i{font-size:30px;font-style:normal}.cat h3{font:500 20px Georgia;margin:12px 0 5px}.cat p{font-size:11px;color:var(--muted);margin:0}
.products{background:#eee3d5}.grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.card{background:#fbf7f0;border:1px solid var(--line);display:flex;flex-direction:column}.photo{height:220px;background:#fff!important;display:grid;place-items:center;font-size:70px;position:relative;overflow:hidden}.photo img{display:block;width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain!important;object-position:center;background:#fff;}.tag{position:absolute;top:11px;left:11px;background:var(--ink);color:white;padding:6px 8px;font-size:9px;text-transform:uppercase}.body{padding:16px;display:flex;flex-direction:column;flex:1}.maker{font-size:9px;text-transform:uppercase;letter-spacing:.13em;color:#80583c;font-weight:800}.body h3{font:500 20px Georgia;margin:7px 0}.body p{font-size:11px;line-height:1.6;color:var(--muted)}.price{font-size:19px;font-weight:800;border-top:1px solid var(--line);padding-top:12px;margin-top:auto}.price small{display:block;font-size:9px;color:var(--muted);font-weight:400}.retailers{border-top:1px solid var(--line);margin-top:8px;padding-top:8px}.retailer{display:flex;justify-content:space-between;gap:8px;padding:7px 0;font-size:11px}.retailer a{color:#80583c;font-weight:800;text-decoration:underline}.disclosure{font-size:10px;color:var(--muted);line-height:1.5;margin-top:18px}
.guide{display:grid;grid-template-columns:1fr 1fr;gap:35px;align-items:center}.guideart{background:radial-gradient(circle at 50% 40%,#4b3020,#1d130f 72%);color:#d7b16e;min-height:300px;display:grid;place-items:center;font:italic 90px Georgia;border:1px solid #6e5031;box-shadow:inset 0 0 0 12px #1d130f,inset 0 0 0 13px #8b693e}.guide h2{font:500 38px/1.1 Georgia}.guide p{font-size:12px;line-height:1.8;color:var(--muted)}
footer{background:var(--ink);color:var(--cream);padding:40px 0 20px}.footgrid{display:grid;grid-template-columns:2fr 1fr 1fr;gap:30px}.footgrid p,.footgrid a{font-size:11px;color:#b9aa9b;line-height:1.9}.footgrid h4{font-size:10px;color:var(--gold);letter-spacing:.13em}.copy{border-top:1px solid #49382d;margin-top:25px;padding-top:15px;color:#8d7d70;font-size:10px}
@media(max-width:800px){.menu{display:none;position:absolute;top:76px;left:0;right:0;background:white;padding:20px;flex-direction:column}.menu.open{display:flex}.toggle{display:block}.hero-in{grid-template-columns:1fr}.cupart{height:220px}.cats{grid-template-columns:repeat(2,1fr)}.grid{grid-template-columns:repeat(2,1fr)}.guide{gap:20px}}
@media(max-width:560px){.wrap{width:calc(100% - 28px)}.trustin{grid-template-columns:1fr}.trustin>div{padding:6px}.head{display:block}.head h2{font-size:29px}.cats{gap:8px}.cat{padding:14px}.grid{grid-template-columns:1fr}.guide{grid-template-columns:1fr}.footgrid{grid-template-columns:1fr 1fr}.footgrid>div:first-child{grid-column:1/-1}}

/* Product category archive */
.kk-category-archive{padding-top:22px;padding-bottom:70px;min-height:55vh}.kk-breadcrumb{display:flex;flex-wrap:wrap;gap:9px;align-items:center;color:var(--muted);font-size:11px;margin-bottom:18px}.kk-breadcrumb a{color:#80583c;text-decoration:underline}.kk-category-heading{padding:16px 0 18px;border-bottom:1px solid var(--line);margin-bottom:20px}.kk-category-heading h1{font:500 clamp(28px,3vw,38px)/1.1 Georgia;margin:6px 0}.kk-category-heading p,.kk-category-description{max-width:760px;color:var(--muted);font-size:13px;line-height:1.8}.kk-category-count{font-size:11px;color:var(--muted);margin:0 0 14px}.kk-pagination{margin-top:32px}.kk-pagination .nav-links{display:flex;gap:12px;align-items:center}.kk-pagination a,.kk-pagination span{padding:8px 12px;border:1px solid var(--line);font-size:12px}.kk-empty-state{padding:36px;background:var(--cream);border:1px solid var(--line)}.kk-empty-state h2{font:500 25px Georgia}.kk-empty-state p{font-size:13px;color:var(--muted);line-height:1.7}


/* Product category archive controls */
.kk-category-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin:22px 0 18px;padding:14px 16px;background:#f9f3ea;border:1px solid var(--line);border-radius:12px}
.kk-category-toolbar .kk-category-count{margin:0;color:var(--muted);font-size:13px}
.kk-category-controls{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.kk-category-controls label{font-size:12px;color:var(--muted)}
.kk-category-controls select{min-height:40px;padding:8px 34px 8px 11px;border:1px solid var(--line);border-radius:8px;background:var(--paper);color:var(--ink);font:inherit;font-size:13px}
.kk-pagination{margin:28px 0 50px}
.kk-pagination .nav-links{display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap}
.kk-pagination .page-numbers{display:inline-flex;align-items:center;justify-content:center;min-width:38px;min-height:38px;padding:7px 11px;border:1px solid var(--line);border-radius:8px;background:#fbf7f0;font-size:13px}
.kk-pagination .page-numbers.current{background:var(--ink);border-color:var(--ink);color:var(--cream)}
@media(max-width:600px){.kk-category-toolbar{align-items:flex-start;flex-direction:column}.kk-category-controls{width:100%}.kk-category-controls label{display:flex;align-items:center;justify-content:space-between;width:100%;gap:12px}.kk-category-controls select{min-width:155px}}

/* Expandable full product descriptions */
.kk-description-more{margin:2px 0 12px;font-size:11px;line-height:1.65;color:var(--muted)}
.kk-description-more summary{display:inline-block;cursor:pointer;color:#80583c;font-weight:700;text-decoration:underline;text-underline-offset:3px;list-style:none}
.kk-description-more summary::-webkit-details-marker{display:none}
.kk-description-more summary:focus-visible{outline:2px solid var(--gold);outline-offset:3px;border-radius:2px}
.kk-description-more[open] summary{margin-bottom:7px}
.kk-description-full{color:var(--muted);overflow-wrap:anywhere}
.kk-description-full p{margin:0 0 8px;font-size:11px;line-height:1.65;color:var(--muted)}


/* Product imagery: neutral white stage, full image visible without cropping */
.kk-category-archive .photo,
.grid .card .photo {
    background: #fff !important;
}
.grid .card .photo > img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
    background: #fff !important;
}

/* Kaffekungen premium header and homepage finish */
header .menu a:focus-visible,.brand:focus-visible,.toggle:focus-visible{outline:2px solid #e0bb79;outline-offset:4px}
.hero .eyebrow:after{content:"";display:block;width:46px;height:1px;background:#c29a61;margin-top:13px}
.hero .cupart .cup{box-shadow:0 30px 55px #0009,inset -18px -12px 30px #321b0e40}
.products{background:#f4ede3}
@media(max-width:800px){
 header .nav{height:72px}
 header .menu{top:72px;background:#21150f;border-top:1px solid #654b30;padding:18px 22px;box-shadow:0 14px 22px #0003}
 header .menu a{color:#f1e4d2;border-bottom:1px solid #59412c;padding:12px 2px}
 .hero-in{min-height:0;padding:46px 0 40px;gap:12px}
 .hero:before{inset:10px}
 .cupart{height:230px}
}
@media(max-width:560px){
 .top{font-size:9px;letter-spacing:.12em;padding:9px 8px}
 .nav{height:68px}
 .brand{font-size:23px}
 .hero-in{padding:38px 0 30px}
 .hero h1{font-size:43px}
 .hero p{font-size:13px}
 .cupart{height:205px}
 .cupart:before{width:220px;height:220px}
}


/* Guide hero artwork supplied for Kaffekungen knowledge hub */
.guideart{padding:0!important;min-height:0!important;display:block!important;background:#1d130f!important;overflow:hidden;border:1px solid #6e5031;box-shadow:0 12px 30px rgba(35,20,12,.14)}
.guideart img{display:block;width:100%;height:auto;aspect-ratio:1783/882;object-fit:contain;object-position:center}
@media(max-width:800px){.guideart img{aspect-ratio:16/9;object-fit:cover;object-position:center}}


/* Homepage: photographic hero image, matching the Guides visual identity */
.hero-home{
    background-color:#1b120e!important;
    background-image:linear-gradient(90deg,rgba(24,15,10,.97) 0%,rgba(24,15,10,.82) 32%,rgba(24,15,10,.2) 68%,rgba(24,15,10,.04) 100%),url("assets/home-hero.webp")!important;
    background-size:cover!important;
    background-position:center 56%!important;
}
.hero-home:after{display:none}
.hero-home .hero-in{
    min-height:510px;
    grid-template-columns:minmax(0,1fr);
    padding-top:65px;
    padding-bottom:65px;
}
.hero-home .hero-copy{max-width:570px}
.hero-home .hero-copy h1{font-size:clamp(44px,5vw,66px)}
.hero-home .hero-copy p{max-width:520px}
.hero-home .cupart{display:none!important}

/* Smaller, more balanced site identity in the global header */
header .nav{height:72px}
header .brand{font-size:22px;letter-spacing:-.7px}
header .crown{width:32px;height:32px;margin-right:8px;font-size:16px}
header .menu{font-size:11px;gap:clamp(12px,1.7vw,23px)}
@media(max-width:800px){
    header .nav{height:68px}
    .hero-home .hero-in{min-height:450px;padding-top:48px;padding-bottom:48px}
    .hero-home{background-position:58% center!important}
}
@media(max-width:560px){
    header .brand{font-size:20px}
    header .crown{width:30px;height:30px}
    .hero-home .hero-in{min-height:420px;padding-top:38px;padding-bottom:38px}
    .hero-home{background-image:linear-gradient(90deg,rgba(24,15,10,.92),rgba(24,15,10,.58)),url("assets/home-hero.webp")!important;background-position:60% center!important}
}


/* Warm coffee-cream site canvas */
html, body { background-color: #f2e8da; }
body { background-color: var(--paper); }
main, .site-main { background-color: transparent; }
.products { background: #eee3d5 !important; }
.card, .kk-category-toolbar, .kk-pagination .page-numbers {
    background-color: #fbf7f0;
}
.kk-category-toolbar { border-color: #dfd1bf; }
.kk-category-controls select { background-color: #f6efe5; }
.kk-pagination .page-numbers.current { background: var(--ink); }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}


/* Stronger contrast for homepage category tiles against the warm coffee canvas */
.cat {
    background: linear-gradient(145deg, #fffdf8 0%, #fbf5eb 100%) !important;
    border-color: #d9c7ae !important;
    box-shadow: 0 4px 14px rgba(58,38,22,.055);
}
.cat h3 { color: #281a12; }
.cat p { color: #76695d; }
.cat:hover {
    box-shadow: 0 13px 28px rgba(48,30,18,.13);
    border-color: #bd9258 !important;
}


/* Official user-selected Kaffekungen logo system */
body > header { background:#f2e8da !important; color:#281a12; border-bottom:1px solid #d8c5a9; }
header .nav { min-height:78px; }
header .brand { display:flex; align-items:center; flex:0 0 auto; line-height:0; }
header .brand img { display:block; width:clamp(210px,22vw,285px); height:auto; max-height:62px; object-fit:contain; }
header .menu a { color:#38271b !important; }
header .menu a:hover, header .menu a:focus-visible { color:#956b32 !important; border-color:#c29a61; }
header .toggle { color:#38271b; border-color:#b99a6b; }
.footer-logo { display:inline-block; max-width:280px; background:#f2e8da; border:1px solid #d8c5a9; border-radius:5px; padding:7px 10px; margin-bottom:12px; }
.footer-logo img { display:block; width:100%; height:auto; }
@media(max-width:800px) {
  header .brand img { width:clamp(190px,42vw,245px); max-height:54px; }
}
@media(max-width:560px) {
  header .brand img { width:190px; max-height:48px; }
}

/* Homepage comparison call-to-action */
.trustin .trust-link{display:block;color:inherit;text-decoration:none;padding:0 10px;border-radius:8px;transition:background .18s,color .18s}
.trustin .trust-link:hover,.trustin .trust-link:focus-visible{background:#fff8;color:#80583c;outline:2px solid #c29a61;outline-offset:3px}
.trustin .trust-link span{display:inline-block;margin-left:5px;color:#9a6d37;font-weight:800}


/* Kaffekungen 1.4.0: accessible mobile navigation and larger desktop menu */
header .menu {
  font-size: 16px !important;
  font-weight: 700;
  letter-spacing: .035em;
}
header .menu a {
  font-size: 16px !important;
}
@media (max-width: 800px) {
  header .menu {
    background: #4a3022 !important;
    border-top: 1px solid #b58b54 !important;
    padding: 20px 24px !important;
    gap: 0 !important;
  }
  header .menu a,
  header .menu a:visited,
  header .menu a:hover,
  header .menu a:focus-visible {
    display: block;
    width: 100%;
    color: #fff2df !important;
    -webkit-text-fill-color: #fff2df !important;
    font-size: 19px !important;
    font-weight: 700 !important;
    line-height: 1.5 !important;
    letter-spacing: .025em !important;
    opacity: 1 !important;
    padding: 15px 4px !important;
    border-bottom: 1px solid #9a744b !important;
    text-shadow: none !important;
  }
  header .menu a:last-child {
    border-bottom: 0 !important;
  }
}
