/* IF Boutique – pouze nakupni panel detailu produktu */
body.type-detail .if-buybox {
    margin: 24px 0; padding: clamp(18px, 2vw, 28px);
    border: 1px solid #e8d6c0; border-radius: 10px;
    background: #f6e9da; color: #3e2e27;
}
body.type-detail .if-buybox .p-info-grid {
    display: flex !important; flex-direction: column;
    gap: 0; width: auto; margin: 0 !important;
}
body.type-detail .if-buybox .detail-grid-item {
    flex: none !important; width: 100% !important;
    min-width: 0; min-height: 0; margin: 0 !important;
    padding: 0 !important; border: 0;
}
body.type-detail .if-buybox .detail-availability-block { order: -2; }
body.type-detail .if-buybox .detail-price-block { order: -1; }
body.type-detail .if-buybox .detail-grid-title { display: none; }
body.type-detail .if-buybox .availability-value {
    display: flex; flex-wrap: wrap; align-items: center;
    gap: 6px; margin: 0 !important; text-align: left;
    font-size: 14px; line-height: 1.5; text-transform: none !important;
}
body.type-detail .if-buybox .availability-label {
    display: inline-flex; align-items: center; gap: 8px;
    font-weight: 600; text-transform: none !important;
}
body.type-detail .if-buybox .availability-label::before {
    content: ""; width: 7px; height: 7px;
    flex: none; border-radius: 50%; background: currentColor;
}
body.type-detail .if-buybox .availability-amount {
    font-size: 13px; font-weight: 400; color: #8f7b6e;
}
body.type-detail .if-buybox .p-final-price-wrapper { margin: 0; padding: 0; }
body.type-detail .if-buybox .price-final {
    font: 600 30px/1.2 "DM Sans", Arial, sans-serif !important;
    color: #3e2e27 !important;
}
body.type-detail .if-buybox .detail-parameters {
    width: 100%; margin: 4px 0 0;
}
body.type-detail .if-buybox .detail-parameters tbody,
body.type-detail .if-buybox .detail-parameters tr,
body.type-detail .if-buybox .detail-parameters th,
body.type-detail .if-buybox .detail-parameters td {
    display: block; width: 100% !important;
    min-width: 0; padding: 0 0 6px;
}
body.type-detail .if-buybox .detail-parameters th {
    font-weight: 500; color: #6f5845;
}
body.type-detail .if-buybox .detail-parameters select {
    width: 100% !important; max-width: 100%; height: auto; min-height: 46px;
    border: 1px solid #d7c2ab; border-radius: 0;
    background-color: #fffdf9; color: #3e2e27;
    box-shadow: none;
}
body.type-detail .if-buybox .detail-parameters select.if-variant-select--native {
    position: absolute !important;
    width: 1px !important; height: 1px !important; min-height: 0 !important;
    margin: -1px !important; padding: 0 !important;
    overflow: hidden !important; clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important; white-space: nowrap !important;
    border: 0 !important; opacity: 0; pointer-events: none;
}
body.type-detail .if-buybox .if-variant-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    margin: 0 0 8px;
}
body.type-detail .if-buybox .if-variant-option {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    min-height: 44px;
    margin: 0;
    padding: 9px 16px;
    border: 1px solid #d7c2ab;
    border-radius: 3px;
    background: #fffdf9;
    box-shadow: none;
    color: #3e2e27;
    font: 600 14px/1.25 "DM Sans", Arial, sans-serif;
    text-align: center;
    text-transform: none;
    cursor: pointer;
    transition: border-color .18s, background-color .18s, color .18s;
}
body.type-detail .if-buybox .if-variant-option:hover:not(:disabled) {
    border-color: #a66027;
    background: #fff7ed;
}
body.type-detail .if-buybox .if-variant-option.is-selected {
    border-color: #3e2e27;
    background: #3e2e27;
    color: #fff;
}
body.type-detail .if-buybox .if-variant-option:disabled {
    border-color: #dfd5ca;
    background: #f2ece5;
    color: #9b8e84;
    cursor: not-allowed;
    opacity: .65;
    text-decoration: line-through;
}
body.type-detail .if-buybox .if-variant-option:focus-visible {
    outline: 2px solid #8a6b3d;
    outline-offset: 2px;
}
body.type-detail .if-buybox .add-to-cart {
    display: flex !important; flex-wrap: wrap; align-items: stretch;
    gap: 12px; margin: 0 !important; padding: 0;
}
body.type-detail .if-buybox .quantity {
    flex: 0 0 112px; width: 112px; max-width: 100%;
    height: 52px; margin: 0 !important;
}
body.type-detail .if-buybox .quantity input.amount {
    box-sizing: border-box; width: 100%; height: 52px;
    padding: 0 32px; border: 1px solid #d7c2ab;
    border-radius: 0; background: #fffdf9; color: #3e2e27;
    box-shadow: none; font-size: 18px;
}
body.type-detail .if-buybox .quantity button {
    width: 34px; height: 52px; padding: 0;
    border-radius: 0; color: #6f5845;
}
body.type-detail .if-buybox .add-to-cart-button {
    display: flex; flex: 1 1 170px; align-items: center;
    justify-content: center; gap: 12px; width: auto !important;
    min-width: 0; max-width: none !important;
    min-height: 52px; height: auto; margin: 0 !important;
    padding: 12px 18px; border: 1px solid #27952e !important;
    border-radius: 0 !important; background: #27952e !important;
    box-shadow: none !important; color: #fff !important;
    font: 500 16px/1.4 "DM Sans", Arial, sans-serif;
    text-transform: none; transform: none !important;
    transition: background-color .2s, border-color .2s;
}
body.type-detail .if-buybox .add-to-cart-button:hover:not(:disabled),
body.type-detail .if-buybox .add-to-cart-button:focus-visible {
    background: #228228 !important; border-color: #228228 !important;
}
body.type-detail .if-buybox .add-to-cart-button:disabled { opacity: .55; }
body.type-detail .if-buybox .shipping-options {
    color: #8a6b3d; text-decoration: underline;
}
body.type-detail .if-buybox :is(button, input, a):focus-visible {
    outline: 2px solid #8a6b3d; outline-offset: 2px;
}
body.type-detail .if-buybox select:focus-visible {
    outline: none;
}
@media (prefers-reduced-motion: reduce) {
    body.type-detail .if-buybox .add-to-cart-button,
    body.type-detail .if-buybox .if-variant-option { transition: none; }
}

/* Zľavový štítok na hlavnej fotografii produktu. */
body.type-detail .p-image-wrapper .p-image { position: relative; }
body.type-detail .p-image-wrapper .flags-extra {
    position: absolute !important;
    top: 14px !important; right: 14px !important;
    bottom: auto !important; left: auto !important;
    display: flex; flex-direction: column; align-items: flex-end;
    width: auto !important; height: auto !important;
    margin: 0 !important; padding: 0 !important;
    transform: none !important; z-index: 4;
}
body.type-detail .p-image-wrapper .flag.flag-discount {
    box-sizing: border-box;
    display: flex !important; align-items: center; justify-content: center;
    width: auto !important; height: auto !important; min-width: 0 !important;
    margin: 0 !important; padding: 10px 12px !important;
    border: 1px solid #e9d8c4; border-radius: 3px !important;
    background: #f6e9da !important; box-shadow: none !important;
    color: #3e2e27 !important; opacity: 1 !important;
    transform: none !important; white-space: nowrap;
    font: 600 20px/1.2 "DM Sans", Arial, sans-serif;
}
body.type-detail .p-image-wrapper .flag.flag-discount::before,
body.type-detail .p-image-wrapper .flag.flag-discount::after {
    content: none !important; display: none !important;
}
body.type-detail .p-image-wrapper .flag.flag-discount .price-standard {
    display: none !important;
}
body.type-detail .p-image-wrapper .flag.flag-discount .price-save,
body.type-detail .p-image-wrapper .flag.flag-discount .price-save > span {
    margin: 0 !important; color: inherit !important;
    font: inherit !important; line-height: inherit !important;
}
body.type-detail .p-image-wrapper .flag.flag-discount sub {
    position: static; vertical-align: baseline; font-size: inherit;
}

/* Rovnaké štítky na kartách v blokoch Podobné a Súvisiace produkty. */
body.type-detail .products-related .p,
body.type-detail .products-additional .p { position: relative; }
body.type-detail .products-related .p > a.image,
body.type-detail .products-additional .p > a.image {
    position: relative; overflow: hidden;
}
body.type-detail .products-related .p .flags-default,
body.type-detail .products-related .p .flags-extra,
body.type-detail .products-additional .p .flags-default,
body.type-detail .products-additional .p .flags-extra {
    position: absolute !important; top: 12px !important; bottom: auto !important;
    width: auto !important; max-width: calc(50% - 18px);
    margin: 0 !important; padding: 0 !important; transform: none !important;
    display: flex; flex-direction: column; gap: 6px; z-index: 3;
}
body.type-detail .products-related .p .flags-default,
body.type-detail .products-additional .p .flags-default {
    left: 12px !important; right: auto !important; align-items: flex-start;
}
body.type-detail .products-related .p .flags-extra,
body.type-detail .products-additional .p .flags-extra {
    right: 12px !important; left: auto !important; align-items: flex-end;
}
body.type-detail .products-related .p .flags-default .flag,
body.type-detail .products-additional .p .flags-default .flag {
    box-sizing: border-box; max-width: 100%; margin: 0;
    border-radius: 3px; padding: 7px 8px;
    font: 500 11px/1.3 "DM Sans", Arial, sans-serif;
    overflow-wrap: anywhere;
}
body.type-detail .products-related .p .flag.flag-discount,
body.type-detail .products-additional .p .flag.flag-discount {
    box-sizing: border-box; display: flex !important;
    align-items: center; justify-content: center;
    width: auto !important; height: auto !important; min-width: 0 !important;
    max-width: 100%; margin: 0 !important; padding: 8px 10px !important;
    border: 1px solid #e9d8c4; border-radius: 3px !important;
    background: #f6e9da !important; box-shadow: none !important;
    color: #3e2e27 !important; opacity: 1 !important;
    transform: none !important; white-space: nowrap;
    font: 600 16px/1.2 "DM Sans", Arial, sans-serif;
}
body.type-detail .products-related .p .flag.flag-discount::before,
body.type-detail .products-related .p .flag.flag-discount::after,
body.type-detail .products-additional .p .flag.flag-discount::before,
body.type-detail .products-additional .p .flag.flag-discount::after {
    content: none !important; display: none !important;
}
body.type-detail .products-related .p .flag.flag-discount .price-save,
body.type-detail .products-related .p .flag.flag-discount .price-save > span,
body.type-detail .products-additional .p .flag.flag-discount .price-save,
body.type-detail .products-additional .p .flag.flag-discount .price-save > span {
    margin: 0 !important; color: inherit !important;
    font: inherit !important; line-height: inherit !important;
}
body.type-detail .products-related .p .flag.flag-discount sub,
body.type-detail .products-additional .p .flag.flag-discount sub {
    position: static; vertical-align: baseline; font-size: inherit;
}
@media (max-width: 767px) {
    body.type-detail .p-image-wrapper .flags-extra {
        top: 10px !important; right: 10px !important;
    }
    body.type-detail .p-image-wrapper .flag.flag-discount {
        padding: 8px 9px !important; font-size: 16px;
    }
    body.type-detail .products-related .p .flags-default,
    body.type-detail .products-related .p .flags-extra,
    body.type-detail .products-additional .p .flags-default,
    body.type-detail .products-additional .p .flags-extra {
        top: 8px !important; max-width: calc(50% - 12px); gap: 4px;
    }
    body.type-detail .products-related .p .flags-default,
    body.type-detail .products-additional .p .flags-default { left: 8px !important; }
    body.type-detail .products-related .p .flags-extra,
    body.type-detail .products-additional .p .flags-extra { right: 8px !important; }
    body.type-detail .products-related .p .flags-default .flag,
    body.type-detail .products-additional .p .flags-default .flag {
        padding: 6px; font-size: 10px;
    }
    body.type-detail .products-related .p .flag.flag-discount,
    body.type-detail .products-additional .p .flag.flag-discount {
        padding: 6px !important; font-size: 13px;
    }
}

/* Kontaktný box sa zobrazuje vždy; odporúčanie iba pri vyplnenom parametri. */
body.type-detail .if-product-advice {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    margin: -8px 0 24px;
    padding: 18px;
    border: 1px solid #e8d6c0;
    border-radius: 10px;
    background: #fffaf4;
    color: #3e2e27;
}
body.type-detail .if-product-advice__avatar {
    position: relative;
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    overflow: hidden;
    border: 2px solid rgba(166, 96, 39, .28);
    border-radius: 50%;
    background: #f6e9da;
    color: #a66027;
    font: 500 18px/1 "Playfair Display", Georgia, serif;
}
body.type-detail .if-product-advice__avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
    opacity: 0;
}
body.type-detail .if-product-advice__avatar--has-image img { opacity: 1; }
body.type-detail .if-product-advice__content { min-width: 0; }
body.type-detail .if-product-advice__title {
    display: block;
    margin: 0 0 5px;
    color: #3e2e27;
    font: 600 17px/1.3 "Playfair Display", Georgia, serif;
}
body.type-detail .if-product-advice__note {
    margin: 0;
    color: #57443a;
    font: 400 14px/1.55 "DM Sans", Arial, sans-serif;
}
body.type-detail .if-product-advice__contact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 22px;
    font: 500 16px/1.4 "DM Sans", Arial, sans-serif;
}
body.type-detail .if-product-advice--has-tip .if-product-advice__contact {
    margin-top: 12px;
    padding-top: 11px;
    border-top: 1px solid rgba(166, 96, 39, .18);
}
body.type-detail .if-product-advice__contact-label {
    flex-basis: 100%;
    color: #6f5845;
    font-size: 17px;
    font-weight: 600;
}
body.type-detail .if-product-advice__contact a {
    color: #a66027 !important;
    text-decoration: none !important;
    overflow-wrap: anywhere;
}
body.type-detail .if-product-advice__phone::before { content: "☎"; margin-right: 8px; font-size: 1.1em; }
body.type-detail .if-product-advice__email::before { content: "✉"; margin-right: 8px; font-size: 1.1em; }
body.type-detail .if-product-advice__contact a:hover,
body.type-detail .if-product-advice__contact a:focus-visible {
    color: #3e2e27 !important;
    text-decoration: underline !important;
}
body.type-detail .if-product-advice__contact a:focus-visible {
    outline: 2px solid #8a6b3d;
    outline-offset: 2px;
}
@media (max-width: 479px) {
    body.type-detail .if-product-advice {
        grid-template-columns: 50px minmax(0, 1fr);
        gap: 12px;
        padding: 15px;
    }
    body.type-detail .if-product-advice__avatar {
        width: 46px;
        height: 46px;
        font-size: 15px;
    }
}
