/* =========================================================
   GLOBAL
   ========================================================= */
p { letter-spacing: .5px; }

.widget_product_search .woocommerce-product-search {
    width: 210px;
}
/* =========================================================
   CONTACT FORM (CF7)
   ========================================================= */
.wpcf7-form select,
.wpcf7-form input {
    font-weight: 600;
    font-size: 13px;
    padding: 5px 15px 0;
    line-height: 36px;
    width: 95%;
    height: 45px;
    border: 1px solid #e8e8e8;
}

.wpcf7-form textarea {
    font-family: 'Poppins';
    font-weight: 600;
    font-size: 13px;
    padding: 15px;
    width: 95%;
    height: 174px;
    line-height: normal;
    margin-bottom: 4px;
    color: #999;
    letter-spacing: .2px;
    border: 1px solid #e8e8e8;
}

.wpcf7-form label {
    float: left;
    width: 46%;
    margin: 0;
}
.wpcf7-form label:first-child { margin-right: 5%; }

.wpcf7-form p { padding-bottom: 24px; }
.wpcf7-form p:after {
    display: table;
    clear: both;
    width: 100%;
    content: '';
}

.wpcf7-form .wpcf7-acceptance,
.wpcf7-form .wpcf7-radio input,
.wpcf7-form .wpcf7-checkbox input {
    width: auto;
    display: inline-block;
    vertical-align: middle;
    margin: 0;
    line-height: normal;
    height: inherit;
}

div.wpcf7 input[type="file"] { padding: 0; }

.wpcf7-form input[type="submit"] {
    height: 50px;
    line-height: 50px;
    padding: 0 38px 0;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    width: auto;
    text-transform: uppercase;
}


/* =========================================================
   PRODUCT SINGLE (Add-to-cart block + wishlist + qty)
   ========================================================= */
.tm-element-woo-add-to-cart {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.tm-element-woo-add-to-cart > form.cart {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}

.tm-element-woo-add-to-cart .single_add_to_cart_button {
    background-color: #9c968b;
    color: #fff;
    height: 50px;
    line-height: 50px;
    padding: 0 38px 0;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    width: auto !important;
    flex: 0 0 auto;
    text-transform: uppercase;
}

.button.alt:hover {
    background-color: #b0aba1;
    color: #fff;
}

.tm-element-woo-add-to-cart .quantity.buttons_added input.plus,
.tm-element-woo-add-to-cart .quantity.buttons_added input.minus {
    display: none !important;
}

.tm-element-woo-add-to-cart .quantity.buttons_added {
    display: inline-flex !important;
    align-items: center;
}

.tm-element-woo-add-to-cart .quantity.buttons_added .qty {
    height: 50px !important;
    line-height: 50px !important;
    width: 90px !important;
    padding: 0 12px !important;
    border: 1px solid #e5e5e5 !important;
    border-radius: 10px !important;
    text-align: center !important;
    background: #fff !important;
}

.tm-element-woo-add-to-cart > .yith-wcwl-add-to-wishlist {
    margin: 0 !important;
    display: inline-flex;
    align-items: center;
}

.yith-wcwl-add-to-wishlist svg.yith-wcwl-icon-svg {
    height: auto;
    width: 45px !important;
    color: #9c968b !important;
    margin-left: 15px;
}

.tm-element-woo-add-to-cart input.qty::-webkit-outer-spin-button,
.tm-element-woo-add-to-cart input.qty::-webkit-inner-spin-button {
    -webkit-appearance: auto !important;
    margin: 0;
}
.tm-element-woo-add-to-cart input.qty {
    -moz-appearance: auto !important;
    appearance: auto !important;
}

h1.product_title {
    margin-bottom: 7px;
    color: #333;
    font-weight: 600;
    font-size: 28px;
}


/* =========================================================
   PRODUCT GRID (Loop cards)
   ========================================================= */

/* Card base */
.woocommerce ul.products li.product {
    position: relative;
    display: flex;
    flex-direction: column;
    margin-top: 40px;

    /* Hover nur auf sichtbaren Inhalt, nicht auf li-Padding */
    pointer-events: none;
}
.woocommerce ul.products li.product > * {
    pointer-events: auto;
}

/* Image zoom (Inhalt zoomt, Rahmen bleibt fix) */
.woocommerce ul.products li.product .dn-product-image{
    display: block;
    overflow: hidden;
}
.woocommerce ul.products li.product .dn-product-image img{
    display: block;
    width: 100%;
    height: auto;
    transition: transform .35s ease;
}
.woocommerce ul.products li.product:hover .dn-product-image img{
    transform: scale(1.05);
}

/* Badge */
.woocommerce ul.products li.product .dn-product-badge {
    position: absolute;
    z-index: 50;
    top: 20px;
    left: 50px;
    background: #fff;
    color: #232323;
    border-radius: 1px;
    padding: 0 13px;
    font-size: 11px;
    font-weight: 600;
    line-height: 22px;
    text-transform: uppercase;
    letter-spacing: .5px;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, .05);
}

/* Headline row: title left, price right */
.dn-product-headline {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;

    /* Abstand zum Kategorien/Button-Slot (statt Margin in .dn-product-categories) */
    margin: 15px 0 6px 0;
}

.dn-product-headline .woocommerce-loop-product__title {
    margin: 0;
    min-height: 2.6em; /* Platz für bis zu ~2 Zeilen */
}

.dn-product-headline .dn-product-price {
    font-size: 14px;
    color: #232323;
    font-weight: 500;
    white-space: nowrap;
    font-family: 'Poppins';
}

/* Categories (KEIN margin!) */
.dn-product-categories{
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    letter-spacing: .3px;
    line-height: 1.2;
    white-space: normal;

    /* stabiler Slot für Swap */
    min-height: 60px;
}

/* =========================================================
   LOOP: Hover swap Categories -> Add-to-cart button (stable)
   ========================================================= */

/* Default: hide add-to-cart in loop */
.woocommerce ul.products li.product a.button.add_to_cart_button,
.woocommerce ul.products li.product a.button.ajax_add_to_cart {
    display: none !important;
}

/* Hover/Fokus: categories off, button on */
.woocommerce ul.products li.product:hover .dn-product-categories,
.woocommerce ul.products li.product:focus-within .dn-product-categories {
    display: none;
}

.woocommerce ul.products li.product:hover a.button.add_to_cart_button,
.woocommerce ul.products li.product:hover a.button.ajax_add_to_cart,
.woocommerce ul.products li.product:focus-within a.button.add_to_cart_button,
.woocommerce ul.products li.product:focus-within a.button.ajax_add_to_cart {
    display: inline-flex !important;
}

/* Loop button: takes the exact same slot as categories */
.woocommerce ul.products li.product a.add_to_cart_button,
.woocommerce ul.products li.product a.ajax_add_to_cart {
    display: inline-flex;
    align-items: flex-start;   /* <<< WICHTIG: oben, nicht mittig */
    gap: 8px;
    color: #232323;
    background: none !important;
    min-height: 60px;          /* Slot bleibt stabil */
    line-height: 21px;         /* <<< entspricht 1. Zeile */
    margin: 0 !important;
    padding: 0 !important;
}

/* Hover: bündig links */
.woocommerce ul.products li.product:hover a.add_to_cart_button,
.woocommerce ul.products li.product:hover a.ajax_add_to_cart,
.woocommerce ul.products li.product:focus-within a.add_to_cart_button,
.woocommerce ul.products li.product:focus-within a.ajax_add_to_cart {
    padding-left: 0 !important;
}

/* Controlled icon */
.woocommerce ul.products li.product a.add_to_cart_button::before,
.woocommerce ul.products li.product a.ajax_add_to_cart::before {
    content: "";
    display: inline-block;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    background: url(/wp-content/uploads/icon-m-cart.svg) no-repeat center;
    background-size: contain;
}


/* =========================================================
   PRODUCT GALLERY (Single): thumbs 1 row + horizontal scroll
   ========================================================= */
.woocommerce div.product .flex-control-thumbs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 12px;
    padding-bottom: 10px;
    scroll-behavior: smooth;
    margin: 10px 0 0 0;
}

.woocommerce div.product .flex-control-thumbs li {
    flex: 0 0 auto;
    width: 90px;
    padding: 0;
}

/* Scrollbar */
.woocommerce div.product .flex-control-thumbs::-webkit-scrollbar { height: 6px; }
.woocommerce div.product .flex-control-thumbs::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,.2);
    border-radius: 3px;
}

/* =========================================================
   YITH Wishlist – Layout/Spalten wie klassisches Woo
   ========================================================= */

.woocommerce table.cart thead th.product-name {
    position: relative;
    text-align: left;
}
.nobr, .product-price, .product-add-to-cart a {
    font-weight: 700;
    color: #232323;
}
.woocommerce table.shop_table td:last-child {
    text-align: center;
}
.wishlist_table.shop_table{
    width:100%;
    border-collapse:collapse;
    table-layout:fixed;                 /* << wichtig */
}

/* feste Spaltenbreiten */
.wishlist_table .product-remove{ width:60px; }
.wishlist_table .product-thumbnail{ width:140px; }
.wishlist_table .product-name{ width:auto; }          /* nimmt Rest */
.wishlist_table .product-price{ width:180px; }
.wishlist_table .product-add-to-cart{ width:220px; }

/* Linien + Padding etwas “Woo-typischer” */
.wishlist_table.shop_table th,
.wishlist_table.shop_table td{
    border:1px solid rgba(0,0,0,.08);
    padding:18px 16px !important;
    vertical-align:middle;
}

/* Header: nicht in grauen Boxen, zentriert */
.wishlist_table.shop_table thead th{
    background:transparent !important;
    text-align:center;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:.02em;
}

/* Name links, Preis/CTA zentriert */
.wishlist_table td.product-name{ text-align:left; font-weight:700; }
.wishlist_table td.product-price,
.wishlist_table td.product-add-to-cart{ text-align:center; }

/* Thumbnail größer/clean */
.wishlist_table .product-thumbnail img{
    width:110px;
    height:auto;
    display:inline-block;
    border-radius:0 !important;
    box-shadow:none !important;
}

/* Remove: kein Kreis/kein Button */
.wishlist_table a.remove.remove_from_wishlist{
    font-size:34px;
    line-height:1;
    display: flex;
    justify-content: center;
    width: auto;
}

/* Add-to-cart: Textlink wie alt */
.wishlist_table a.add_to_cart_button,
.wishlist_table a.ajax_add_to_cart{
    background:none !important;
    border:0 !important;
    padding:0 !important;
    box-shadow:none !important;
    font-weight:700;
    text-decoration:none;
    white-space:nowrap;
}
/* =========================================================
   YITH Wishlist Button auf Produktbildern im Produkt-Grid
   ========================================================= */
.woocommerce ul.products li.product {
    position: relative;
}
.woocommerce ul.products li.product .dn-wishlist-btn {
    position: absolute;
    top: 10px;
    right: 20px;
    z-index: 5;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.woocommerce ul.products li.product:hover .dn-wishlist-btn,
.woocommerce ul.products li.product:focus-within .dn-wishlist-btn {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
/* Weiße Icon-Kachel wie im Original */
.woocommerce ul.products li.product .dn-wishlist-btn .yith-wcwl-add-to-wishlist svg.yith-wcwl-icon-svg {
    background: #fff;
    padding: 6px;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, .05);
    color: #232323 !important;
    margin: 0;
    height. auto;
    width: 35px !important;
}

.yith-wcan-reset-filters {
    background-color: #fff;
    border: 1px solid #D7D7D7;
    border-radius: 4px;
    display: inline-block;
    padding: 12px 7px;
    text-align: center;
    font-size: 0.8rem;
    font-family: 'Raleway', sans-serif;
    color: #434343;
}
.yith-wcan-filters .yith-wcan-filter {
    margin-bottom: 0;
}

/* =========================================================
   Mengenangabe im Warenkorb am Icon im Header
   ========================================================= */

/* Cart-Icon als Bezugspunkt */
.cartTrigger {
    position: relative;
}

/* Counter-Badge */
.cartCounter {
    position: absolute;
    top: 24px;
    right: 28px;
    min-width: 18px;
    height: 18px;
    background: #000;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 16px;
    text-align: center;
    border-radius: 999px;
    box-sizing: border-box;
}

/* Optional: ausblenden, wenn leer */
.cartCounter:empty,
.cartCounter[data-count="0"] {
    display: none;
}