/*
 Theme Name:   Woodmart Child
 Description:  Woodmart Child Theme
 Author:       XTemos
 Author URI:   http://xtemos.com
 Template:     woodmart
 Version:      1.0.0
 Text Domain:  woodmart
*/

body,
h1, h2, h3, h4, h5, h6,
.elementor-heading-title {
    font-family: 'Fredoka', Arial, Helvetica, sans-serif !important;
}

.price del {
    color: #ef9898;
    font-weight: 300;
}

.wd-product.wd-hover-buttons-on-hover :is(.wd-product-header,.wrap-price) {
    flex-flow: column;
}

/* ── Product image uniform height ─────────────────────────────────────────── */
.wd-product:not(.wd-hover-small) :is(.wd-product-img-link,.wd-product-img-hover) :is(picture,img) {
    width: 100%;
    height: 284px;
    object-fit: contain;
}

/* ── Discount badge na detail produktu ─────────────────────────────────────── */
.ds-discount-badge {
    display: inline-block;
    background: #e53e3e;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 8px;
}

/* ── Loop badges (20KS / 5KS / 1+2) ───────────────────────────────────────── */
.ds-label-wrap {
    position: absolute;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ds-label-wrap.right {
    top: 10px;
    right: 10px;
    align-items: flex-end;
}

.ds-label-wrap.left {
    top: 10px;
    left: 10px;
    align-items: flex-start;
}

.ds-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 12px;
    letter-spacing: .4px;
    text-transform: uppercase;
    white-space: nowrap;
}

.ds-badge.balenie {
    background: #1e40af;
    color: #fff;
}

.ds-badge.akcia {
    background: #16a34a;
    color: #fff;
}

/* ── Promo banner "3 za cenu 1" na detail produktu ─────────────────────────── */
.ds-promo-3for1 {
    margin: 12px 0 8px;
    padding: 13px 16px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-left: 4px solid #16a34a;
    border-radius: 10px;
    font-size: 15px;
    line-height: 1.5;
}

.ds-promo-3for1 strong {
    font-weight: 700;
}

.ds-promo-sub {
    color: #15803d;
    font-weight: 600;
}

/* ── Tutorial tab ───────────────────────────────────────────────────────────── */
.ds-tutorial {
    padding-left: 20px;
    line-height: 1.8;
}

.ds-tutorial li {
    margin-bottom: 8px;
}

/* ── Dostupnosť produktu (skladom / na objednávku / vypredané) ──────────────── */

/* Malý odznak – shop loop, mini-košík, pokladňa */
.ds-stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    white-space: nowrap;
    border: 1px solid transparent;
}

.ds-stock-badge--instock {
    background: #e8f8ee;
    color: #15803d;
    border-color: #86e5ae;
}

.ds-stock-badge--onbackorder {
    background: #fff7ed;
    color: #c2410c;
    border-color: #fdba74;
}

.ds-stock-badge--outofstock {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fca5a5;
}

/* Shop loop – odznak v bežnom toku, na stred, tesne nad názvom produktu */
.ds-stock-inline {
    display: flex;
    justify-content: center;
    margin-bottom: 6px;
}

/* Veľký informačný box na karte produktu */
.ds-stock-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 12px 0 16px;
    padding: 14px 16px;
    border-radius: 10px;
    border: 1px solid transparent;
}

.ds-stock-notice-icon {
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
}

.ds-stock-notice strong {
    display: block;
    font-size: 15px;
    margin-bottom: 2px;
}

.ds-stock-notice p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    opacity: .85;
}

.ds-stock-notice--instock {
    background: #e8f8ee;
    border-color: #86e5ae;
    color: #15803d;
}

.ds-stock-notice--onbackorder {
    background: #fff7ed;
    border-color: #fdba74;
    color: #c2410c;
}

.ds-stock-notice--outofstock {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #b91c1c;
}

/* ── Súvisiace produkty ([related_products] shortcode, ak sa niekde použije) ── */
.related.products {
    margin-top: 48px;
    padding-top: 36px;
    border-top: 1px solid #eee;
}

.related.products > h2 {
    font-size: 26px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
    position: relative;
}

.related.products > h2::after {
    content: '';
    display: block;
    width: 56px;
    height: 3px;
    background: #2563eb;
    border-radius: 2px;
    margin: 12px auto 28px;
}

.related.products ul.products li.product {
    transition: transform .2s ease, box-shadow .2s ease;
    border-radius: 12px;
}

.related.products ul.products li.product:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
}

@media (max-width: 767px) {
    .related.products > h2 {
        font-size: 21px;
    }
}

/* ── Vlastný "Odporúčame k produktu" blok – 2 stĺpce, max 2 produkty ─────────── */
.ds-upsell-block {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.ds-upsell-heading {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 20px;
}

.ds-upsell-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.ds-upsell-card {
    position: relative;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    transition: box-shadow .2s ease, transform .2s ease;
}

.ds-upsell-card:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, .07);
    transform: translateY(-2px);
}

.ds-upsell-img {
    display: block;
    margin-bottom: 10px;
}

.ds-upsell-img img {
    width: 100%;
    height: 120px;
    object-fit: contain;
    border-radius: 8px;
}

.ds-upsell-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
}

.ds-upsell-title {
    font-size: 18px;
    font-weight: 700;
    color: #1d2327;
    line-height: 1.3;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ds-upsell-title:hover { color: #1778b4; }

.ds-upsell-price {
    font-size: 22px;
    font-weight: 700;
    color: #1778b4;
}

.ds-upsell-price del { color: #ef9898; font-weight: 400; margin-right: 4px; }

/* Kruhové ikonové tlačidlo v pravom hornom rohu karty */
.ds-upsell-info .button,
.ds-upsell-info .add_to_cart_button,
.ds-upsell-info a.button {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 50%;
    background-color: #1778b4 !important;
    box-shadow: 0 4px 12px rgba(23, 120, 180, .35);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' width='18' height='18'%3E%3Ccircle cx='9' cy='21' r='1'/%3E%3Ccircle cx='20' cy='21' r='1'/%3E%3Cpath d='M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 18px 18px;
    font-size: 0;
    transition: background-color .15s ease, transform .15s ease;
}

.ds-upsell-info .button:hover,
.ds-upsell-info .add_to_cart_button:hover {
    background-color: #135f8f !important;
    transform: scale(1.08);
}

/* Loading stav (Woodmart/WC pridá triedu .loading počas AJAX pridávania) */
.ds-upsell-info .button.loading {
    background-image: none;
}

.ds-upsell-info .button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 14px;
    margin: -7px 0 0 -7px;
    border: 2px solid rgba(255, 255, 255, .5);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ds-spin .6s linear infinite;
}

@keyframes ds-spin {
    to { transform: rotate(360deg); }
}

/* Skryje "Zobraziť košík" odkaz, ktorý WooCommerce pridá po AJAX pridaní do košíka */
.ds-upsell-info .added_to_cart {
    display: none !important;
}

@media (max-width: 480px) {
    .ds-upsell-grid { gap: 10px; }
    .ds-upsell-card { padding: 8px; }
}

/* ── Minimálna hodnota košíka ─────────────────────────────────────────────── */

/* "Blokovací" WC notice (nutný len na zákaz checkoutu) – úplne skrytý,
   viditeľná verzia sa vykresľuje samostatne cez .ds-min-cart-standalone */
.woocommerce-error:has(.ds-min-cart-blocker) {
    display: none !important;
}

/* Vlastný panel na celú šírku, nad obsahom */
.ds-min-cart-standalone {
    width: 100%;
    margin: 0 0 24px;
}

.ds-min-cart-notice {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    box-sizing: border-box;
    padding: 18px 24px;
    background: linear-gradient(135deg, #fff7ed 0%, #fffbeb 100%);
    border: 1px solid #fdba74;
    border-radius: 12px;
}

.ds-min-cart-icon {
    font-size: 30px;
    line-height: 1;
    flex-shrink: 0;
}

.ds-min-cart-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0; /* aby flex:1 nepretekal pri dlhšom texte */
}

/* Vynúť farbu na VŠETKO vnútri panelu vrátane wc_price() výstupu
   (<span class="woocommerce-Price-amount">), ktorý inak dedil bielu farbu
   z predka a splýval s pozadím */
.ds-min-cart-notice,
.ds-min-cart-notice * {
    color: #9a3412 !important;
}

.ds-min-cart-body strong {
    font-size: 16px;
    font-weight: 700;
}

.ds-min-cart-bar {
    width: 100%;
    height: 10px;
    background: #fed7aa;
    border-radius: 5px;
    overflow: hidden;
}

.ds-min-cart-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #fb923c, #f97316);
    border-radius: 5px;
    transition: width .3s ease;
}

.ds-min-cart-sub {
    font-size: 13px;
    opacity: .85;
}

.oodz-form-wrap{
    background: white;
    padding: 50px;
    border-radius: 50px;
    max-width: 90%;
}

@media (max-width: 480px) {
    .ds-min-cart-notice {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        padding: 16px 18px;
    }
    .ds-min-cart-icon {
        font-size: 24px;
    }
}
