/*
Theme Name: Kleine Helden Stoffwerk
Theme URI: https://kleineheldenstoffwerk.geld-solutions.de
Author: Kleine Helden Stoffwerk
Description: WooCommerce Theme für handgemachte Einzelstücke und Kleinserien.
Version: 11.0.0
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: kleine-helden-stoffwerk
*/
:root{
 --pink:#ed3f75; --pink2:#d93468; --navy:#17304f; --cream:#fffaf5;
 --soft:#fbf5ee; --mint:#dff3ef; --teal:#4f8d89; --border:#eee3d8;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;color:#222;background:#fff;font-family:Arial,Helvetica,sans-serif;line-height:1.55}
a{text-decoration:none;color:inherit}
img{max-width:100%;height:auto;display:block}
.khs-wrap{width:min(1450px,94%);margin:auto}

.khs-top{background:linear-gradient(90deg,var(--pink),var(--pink2));color:#fff}
.khs-top .khs-wrap{min-height:42px;display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap;font-size:.93rem}

.site-header{background:#fff;border-bottom:1px solid var(--border);position:sticky;top:0;z-index:50}
.header-inner{min-height:136px;display:grid;grid-template-columns:300px 1fr auto;align-items:center;gap:28px}
.brand img{width:215px;max-height:none;object-fit:contain;object-position:left center}
.site-nav{justify-self:center}
.site-nav ul{display:flex;gap:40px;list-style:none;padding:0;margin:0;align-items:center}
.site-nav a{font-size:1.05rem;font-weight:700}
.header-icons{display:flex;gap:18px;align-items:center;font-size:1.3rem}

.hero{background:var(--cream)}
.hero .khs-wrap{width:min(1500px,96%)}
.hero-inner{display:grid;grid-template-columns:30% 70%;min-height:620px}
.hero-copy{padding:55px 38px 46px 8px;display:flex;flex-direction:column;justify-content:center}
.hero-copy h1{font-size:clamp(2.7rem,5.1vw,5.1rem);line-height:1.02;margin:0 0 20px;color:var(--navy);letter-spacing:-1px}
.hero-copy h1 span{color:var(--pink)}
.hero-copy p{font-size:1.14rem;margin:0 0 18px}
.hero-note{border:1px dashed #dfa86f;border-radius:14px;padding:15px 17px;background:#fff9f4;margin:7px 0 18px;font-size:.98rem}
.hero-note strong{color:var(--pink)}
.hero-visual{
 background-image:url('assets/images/hero-approved.jpg');
 background-size:cover;
 background-position:center;
 min-height:620px;
 border-radius:0 0 0 0;
}
.khs-btn,.woocommerce a.button,.woocommerce button.button,.woocommerce input.button{
 display:inline-block;background:var(--pink)!important;color:white!important;
 border-radius:9px!important;padding:14px 23px!important;border:0!important;font-weight:700!important
}

.categories{padding:45px 0 26px;background:#fff}
.categories h2{text-align:center;color:var(--navy);font-size:2.1rem;margin:0 0 30px}
.cat-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:18px}
.cat-card{background:#fffaf6;border:1px solid var(--border);border-radius:19px;overflow:hidden;text-align:center;padding-bottom:18px}
.cat-card img{width:100%;aspect-ratio:1.12/1;object-fit:cover}
.cat-card h3{margin:12px 0 2px;color:var(--navy);font-size:1.08rem}
.cat-card p{margin:0;font-size:.92rem}

.trust{padding:19px 0;background:#faf7f2;border-top:1px solid var(--border);border-bottom:1px solid var(--border)}
.trust-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:14px}
.trust-item{text-align:center;font-size:.94rem}
.trust-item .ico{font-size:1.65rem;margin-bottom:4px}
.trust-item b{display:block;color:#111}

.tagline{width:min(1320px,92%);margin:22px auto;background:var(--mint);border:1px dashed #75bbb5;border-radius:13px;text-align:center;padding:13px;color:var(--teal);font-size:1.1rem;font-weight:700}

.content-area{padding:56px 0;min-height:55vh}
.content-area h2{color:var(--navy)}
.woocommerce ul.products li.product{background:#fff;padding:15px;border:1px solid var(--border);border-radius:16px}
.woocommerce ul.products li.product img{border-radius:12px}

.site-footer{background:var(--navy);color:white;padding:48px 0}
.footer-grid{display:grid;grid-template-columns:2fr 1fr 1fr;gap:38px}
.site-footer a{color:#fff}
.footer-logo{width:150px;background:#fff;border-radius:14px;padding:9px;margin-bottom:14px}

@media(max-width:1000px){
 .header-inner{grid-template-columns:180px 1fr auto;min-height:95px}
 .brand img{width:165px}
 .site-nav ul{gap:22px}
 .hero-inner{grid-template-columns:1fr}
 .hero-copy{padding:42px 0 22px}
 .hero-visual{min-height:460px;border-radius:18px}
 .cat-grid{grid-template-columns:repeat(2,1fr)}
 .trust-grid{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:720px){
 .khs-top .khs-wrap{justify-content:center}
 .header-inner{display:flex;justify-content:space-between;min-height:82px}
 .brand img{width:128px}
 .site-nav{display:none}
 .hero-visual{min-height:330px}
 .hero-copy h1{font-size:3rem}
 .cat-grid{grid-template-columns:1fr 1fr}
 .footer-grid{grid-template-columns:1fr}
}

/* V5 visual cleanup */
.hero{overflow:hidden}
.hero-inner{align-items:stretch;overflow:hidden}
.hero-copy{background:var(--cream);position:relative;z-index:2}
.hero-visual{overflow:hidden;background-repeat:no-repeat;background-color:#fbf5ee}
.cat-card img{background:#faf7f2;object-fit:contain;padding:10px}
.categories{overflow:hidden}
body:not(.woocommerce) .content-area:empty{display:none}

/* V6 */
.header-inner{min-height:150px}
.brand{display:flex;align-items:center}
.brand img{height:132px;width:auto;object-fit:contain}
.hero-visual{background-position:center center;background-size:cover}
.cat-card img{padding:0;background:#faf7f2;object-fit:cover;aspect-ratio:1.25/1}
.cat-card{overflow:hidden}

/* V7 */
.header-inner{min-height:132px;grid-template-columns:250px 1fr auto;gap:24px}
.brand img{height:118px;width:auto;max-width:235px;object-fit:contain}
.main-nav{justify-self:center}.hero-copy{padding:54px 38px 48px}
.hero-visual{min-height:620px;background-size:cover;background-position:center}
.categories{padding-top:42px;padding-bottom:34px}.category-grid{gap:18px}
.cat-card{background:#fbf7f1;border:1px solid #eadfd3;border-radius:18px;overflow:hidden;box-shadow:0 5px 18px rgba(35,52,70,.045)}
.cat-card img{display:block;width:100%;aspect-ratio:1.38/1;object-fit:cover;background:#fbf7f1;padding:0}
.cat-card .cat-copy{padding:14px 12px 16px}.cat-card h3{margin:0 0 4px;font-weight:700}.cat-card p{margin:0}

/* V8: Umsetzung nach bestätigter Designvorlage */
.khs-wrap{width:min(1480px,94%);margin:auto}
.khs-top .khs-wrap{min-height:42px;font-size:.94rem}

.site-header{position:relative;top:auto}
.header-inner{
  min-height:128px;
  grid-template-columns:300px 1fr 190px;
  gap:28px;
}
.brand img{
  width:auto;
  height:122px;
  max-width:280px;
}
.site-nav{justify-self:center}
.site-nav ul{gap:42px}
.site-nav a{font-size:1.04rem}

.hero .khs-wrap{width:min(1500px,96%)}
.hero-inner{
  display:grid;
  grid-template-columns:29% 71%;
  min-height:560px;
  align-items:stretch;
}
.hero-copy{
  padding:42px 34px 38px 8px;
  justify-content:center;
}
.hero-copy h1{
  font-size:clamp(3rem,4.8vw,4.8rem);
  line-height:1.02;
  margin-bottom:20px;
}
.hero-copy p{
  max-width:410px;
  font-size:1.08rem;
  line-height:1.45;
}
.hero-note{
  max-width:430px;
  padding:14px 16px;
  margin:4px 0 16px;
  line-height:1.42;
}
.hero-visual{
  min-height:560px;
  background-image:url('assets/images/hero-approved.jpg');
  background-size:cover;
  background-position:center center;
  background-repeat:no-repeat;
}

.categories{padding:34px 0 30px}
.categories h2{
  position:relative;
  width:max-content;
  max-width:100%;
  margin:0 auto 28px;
  color:var(--navy);
  font-size:2rem;
}
.categories h2:before,
.categories h2:after{
  content:"♡";
  color:var(--pink);
  margin:0 18px;
}
.cat-grid{
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:18px;
}
.cat-card{
  padding:0 0 16px;
  background:#fffaf6;
  border:1px solid #eee3d8;
  border-radius:18px;
  overflow:hidden;
  text-align:center;
  box-shadow:none;
}
.cat-card img{
  width:100%;
  aspect-ratio:1.2/1;
  object-fit:cover;
  padding:0;
  background:#fbf7f1;
}
.cat-card h3{
  margin:12px 0 2px;
  color:var(--navy);
  font-size:1.08rem;
}
.cat-card p{margin:0;font-size:.92rem}

.trust{padding:17px 0}
.trust-item .ico{font-size:1.55rem}
.tagline{
  margin:18px auto 24px;
  padding:11px 14px;
  font-size:1.08rem;
}

.content-area{padding:28px 0 50px;min-height:0}
.content-area h2{margin-top:0}

@media(max-width:1000px){
  .header-inner{grid-template-columns:190px 1fr auto;min-height:105px}
  .brand img{height:94px;max-width:180px}
  .site-nav ul{gap:20px}
  .hero-inner{grid-template-columns:1fr}
  .hero-copy{padding:34px 4% 24px}
  .hero-visual{min-height:480px}
  .cat-grid{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:720px){
  .header-inner{min-height:84px}
  .brand img{height:72px;width:auto}
  .hero-copy h1{font-size:3rem}
  .hero-visual{min-height:350px}
  .categories h2{font-size:1.55rem}
  .categories h2:before,.categories h2:after{margin:0 7px}
}

/* V9: Logo überlappt Header und Hero. Normales Seitenscrolling. */
.site-header{
  position:relative;
  z-index:30;
  overflow:visible;
}
.header-inner{
  position:relative;
  overflow:visible;
  min-height:108px;
  grid-template-columns:330px 1fr 190px;
}
.brand{
  position:absolute;
  left:0;
  top:14px;
  z-index:50;
  width:315px;
  height:250px;
  display:flex;
  align-items:flex-start;
  justify-content:flex-start;
  pointer-events:auto;
}
.brand img{
  width:300px;
  height:auto;
  max-width:none;
  max-height:none;
  object-fit:contain;
  filter:drop-shadow(0 5px 8px rgba(30,54,83,.08));
}
.site-nav{
  grid-column:2;
  align-self:center;
}
.header-actions{
  grid-column:3;
}
.hero{
  position:relative;
  z-index:10;
  overflow:visible;
}
.hero-copy{
  padding-top:155px;
}
html{
  scroll-behavior:smooth;
  scroll-snap-type:none;
}
body,main,.hero,.categories,.trust,.content-area{
  scroll-snap-align:none;
  overflow:visible;
}

@media(max-width:1100px){
  .header-inner{grid-template-columns:235px 1fr auto}
  .brand{width:225px;height:195px;top:18px}
  .brand img{width:215px}
  .hero-copy{padding-top:118px}
}
@media(max-width:720px){
  .header-inner{grid-template-columns:120px 1fr auto;min-height:82px}
  .brand{width:132px;height:125px;top:10px}
  .brand img{width:126px}
  .hero-copy{padding-top:72px}
}

/* V10 */
.brand img{background:transparent!important}
.cat-card{display:block;color:inherit;text-decoration:none;transition:transform .18s ease,box-shadow .18s ease}
.cat-card:hover{transform:translateY(-3px);box-shadow:0 8px 22px rgba(35,52,70,.10)}
.cat-card:focus-visible{outline:3px solid var(--pink);outline-offset:3px}

/* V11: Abstand zwischen Logo und Hero-Überschrift */
.brand{
  top:2px;
  height:220px;
}
.brand img{
  width:280px;
}
.hero-copy{
  padding-top:190px;
}
@media(max-width:1100px){
  .brand{top:4px;height:175px}
  .brand img{width:205px}
  .hero-copy{padding-top:145px}
}
@media(max-width:720px){
  .brand{top:4px;height:115px}
  .brand img{width:120px}
  .hero-copy{padding-top:90px}
}

/* V12: Produktkarten auf der Startseite sauber ausrichten */
.home .content-area .woocommerce ul.products{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:24px!important;
  margin:0!important;
  padding:0!important;
}
.home .content-area .woocommerce ul.products::before,
.home .content-area .woocommerce ul.products::after{
  display:none!important;
  content:none!important;
}
.home .content-area .woocommerce ul.products li.product{
  float:none!important;
  width:auto!important;
  margin:0!important;
  display:flex!important;
  flex-direction:column!important;
  min-width:0!important;
  height:100%!important;
  padding:16px!important;
  overflow:hidden!important;
}
.home .content-area .woocommerce ul.products li.product a.woocommerce-LoopProduct-link{
  display:flex!important;
  flex-direction:column!important;
  flex:1 1 auto!important;
  min-width:0!important;
}
.home .content-area .woocommerce ul.products li.product img{
  width:100%!important;
  aspect-ratio:1/1!important;
  object-fit:cover!important;
  margin:0 0 14px!important;
}
.home .content-area .woocommerce ul.products li.product .woocommerce-loop-product__title{
  font-size:1rem!important;
  line-height:1.35!important;
  min-height:4.05em!important;
  margin:0 0 10px!important;
  padding:0!important;
  overflow-wrap:anywhere!important;
}
.home .content-area .woocommerce ul.products li.product .price{
  display:block!important;
  margin:auto 0 14px!important;
  line-height:1.3!important;
}
.home .content-area .woocommerce ul.products li.product .button{
  display:block!important;
  width:100%!important;
  margin:0!important;
  text-align:center!important;
  white-space:normal!important;
}
@media(max-width:1000px){
  .home .content-area .woocommerce ul.products{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}
@media(max-width:600px){
  .home .content-area .woocommerce ul.products{
    grid-template-columns:1fr!important;
  }
  .home .content-area .woocommerce ul.products li.product .woocommerce-loop-product__title{
    min-height:0!important;
  }
}

/* V13: Eigene stabile Produktkarten fuer "Neu im Stoffwerk" */
.khs-new-products{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:24px;
}
.khs-product-card{
  min-width:0;
  display:flex;
  flex-direction:column;
  background:#fff;
  border:1px solid var(--border);
  border-radius:16px;
  overflow:hidden;
}
.khs-product-image{
  display:block;
  aspect-ratio:1/1;
  background:#fbf7f1;
}
.khs-product-image img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.khs-product-copy{
  display:flex;
  flex:1 1 auto;
  flex-direction:column;
  padding:16px;
  min-width:0;
}
.khs-product-copy h3{
  margin:0 0 10px;
  font-size:1rem;
  line-height:1.35;
  color:var(--navy);
  min-height:4.05em;
  overflow-wrap:anywhere;
}
.khs-product-price{
  margin:auto 0 14px;
  font-weight:700;
}
.khs-product-button{
  display:block;
  width:100%;
  text-align:center;
  white-space:normal;
}
@media(max-width:1000px){
  .khs-new-products{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:600px){
  .khs-new-products{grid-template-columns:1fr}
  .khs-product-copy h3{min-height:0}
}
