.wpil-custom-gallery {
    width: 100%;
    max-width: 100%;
    margin-top: 10px;
}

.wpil-gallery-main {
    position: relative;
    width: 100%;
    background: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
}

.wpil-slides {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
}

.wpil-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wpil-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

.wpil-slide-label {
    position: absolute;
    bottom: 30px;
    right: 80px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #333;
    border-radius: 4px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    pointer-events: none;
}

.wpil-slide img,
.wpil-slide canvas {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.wpil-slide canvas {
    max-width: 800px;
    max-height: 800px;
}

.wpil-gallery-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 5px 0;
}

.wpil-thumb {
    flex: 0 0 90px;
    width: 90px;
    height: 90px;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
}

.wpil-thumb:hover {
    border-color: #999;
}

.wpil-thumb.active {
    border-color: #000;
}

.wpil-thumb img,
.wpil-thumb canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

body.single-product .product .summary .wpil-desktop-price-breakdown {
    order: 2;
}

body.single-product .product .summary .product_title {
    order: 1;
}

body.single-product .product .summary .price {
    order: 2;
}

body.single-product .product .summary .wpil-customizer-wrapper {
    order: 4;
    background: #fff;
}

body.single-product .product .summary .variations,
body.single-product .product .summary table.variations {
    order: 5 !important;
    background: white;
    padding: 15px;
    border-radius: 10px;
}

body.single-product .product .summary .cart {
    order: 7;
    display: flex !important;
    gap: 12px !important;
    align-items: stretch !important;
    flex-wrap: wrap-reverse !important;
}

body.single-product .product .summary .quantity {
    display: none !important;
}

body.single-product .product .summary .quantity input[type="number"] {
    display: none !important;
}

body.single-product .product .summary .quantity .qty {
    width: 100% !important;
    height: 52px !important;
    padding: 14px 30px 14px 16px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    color: #1a1a1a !important;
    background: #fff !important;
    border: 2px solid #E5E5EA !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%231a1a1a' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 16px center !important;
    background-size: 12px !important;
}

body.single-product .product .summary .single_add_to_cart_button {
    display: none !important;
}

/* Optional personalization row: [Personalizare] + [Adaugă în coș] */
.wpil-optional-btn-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
    margin-top: 16px;
}
.wpil-optional-btn-row .single_add_to_cart_button {
    flex: 1;
    margin: 0 !important;
    text-transform: uppercase !important;
}
.wpil-personalize-toggle-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 18px;
    border: 2px solid #1a1a1a;
    border-radius: 6px;
    background: #fff;
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    outline: none;
}
.wpil-personalize-toggle-btn::before {
    content: '✏️';
    font-size: 16px;
}
.wpil-personalize-toggle-btn:hover,
.wpil-personalize-toggle-btn.active {
    background: #1a1a1a;
    color: #fff;
}
/* Mobile: keep buttons side-by-side in the optional row */
@media (max-width: 768px) {
    .wpil-optional-btn-row {
        flex-direction: row;
        gap: 8px;
    }
    .wpil-optional-btn-row .wpil-mobile-personalize-btn {
        flex: 1;
        width: auto;
        margin: 0 !important;
        padding: 14px 10px;
        font-size: 12px;
    }
    .wpil-optional-btn-row .single_add_to_cart_button {
        padding: 14px 10px;
        font-size: 14px;
    }
}

/* YITH Wishlist button on PDP */
body.single-product .product .summary .cart .yith-wcwl-btn,
body.single-product .product .summary .cart .yith-add-to-wishlist-button-block {
    flex-shrink: 0 !important;
    width: 52px !important;
    order: 3 !important;
}

body.single-product .product .summary .cart .yith-wcwl-btn a,
body.single-product .product .summary .cart .yith-wcwl-btn .add_to_wishlist {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 52px !important;
    background: #fff !important;
    color: #1a1a1a !important;
    border: 2px solid #E5E5EA !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

body.single-product .product .summary .cart .yith-wcwl-btn a:hover,
body.single-product .product .summary .cart .yith-wcwl-btn .add_to_wishlist:hover {
    background: #f5f5f5 !important;
    border-color: #ccc !important;
}

body.single-product .product .summary .cart .yith-wcwl-add-button a > span,
body.single-product .product .summary .cart .yith-wcwl-add-to-wishlist-button__label {
    display: none !important;
}

body.single-product .product .summary .cart .yith-wcwl-btn .yith-wcwl-icon {
    width: 22px !important;
    height: 22px !important;
}

@media (min-width: 769px) {
    body.single-product div.product {
        display: flex !important;
        gap: 40px !important;
        align-items: flex-start !important;
    }

    body.single-product .product .images {
        width: 60% !important;
        max-width: 60% !important;
        flex: 0 0 60% !important;
        position: sticky !important;
        top: 120px !important;
        align-self: flex-start !important;
        max-height: 85vh !important;
        overflow: visible !important;
    }
    
    body.single-product .product .images .wpil-gallery-main {
        max-height: calc(85vh - 120px) !important;
    }
    
    body.single-product .product .images .wpil-slides {
        padding-bottom: 0 !important;
        height: 0 !important;
        padding-bottom: min(100%, calc(85vh - 150px)) !important;
        background: #f5f5f5;
    }

    body.single-product .product .summary {
        width: 40% !important;
        max-width: 40% !important;
        flex: 0 0 40% !important;
        display: flex !important;
        flex-direction: column !important;
    }
}

body.single-product div.product::after {
    content: "";
    display: table;
    clear: both;
}

body.single-product .woocommerce-tabs,
body.single-product .related.products {
    display: none !important;
}

@media (min-width: 769px) {
    body.single-product .wpil-product-description-wrapper {
        clear: both !important;
        width: 100% !important;
        margin-top: 40px !important;
        padding: 30px 0 !important;
        border-top: 1px solid #eee !important;
    }
}


.wpil-customizer-wrapper {
    margin: 20px 0;
    padding: 0;
    order: 4 !important;
    border: none !important;
}

.woocommerce-error.wpil-error {
    position: relative !important;
    width: 100% !important;
    order: 3 !important;
    margin: 0 0 20px 0 !important;
}

.wpil-layers-selector {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.wpil-layer-group {
    padding: 0;
    position: relative;
}

.wpil-layer-label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    display: none;
}

.wpil-required {
    color: #e2401c;
    font-weight: bold;
}

.wpil-swatches-scroll-wrap {
    position: relative;
    overflow-x: scroll;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: auto;
    scrollbar-color: #aaa #eee;
    padding-bottom: 6px;
}
.wpil-swatches-scroll-wrap::-webkit-scrollbar {
    height: 6px;
    display: block;
}
.wpil-swatches-scroll-wrap::-webkit-scrollbar-track {
    background: #eee;
    border-radius: 3px;
}
.wpil-swatches-scroll-wrap::-webkit-scrollbar-thumb {
    background: #aaa;
    border-radius: 3px;
}

.wpil-swatches-container {
    position: relative;
}

.wpil-swatches-scroll-arrow {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 12px; /* exclude scrollbar area */
    width: 40px;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.95) 50%);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 4px;
    cursor: pointer;
    z-index: 2;
    transition: opacity 0.2s;
    border: none;
    color: #444;
    font-size: 22px;
    line-height: 1;
    pointer-events: auto;
}
.wpil-swatches-scroll-arrow:hover {
    color: #000;
}
.wpil-swatches-scroll-arrow.hidden {
    opacity: 0;
    pointer-events: none;
}

.wpil-swatches {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    padding-top: 4px;
    padding-bottom: 40px;
}

.wpil-swatch {
    overflow: visible;
    position: relative;
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #fff;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.wpil-swatch-option-name {
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: #000;
    white-space: normal;
    max-width: 80px;
    text-align: center;
    line-height: 1.3;
    word-wrap: break-word;
    pointer-events: none;
    font-weight: 500;
}

.wpil-swatch:hover {
    border-color: #666;
    border-width: 3px;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.wpil-swatch.selected {
    border-color: #000;
    border-width: 3px;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.1);
}

.wpil-swatch-label {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    white-space: normal;
    max-width: 80px;
    text-align: center;
    line-height: 1.3;
    word-wrap: break-word;
    font-size: 11px;
    color: #666;
    pointer-events: none;
    display: none;
}

.wpil-swatch:hover .wpil-swatch-label {
    color: #000;
}

.wpil-swatch:hover .wpil-swatch-option-name {
    color: #000;
    font-weight: 600;
}

/* Caine layer label: "Alege" on line 1, breed category on line 2 */
.wpil-layer-group:has(.wpil-alta-rasa-btn) .wpil-layer-label .wpil-label-line1 {
    display: block;
    font-size: 0.75em;
    font-weight: 400;
    opacity: 0.55;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.4;
}
.wpil-layer-group:has(.wpil-alta-rasa-btn) .wpil-layer-label .wpil-label-line2 {
    display: block;
    font-size: 1em;
    font-weight: 600;
    line-height: 1.3;
}

/* Caine layer (has "Altă rasă") — wrap to multiple rows, no horizontal scroll */
.wpil-layer-group:has(.wpil-alta-rasa-btn) .wpil-swatches {
    flex-wrap: wrap;
    padding-bottom: 10px;
}

/* "Altă rasă" swatch */
.wpil-alta-rasa-btn {
    background: #f9f9f9;
    background-size: cover;
    background-position: center;
    border-style: dashed;
    font-size: 11px;
    color: #555;
    text-align: center;
    padding: 4px;
}
.wpil-alta-rasa-btn.wpil-has-image {
    border-style: solid;
    border-color: #ddd;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.55);
}
.wpil-alta-rasa-btn .wpil-swatch-option-name {
    white-space: normal;
    line-height: 1.3;
}
.wpil-alta-rasa-btn:hover {
    border-color: #888;
    color: #000;
}
.wpil-alta-rasa-btn.selected {
    border-color: #000;
    border-style: solid;
    border-width: 3px;
}

/* Dropdown below the swatch row */
.wpil-alta-rasa-dropdown {
    padding: 8px 0 4px;
}
.wpil-alta-rasa-dropdown select {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
    background: #fff;
    cursor: pointer;
}

.wpil-validation-error {
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

#wpil-canvas {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.wpil-canvas-overlay {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.88);
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 10;
    padding: 24px;
}

.wpil-canvas-overlay.visible {
    display: flex;
}

.wpil-canvas-overlay-text {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    line-height: 1.5;
    max-width: 280px;
    margin: 0;
}

@media (max-width: 768px) {
    body.single-product .product .summary .wpil-customizer-wrapper {
        background: transparent !important;
    }
    .wpil-slide-label {
        bottom: 10px;
        right: 10px;
    }
    .wpil-swatches {
        padding-top: 10px;
        gap: 30px;
        justify-content: center;
        max-height: calc(100dvh - 145vw);
        overflow-y: scroll;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
    body.single-product div.product {
        flex-direction: column !important;
    }
    
    body.single-product .product .images,
    body.single-product .product .summary {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    body.single-product .product .images {
        position: relative;
    }
    
    /* Sticky canvas disabled on mobile - canvas stays in gallery */
    /*
    #wpil-canvas.wpil-sticky-canvas {
        position: fixed !important;
        width: 88vw !important;
        height: 88vw !important;
        max-width: 500px !important;
        max-height: 500px !important;
        top: 120px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        margin-left: 0 !important;
        z-index: 999 !important;
        background: #fff !important;
        border-radius: 8px !important;
        box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important;
    }

    #wpil-canvas.wpil-sticky-canvas + .wpil-canvas-sticky-spacer {
        height: calc(90vw + 20px);
        max-height: 520px;
    }
    */
}

.wpil-floating-notice,
.wpil-floating-loading {
    position: fixed;
    top: 120px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: #6b1430;
    color: #fff;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    font-size: 14px;
    font-weight: 600;
    z-index: 999999;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.wpil-floating-notice.show,
.wpil-floating-loading.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.wpil-checkout-prompt {
    pointer-events: auto;
    cursor: pointer;
    background: #800020;
}

.wpil-checkout-prompt a {
    color: #fff;
    text-decoration: none;
}

.wpil-checkout-prompt:hover {
    background: #6b1430;
}

.wpil-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: wpil-spin 0.7s linear infinite;
    flex-shrink: 0;
}

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

.woocommerce-message {
    display: none !important;
}

.woocommerce-notices-wrapper {
    display: none !important;
}

body.woocommerce .woocommerce-message,
body.woocommerce-page .woocommerce-message {
    display: none !important;
}

div.woocommerce-message {
    display: none !important;
}

.wpil-cart-selections {
    margin-top: 8px !important;
    padding: 8px 0 !important;
    border-top: 1px solid #eee;
}

.wpil-cart-selections > div {
    display: flex;
    align-items: center;
    gap: 4px;
}

.woocommerce-cart-form__cart-item .wpil-cart-selections,
.cart_item .wpil-cart-selections {
    font-size: 13px;
    line-height: 1.5;
}

.wc-block-cart__main .wc-block-cart-items td.wc-block-cart-item__image {
    width: 180px !important;
    min-width: 180px !important;
}

.wc-block-cart__main .wc-block-cart-items td.wc-block-cart-item__image img {
    width: 180px !important;
    height: 180px !important;
    object-fit: cover;
    image-rendering: -webkit-optimize-contrast !important;
    image-rendering: crisp-edges !important;
    border-radius: 20px;
}

.woocommerce-cart-form__cart-item .product-thumbnail img,
.cart_item .product-thumbnail img,
img.wpil-custom-thumbnail {
    width: 180px !important;
    height: 180px !important;
    object-fit: contain !important;
    display: block !important;
    max-width: 180px !important;
    max-height: 180px !important;
    image-rendering: -webkit-optimize-contrast !important;
    image-rendering: crisp-edges !important;
}

/* Cart / mini-cart thumbnail overlay when custom dog option is active */
.wpil-cart-thumbnail-wrap {
    position: relative;
    display: inline-block;
}
.wpil-cart-thumbnail-wrap img {
    display: block;
}
.wpil-cart-img-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8px;
    font-size: 11px;
    font-weight: 700;
    color: #333;
    line-height: 1.4;
    z-index: 2;
}
/* Mini-cart image wrap */
.wpil-mini-cart-image {
    position: relative;
}

.woocommerce-cart-form .cart_item .product-thumbnail {
    width: 180px !important;
    min-width: 180px !important;
    max-width: 180px !important;
}

.woocommerce-cart-form .cart_item .product-thumbnail a {
    display: block !important;
    width: 180px !important;
    height: 180px !important;
}

.woocommerce table.shop_table.cart .product-thumbnail,
.woocommerce-page table.shop_table.cart .product-thumbnail {
    width: 180px !important;
    min-width: 180px !important;
}

.woocommerce table.shop_table.cart img,
.woocommerce-page table.shop_table.cart img {
    width: 180px !important;
    height: 180px !important;
    image-rendering: -webkit-optimize-contrast !important;
    image-rendering: crisp-edges !important;
}

.woocommerce-cart .woocommerce-product-details__short-description,
.woocommerce-cart .product-subtitle,
.wc-block-cart .wc-block-components-product-details__description,
.wc-block-cart-item__descriptions,
.wc-block-components-product-metadata__description,
.wc-block-cart-item-product-metadata .wc-block-components-product-details__description,
dl.variation dd p,
.product-item-data .woocommerce-product-details__short-description {
    display: none !important;
}

.wc-block-components-product-name,
.wc-block-components-product-name a {
    color: #000 !important;
    font-weight: 700 !important;
    font-size: 18px !important;
    line-height: 1.4 !important;
}

.wpil-text-customization {
    margin-top: 30px;
    padding: 24px;
    background: #ffffff;
    border: 2px solid #e5e5e5;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.wpil-text-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.wpil-text-header h3 {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -0.3px;
}

.wpil-hide-text-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 15px;
    color: #666;
    font-weight: 500;
    padding: 10px 16px;
    border-radius: 10px;
    transition: all 0.2s ease;
    user-select: none;
}

.wpil-hide-text-toggle:hover {
    background: #f9f9f9;
    color: #1a1a1a;
}

.wpil-hide-text-toggle:active {
    transform: scale(0.98);
}

.wpil-hide-text-checkbox {
    position: relative;
    width: 22px;
    height: 22px;
    cursor: pointer;
    margin: 0;
    appearance: none;
    border: 2.5px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    transition: all 0.2s ease;
}

.wpil-hide-text-checkbox:hover {
    border-color: #ff6b00;
    background: #fff5f0;
}

.wpil-hide-text-checkbox:checked {
    background: #ff6b00;
    border-color: #ff6b00;
}

.wpil-hide-text-checkbox:checked::after {
    content: 'ÃƒÂ¢Ã…â€œÃ¢â‚¬Å“';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 14px;
    font-weight: bold;
}

.wpil-text-fields {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.wpil-text-field-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wpil-text-field-group label {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    letter-spacing: -0.2px;
}

.wpil-text-input {
    width: 100%;
    padding: 15px 18px;
    font-size: 16px;
    border: 2.5px solid #e5e5e5;
    border-radius: 12px;
    transition: all 0.2s ease;
    background: #fafafa;
    font-weight: 500;
    color: #1a1a1a;
}

.wpil-text-input:hover {
    border-color: #d1d5db;
    background: #f5f5f5;
}

.wpil-text-input:focus {
    border-color: #ff6b00;
    outline: none;
    box-shadow: 0 0 0 4px rgba(255, 107, 0, 0.1);
    background: #fff;
}

.wpil-text-input::placeholder {
    color: #9ca3af;
    font-size: 14px;
    font-weight: 400;
}

.wpil-text-customization-toggle-section {
    margin-top: 25px;
    padding: 20px 24px;
    background: #ffffff;
    border: 2px solid #e5e5e5;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.wpil-add-text-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 15px;
    color: #666;
    font-weight: 500;
    padding: 10px 16px;
    border-radius: 10px;
    transition: all 0.2s ease;
    user-select: none;
}

.wpil-add-text-toggle:hover {
    background: #f9f9f9;
    color: #1a1a1a;
}

.wpil-add-text-toggle:active {
    transform: scale(0.98);
}

.wpil-add-text-checkbox {
    position: relative;
    width: 22px;
    height: 22px;
    cursor: pointer;
    margin: 0;
    appearance: none;
    border: 2.5px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    transition: all 0.2s ease;
}

.wpil-add-text-checkbox:hover {
    border-color: #6b1430 !important;
    background: #fff5f0;
}

.wpil-add-text-checkbox:checked {
    background: #6b1430 !important;
    border-color: #6b1430 !important;
}

.wpil-add-text-checkbox:checked::after {
    content: '✔';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 14px;
    font-weight: bold;
}

.wpil-text-customization {
    margin-top: 15px;
    padding: 20px 24px;
    background: #ffffff;
    border: 2px solid #e5e5e5;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.wpil-custom-image-toggle-section {
    margin-top: 25px;
    padding: 20px 24px;
    background: #ffffff;
    border: 2px solid #e5e5e5;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.wpil-add-custom-image-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 15px;
    color: #666;
    font-weight: 500;
    padding: 10px 16px;
    border-radius: 10px;
    transition: all 0.2s ease;
    user-select: none;
}

.wpil-add-custom-image-toggle:hover {
    background: #f9f9f9;
    color: #1a1a1a;
}

.wpil-add-custom-image-toggle:active {
    transform: scale(0.98);
}

.wpil-add-custom-image-checkbox {
    position: relative;
    width: 22px;
    height: 22px;
    cursor: pointer;
    margin: 0;
    appearance: none;
    border: 2.5px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    transition: all 0.2s ease;
}

.wpil-add-custom-image-checkbox:hover {
    border-color: #6b1430 !important;
    background: #f5f3ff;
}

.wpil-add-custom-image-checkbox:checked {
    background: #6b1430 !important;
    border-color: #6b1430 !important;
}

.wpil-add-custom-image-checkbox:checked::after {
    content: '✔';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 14px;
    font-weight: bold;
}
.wpil-promotional-text {
    margin: 20px 0;
    padding: 15px 20px;
    font-size: 15px;
    line-height: 1.6;
    border-radius: 4px;
    order: 3 !important;
}

.wpil-promotional-text.wpil-global-promo {
    background: #fff;
}

.wpil-promotional-text.wpil-product-promo {
    background: #fff;
    border-left: 4px solid #ff6b00;
}

.wpil-promotional-text strong {
    font-weight: 700;
    color: #000;
}

.wpil-promotional-text a {
    color: #ff6b00;
    text-decoration: none;
    font-weight: 600;
}

.wpil-promotional-text a:hover {
    text-decoration: underline;
}

.wpil-promotional-text p {
    margin: 0 0 10px 0;
}

.wpil-promotional-text p:last-child {
    margin-bottom: 0;
}

.variations select {
    display: none !important;
}

.wpil-variation-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.wpil-variation-button {
    padding: 12px 20px;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #333;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 60px;
    text-align: center;
}

.wpil-variation-button:hover {
    border-color: #000 !important;
    background: #fff !important;
    color: #333 !important;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.wpil-variation-button.selected {
    border-color: #000;
    background: #fff;
    color: #333;
    border-width: 2px;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.1);
}

.wpil-variation-button.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.variations .label {
    display: none !important;
}

/* Dimension variation buttons with live canvas preview */
.wpil-variation-button[data-attribute="pa_dimensiune"] {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 14px 8px;
    min-width: 100px;
    gap: 6px;
}

.wpil-variation-btn-preview {
    width: 90px;
    height: 90px;
    overflow: hidden;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wpil-variation-btn-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wpil-variation-btn-preview--zoom img {
    transform: scale(1.2);
    transform-origin: center;
}


.variations .value {
    width: 100%;
}

.wc-block-cart__submit-button {
    min-height: 52px !important;
    padding: 14px 24px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #000 !important;
    background: #fff !important;
    border: 2px solid #000 !important;
    border-radius: 6px !important;
    transition: all 0.2s ease !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

.wc-block-cart__submit-button:hover {
    background: #f5f5f5 !important;
    border-color: #000 !important;
}

@media (max-width: 768px) {
    .wp-block-woocommerce-filled-cart-block > h1,
    .wp-block-woocommerce-filled-cart-block .wc-block-cart__main > h1,
    .entry-title:not(.product_title) {
        display: none !important;
    }

    body.single-product .product_title {
        display: block !important;
        text-transform: uppercase !important;
    }
    
    .wp-block-woocommerce-cart.alignwide {
        justify-self: center !important;
    }
    
    .wc-block-cart-items__row {
        display: flex !important;
        flex-direction: column !important;
        padding: 20px 0 !important;
        gap: 20px !important;
        margin-top: 0 !important;
    }
    
    .wc-block-cart-item__image {
        width: 100% !important;
        max-width: 100% !important;
        order: -1 !important;
        text-align: center !important;
        padding: 0 !important;
        align-self: center !important;
    }
    
    .wc-block-cart__main .wc-block-cart-items td.wc-block-cart-item__image {
        width: 300px !important;
        height: 300px !important;
    }
    
    .wc-block-cart-item__image a {
        display: block !important;
    }
    
    .wc-block-cart__main .wc-block-cart-items td.wc-block-cart-item__image img {
        width: 300px !important;
        height: 300px !important;
        margin: 0 auto !important;
        display: block !important;
        object-fit: contain !important;
        border-radius: 20px;
    }
    
    .wc-block-cart-item__product {
        width: 100% !important;
        padding: 0 15px !important;
    }
    
    .wc-block-components-product-name {
        font-size: 18px !important;
        font-weight: 600 !important;
        margin-bottom: 12px !important;
        text-align: center !important;
    }
    
    .wc-block-cart-item__prices {
        margin: 12px 0 !important;
        text-align: center !important;
        font-size: 18px !important;
    }
    
    .wc-block-components-product-badge {
        display: block !important;
        margin: 12px auto !important;
        text-align: center !important;
        font-size: 16px !important;
        font-weight: 700 !important;
        color: #22c55e !important;
        padding: 8px 20px !important;
        background: #f0fdf4 !important;
        border-radius: 8px !important;
        border: 2px solid #22c55e !important;
    }
    
    .wc-block-components-product-metadata {
        display: block !important;
        margin-top: 12px !important;
        padding-top: 12px !important;
        border-top: 1px solid #e5e5e5 !important;
        text-align: center !important;
    }
    
    .wc-block-components-product-metadata .wc-block-components-product-details {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
    }
    
    .wc-block-components-product-metadata .wc-block-components-product-details__name {
        font-size: 14px !important;
        font-weight: 600 !important;
        color: #666 !important;
    }
    
    .wc-block-components-product-metadata .wc-block-components-product-details__value {
        font-size: 14px !important;
        color: #333 !important;
    }
    
    .wc-block-cart-item__quantity {
        margin: 20px 0 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 15px !important;
    }
    
    .wc-block-components-quantity-selector {
        width: 100% !important;
        max-width: 100% !important;
        height: 50px !important;
        order: 1 !important;
        background: #f5f5f5 !important;
        border: none !important;
        border-radius: 25px !important;
        overflow: hidden !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 0 20px !important;
    }
    
    .wc-block-components-quantity-selector__input {
        height: 50px !important;
        font-size: 20px !important;
        font-weight: 600 !important;
        color: #333 !important;
        text-align: center !important;
        border: none !important;
        background: transparent !important;
        flex: 1 !important;
    }
    
    .wc-block-components-quantity-selector__button {
        height: 40px !important;
        width: 40px !important;
        font-size: 24px !important;
        font-weight: 400 !important;
        color: #666 !important;
        background: transparent !important;
        border: none !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .wc-block-components-quantity-selector__button:hover {
        color: #000 !important;
        background: transparent !important;
    }
    
    .wc-block-cart-item__total {
        display: none !important;
    }
    
    .wc-block-components-product-badge {
        order: 0 !important;
    }
    
    .wc-block-cart-item__remove-link {
        color: #d63638 !important;
        text-decoration: none !important;
        font-size: 14px !important;
        font-weight: 500 !important;
        order: 2 !important;
        pointer-events: auto !important;
        cursor: pointer !important;
        position: relative !important;
        z-index: 10 !important;
    }
    
    .wc-block-cart-item__remove-link:hover {
        color: #a02222 !important;
        text-decoration: underline !important;
    }
    
    .wc-block-cart__main,
    .wc-block-cart__sidebar {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    .wc-block-cart-items {
        padding: 0 !important;
    }
    
    .wc-block-cart-items thead {
        display: none !important;
    }
    
    .wp-block-woocommerce-cart-order-summary-block {
        padding: 20px 15px !important;
    }
    
    .wc-block-cart__submit-button {
        width: 100% !important;
    }
}

.wc-block-components-totals-coupon__form {
    display: flex !important;
    gap: 12px !important;
    align-items: flex-end !important;
}

.wc-block-components-text-input.wc-block-components-totals-coupon__input {
    flex: 1 !important;
}

.wc-block-components-totals-coupon__button {
    height: 52px !important;
    padding: 14px 24px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #000 !important;
    background: #fff !important;
    border: 2px solid #000 !important;
    border-radius: 6px !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    transition: all 0.2s ease !important;
    min-width: 120px !important;
}

.wc-block-components-totals-coupon__button:hover:not(:disabled) {
    background: #f5f5f5 !important;
    border-color: #000 !important;
}

.wc-block-components-totals-coupon__button:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

.wc-block-components-totals-coupon__button .wc-block-components-button__text {
    color: #000 !important;
}

@media (min-width: 769px) {
    .wc-block-cart__main .wc-block-components-product-price {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 10px !important;
        flex-wrap: wrap !important;
    }
    
    .wc-block-cart__main .wc-block-components-product-badge {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 6px 12px !important;
        font-size: 13px !important;
        font-weight: 700 !important;
        color: #22c55e !important;
        background: #f0fdf4 !important;
        border: 2px solid #22c55e !important;
        border-radius: 16px !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
        margin: 0 !important;
    }
    
    .wc-block-components-product-metadata {
        display: block !important;
        margin-top: 10px !important;
        padding-top: 10px !important;
        border-top: 1px solid #e5e5e5 !important;
    }
    
    .wc-block-components-product-metadata .wc-block-components-product-details {
        display: flex !important;
        flex-direction: column !important;
        gap: 6px !important;
    }
    
    .wc-block-components-product-metadata .wc-block-components-product-details__name {
        font-size: 13px !important;
        font-weight: 600 !important;
        color: #666 !important;
    }
    
    .wc-block-components-product-metadata .wc-block-components-product-details__value {
        font-size: 13px !important;
        color: #333 !important;
    }
    
    .wc-block-cart__sidebar .wc-block-components-product-price {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 10px !important;
        flex-wrap: wrap !important;
    }
    
    .wc-block-cart__sidebar .wc-block-components-product-badge {
        display: inline-flex !important;
        margin: 0 !important;
    }
}

.wc-block-cart-items .wc-block-components-quantity-selector {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: #fff !important;
    border: none !important;
    border-radius: 25px !important;
    padding: 0 20px !important;
    gap: 5px !important;
    height: 50px !important;
    width: auto !important;
    min-width: 150px !important;
}

.wc-block-cart-items .wc-block-components-quantity-selector__button {
    background: transparent !important;
    border: none !important;
    color: #000 !important;
    font-size: 20px !important;
    width: 35px !important;
    height: 35px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    cursor: pointer !important;
    border-radius: 50% !important;
    transition: all 0.2s ease !important;
}

.wc-block-cart-items .wc-block-components-quantity-selector__button:hover {
    background: #e5e5e5 !important;
}

.wc-block-cart-items .wc-block-components-quantity-selector__input {
    border: none !important;
    background: transparent !important;
    text-align: center !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #000 !important;
    width: 50px !important;
    padding: 0 !important;
}

.wc-block-cart-items .wc-block-components-quantity-selector__input:focus {
    outline: none !important;
    box-shadow: none !important;
}

.wc-block-components-product-price__regular,
del.wc-block-components-product-price__regular {
    color: #dc2626 !important;
    text-decoration: line-through !important;
    font-weight: 400 !important;
}

.wc-block-components-product-price__value.is-on-sale,
.wc-block-components-product-price__value {
    font-weight: 700 !important;
    color: #000 !important;
}

.up-sells.products,
.related.products {
    margin-top: 40px !important;
    padding-top: 30px !important;
    border-top: 1px solid #eee !important;
}

.up-sells.products h2,
.related.products h2 {
    font-size: 24px !important;
    font-weight: 600 !important;
    margin-bottom: 30px !important;
    text-align: left !important;
}

.up-sells.products ul.products,
.related.products ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    align-items: stretch !important;
}

.up-sells.products ul.products li,
.related.products ul.products li {
    margin: 0 !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-self: stretch !important;
}

.up-sells.products ul.products li .astra-shop-thumbnail-wrap,
.related.products ul.products li .astra-shop-thumbnail-wrap {
    margin-bottom: 15px !important;
}

.up-sells.products ul.products li .astra-shop-summary-wrap,
.related.products ul.products li .astra-shop-summary-wrap {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    justify-content: space-between !important;
}

.up-sells.products ul.products li h2,
.related.products ul.products li h2,
.up-sells.products ul.products li .woocommerce-loop-product__title,
.related.products ul.products li .woocommerce-loop-product__title {
    min-height: 50px !important;
}

.up-sells.products ul.products li .button,
.related.products ul.products li .button,
.up-sells.products ul.products li .ast-on-card-button.ast-select-options-trigger,
.related.products ul.products li .ast-on-card-button.ast-select-options-trigger {
    background: #6b1430 !important;
    color: #fff !important;
    font-size: 12px !important;
    padding: 10px 16px !important;
    border-radius: 4px !important;
    text-align: center !important;
    text-decoration: none !important;
    display: inline-block !important;
    margin-top: 10px !important;
    border: none !important;
    transition: all 0.2s ease !important;
}

.up-sells.products ul.products li .button:hover,
.related.products ul.products li .button:hover,
.up-sells.products ul.products li .ast-on-card-button.ast-select-options-trigger:hover,
.related.products ul.products li .ast-on-card-button.ast-select-options-trigger:hover {
    background: #4a0e20 !important;
    color: #fff !important;
}

@media (max-width: 768px) {
    .up-sells.products ul.products,
    .related.products ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }
    
    .up-sells.products,
    .related.products {
        margin-top: 30px !important;
        padding-top: 20px !important;
    }
    
    .up-sells.products h2,
    .related.products h2 {
        font-size: 20px !important;
        margin-bottom: 20px !important;
    }

    /* ===================================
       DESKTOP WIZARD — hidden on mobile
       =================================== */
    .wpil-desktop-wizard-progress,
    .wpil-desktop-wizard-nav,
    .wpil-desktop-text-step {
        display: none !important;
    }

    /* ===================================
       MOBILE WIZARD MODAL
       =================================== */

    /* Personalize button */
    .wpil-mobile-personalize-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 6px;
        width: 100%;
        padding: 16px;
        margin: 20px 0 0;
        background: #fff;
        color: #1a1a1a;
        font-size: 14px;
        font-weight: 700;
        letter-spacing: 0.04em;
        border: 2px solid #1a1a1a;
        border-radius: 6px;
        cursor: pointer;
        text-transform: capitalize;
        outline: none;
        transition: background 0.15s, color 0.15s;
    }
    .wpil-mobile-personalize-btn::before {
        content: '✏️';
        font-size: 16px;
    }
    .wpil-mobile-personalize-btn:hover,
    .wpil-mobile-personalize-btn.active {
        background: #1a1a1a;
        color: #fff;
    }

    /* Full-screen modal */
    .wpil-mobile-wizard-modal {
        display: none;
        position: fixed;
        top: 0; left: 0; right: 0;
        height: 100dvh; /* excludes browser chrome on mobile */
        z-index: 99999;
        background: #fff;
    }

    .wpil-mobile-wizard-modal.active {
        display: flex;
        flex-direction: column;
    }

    .wpil-mobile-wizard-content {
        display: flex;
        flex-direction: column;
        flex: 1 1 0;
        min-height: 0;
        overflow: hidden;
    }

    /* Canvas slot — top portion, takes all available space */
    .wpil-mobile-wizard-canvas-slot {
        flex: 1 1 0;
        min-height: 0;
        position: relative; /* needed for canvas overlay positioning */
        display: flex;
        align-items: center;
        justify-content: center;
        background: #f4f4f4;
        padding: 8px;
        overflow: hidden;
    }

    .wpil-mobile-wizard-canvas-slot #wpil-canvas {
        max-width: 100%;
        max-height: 100%;
        width: auto !important;
        height: auto !important;
        transition: transform 0.35s ease;
        will-change: transform;
    }

    /* Header strip: step indicator + close button */
    .wpil-mobile-wizard-header {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 16px;
        border-bottom: 1px solid #ebebeb;
        background: #fff;
    }

    .wpil-mobile-wizard-progress {
        font-size: 14px;
        color: #666;
        font-weight: 500;
    }

    .wpil-mobile-wizard-close {
        background: none;
        border: none;
        font-size: 26px;
        line-height: 1;
        color: #333;
        cursor: pointer;
        padding: 0 4px;
    }

    /* Steps area — auto-height, no vertical scroll, canvas takes remaining space */
    .wpil-mobile-wizard-body {
        flex: 0 0 auto;
        overflow: hidden;
        padding: 20px 16px;
    }

    .wpil-wizard-step {
        display: none;
    }

    .wpil-wizard-step.active {
        display: block;
    }

    /* Price summary */
    .wpil-wizard-price-summary {
        position: absolute;
        top: 12px; /* deasupra footer-ului */
        left: 50%;
        transform: translateX(-50%);
        z-index: 999;
        align-self: center;
        padding: 10px 18px;
        background: rgba(255,255,255,0.96);
        border-radius: 12px;
        box-shadow: 0 2px 16px rgba(0,0,0,0.13);
        min-width: 200px;
        text-align: center;
        pointer-events: none;
    }

    .wpil-wizard-price-total {
        font-size: 16px;
    }

    .wpil-wizard-price-value {
        font-size: 18px;
        font-weight: 700;
        color: #6b1430;
    }

    .wpil-wizard-price-breakdown {
        font-size: 12px;
        color: #555;
        line-height: 1.6;
    }

    .wpil-wizard-price-breakdown span {
        display: inline-block;
        animation: wpil-tag-in 0.25s ease both;
    }

    .wpil-wizard-price-breakdown:empty {
        display: none;
    }

    /* Footer: nav buttons */
    .wpil-mobile-wizard-footer {
        flex: 0 0 auto;
        display: flex;
        justify-content: space-between;
        gap: 10px;
        padding: 12px 16px;
        padding-bottom: max(16px, env(safe-area-inset-bottom));
        border-top: 1px solid #ebebeb;
        background: #fff;
    }

    .wpil-mobile-wizard-footer .wpil-wizard-btn {
        flex: 1;
        padding: 14px 16px;
        font-size: 15px;
        font-weight: 600;
        border: 2px solid #6b1430;
        border-radius: 8px;
        cursor: pointer;
        background: #fff;
        color: #6b1430;
    }

    .wpil-mobile-wizard-footer .wpil-wizard-next {
        background: #6b1430;
        color: #fff;
    }

    /* Caine layer ("Altă rasă"): on mobile switch from wrap to horizontal scroll */
    .wpil-layer-group:has(.wpil-alta-rasa-btn) .wpil-swatches {
        flex-wrap: nowrap;
    }

    /* Swatches inside mobile wizard: single horizontal row with scroll (handled by .wpil-swatches-scroll-wrap) */
    .wpil-mobile-wizard-body .wpil-swatches {
        flex-wrap: nowrap;
        gap: 16px;
        padding-bottom: 20px;
        justify-content: flex-start;
        max-height: none;
    }

    /* Arrow: no scrollbar space to exclude on mobile */
    .wpil-mobile-wizard-body .wpil-swatches-scroll-arrow {
        bottom: 0;
    }

    .wpil-mobile-wizard-body .wpil-swatch {
        flex-shrink: 0;
        width: 120px;
        height: 120px;
    }

    /* Dog custom options — second row, always below breed swatches */
    .wpil-mobile-wizard-body .wpil-dog-custom-options {
        display: flex;
        flex-direction: row;
        gap: 16px;
        padding: 12px 0 8px;
        border-top: 1px solid #ebebeb;
        margin-top: 4px;
    }

    .wpil-mobile-wizard-body .wpil-dog-custom-options .wpil-dog-swatch {
        flex: 0 0 85px;
        width: 85px;
        height: 85px;
        margin-bottom: 0;
        align-items: flex-end;
        padding-bottom: 6px;
    }

    /* Label inside button as bottom overlay — no extra space needed below */
    .wpil-mobile-wizard-body .wpil-dog-custom-options .wpil-dog-swatch .wpil-dog-swatch-label {
        position: static;
        transform: none;
        text-align: center;
        background: rgba(255, 255, 255, 0.88);
        padding: 2px 6px;
        border-radius: 3px;
        width: auto;
        max-width: 90%;
    }

    /* ===================================
       DOG DETAIL MODAL (breed / photo)
       =================================== */
    .wpil-dog-detail-modal {
        display: none;
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        z-index: 999999;
    }

    .wpil-dog-detail-modal.active {
        display: block;
    }

    .wpil-dog-detail-overlay {
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
    }

    .wpil-dog-detail-content {
        position: absolute;
        bottom: 0; left: 0; right: 0;
        background: #fff;
        border-radius: 16px 16px 0 0;
        display: flex;
        flex-direction: column;
        max-height: 70vh;
        height: 30vh;
    }

    .wpil-dog-detail-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 20px;
        border-bottom: 1px solid #ebebeb;
    }

    .wpil-dog-detail-title {
        font-size: 16px;
        font-weight: 700;
        color: #333;
    }

    .wpil-dog-detail-close {
        background: none;
        border: none;
        font-size: 26px;
        line-height: 1;
        color: #666;
        cursor: pointer;
        padding: 0 4px;
    }

    .wpil-dog-detail-body {
        flex: 1 1 0;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 20px;
    }

    .wpil-dog-detail-body .wpil-custom-option-body {
        display: none;
        padding: 0;
    }

    .wpil-dog-detail-body .wpil-custom-option-body.active {
        display: block;
    }

    .wpil-dog-detail-footer {
        padding: 12px 20px;
        padding-bottom: max(16px, env(safe-area-inset-bottom));
        border-top: 1px solid #ebebeb;
    }

    .wpil-dog-detail-confirm {
        width: 100%;
        padding: 14px;
        background: #6b1430;
        color: #fff;
        font-size: 16px;
        font-weight: 700;
        border: none;
        border-radius: 8px;
        cursor: pointer;
    }
}

/* Hide mobile wizard on desktop */
@media (min-width: 769px) {
    .wpil-mobile-personalize-btn {
        display: none !important;
    }
    .wpil-mobile-wizard-modal {
        display: none !important;
    }
    .wpil-dog-detail-modal {
        display: none !important;
    }
}

/* ================================================================
   Desktop price breakdown (below WC variation price)
   ================================================================ */
.wpil-desktop-price-breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    min-height: 28px;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.wpil-desktop-price-breakdown.visible {
    opacity: 1;
}

@keyframes wpil-tag-in {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.92);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.wpil-desktop-price-breakdown span {
    display: inline-block;
    font-size: 13px;
    color: #555;
    background: #f5f5f5;
    border-radius: 4px;
    padding: 2px 8px;
    line-height: 1.6;
    animation: wpil-tag-in 0.25s ease both;
}

/* ================================================================
   Custom Dog Option Swatches
   ================================================================ */

/* Dog swatches look like .wpil-swatch but are independently styled
   to avoid JS handler conflicts with the regular swatch click logic */
.wpil-dog-swatch {
    overflow: visible;
    position: relative;
    width: 64px;
    height: 64px;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #f0f0f0;
    background-size: cover;
    background-position: center;
    padding: 0;
    margin-bottom: 55px;
}

.wpil-dog-swatch:hover {
    border-color: #666;
    border-width: 3px;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.wpil-dog-swatch.selected {
    border-color: #6b1430;
    border-width: 3px;
    box-shadow: 0 0 0 2px rgba(107,20,48,0.15);
}

/* Label below the swatch (name + price stacked) */
.wpil-dog-swatch-label {
    position: absolute;
    bottom: -52px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    text-align: center;
    pointer-events: none;
}

.wpil-dog-swatch-name {
    display: block;
    font-size: 10px;
    color: #333;
    font-weight: 500;
    line-height: 1.3;
    white-space: normal;
    word-wrap: break-word;
}

.wpil-dog-swatch-price {
    display: block;
    font-size: 10px;
    color: #6b1430;
    font-weight: 600;
    white-space: nowrap;
    margin-top: 2px;
}

/* Info (i) badge — below the swatch, next to price */
.wpil-dog-swatch .wpil-info-btn {
    position: absolute;
    top: auto;
    bottom: -76px;
    right: -10px;
    pointer-events: all;
    z-index: 2;
}

/* Dog custom options row — desktop */
.wpil-dog-custom-options {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    padding-bottom: 40px;
}

.wpil-dog-custom-options .wpil-dog-swatch {
    width: 85px;
    height: 85px;
}

/* Dog section container (holds the option bodies that slide open) */
.wpil-custom-dog-section {
    margin-top: 8px;
}

.wpil-custom-option-body {
    display: none;
    padding: 10px 0 0;
}

.wpil-custom-option-body input[type="text"] {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.15s;
}

.wpil-custom-option-body input[type="text"]:focus {
    border-color: #888;
    outline: none;
}

.wpil-custom-option-hint {
    font-size: 12px;
    color: #888;
    margin: 6px 0 0;
}

/* ── Photo upload area ─────────────────────────────────────────── */

.wpil-photo-upload-area {
    position: relative;
    border: 2px dashed #d0d0d0;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wpil-photo-upload-area:hover {
    border-color: #888;
}

.wpil-photo-upload-area input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.wpil-photo-upload-area.has-photo input[type="file"] {
    display: none;
}

.wpil-photo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 16px;
    color: #888;
    font-size: 13px;
    text-align: center;
    pointer-events: none;
}

.wpil-photo-icon {
    font-size: 28px;
    line-height: 1;
}

.wpil-photo-preview {
    display: none;
    position: relative;
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
}

.wpil-photo-preview img {
    width: 100%;
    max-height: 160px;
    object-fit: contain;
    border-radius: 4px;
    display: block;
}

#wpil-photo-remove {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0,0,0,0.55);
    color: #fff;
    border: none;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.15s;
}

#wpil-photo-remove:hover {
    background: rgba(0,0,0,0.8);
}

/* ── Info button ───────────────────────────────────────────────── */

.wpil-info-btn {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border-radius: 50%;
    border: 1.5px solid #888;
    background: transparent;
    color: #888;
    font-size: 12px;
    font-weight: 700;
    font-style: italic;
    font-family: Georgia, serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: border-color 0.15s, color 0.15s;
    flex-shrink: 0;
}

.wpil-info-btn:hover {
    border-color: #333;
    color: #333;
}

/* ── Info modal ────────────────────────────────────────────────── */

.wpil-info-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    align-items: center;
    justify-content: center;
}

.wpil-info-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    cursor: pointer;
}

.wpil-info-modal-content {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 8px;
    max-width: 480px;
    width: calc(100% - 32px);
    max-height: 80vh;
    overflow-y: auto;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.wpil-info-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    font-size: 20px;
    color: #888;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 4px;
    transition: color 0.15s;
}

.wpil-info-modal-close:hover {
    color: #333;
}

.wpil-info-modal-body {
    font-size: 14px;
    line-height: 1.7;
    color: #444;
    padding-right: 20px;
}

.wpil-info-modal-body p {
    margin: 0 0 12px;
}

.wpil-info-modal-body p:last-child {
    margin-bottom: 0;
}

/* ── Validation error states ───────────────────────────────────── */

.wpil-field-error {
    border-color: #c0392b !important;
    animation: wpil-shake 0.3s ease;
}

@keyframes wpil-shake {
    0%, 100% { transform: translateX(0); }
    25%       { transform: translateX(-4px); }
    75%       { transform: translateX(4px); }
}

/* Modal flex display fix (display:none overrides display:flex) */
.wpil-info-modal[style*="display: block"],
.wpil-info-modal[style*="display:block"] {
    display: flex !important;
}

/* ================================================================
   DESKTOP WIZARD - STEP-BY-STEP (min-width: 769px)
   ================================================================ */

@media (min-width: 769px) {

/* Progress bar */
.wpil-desktop-wizard-progress {
    display: flex;
    align-items: center;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ebebeb;
}

/* Connector line between steps */
.wpil-desktop-step-line {
    flex: 1;
    height: 2px;
    background: #ddd;
    margin: 0 6px;
    margin-bottom: 22px; /* align with circle center */
    transition: background 0.25s;
}

/* Step dot container */
.wpil-desktop-step-dot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: default;
}

.wpil-desktop-step-dot.completed {
    cursor: pointer;
}

/* Numbered circle */
.wpil-desktop-step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e8e8e8;
    border: 2px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #999;
    transition: background 0.25s, border-color 0.25s, color 0.25s;
    flex-shrink: 0;
}

.wpil-desktop-step-dot.active .wpil-desktop-step-circle {
    background: #6b1430;
    border-color: #6b1430;
    color: #fff;
}

.wpil-desktop-step-dot.completed .wpil-desktop-step-circle {
    background: #6b1430;
    border-color: #6b1430;
    color: #fff;
}

.wpil-desktop-step-dot.completed .wpil-desktop-step-circle span {
    font-size: 0;
    line-height: 0;
}
.wpil-desktop-step-dot.completed .wpil-desktop-step-circle span::before {
    content: '✓';
    font-size: 14px;
    line-height: 1;
    color: #fff;
    display: block;
}

/* Step label */
.wpil-desktop-step-label {
    font-size: 11px;
    color: #aaa;
    font-weight: 500;
    letter-spacing: 0.02em;
    max-width: 80px;
    white-space: normal;
    text-align: center;
    line-height: 1.3;
}

.wpil-desktop-step-dot.active .wpil-desktop-step-label {
    color: #6b1430;
    font-weight: 700;
}

.wpil-desktop-step-dot.completed .wpil-desktop-step-label {
    color: #6b1430;
}

/* Line color for completed steps */
.wpil-desktop-step-dot.completed + .wpil-desktop-step-line {
    background: #6b1430;
}

/* Hide layer group label inside wizard steps */
.wpil-layer-group .wpil-layer-label {
    display: none;
}

/* Nav buttons */
.wpil-desktop-wizard-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 28px;
    padding-top: 16px;
    border-top: 0 solid #ebebeb;
    gap: 12px;
}

.wpil-desktop-wizard-nav .wpil-wizard-btn {
    flex: none;
    min-width: 130px;
    padding: 11px 22px;
    border: 2px solid #6b1430;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.wpil-desktop-wizard-prev {
    background: #fff !important;
    color: #6b1430 !important;
}

.wpil-desktop-wizard-prev:hover,
.wpil-desktop-wizard-prev:focus,
.wpil-desktop-wizard-prev:active,
.wpil-desktop-wizard-prev:focus-visible {
    background: #f7f0f2 !important;
    color: #6b1430 !important;
    outline: none;
}

.wpil-desktop-wizard-next {
    background: #6b1430 !important;
    color: #fff !important;
}

.wpil-desktop-wizard-next:hover,
.wpil-desktop-wizard-next:focus,
.wpil-desktop-wizard-next:active,
.wpil-desktop-wizard-next:focus-visible {
    background: #800020 !important;
    border-color: #800020 !important;
    color: #fff !important;
    outline: none;
}

.wpil-desktop-wizard-prev.wpil-btn-hidden {
    visibility: hidden;
    pointer-events: none;
}

.wpil-desktop-wizard-next.wpil-btn-finish {
    background: #1a6e36 !important;
    border-color: #1a6e36 !important;
    color: #fff !important;
}

.wpil-desktop-wizard-next.wpil-btn-finish:hover,
.wpil-desktop-wizard-next.wpil-btn-finish:focus,
.wpil-desktop-wizard-next.wpil-btn-finish:active,
.wpil-desktop-wizard-next.wpil-btn-finish:focus-visible {
    background: #145929 !important;
    border-color: #145929 !important;
    color: #fff !important;
    outline: none;
}

} /* end @media (min-width: 769px) desktop wizard */

/* Next button disabled state (Alta rasa selected but no breed chosen) */
.wpil-desktop-wizard-next.wpil-next-disabled,
.wpil-desktop-wizard-next.wpil-next-disabled:hover,
.wpil-desktop-wizard-next.wpil-next-disabled:focus {
    background: #bbb !important;
    border-color: #bbb !important;
    color: #fff !important;
    cursor: not-allowed !important;
    opacity: 0.65;
}
.wpil-wizard-next.wpil-next-disabled,
.wpil-wizard-next.wpil-next-disabled:hover,
.wpil-wizard-next.wpil-next-disabled:focus {
    background: #bbb !important;
    border-color: #bbb !important;
    color: #fff !important;
    cursor: not-allowed !important;
    opacity: 0.65;
}

/* ── Color picker buttons ───────────────────────────────────────────── */
.wpil-pt-style-row {
    margin-bottom: 10px;
}
@media (min-width: 769px) {
    .wpil-pt-style-controls {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
    .wpil-pt-style-row {
        margin-bottom: 0;
    }
    .wpil-pt-color-btn-row {
        margin: 0;
    }
    .wpil-pt-swatches-panel {
        margin: 0 0 4px;
    }
}
.wpil-pt-size-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
}
.wpil-pt-size-row .wpil-pt-size {
    flex: 1;
}
#wpil-pt-size-display {
    font-size: 12px;
    color: #555;
    white-space: nowrap;
    min-width: 32px;
    text-align: right;
}
/* Range slider */
.wpil-pt-size {
    -webkit-appearance: none !important;
    appearance: none !important;
    height: 2px !important;
    background: #111 !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    cursor: pointer;
    padding: 0 !important;
    margin: 0 !important;
}
.wpil-pt-size:focus,
.wpil-pt-size:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}
.wpil-pt-size::-webkit-slider-runnable-track {
    height: 2px !important;
    background: #111 !important;
    border: none !important;
    box-shadow: none !important;
}
.wpil-pt-size::-moz-range-track {
    height: 2px !important;
    background: #111 !important;
    border: none !important;
    box-shadow: none !important;
}
.wpil-pt-size::-webkit-slider-thumb {
    -webkit-appearance: none !important;
    width: 20px !important;
    height: 20px !important;
    background: #111 !important;
    border: none !important;
    box-shadow: none !important;
    cursor: pointer;
    margin-top: -9px !important;
    border-radius: 50% !important;
    transition: transform 0.1s ease !important;
}
.wpil-pt-size:active::-webkit-slider-thumb {
    transform: scale(1.35) !important;
}
.wpil-pt-size::-moz-range-thumb {
    width: 20px !important;
    height: 20px !important;
    background: #111 !important;
    border: none !important;
    box-shadow: none !important;
    cursor: pointer;
    border-radius: 50% !important;
    transition: transform 0.1s ease !important;
}
.wpil-pt-size:active::-moz-range-thumb {
    transform: scale(1.35) !important;
}
@keyframes wpil-size-pop {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.3); }
    100% { transform: scale(1); }
}
#wpil-pt-size-display.wpil-size-pop {
    display: inline-block;
    animation: wpil-size-pop 0.2s ease;
}
/* Transparent background button icon — dashed box with diagonal slash */
.wpil-transp-icon {
    position: relative;
    display: block;
    width: 16px;
    height: 16px;
    border: 2px dashed #777;
    border-radius: 2px;
    overflow: hidden;
    transform: rotate(90deg);
}
.wpil-transp-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -4px;
    right: -4px;
    height: 2px;
    background: #777;
    transform: translateY(-50%) rotate(-45deg);
    transform-origin: center;
}
.wpil-pt-bold-btn.active .wpil-transp-icon {
    border-color: #fff;
}
.wpil-pt-bold-btn.active .wpil-transp-icon::after {
    background: #fff;
}
/* Font swatch pills */
.wpil-font-swatch {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 20px;
    border: 2px solid #ddd;
    cursor: pointer;
    white-space: nowrap;
    font-size: 14px;
    background: #fff;
    flex-shrink: 0;
    transition: border-color 0.15s, background 0.15s;
}
.wpil-font-swatch:hover {
    border-color: #999;
}
.wpil-font-swatch.active {
    border-color: #333;
    background: #f0f0f0;
}
/* Font button "Aa" preview */
.wpil-pt-font-preview {
    font-size: 13px;
    margin-left: 4px;
    opacity: 0.75;
}
/* Simple text section — needs width containment since it's inside the WC form, not a flex wrapper */
.wpil-st-simple-section {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}
.wpil-st-simple-section .wpil-pt-swatches-panel {
    overflow: hidden;
}
.wpil-st-simple-section .wpil-color-swatches-wrap {
    max-width: 100%;
}
.wpil-st-simple-section .wpil-pt-bold-btn {
    min-width: 0;
}

.wpil-pt-color-btn-row {
    display: flex;
    gap: 10px;
    margin: 12px 0;
    flex-wrap: wrap;
}
.wpil-pt-color-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    transition: border-color 0.15s, background 0.15s;
}
.wpil-pt-color-btn:hover {
    border-color: #aaa;
    background: #f7f7f7;
    color: #000;
}
.wpil-pt-color-btn.active {
    border-color: #333;
    background: #f0f0f0;
}
.wpil-pt-color-preview {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid #ccc;
    flex-shrink: 0;
}
.wpil-pt-swatches-panel {
    margin: 4px 0 12px;
    padding: 10px 12px;
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
}
.wpil-pt-bold-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 52px;
    height: 75px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-size: 16px;
    color: #333;
    transition: border-color 0.15s, background 0.15s;
    flex-shrink: 0;
}
.wpil-pt-btn-label {
    font-size: 9px;
    font-weight: 400;
    line-height: 1;
    text-transform: none;
    letter-spacing: 0;
}
#wpil-pt-emoji-btn .wpil-pt-emoji-icon {
    font-size: 22px !important;
    line-height: 1 !important;
    display: block;
    width: 24px;
}
#wpil-pt-emoji-btn .wpil-pt-emoji-icon img.emoji {
    width: 24px !important;
    height: 24px !important;
    margin: 0 !important;
    vertical-align: middle !important;
}
.wpil-pt-bold-btn:hover {
    border-color: #aaa;
    background: #f7f7f7;
    color: #000;
}
.wpil-pt-bold-btn:focus,
.wpil-pt-bold-btn:focus-visible {
    outline: none;
    color: #333;
}
.wpil-pt-bold-btn.active {
    border-color: #333;
    background: #333;
    color: #fff;
}
.wpil-pt-color-btn:focus,
.wpil-pt-color-btn:focus-visible {
    outline: none;
    color: #333;
}
.wpil-pt-cancel-btn {
    display: inline-block;
    margin-top: 14px;
    padding: 7px 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    font-size: 12px;
    color: #888;
    transition: border-color 0.15s, color 0.15s;
    outline: none;
}
.wpil-desktop-wizard-nav .wpil-pt-cancel-btn {
    margin-top: 0;
}
.wpil-pt-cancel-btn:hover,
.wpil-pt-cancel-btn:focus {
    border-color: #999;
    color: #333;
    background: transparent;
}

.wpil-pt-zoom-toggle {
    display: inline-block;
    margin-top: 14px;
    margin-left: 8px;
    padding: 7px 12px;
    border: 1px solid #bbb;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    font-size: 12px;
    color: #555;
    transition: border-color 0.15s, color 0.15s;
    outline: none;
}
.wpil-pt-zoom-toggle:hover,
.wpil-pt-zoom-toggle:focus {
    border-color: #888;
    color: #111;
    background: transparent;
}

/* ── Color swatches ─────────────────────────────────────────────────── */
.wpil-color-swatches-wrap {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 14px;
    padding: 14px 2px 14px 10px;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}
.wpil-color-swatches-wrap::-webkit-scrollbar {
    height: 4px;
}
.wpil-color-swatches-wrap::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}
.wpil-color-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #ddd;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}
.wpil-color-swatch:hover {
    transform: scale(1.15);
    border-color: #999;
}
.wpil-color-swatch.active {
    border-color: #333;
    transform: scale(1.2);
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #333;
}

/* ── Emoji picker ───────────────────────────────────────────────────── */
#wpil-emoji-picker {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    z-index: 9999;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    padding: 10px;
    width: 260px;
}
.wpil-emoji-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}
.wpil-emoji-tab {
    flex: 1;
    background: none;
    border: none;
    border-radius: 6px;
    padding: 4px;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.15s, background 0.15s;
}
.wpil-emoji-tab:hover { opacity: 0.8; background: #f5f5f5; }
.wpil-emoji-tab.active { opacity: 1; background: #f0f0f0; }
.wpil-emoji-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
}
.wpil-emoji-item {
    background: none;
    border: none;
    border-radius: 6px;
    font-size: 22px;
    padding: 4px;
    cursor: pointer;
    transition: background 0.1s;
    line-height: 1;
}
.wpil-emoji-item:hover { background: #f0f0f0; }

/* ── Mobile: Font / Culoare text / Culoare fundal + Bold / Fundal transparent ── */
@media (max-width: 768px) {
    .wpil-pt-bold-btn {
        flex: 1;
        width: auto;
        flex-shrink: 1;
        font-size: 22px;
        height: 80px;
    }
    .wpil-pt-bold-btn > strong {
        font-size: 26px;
    }
    .wpil-pt-bold-btn > span:not(.wpil-pt-btn-label) {
        transform: scale(1.3);
    }
    .wpil-pt-bold-btn > span[style] {
        font-size: 26px !important;
    }
    .wpil-pt-btn-label {
        font-size: 12px;
    }
    .wpil-pt-color-btn-row {
        flex-wrap: nowrap;
        gap: 8px;
    }
    .wpil-pt-color-btn {
        flex: 1;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
        padding: 10px 6px;
        font-size: 11px;
        font-weight: 600;
        text-align: center;
        min-width: 0;
    }
    .wpil-pt-font-preview {
        font-size: 26px;
        margin-left: 0;
        opacity: 1;
    }
    .wpil-pt-color-preview {
        width: 32px;
        height: 32px;
    }
    #wpil-emoji-picker {
        width: calc(100vw - 32px);
        left: 50%;
        transform: translateX(-50%);
        max-height: 38vh;
        overflow-y: auto;
        padding: 8px;
    }
    .wpil-emoji-tab {
        font-size: 18px;
        padding: 3px;
    }
    .wpil-emoji-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 3px;
    }
    .wpil-emoji-item {
        font-size: 22px;
        padding: 4px;
    }
}


/* ── AI Breed Generation overlay ── */
.wpil-ai-breed-loading {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    border-radius: 8px;
}
.wpil-ai-breed-loading-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    padding: 20px;
}
.wpil-ai-breed-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid #e0e0e0;
    border-top-color: #333;
    border-radius: 50%;
    animation: wpil-spin 0.8s linear infinite;
}
@keyframes wpil-spin {
    to { transform: rotate(360deg); }
}
.wpil-ai-breed-msg {
    font-size: 14px;
    color: #333;
    margin: 0;
}
.wpil-ai-breed-sub {
    font-size: 12px;
    color: #888;
    margin: 0;
}
.wpil-ai-breed-error {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: #d9534f;
    color: #fff;
    font-size: 12px;
    padding: 8px 14px;
    border-radius: 6px;
    z-index: 21;
    white-space: nowrap;
    max-width: 90%;
    text-align: center;
}

.wpil-breed-limit-notice {
    font-size: 12px;
    color: #888;
    margin-top: 5px;
    padding: 3px 2px;
}
.wpil-breed-limit-notice.wpil-breed-limit-error {
    color: #d9534f;
    font-weight: 500;
}
