/*
Theme Name:   3dwolf Child
Theme URI:    https://3dwolf.ch
Description:  Child Theme für 3dwolf.ch – modernes Design basierend auf Storefront
Author:       3dClawi
Author URI:   https://3dwolf.ch
Template:     storefront
Version:      1.0.0
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  3dwolf-child
*/

/* ==========================================================================
   VARIABLEN & BASIS
   ========================================================================== */
:root {
  --wolf-green:        #00C850;
  --wolf-green-dark:   #009A3D;
  --wolf-green-light:  #00E85C;
  --wolf-dark:         #1A1A1A;
  --wolf-gray:         #2C2C2C;
  --wolf-mid:          #555555;
  --wolf-light:        #F5F5F5;
  --wolf-white:        #FFFFFF;
  --wolf-radius:       6px;
  --wolf-radius-lg:    12px;
  --wolf-transition:   0.2s ease;
  --wolf-shadow:       0 2px 12px rgba(0,0,0,0.08);
  --wolf-shadow-hover: 0 6px 24px rgba(0,200,80,0.18);
}

/* ==========================================================================
   TYPOGRAFIE
   ========================================================================== */
body {
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--wolf-dark);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--wolf-dark);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

a {
  color: var(--wolf-green-dark);
  transition: color var(--wolf-transition);
}

a:hover {
  color: var(--wolf-green);
  text-decoration: none;
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
  background-color: var(--wolf-dark) !important;
  padding: 16px 0 !important;
  border-bottom: 3px solid var(--wolf-green) !important;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 16px rgba(0,0,0,0.3);
}

.site-header .site-branding .site-title a,
.site-header .site-branding .site-title a:hover {
  color: var(--wolf-white) !important;
  font-weight: 800;
  font-size: 1.6rem;
  letter-spacing: -0.03em;
}

.site-header .site-description {
  color: rgba(255,255,255,0.5) !important;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Header Cart */
.storefront-handheld-footer-bar .cart-contents,
.site-header-cart .cart-contents {
  color: var(--wolf-white) !important;
}

/* count badge - transparent, kein Badge */

/* ==========================================================================
   SIDEBAR WIDGET - PRODUKTKATEGORIEN
   ========================================================================== */
.widget_product_categories .product-categories,
.widget_product_categories ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.widget_product_categories .product-categories li,
.widget_product_categories ul li {
  display: block;
  padding: 3px 0;
}

/* Produktanzahl-Zähler ausblenden (stört das Layout) */
.widget_product_categories .count {
  display: none !important;
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.main-navigation ul li a,
.site-header-menu .main-navigation ul li a {
  color: rgba(255,255,255,0.85) !important;
  font-weight: 500;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 8px 14px !important;
  border-radius: var(--wolf-radius);
  transition: all var(--wolf-transition) !important;
}

.main-navigation ul li a:hover,
.main-navigation ul li.current-menu-item > a {
  color: var(--wolf-green) !important;
  background-color: rgba(0,200,80,0.08) !important;
}

.main-navigation ul li ul {
  background-color: var(--wolf-gray) !important;
  border: 1px solid rgba(0,200,80,0.2) !important;
  border-radius: var(--wolf-radius) !important;
  box-shadow: var(--wolf-shadow) !important;
}

.main-navigation ul li ul li a {
  color: rgba(255,255,255,0.8) !important;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.button,
button,
input[type="button"],
input[type="reset"],
input[type="submit"],
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
  background-color: var(--wolf-green) !important;
  color: var(--wolf-dark) !important;
  font-weight: 700 !important;
  font-size: 0.875rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  border: none !important;
  border-radius: var(--wolf-radius) !important;
  padding: 12px 24px !important;
  transition: all var(--wolf-transition) !important;
  box-shadow: none !important;
  cursor: pointer;
}

.button:hover,
button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover {
  background-color: var(--wolf-green-light) !important;
  color: var(--wolf-dark) !important;
  transform: translateY(-1px);
  box-shadow: var(--wolf-shadow-hover) !important;
}

.button.alt,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce #respond input#submit.alt {
  background-color: var(--wolf-dark) !important;
  color: var(--wolf-green) !important;
  border: 2px solid var(--wolf-green) !important;
}

.button.alt:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover {
  background-color: var(--wolf-green) !important;
  color: var(--wolf-dark) !important;
}

/* ==========================================================================
   PRODUKTKARTEN
   ========================================================================== */
.woocommerce ul.products li.product {
  background: var(--wolf-white);
  border-radius: var(--wolf-radius-lg) !important;
  overflow: hidden;
  transition: all var(--wolf-transition) !important;
  box-shadow: var(--wolf-shadow) !important;
  border: 1px solid rgba(0,0,0,0.06) !important;
}

.woocommerce ul.products li.product:hover {
  transform: translateY(-4px);
  box-shadow: var(--wolf-shadow-hover) !important;
  border-color: var(--wolf-green) !important;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-weight: 700;
  font-size: 1rem !important;
  color: var(--wolf-dark) !important;
  padding: 12px 16px 4px !important;
}

.woocommerce ul.products li.product .price {
  color: var(--wolf-green-dark) !important;
  font-weight: 700 !important;
  font-size: 1.1rem !important;
  padding: 0 16px 12px !important;
}

.woocommerce ul.products li.product .onsale,
.woocommerce span.onsale {
  background-color: var(--wolf-green) !important;
  color: var(--wolf-dark) !important;
  font-weight: 700;
  border-radius: var(--wolf-radius) !important;
  font-size: 0.75rem !important;
  padding: 4px 10px !important;
  min-height: unset !important;
  min-width: unset !important;
  line-height: 1.4 !important;
}

/* ==========================================================================
   PRODUKTSEITE (SINGLE)
   ========================================================================== */
.woocommerce div.product .product_title {
  font-size: 2rem !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em;
}

.woocommerce div.product p.price,
.woocommerce div.product span.price {
  color: var(--wolf-green-dark) !important;
  font-size: 1.8rem !important;
  font-weight: 800 !important;
}

.woocommerce div.product .woocommerce-product-gallery__wrapper img {
  border-radius: var(--wolf-radius-lg);
}

/* Tabs */
.woocommerce div.product .woocommerce-tabs ul.tabs li a {
  font-weight: 600;
  color: var(--wolf-mid);
  border-radius: var(--wolf-radius) var(--wolf-radius) 0 0 !important;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
  color: var(--wolf-green-dark) !important;
  border-top: 3px solid var(--wolf-green) !important;
}

/* ==========================================================================
   WARENKORB & CHECKOUT
   ========================================================================== */
.woocommerce table.shop_table {
  border-radius: var(--wolf-radius-lg) !important;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.08) !important;
  box-shadow: var(--wolf-shadow) !important;
}

.woocommerce table.shop_table th {
  background-color: var(--wolf-dark) !important;
  color: var(--wolf-white) !important;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  padding: 14px 16px !important;
}

.woocommerce #payment {
  background: var(--wolf-light) !important;
  border-radius: var(--wolf-radius-lg) !important;
  border: 1px solid rgba(0,0,0,0.08) !important;
}

/* ==========================================================================
   FORMULARE & INPUTS
   ========================================================================== */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="password"],
input[type="search"],
textarea,
select {
  border: 1.5px solid #DDDDDD !important;
  border-radius: var(--wolf-radius) !important;
  padding: 10px 14px !important;
  font-size: 0.95rem !important;
  transition: border-color var(--wolf-transition) !important;
  background: var(--wolf-white) !important;
  color: var(--wolf-dark) !important;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
  border-color: var(--wolf-green) !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(0,200,80,0.12) !important;
}

/* ==========================================================================
   WIDGETS & SIDEBAR
   ========================================================================== */
.widget-title,
.woocommerce-widget-layered-nav-list__item a {
  font-weight: 700;
}

.widget-title {
  font-size: 1rem !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--wolf-dark) !important;
  border-bottom: 2px solid var(--wolf-green) !important;
  padding-bottom: 8px !important;
  margin-bottom: 16px !important;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background-color: var(--wolf-dark) !important;
  color: rgba(255,255,255,0.7) !important;
  border-top: 3px solid var(--wolf-green) !important;
  padding: 48px 0 24px !important;
}

.site-footer .widget-title {
  color: var(--wolf-white) !important;
  border-bottom-color: var(--wolf-green) !important;
}

.site-footer a {
  color: rgba(255,255,255,0.7) !important;
}

.site-footer a:hover {
  color: var(--wolf-green) !important;
}

.site-info {
  background-color: #111111 !important;
  color: rgba(255,255,255,0.4) !important;
  font-size: 0.8rem !important;
  padding: 16px 0 !important;
  text-align: center;
}

/* ==========================================================================
   WOOCOMMERCE – BENACHRICHTIGUNGEN
   ========================================================================== */
.woocommerce-message,
.woocommerce-info {
  border-top-color: var(--wolf-green) !important;
  background-color: rgba(0,200,80,0.06) !important;
  border-radius: 0 var(--wolf-radius) var(--wolf-radius) 0 !important;
}

.woocommerce-error {
  border-top-color: #e53935 !important;
  border-radius: 0 var(--wolf-radius) var(--wolf-radius) 0 !important;
}

/* ==========================================================================
   BREADCRUMBS
   ========================================================================== */
.woocommerce-breadcrumb {
  font-size: 0.8rem !important;
  color: var(--wolf-mid) !important;
  margin-bottom: 24px !important;
}

.woocommerce-breadcrumb a {
  color: var(--wolf-mid) !important;
}

.woocommerce-breadcrumb a:hover {
  color: var(--wolf-green) !important;
}

/* ==========================================================================
   STAR RATINGS
   ========================================================================== */
.star-rating span::before,
.star-rating::before {
  color: var(--wolf-green) !important;
}

/* ==========================================================================
   SIDEBAR LOGO – transparent, passend
   ========================================================================== */
.widget-area .widget_media_image img {
  max-width: 180px !important;
  height: auto !important;
  display: block;
  margin: 0 auto 8px;
  background: transparent !important;
}

.widget-area .widget_media_image {
  text-align: center;
  padding: 8px 0 16px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  margin-bottom: 16px;
}

/* ==========================================================================
   BANNER BILDER – gleich gross, schwarze Box weg
   ========================================================================== */
.wp-block-image figure img {
  width: 220px !important;
  height: 220px !important;
  object-fit: cover;
}

/* Schwarze figure-Box weg */
.wp-block-image figure {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  margin: 0 auto;
}

/* Banner-Bereich zentriert und gleich ausgerichtet */
.wp-block-columns .wp-block-column .wp-block-image {
  text-align: center;
}

/* ==========================================================================
   WARENKORB HEADER – sichtbar machen
   ========================================================================== */
.site-header .site-header-cart,
.site-header .cart-contents {
  color: var(--wolf-white) !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.site-header .cart-contents {
  display: flex !important;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.9rem;
}

.site-header .cart-contents .amount {
  color: var(--wolf-white) !important;
}

/* count badge header - kein badge */

/* Warenkorb CHF-Betrag und Icon-Bereich */
.storefront-header-cart {
  background: rgba(255,255,255,0.08) !important;
  border-radius: var(--wolf-radius) !important;
  padding: 6px 12px !important;
  border: 1px solid rgba(0,200,80,0.3) !important;
  transition: all var(--wolf-transition);
}

.storefront-header-cart:hover {
  background: rgba(0,200,80,0.12) !important;
  border-color: var(--wolf-green) !important;
}

/* CHF 0.00 Text */
.site-header .cart-contents .woocommerce-Price-amount {
  color: var(--wolf-white) !important;
}

/* Warenkorb-Link: Text und CHF weiss */
a.cart-contents,
.site-header a.cart-contents {
  color: var(--wolf-white) !important;
  text-decoration: none !important;
  display: flex !important;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 500;
}

.site-header a.cart-contents .woocommerce-Price-amount,
.site-header a.cart-contents .count {
  color: var(--wolf-white) !important;
}

/* Count-Badge komplett cleanen – überschreibt auch .onsale-Regel */
.site-header-cart .count,
a.cart-contents .count,
.cart-contents .count,
.site-header .count {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  color: rgba(255,255,255,0.75) !important;
  font-size: 0.85rem !important;
  min-height: unset !important;
  min-width: unset !important;
  line-height: inherit !important;
  border-radius: 0 !important;
  padding: 0 !important;
  width: auto !important;
  height: auto !important;
  box-shadow: none !important;
  display: inline !important;
  vertical-align: baseline !important;
}

/* Storefront setzt einen grünen Kreis über ::before oder inline-block */
.site-header-cart li > a.cart-contents .count {
  display: inline !important;
}

/* Warenkorb-Icon-Farbe */
.site-header .cart-contents svg path,
.site-header .cart-contents svg {
  fill: var(--wolf-white) !important;
  color: var(--wolf-white) !important;
}

/* ==========================================================================
   KATEGORIEN – LINKS (vor dem Content)
   ========================================================================== */

/* Sidebar links anzeigen auf der Startseite/Shop */
.home .content-area,
.archive .content-area,
.woocommerce-page .content-area {
  float: right !important;
  overflow: visible;
}

.home .widget-area,
.archive .widget-area,
.woocommerce-page .widget-area {
  float: left !important;
  overflow: visible;
}

/* Clearfix – verhindert Überlappungen nach Float-Layout */
.site-content::after,
.home .site-content::after,
.archive .site-content::after {
  content: '';
  display: table;
  clear: both;
}

/* Storefront layout-left class nutzen */
.storefront-full-width-content .site-main {
  width: 100%;
}

/* ==========================================================================
   WARENKORB – WooCommerce Blocks Cart Fix
   ========================================================================== */

/* Quantity-Wrapper: Mengenfeld + Papierkorb nebeneinander mit Abstand */
.wc-block-cart-item__quantity {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  flex-wrap: nowrap !important;
}

/* Quantity-Selector normal */
.wc-block-components-quantity-selector {
  flex-shrink: 0;
}

/* Papierkorb-Button: sauber rechts neben dem Mengenfeld */
.wc-block-cart-item__remove-link {
  flex-shrink: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  background: rgba(200,50,50,0.12) !important;
  color: #c83232 !important;
  border: none !important;
  cursor: pointer !important;
  transition: background var(--wolf-transition);
  margin-left: 4px !important;
}

.wc-block-cart-item__remove-link:hover {
  background: rgba(200,50,50,0.3) !important;
  color: #c83232 !important;
}

/* SVG sichtbar machen (WooCommerce Blocks setzt aria-hidden aber nicht display:none) */
.wc-block-cart-item__remove-link svg {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 20px !important;
  height: 20px !important;
  pointer-events: none;
  overflow: visible !important;
}

.wc-block-cart-item__remove-link svg path {
  fill: #c83232 !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Kein ::after – sonst doppelter Inhalt */
.wc-block-cart-item__remove-link::after {
  display: none !important;
  content: none !important;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.5rem; }

  .site-header {
    padding: 12px 0 !important;
  }
}

@media (max-width: 480px) {
  h1 { font-size: 1.5rem; }
}
