/* Paint2Fix Market — Global Fixes */
/* WP block columns: is-layout-flex class missing on market translated pages */
.wp-block-columns:not(.is-layout-flex) { display: flex; flex-wrap: wrap; gap: 2em; }
.wp-block-columns:not(.is-layout-flex) > .wp-block-column { flex: 1 1 0; min-width: 0; }

/* Paint2Fix Market — Switcher Styles */

.p2f-switcher { position: relative; display: inline-block; z-index: 200; }

.p2f-switcher-btn {
    display: flex; align-items: center; gap: 4px;
    padding: 0; background: transparent; border: none;
    border-radius: 6px; cursor: pointer; font-size: 13px; font-weight: 500;
    color: inherit; transition: background .15s;
}
.p2f-switcher-btn:hover { background: #f8f8f8; }
.p2f-switcher-btn:focus { outline: none; }

.p2f-flag { font-size: 16px; line-height: 1; display: inline-flex; align-items: center; flex-shrink: 0; }
img.p2f-flag-img,
.p2f-flag img.p2f-flag-img,
.p2f-switcher img.p2f-flag-img {
    display: inline-block !important;
    width: 20px !important;
    height: 15px !important;
    max-width: none !important;
    min-width: 20px !important;
    max-height: none !important;
    min-height: 15px !important;
    object-fit: cover !important;
    border-radius: 2px !important;
    vertical-align: middle !important;
    box-shadow: 0 0 0 1px rgba(0,0,0,.1);
    margin: 0 !important;
    padding: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
}
.p2f-market-name { text-transform: uppercase; font-size: 12px; letter-spacing: .5px; }
.p2f-chevron { transition: transform .15s; }
.p2f-switcher-btn[aria-expanded="true"] .p2f-chevron { transform: rotate(180deg); }

.p2f-switcher-dropdown {
    position: absolute; top: calc(100% + 6px); right: 0;
    background: #fff; border: 1px solid #ddd; border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,.1); min-width: 360px;
    padding: 6px;
    display: grid; grid-auto-flow: column; gap: 2px;
}
.p2f-switcher-dropdown[hidden] { display: none; }

.p2f-switcher-item {
    display: flex; align-items: center; gap: 8px;
    padding: 5px 10px; border-radius: 6px; text-decoration: none;
    color: #333; font-size: 13px; font-weight: 500; transition: background .12s;
    white-space: nowrap; border: none; outline: none;
}
.p2f-switcher-item:hover { background: #f5f5f5; text-decoration: none; color: #333; }
.p2f-switcher-item:focus { outline: none; border: none; }
.p2f-switcher-item.p2f-active { background: #f0f6fc; color: #135e96; }

.p2f-currency-badge {
    margin-left: auto; font-size: 11px; color: #999;
    background: #f0f0f1; padding: 2px 6px; border-radius: 3px;
    transition: background .12s, color .12s;
}
.p2f-switcher-item:hover .p2f-currency-badge {
    background: #2271b1; color: #fff;
}

/* Mobile menu — market list */
.p2f-mobile-markets {
    padding: 0;
    margin: 0;
    list-style: none;
}
.p2f-mobile-markets li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
}
.p2f-mobile-markets li a:hover {
    background: #f5f5f5;
}
.p2f-mobile-markets li a.p2f-active {
    font-weight: 600;
    color: #135e96;
}
.p2f-mobile-markets .p2f-currency-badge {
    margin-left: auto;
    font-size: 11px;
    color: #999;
    background: #f0f0f1;
    padding: 2px 6px;
    border-radius: 3px;
}

/* Mobile overlay behind dropdown */
.p2f-switcher-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 199;
}
.p2f-switcher-overlay.p2f-overlay-show { display: block; }

/* Responsive */
@media (max-width: 768px) {
    .p2f-market-name { display: none; }
    .p2f-switcher-dropdown {
        min-width: unset;
        width: auto;
        max-width: calc(100vw - 16px);
        right: auto; left: auto; transform: none;
        position: fixed !important;
        top: auto !important;
        left: 13px !important;
        right: 13px !important;
        grid-auto-flow: row;
        grid-template-columns: 1fr 1fr;
        max-height: 70vh; overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .p2f-switcher-dropdown .p2f-switcher-item { white-space: nowrap; font-size: 12px; padding: 5px 8px; }
}

/* Market Select Dropdown [p2f_market_list] */
.p2f-market-select {
    width: 100%;
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #fff;
    color: #333;
    cursor: pointer;
    appearance: auto;
}
.p2f-market-select:focus {
    outline: none;
    border-color: #999;
}

/* WC "added to cart" notice — styled box with close button */
.woocommerce-message {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 40px 12px 16px;
    margin: 0 0 16px;
    background: #f0faf0;
    border: 1px solid #c3e6c3;
    border-radius: 6px;
    font-size: 14px;
    color: #2e7d32;
    line-height: 1.5;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.woocommerce-message::before {
    display: none !important;
}
.woocommerce-message .button.wc-forward {
    order: -1;
    margin-right: 12px;
    padding: 6px 14px;
    background: #333;
    color: #fff;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    border: none;
}
.woocommerce-message .button.wc-forward:hover {
    background: #555;
    color: #fff;
}
.p2f-notice-close {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    padding: 2px 6px;
    line-height: 1;
}
.p2f-notice-close:hover {
    color: #333;
}

/* Footer — Secure Shopping block */
.p2f-secure-footer .secure-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}
.p2f-secure-footer .secure-item svg {
    flex-shrink: 0;
    color: #333;
}


/* Charge fee price — match WC shipping font size */
.fee td .woocommerce-Price-amount { font-size: .9em; }

/* Charge info tooltip */
.p2f-charge-info {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 4px;
    outline: none;
}
.p2f-charge-info::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.4;
    white-space: normal;
    width: max-content;
    max-width: 240px;
    text-align: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity .15s;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.p2f-charge-info::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #333;
    pointer-events: none;
    opacity: 0;
    transition: opacity .15s;
    z-index: 100;
}
.p2f-charge-info:hover::after,
.p2f-charge-info:focus::after,
.p2f-charge-info:hover::before,
.p2f-charge-info:focus::before {
    opacity: 1;
}
@media (max-width: 768px) {
    .p2f-charge-info::after {
        left: auto;
        right: 0;
        transform: none;
        max-width: 200px;
    }
    .p2f-charge-info::before {
        left: auto;
        right: 4px;
        transform: none;
    }
}

/* ── Product Description — Model Links ── */
a.p2f-model-link { color: #004faf; font-weight: 600; text-decoration: none; }
a.p2f-model-link:hover { color: #333; }

/* ── Product Description — Trust Bar ── */
.p2f-trust-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 28px;
}
.p2f-trust-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.4;
    color: #555;
}
.p2f-trust-item i {
    font-size: 20px;
    color: #333;
    flex-shrink: 0;
    margin-top: 2px;
}
.p2f-trust-item strong {
    color: #222;
    display: block;
    margin-bottom: 2px;
}

/* ── Product Description — Promo Banner ── */
.p2f-promo-banner {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    color: #fff;
    border-radius: 10px;
    padding: 18px 20px;
    text-align: center;
    margin-bottom: 28px;
}
.p2f-promo-badge {
    display: inline-block;
    background: #e63946;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 4px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.p2f-promo-text {
    display: block;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
}

/* ── Product Description — Highlights ── */
ul.p2f-highlights {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 20px !important;
}
ul.p2f-highlights li {
    position: relative;
    padding: 8px 0 8px 28px !important;
    font-size: 14px;
    color: #444;
    border-bottom: 1px solid #f5f5f5;
}
ul.p2f-highlights li:last-child { border-bottom: none; }
ul.p2f-highlights li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #2e7d32;
}

/* ── Product Description — Why List ── */
ul.p2f-why-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 20px !important;
}
ul.p2f-why-list li {
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
    padding: 10px 0 !important;
    font-size: 14px;
    color: #444;
    border-bottom: 1px solid #f5f5f5;
    overflow: hidden;
}
ul.p2f-why-list li:last-child { border-bottom: none; }
ul.p2f-why-list li i {
    font-size: 20px;
    color: #333;
    flex-shrink: 0;
    min-width: 20px;
    margin-top: 2px;
}
ul.p2f-why-list li div {
    min-width: 0;
    overflow-wrap: break-word;
}

/* ── Product Description — Color Code Finder ── */
.p2f-finder-box {
    background: #eef5fc;
    border: 1px solid #c3d9ed;
    border-radius: 10px;
    padding: 18px;
    font-size: 14px;
    color: #444;
    line-height: 1.6;
    margin-bottom: 20px;
}
.p2f-finder-box i {
    font-size: 18px;
    color: #333;
    margin-right: 6px;
}
.p2f-finder-box strong { color: #222; }

/* ── Product Description — FAQ Grid ── */
.p2f-faq-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}
.p2f-faq-item {
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
}
.p2f-faq-q {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    background: #fafafa;
}
.p2f-faq-q:hover { background: #f0f0f0; }
.p2f-faq-arrow { font-size: 12px; color: #999; transition: transform .2s; }
.p2f-faq-item.open .p2f-faq-arrow { transform: rotate(180deg); }
.p2f-faq-a {
    display: none;
    padding: 0 16px 14px;
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}
.p2f-faq-item.open .p2f-faq-a { display: block; }

/* ── Product Description — Two Column Layout ── */
.p2f-two-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 28px;
}
.p2f-col { min-width: 0; }
.p2f-col h2 { margin-top: 0; }

/* ── Product Description — Color Table ── */
.p2f-color-table {
    width: 100%;
    border-collapse: collapse;
}
.p2f-color-table tr { border-bottom: 1px solid #f0f0f0; }
.p2f-color-table tr:last-child { border-bottom: none; }
.p2f-color-table td {
    padding: 10px 0;
    font-size: 14px;
    vertical-align: top;
}
.p2f-color-table td:first-child {
    font-weight: 700;
    color: #222;
    width: 40%;
    padding-right: 12px;
}
.p2f-color-table td:last-child { color: #555; }
.p2f-color-table a { color: #1a4a7a; text-decoration: none; font-weight: 600; }
.p2f-color-table a:hover { text-decoration: underline; }

/* ── Product Description — Desktop ── */
@media (min-width: 769px) {
    .p2f-trust-bar { grid-template-columns: 1fr 1fr 1fr 1fr; }
    .p2f-two-col { flex-direction: row; gap: 30px; }
    .p2f-col { flex: 1; }
    .p2f-faq-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Find Your Color link ── */
.p2f-find-color {
    display: none;
    margin: 16px 0 0;
    padding: 12px 16px;
    background: #eef5fc;
    border: 1px solid #c3d9ed;
    border-radius: 8px;
    font-size: 13px;
    color: #333;
    line-height: 1.5;
}
@media (max-width: 768px) {
    .p2f-find-color { display: block; margin-bottom: 30px; }
}
.p2f-find-color-text { display: block; margin-bottom: 6px; font-size: 16px !important; }
.p2f-find-color-link {
    font-weight: 600;
    font-size: 16px !important;
    color: #1a4a7a;
    text-decoration: none;
}
.p2f-find-color-link:hover { color: #0d2f52; text-decoration: underline; }

/* ── Product Meta (mobile fix) ── */
.product_meta .ean-wrapper {
    display: block;
    padding: 10px 0;
    border-bottom: 1px dotted #e0e0e0;
    font-size: 14px;
    line-height: 1.5;
    color: #444;
}
.product_meta .ean-wrapper:last-child { border-bottom: none; }
.product_meta .ean-wrapper strong {
    font-weight: 700;
    color: #222;
}

/* ── Live Search Dropdown ── */
.p2f-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,.12);
    max-height: 400px;
    overflow-y: auto;
    z-index: 9999;
    margin-top: 4px;
}
div.p2f-search-dropdown a.p2f-search-item {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 8px 12px !important;
    margin: 0 !important;
    text-decoration: none !important;
    color: #333 !important;
    border-bottom: 1px solid #f0f0f0;
    transition: background .1s;
    line-height: 1.3 !important;
}
div.p2f-search-dropdown a.p2f-search-item:last-child { border-bottom: none; }
div.p2f-search-dropdown a.p2f-search-item:hover { background: #f5f5f5; }
div.p2f-search-dropdown .p2f-search-item img {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    object-fit: cover !important;
    border-radius: 4px !important;
    flex-shrink: 0 !important;
    background: #f0f0f0;
    margin: 0 !important;
    padding: 0 !important;
}
div.p2f-search-dropdown .p2f-search-noimg {
    width: 36px; height: 36px; min-width: 36px;
    border-radius: 4px; background: #f0f0f0; flex-shrink: 0;
}
div.p2f-search-dropdown .p2f-search-info {
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
    flex: 1 !important;
}
div.p2f-search-dropdown .p2f-search-title {
    font-size: 16px !important;
    font-weight: 500 !important;
    color: #333 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin: 0 !important;
    padding: 0 !important;
}
div.p2f-search-dropdown .p2f-search-alt {
    font-size: 14px !important;
    color: #555 !important;
    margin: 2px 0 0 !important;
    padding: 0 !important;
}
div.p2f-search-dropdown .p2f-search-empty {
    padding: 14px !important;
    text-align: center;
    font-size: 13px !important;
    color: #999 !important;
}
