/* Visual Product Options - Frontend Styles (v2.1 Mobile-First) */

/* === CSS Custom Properties (Theming) === */
:root {
    --vpo-accent: #2e7d32;
    --vpo-accent-light: #e8f5e9;
    --vpo-accent-bg: #fafff7;
    --vpo-border: #ddd;
    --vpo-border-selected: #2e7d32;
    --vpo-card-bg: #fff;
    --vpo-card-radius: 10px;
    --vpo-text: #1a1a1a;
    --vpo-text-muted: #757575;
    --vpo-badge-bg: #1a5c2e;
    --vpo-free-tag-bg: #2e7d32;
    --vpo-free-gift-bg: #f5fff5;
    --vpo-free-gift-border: #2e7d32;
    --vpo-toggle-active-bg: #2e7d32;
    --vpo-error: #d32f2f;
    --vpo-transition: 0.25s ease;
    --vpo-font: inherit;
    --vpo-title-color: ;
    --vpo-section-bg: ;
}

#vpo-product-options {
    margin: 16px 0;
    font-family: var(--vpo-font);
    background: var(--vpo-section-bg, transparent);
    border-radius: var(--vpo-card-radius, 10px);
    padding: var(--vpo-section-padding, 0);
}

.vpo-option-group {
    margin-bottom: 18px;
}

/* === Group Title === */
.vpo-group-title-front {
    font-size: 14px;
    font-weight: 700;
    color: var(--vpo-title-color, var(--vpo-text));
    margin-bottom: 10px;
}

.vpo-required-star {
    color: var(--vpo-error);
    margin-left: 2px;
}

/* === Cards Grid === */
.vpo-cards-grid {
    display: grid !important;
    gap: 10px;
    padding-top: 14px;
    overflow: visible;
}

/* 1 column - full width list */
#vpo-product-options .vpo-cols-1 .vpo-cards-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
}

/* 2 columns */
#vpo-product-options .vpo-cols-2 .vpo-cards-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
}

/* 3 columns */
#vpo-product-options .vpo-cols-3 .vpo-cards-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
}

/* 4 columns */
#vpo-product-options .vpo-cols-4 .vpo-cards-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
}

/* ============================
   CARD LAYOUT (2-col, 3-col)
   Vertical: image on top, content below
   ============================ */
.vpo-option-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 12px 10px;
    border: 2px solid var(--vpo-border);
    border-radius: var(--vpo-card-radius);
    background: var(--vpo-card-bg);
    cursor: pointer;
    transition: border-color var(--vpo-transition), box-shadow var(--vpo-transition),
                background-color var(--vpo-transition), transform 0.15s ease;
    user-select: none;
    -webkit-user-select: none;
    outline: none;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: 44px;
    min-width: 0;
    overflow: visible;
}

.vpo-option-card:hover {
    border-color: #bbb;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
}

.vpo-option-card:active {
    transform: scale(0.98);
}

.vpo-option-card:focus-visible {
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.25);
}

/* Selected */
.vpo-card-selected {
    border-color: var(--vpo-border-selected);
    box-shadow: 0 0 0 1px var(--vpo-border-selected);
    background: var(--vpo-accent-bg);
}
.vpo-card-selected:hover {
    border-color: var(--vpo-border-selected);
}

/* === Checkmark === */
.vpo-card-check {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 22px;
    height: 22px;
    color: var(--vpo-accent);
    opacity: 0;
    transform: scale(0);
    transition: opacity 0.15s ease, transform 0.15s ease;
    pointer-events: none;
    z-index: 3;
}

/* Checkmark bounce animation */
@keyframes vpoBounceIn {
    0%   { transform: scale(0); opacity: 0; }
    60%  { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.vpo-card-selected .vpo-card-check {
    opacity: 1;
    transform: scale(1);
    animation: vpoBounceIn 0.3s ease forwards;
}

/* === Badge === */
.vpo-card-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--vpo-badge-bg);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 12px;
    border-radius: 20px;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.5;
    z-index: 2;
}

/* === Card Image === */
.vpo-card-image {
    width: 100%;
    margin-bottom: 8px;
    overflow: hidden;
    border-radius: 6px;
    background: #f5f5f5;
    position: relative;
}
.vpo-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* === Responsive Image Sizing (Aspect Ratio) === */
/* Default: square images that fill the card width */
.vpo-card-image {
    aspect-ratio: 1;
}

/* Image size controls aspect ratio */
.vpo-imgsize-thumbnail:not(.vpo-type-free_gifts) .vpo-card-image { aspect-ratio: 1; }       /* Square */
.vpo-imgsize-medium:not(.vpo-type-free_gifts) .vpo-card-image    { aspect-ratio: 4/3; }     /* Landscape */
.vpo-imgsize-large:not(.vpo-type-free_gifts) .vpo-card-image     { aspect-ratio: 3/4; }     /* Portrait */
.vpo-imgsize-full:not(.vpo-type-free_gifts) .vpo-card-image      { aspect-ratio: auto; }    /* Natural */

/* 1-column list: horizontal card layout with smaller image */
.vpo-cols-1:not(.vpo-type-free_gifts) .vpo-card-image {
    width: 80px;
    min-width: 80px;
    aspect-ratio: 1;
    margin-bottom: 0;
}

/* Toggle image: consistent sizing that fills available space */
.vpo-toggle-image {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}
.vpo-imgsize-thumbnail .vpo-toggle-image { width: 50px; height: 50px; }
.vpo-imgsize-medium .vpo-toggle-image    { width: 70px; height: 70px; }
.vpo-imgsize-large .vpo-toggle-image     { width: 90px; height: 90px; }
.vpo-imgsize-full .vpo-toggle-image      { width: 110px; height: 110px; }
.vpo-toggle-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 6px;
}

.vpo-card-no-image {
    padding: 10px 14px;
    justify-content: center;
}

/* === Zoom Button === */
.vpo-card-image,
.vpo-toggle-image {
    position: relative;
}

.vpo-zoom-btn {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    opacity: 0.5;
    transition: opacity 0.2s ease, transform 0.15s ease;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
    padding: 0;
    z-index: 3;
}

.vpo-zoom-btn:hover,
.vpo-card-image:hover .vpo-zoom-btn,
.vpo-toggle-image:hover .vpo-zoom-btn {
    opacity: 1;
}

.vpo-zoom-btn:hover {
    transform: scale(1.1);
    color: #333;
}

/* Zoom Lightbox Overlay */
.vpo-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    animation: vpoFadeIn 0.2s ease;
}

@keyframes vpoFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.vpo-lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 4px 30px rgba(0,0,0,0.4);
}

.vpo-lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.vpo-lightbox-prev,
.vpo-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    z-index: 2;
}
.vpo-lightbox-prev { left: 16px; }
.vpo-lightbox-next { right: 16px; }
.vpo-lightbox-prev:hover,
.vpo-lightbox-next:hover {
    background: rgba(255,255,255,0.4);
}
.vpo-lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.8);
    font-size: 14px;
    font-weight: 600;
}

/* Variant selection lightbox */
.vpo-variant-lightbox-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 30px;
    max-width: 90vw;
    max-height: 85vh;
    overflow-y: auto;
}
.vpo-variant-lb-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 14px;
    background: #fff;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s;
    min-width: 160px;
    max-width: 220px;
    font-family: inherit;
    box-shadow: 0 2px 10px rgba(0,0,0,0.12);
}
.vpo-variant-lb-option:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0,0,0,0.2);
}
.vpo-variant-lb-option img {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
}
.vpo-variant-lb-name {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    text-align: center;
}
.vpo-variant-lb-price {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
}

/* Toggle zoom button smaller */
.vpo-toggle-image .vpo-zoom-btn {
    width: 24px;
    height: 24px;
    bottom: 2px;
    right: 2px;
}

/* === Card Content === */
.vpo-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    width: 100%;
}

.vpo-card-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--vpo-text);
    line-height: 1.3;
}

.vpo-card-description {
    font-size: 11px;
    color: var(--vpo-text-muted);
    line-height: 1.3;
}

/* Price area */
.vpo-card-price-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
    flex-wrap: wrap;
    justify-content: center;
}

.vpo-card-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--vpo-text);
}

.vpo-card-compare-price {
    font-size: 13px;
    color: #999;
    text-decoration: line-through;
}

/* Additive pricing */
.vpo-option-group[data-pricing-mode="additive"] .vpo-card-price {
    color: var(--vpo-accent);
    font-size: 13px;
}

/* ============================
   1-COLUMN LIST LAYOUT
   Horizontal: image left, content center, price right
   ============================ */
.vpo-cols-1:not(.vpo-type-free_gifts) .vpo-option-card {
    flex-direction: row;
    text-align: left;
    align-items: center;
    padding: 12px 16px;
    gap: 12px;
}

.vpo-cols-1:not(.vpo-type-free_gifts) .vpo-card-check {
    position: relative;
    top: auto;
    left: auto;
    opacity: 1;
    transform: scale(1);
    flex-shrink: 0;
    color: var(--vpo-border);
    width: 24px;
    height: 24px;
    animation: none;
}

.vpo-cols-1:not(.vpo-type-free_gifts) .vpo-card-selected .vpo-card-check {
    color: var(--vpo-accent);
}

.vpo-cols-1:not(.vpo-type-free_gifts) .vpo-card-image {
    width: 50px;
    height: 50px;
    margin-bottom: 0;
    flex-shrink: 0;
    border-radius: 4px;
    background: transparent;
}
.vpo-cols-1:not(.vpo-type-free_gifts) .vpo-card-image img {
    object-fit: cover;
}

.vpo-cols-1:not(.vpo-type-free_gifts) .vpo-card-content {
    align-items: flex-start;
    gap: 1px;
}

.vpo-cols-1:not(.vpo-type-free_gifts) .vpo-card-label {
    font-size: 15px;
    font-weight: 600;
}

.vpo-cols-1:not(.vpo-type-free_gifts) .vpo-card-description {
    font-size: 12px;
    color: var(--vpo-accent);
    font-weight: 500;
}

.vpo-cols-1 .vpo-card-price-wrap {
    flex-shrink: 0;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    margin-top: 0;
}

.vpo-cols-1 .vpo-card-price {
    font-size: 16px;
    font-weight: 700;
}

.vpo-cols-1 .vpo-card-compare-price {
    font-size: 12px;
}

.vpo-cols-1 .vpo-card-badge {
    position: absolute;
    top: -8px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    font-size: 9px;
    padding: 2px 8px;
    z-index: 2;
}

.vpo-cols-1 .vpo-card-no-image {
    padding: 12px 16px;
}

/* === Dynamic Price Display === */
.vpo-price-display {
    font-size: 20px;
    font-weight: 700;
    color: var(--vpo-text);
    padding: 8px 0;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.vpo-price-label {
    font-weight: 400;
    font-size: 14px;
    color: #555;
}
.vpo-price-value {
    font-size: 22px;
    color: var(--vpo-text);
    transition: color 0.2s ease;
}

/* === Validation === */
@keyframes vpoShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

.vpo-option-group.vpo-error {
    animation: vpoShake 0.4s ease;
}

.vpo-option-group.vpo-error .vpo-cards-grid {
    outline: 2px solid var(--vpo-error);
    outline-offset: 4px;
    border-radius: var(--vpo-card-radius);
}

.vpo-error-message {
    color: var(--vpo-error);
    font-size: 13px;
    font-weight: 500;
    margin-top: 6px;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.vpo-option-group.vpo-error .vpo-error-message {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* ============================
   TOGGLE ADDON LAYOUT
   Horizontal row: image | label+price | toggle switch
   ============================ */
.vpo-toggles-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.vpo-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    background: var(--vpo-card-bg);
    transition: border-color var(--vpo-transition), box-shadow var(--vpo-transition), transform 0.15s ease;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: 44px;
    cursor: pointer;
}

.vpo-toggle-row:hover {
    border-color: #ccc;
}

.vpo-toggle-row:active {
    transform: scale(0.99);
}

.vpo-toggle-active {
    border-color: #c8e6c9;
    background: var(--vpo-accent-bg);
}

.vpo-toggle-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.vpo-toggle-image {
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vpo-toggle-info {
    flex: 1;
    min-width: 0;
}

.vpo-toggle-label {
    font-size: 15px;
    font-weight: 600;
    color: var(--vpo-text);
    line-height: 1.3;
}

.vpo-toggle-price {
    font-size: 13px;
    color: #666;
    line-height: 1.3;
    margin-top: 1px;
}

.vpo-toggle-desc {
    font-size: 12px;
    color: #999;
    line-height: 1.3;
    margin-top: 1px;
}

.vpo-toggle-right {
    flex-shrink: 0;
    margin-left: 16px;
}

/* Toggle Switch */
.vpo-toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    cursor: pointer;
}

.vpo-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.vpo-toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    border-radius: 28px;
    transition: background-color var(--vpo-transition);
}

.vpo-toggle-slider::before {
    content: "";
    position: absolute;
    width: 22px;
    height: 22px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.vpo-toggle-switch input:checked + .vpo-toggle-slider {
    background-color: var(--vpo-toggle-active-bg);
}

.vpo-toggle-switch input:checked + .vpo-toggle-slider::before {
    transform: translateX(24px);
}

.vpo-toggle-switch input:focus-visible + .vpo-toggle-slider {
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.25);
}

/* Validation for toggle groups */
.vpo-option-group.vpo-error .vpo-toggles-list {
    outline: 2px solid var(--vpo-error);
    outline-offset: 4px;
    border-radius: var(--vpo-card-radius);
}

/* ============================
   MULTI-SELECT CARDS (checkbox)
   Cards that can be independently toggled
   ============================ */
.vpo-selection-multi .vpo-card-check {
    opacity: 1;
    transform: scale(1);
    color: var(--vpo-border);
    animation: none;
}
.vpo-selection-multi .vpo-card-selected .vpo-card-check {
    color: var(--vpo-accent);
    animation: vpoBounceIn 0.3s ease forwards;
}

/* ============================
   EXPANDABLE DETAILS PANEL
   Shown below cards grid when an option is selected
   ============================ */
.vpo-details-panel {
    margin-top: 12px;
    padding: 16px 20px;
    background: #f9fdf6;
    border: 1px solid #e0e8d8;
    border-radius: var(--vpo-card-radius);
    animation: vpoSlideDown 0.25s ease;
}

@keyframes vpoSlideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.vpo-details-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--vpo-text);
    margin-bottom: 2px;
}

.vpo-details-subtitle {
    font-size: 13px;
    color: var(--vpo-accent);
    font-weight: 500;
    margin-bottom: 10px;
}

.vpo-details-content {
    font-size: 14px;
    color: #333;
    line-height: 1.7;
}

.vpo-details-content p {
    margin: 0 0 4px;
}

/* === WooCommerce === */
.vpo-has-options > .price {
    display: none;
}

/* ============================
   FREE GIFTS SECTION
   Distinct bordered box with header
   ============================ */
.vpo-free-gift-section {
    margin-bottom: 18px;
    border: 2px solid var(--vpo-free-gift-border);
    border-radius: 14px;
    padding: 0;
    overflow: hidden;
    background: var(--vpo-free-gift-bg);
}

.vpo-free-gift-header {
    background: var(--vpo-free-gift-border);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    padding: 8px 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vpo-free-gift-section .vpo-option-group {
    margin-bottom: 0;
    padding: 12px;
}

.vpo-free-gift-section .vpo-cards-grid {
    gap: 8px;
}

/* Free gifts always stay in 1 row — flexbox override */
.vpo-free-gift-section .vpo-option-group .vpo-cards-grid {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    gap: 8px;
}
/* Free gift cards: equal width in 1 row, always vertical layout */
.vpo-free-gift-section .vpo-option-card {
    flex: 1 1 0%;
    min-width: 70px;
    flex-direction: column;
    text-align: center;
    align-items: center;
    padding: 10px 6px;
}
.vpo-free-gift-section .vpo-card-label {
    font-size: 12px;
    line-height: 1.2;
}
.vpo-free-gift-section .vpo-card-description {
    font-size: 10px;
    line-height: 1.2;
}
.vpo-free-gift-section .vpo-card-check {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 22px;
    height: 22px;
}
.vpo-free-gift-section .vpo-card-image {
    width: 100%;
    height: auto;
    max-height: 180px;
    margin-bottom: 8px;
    overflow: hidden;
}
.vpo-free-gift-section .vpo-card-image img {
    width: 100%;
    height: auto;
    max-height: 180px;
    object-fit: cover;
}
.vpo-free-gift-section .vpo-card-content {
    align-items: center;
}

.vpo-free-gift-card {
    background: var(--vpo-free-gift-bg, #f0faf0) !important;
    border: 2px solid var(--vpo-free-gift-border, #2e7d32) !important;
    transition: border-color var(--vpo-transition), box-shadow var(--vpo-transition),
                background-color var(--vpo-transition), transform 0.2s ease;
}

.vpo-free-gift-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.vpo-free-gift-card.vpo-card-selected {
    border-color: var(--vpo-free-gift-border, #2e7d32) !important;
    background: var(--vpo-free-gift-bg, #f0faf0) !important;
    cursor: default;
}

.vpo-free-gift-card:not(.vpo-card-selected) {
    opacity: 0.6;
    border-color: var(--vpo-border) !important;
    background: #f5f5f5 !important;
}

.vpo-free-gift-price {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    justify-content: center;
    flex-wrap: wrap;
}

.vpo-free-tag {
    background: var(--vpo-free-tag-bg);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.vpo-strikethrough {
    font-size: 11px;
    color: #999;
    text-decoration: line-through;
    white-space: nowrap;
}

/* ============================
   UPLOAD ZONE
   Drag-and-drop photo upload
   ============================ */
.vpo-upload-zone {
    margin-bottom: 18px;
}

.vpo-upload-droparea {
    border: 2px dashed var(--vpo-border);
    border-radius: var(--vpo-card-radius);
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    background: var(--vpo-card-bg);
}

.vpo-upload-droparea:hover {
    border-color: #bbb;
}

.vpo-upload-droparea.vpo-drag-over {
    border-color: var(--vpo-accent);
    background: var(--vpo-accent-light);
}

.vpo-upload-droparea svg {
    display: block;
    margin: 0 auto 10px;
    color: var(--vpo-text-muted);
}

.vpo-upload-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--vpo-text);
    margin: 0 0 4px;
}

.vpo-upload-hint {
    font-size: 12px;
    color: var(--vpo-text-muted);
    margin: 0;
}

.vpo-upload-input {
    display: none;
}

.vpo-upload-preview {
    position: relative;
    display: inline-block;
    margin-top: 12px;
}

.vpo-upload-thumb {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    display: block;
    border: 2px solid var(--vpo-border);
}

.vpo-upload-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--vpo-error);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 16px;
    line-height: 22px;
    text-align: center;
    cursor: pointer;
    padding: 0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    transition: transform 0.15s ease;
}

.vpo-upload-remove:hover {
    transform: scale(1.1);
}

.vpo-upload-progress {
    width: 100%;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    margin-top: 12px;
    overflow: hidden;
}

.vpo-upload-progress-bar {
    height: 100%;
    background: var(--vpo-accent);
    border-radius: 2px;
    width: 0%;
    transition: width 0.2s ease;
}

/* Upload spinner overlay */
.vpo-upload-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    text-align: center;
}

.vpo-upload-spinner-ring {
    width: 40px;
    height: 40px;
    border: 4px solid #e0e0e0;
    border-top-color: var(--vpo-accent);
    border-radius: 50%;
    animation: vpoSpin 0.8s linear infinite;
    margin-bottom: 12px;
}

@keyframes vpoSpin {
    to { transform: rotate(360deg); }
}

.vpo-upload-spinner-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--vpo-text);
}

.vpo-upload-spinner-text::after {
    content: '';
    animation: vpoDots 1.5s steps(4, end) infinite;
}

@keyframes vpoDots {
    0%   { content: ''; }
    25%  { content: '.'; }
    50%  { content: '..'; }
    75%  { content: '...'; }
}

/* Validation for upload zone */
.vpo-option-group.vpo-error .vpo-upload-zone .vpo-upload-droparea {
    border-color: var(--vpo-error);
}

/* ============================
   BUNDLE DISCOUNT HINT
   Teaser + active discount banner
   ============================ */
.vpo-bundle-hint {
    font-size: 13px;
    font-weight: 600;
    padding: 6px 12px;
    margin-bottom: 8px;
    border-radius: 6px;
    text-align: center;
    background: var(--vpo-accent-light);
    color: var(--vpo-accent);
    animation: vpoSlideDown 0.25s ease;
}

.vpo-bundle-hint.vpo-bundle-applied {
    background: #fff8e1;
    color: #e65100;
}

/* ============================
   CONDITIONAL LOGIC
   Show/hide groups based on selections
   ============================ */
.vpo-conditional-hidden {
    display: none !important;
}

/* ============================
   SELECTION LIMIT
   Grayed out cards + counter
   ============================ */
.vpo-option-card.vpo-limit-reached {
    opacity: 0.4;
    pointer-events: none;
    cursor: default;
}

.vpo-selection-counter {
    font-size: 12px;
    color: var(--vpo-text-muted);
    margin-bottom: 6px;
    text-align: right;
}

/* ============================
   FEATURE 1: SMART VALIDATION
   Error pulse + disabled button
   ============================ */
@keyframes vpoErrorPulse {
    0%   { box-shadow: 0 0 0 0 rgba(211, 47, 47, 0.4); }
    50%  { box-shadow: 0 0 0 8px rgba(211, 47, 47, 0); }
    100% { box-shadow: 0 0 0 0 rgba(211, 47, 47, 0); }
}

.vpo-option-group.vpo-error-pulse {
    animation: vpoErrorPulse 0.5s ease 2;
}

/* Customily field validation error highlight */
.vpo-customily-error {
    outline: 2px solid var(--vpo-error, #d32f2f) !important;
    outline-offset: 2px;
    animation: vpoErrorPulse 0.5s ease 2;
}

.single_add_to_cart_button.vpo-btn-disabled {
    opacity: 0.5;
    cursor: pointer;
    position: relative;
}

/* ============================
   FEATURE 2: UPLOAD CONFIRMATION
   Checkmark + "Photo received!" text
   ============================ */
.vpo-upload-confirm {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 8px 14px;
    background: var(--vpo-accent-light);
    border-radius: 8px;
    animation: vpoSlideDown 0.3s ease;
}

.vpo-upload-check-icon {
    flex-shrink: 0;
}

@keyframes vpoCheckDraw {
    from { stroke-dashoffset: 20; }
    to   { stroke-dashoffset: 0; }
}

.vpo-upload-check-icon path {
    stroke-dasharray: 20;
    animation: vpoCheckDraw 0.4s ease 0.1s both;
}

.vpo-upload-confirm-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--vpo-accent);
}

/* ============================
   FEATURE 3: VISUAL TIER STRIP
   Horizontal stepped price display
   ============================ */
.vpo-tier-strip {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    position: relative;
    padding: 20px 0 10px;
}

.vpo-tier-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    position: relative;
    z-index: 2;
    min-width: 60px;
    transition: transform 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.vpo-tier-node:hover {
    transform: scale(1.05);
}

.vpo-tier-node:active {
    transform: scale(0.97);
}

.vpo-tier-badge {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    background: var(--vpo-badge-bg);
    padding: 2px 8px;
    border-radius: 10px;
    margin-bottom: 6px;
    white-space: nowrap;
    line-height: 1.4;
}

.vpo-tier-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid var(--vpo-border);
    background: var(--vpo-card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    color: var(--vpo-text-muted);
    transition: all 0.25s ease;
    position: relative;
}

.vpo-tier-selected .vpo-tier-circle {
    border-color: var(--vpo-accent);
    background: var(--vpo-accent);
    color: #fff;
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.3);
}

.vpo-tier-price {
    font-size: 13px;
    font-weight: 700;
    color: var(--vpo-text);
    margin-top: 6px;
    text-align: center;
}

.vpo-tier-unit-price {
    font-size: 11px;
    color: var(--vpo-text-muted);
    margin-top: 2px;
}

.vpo-tier-discount {
    font-size: 10px;
    font-weight: 700;
    color: #e65100;
    margin-top: 2px;
}

/* Connector line between tier nodes */
.vpo-tier-connector {
    flex: 1;
    height: 3px;
    background: var(--vpo-border);
    align-self: center;
    margin-top: -2px;
    position: relative;
    top: -10px;
    min-width: 20px;
    transition: background-color 0.25s ease;
}

.vpo-tier-connector-active {
    background: var(--vpo-accent);
}

/* Validation for tier strip */
.vpo-option-group.vpo-error .vpo-tier-strip {
    outline: 2px solid var(--vpo-error);
    outline-offset: 4px;
    border-radius: var(--vpo-card-radius);
}

/* ============================
   FEATURE 4B: DYNAMIC UPLOADS
   Multiple upload zones
   ============================ */
.vpo-option-group[data-multiply-by-group] .vpo-upload-zone + .vpo-upload-zone {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--vpo-border);
}

/* ============================
   FEATURE 5: PROGRESS STEPPER
   Step bar at top of options
   ============================ */
.vpo-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 0 20px;
    margin-bottom: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.vpo-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
    min-width: 60px;
    transition: opacity 0.2s ease;
}

.vpo-step:hover {
    opacity: 0.8;
}

.vpo-step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--vpo-border);
    background: var(--vpo-card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--vpo-text-muted);
    transition: all 0.25s ease;
    margin-bottom: 4px;
}

.vpo-step-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--vpo-text-muted);
    text-align: center;
    max-width: 100px;
    line-height: 1.3;
    transition: color 0.25s ease;
}

.vpo-step-connector {
    flex: 1;
    height: 2px;
    background: var(--vpo-border);
    min-width: 16px;
    max-width: 60px;
    align-self: center;
    margin-bottom: 18px;
    transition: background-color 0.25s ease;
}

/* Stepper States */
.vpo-step-completed .vpo-step-circle {
    border-color: var(--vpo-accent);
    background: var(--vpo-accent);
    color: #fff;
}
.vpo-step-completed .vpo-step-circle::after {
    content: '\2713';
    font-size: 14px;
}
.vpo-step-completed .vpo-step-label {
    color: var(--vpo-accent);
}
.vpo-step-completed + .vpo-step-connector {
    background: var(--vpo-accent);
}

.vpo-step-active .vpo-step-circle {
    border-color: var(--vpo-accent);
    color: var(--vpo-accent);
    box-shadow: 0 0 0 4px var(--vpo-accent-light);
}
.vpo-step-active .vpo-step-label {
    color: var(--vpo-text);
    font-weight: 700;
}

.vpo-step-upcoming .vpo-step-circle {
    border-color: #e0e0e0;
    color: #bbb;
}
.vpo-step-upcoming .vpo-step-label {
    color: #bbb;
}

/* Stepper: Add to Cart final step */
.vpo-step-atc .vpo-step-circle {
    background: var(--vpo-accent);
    border-color: var(--vpo-accent);
    color: #fff;
    font-size: 16px;
}
.vpo-step-atc.vpo-step-upcoming .vpo-step-circle {
    background: var(--vpo-card-bg);
    border-color: #e0e0e0;
    color: #bbb;
}
.vpo-step-atc.vpo-step-active .vpo-step-circle {
    background: var(--vpo-accent);
    border-color: var(--vpo-accent);
    color: #fff;
    box-shadow: 0 0 0 4px var(--vpo-accent-light);
}

/* ============================
   FEATURE 6: STICKY PRICE BAR
   Fixed bottom summary bar
   ============================ */
.vpo-sticky-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.vpo-sticky-bar.vpo-sticky-visible {
    transform: translateY(0);
}

.vpo-sticky-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--vpo-text);
}

.vpo-sticky-savings {
    font-size: 13px;
    font-weight: 600;
    color: #e65100;
    background: #fff8e1;
    padding: 4px 10px;
    border-radius: 12px;
    white-space: nowrap;
}

.vpo-sticky-atc {
    background: var(--vpo-accent) !important;
    color: #fff !important;
    border: none !important;
    padding: 10px 24px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
    white-space: nowrap;
}

.vpo-sticky-atc:hover {
    background: #256628 !important;
}

.vpo-sticky-atc:active {
    transform: scale(0.97);
}

/* ============================
   FEATURE 7A: ANIMATED PRICE
   Green flash on price decrease
   ============================ */
@keyframes vpoPriceFlash {
    0%   { color: var(--vpo-accent); }
    100% { color: var(--vpo-text); }
}

.vpo-price-value.vpo-price-decreased {
    animation: vpoPriceFlash 0.6s ease;
}

/* ============================
   BUNDLE PER-UNIT PRICING
   Show original crossed-out + bundle price on cards
   ============================ */
.vpo-card-bundle-price {
    font-size: 12px;
    font-weight: 600;
    color: var(--vpo-accent);
    margin-top: 2px;
}

/* Hide the original price-wrap when bundle price overlay is shown */
.vpo-option-card:has(.vpo-card-bundle-price) .vpo-card-price-wrap {
    display: none !important;
}

.vpo-card-original-price {
    text-decoration: line-through;
    color: #999;
    font-weight: 400;
}

@keyframes vpoScaleIn {
    from { transform: scale(0.8); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

/* ============================
   FEATURE 8: HIDE PRICES
   Suppress price display on cards/tiers
   ============================ */
.vpo-option-group[data-hide-prices="1"] .vpo-card-price,
.vpo-option-group[data-hide-prices="1"] .vpo-card-compare-price,
.vpo-option-group[data-hide-prices="1"] .vpo-card-price-wrap,
.vpo-option-group[data-hide-prices="1"] .vpo-tier-price,
.vpo-option-group[data-hide-prices="1"] .vpo-tier-unit-price,
.vpo-option-group[data-hide-prices="1"] .vpo-tier-discount,
.vpo-option-group[data-hide-prices="1"] .vpo-card-bundle-price {
    display: none !important;
}

/* ============================
   RESPONSIVE BREAKPOINTS
   Column counts always stay as set in admin.
   Only typography/padding adjusts on mobile.
   ============================ */

/* Mobile adjustments (no column changes) */
@media (max-width: 576px) {
    .vpo-option-card {
        padding: 10px 8px;
    }

    .vpo-card-label {
        font-size: 13px;
    }

    .vpo-toggle-row {
        padding: 12px 14px;
    }

    .vpo-upload-droparea {
        padding: 20px 14px;
    }

    .vpo-upload-thumb {
        max-width: 150px;
    }

    /* Stepper: compact on mobile */
    .vpo-stepper {
        padding: 10px 0 14px;
        gap: 0;
    }
    .vpo-step-label {
        font-size: 9px;
        max-width: 70px;
    }
    .vpo-step-circle {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    .vpo-step-connector {
        min-width: 10px;
    }

    /* Tier strip: compact */
    .vpo-tier-node {
        min-width: 48px;
    }
    .vpo-tier-circle {
        width: 34px;
        height: 34px;
        font-size: 13px;
    }
    .vpo-tier-price {
        font-size: 11px;
    }
    .vpo-tier-badge {
        font-size: 8px;
        padding: 1px 6px;
    }

    /* Sticky bar: simplified */
    .vpo-sticky-bar {
        padding: 10px 14px;
        gap: 10px;
    }
    .vpo-sticky-price {
        font-size: 18px;
    }
    .vpo-sticky-savings {
        display: none;
    }
    .vpo-sticky-atc {
        padding: 8px 16px !important;
        font-size: 13px !important;
    }
}

/* Very small screens */
@media (max-width: 380px) {
    .vpo-card-badge {
        font-size: 9px;
        padding: 2px 8px;
    }
}

/* ============================
   REDUCED MOTION
   ============================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================
   TEXT INPUT (personalization)
   ============================ */
.vpo-text-zone {
    margin-bottom: 8px;
}

.vpo-text-input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--vpo-border);
    border-radius: var(--vpo-card-radius);
    font-size: 15px;
    font-family: var(--vpo-font);
    color: var(--vpo-text);
    background: var(--vpo-card-bg);
    transition: border-color var(--vpo-transition), box-shadow var(--vpo-transition);
    box-sizing: border-box;
    outline: none;
}

.vpo-text-input:focus {
    border-color: var(--vpo-accent);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.15);
}

.vpo-text-input::placeholder {
    color: #aaa;
}

.vpo-text-counter {
    text-align: right;
    font-size: 11px;
    color: var(--vpo-text-muted);
    margin-top: 4px;
}

.vpo-text-count {
    font-weight: 600;
}

/* Validation for text zone */
.vpo-option-group.vpo-error .vpo-text-zone .vpo-text-input {
    border-color: var(--vpo-error);
}

/* ============================
   GROUP DESCRIPTION
   Subtitle shown under group title
   ============================ */
.vpo-group-description-front {
    font-size: 13px;
    color: var(--vpo-text-muted);
    margin-top: 2px;
    margin-bottom: 8px;
    line-height: 1.4;
}

/* ============================
   TIERS TOGGLE
   Clickable discount tiers display
   ============================ */
.vpo-tiers-toggle {
    margin-bottom: 10px;
}

.vpo-tiers-toggle-btn {
    background: none;
    border: none;
    color: var(--vpo-accent);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 2px 0;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.vpo-tiers-toggle-btn:hover {
    color: #1b5e20;
}

.vpo-tiers-toggle-btn.vpo-tiers-open {
    text-decoration: none;
}

.vpo-tiers-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
    padding: 8px 12px;
    background: var(--vpo-accent-light);
    border-radius: 8px;
}

.vpo-tier-tag {
    font-size: 12px;
    font-weight: 600;
    color: var(--vpo-accent);
    background: #fff;
    padding: 3px 10px;
    border-radius: 12px;
    border: 1px solid var(--vpo-accent);
    white-space: nowrap;
}

/* ============================
   CARD SUB-OPTIONS
   Color swatches, variant buttons, per-card upload
   ============================ */
.vpo-card-sub-options {
    border-top: 1px solid var(--vpo-border);
    padding-top: 10px;
    margin-top: 8px;
    width: 100%;
    text-align: center;
}

.vpo-sub-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--vpo-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 6px;
}

/* Color swatches */
.vpo-sub-color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
    justify-content: center;
}

.vpo-sub-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #e0e0e0;
    cursor: pointer;
    padding: 0;
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.vpo-sub-swatch:hover {
    transform: scale(1.15);
    border-color: #bbb;
}

.vpo-sub-swatch.vpo-sub-swatch-active {
    border-color: var(--vpo-accent);
    box-shadow: 0 0 0 2px var(--vpo-accent);
    transform: scale(1.1);
}

/* Variant buttons */
.vpo-sub-variant-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
    justify-content: center;
}

.vpo-sub-variant-btn {
    padding: 5px 12px;
    border: 2px solid var(--vpo-border);
    border-radius: 6px;
    background: var(--vpo-card-bg);
    color: var(--vpo-text);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.vpo-sub-variant-btn:hover {
    border-color: var(--vpo-accent);
}

.vpo-sub-variant-btn.vpo-sub-variant-active {
    border-color: var(--vpo-accent);
    background: var(--vpo-accent-light);
    color: var(--vpo-accent);
}

.vpo-sub-variant-price {
    font-size: 10px;
    font-weight: 400;
    color: var(--vpo-text-muted);
    margin-left: 2px;
}

.vpo-sub-variant-active .vpo-sub-variant-price {
    color: var(--vpo-accent);
}

/* === Inline tier sub-variant (checkbox below tier-row) === */
.vpo-tier-svg-inline {
    padding: 4px 14px;
    position: relative;
    border: 2px solid var(--vpo-border-selected, #2e7d32);
    border-top: 1px dashed var(--vpo-border-selected, #2e7d32);
    background: var(--vpo-accent-bg, #e8f5e9);
    margin-top: -2px;
    z-index: 2;
    box-sizing: border-box;
}
/* When followed by another svg-inline, remove double border */
.vpo-tier-svg-inline + .vpo-tier-svg-inline {
    border-top: 1px dashed var(--vpo-border-selected, #2e7d32);
    margin-top: -2px;
}
/* Last svg-inline before items — no bottom radius (items continues the chain) */
/* Last svg-inline as final section — bottom radius */
.vpo-tier-svg-inline:last-child {
    border-radius: 0 0 var(--vpo-card-radius, 10px) var(--vpo-card-radius, 10px);
}
.vpo-tier-svg-inline:not(:last-child) {
    border-radius: 0;
}
.vpo-tier-option:not(.vpo-tier-selected) .vpo-tier-svg-inline {
    display: none;
}
/* Swatch expansion inside inline section — clean, no heavy overlay */
.vpo-tier-svg-inline .vpo-svg-popup {
    position: relative;
    z-index: 5;
    padding: 6px 0 2px;
}
/* Thumbnail flash animation */
.vpo-tier-svg-thumb-flash {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    opacity: 0;
    transform: scale(0.7);
    transition: opacity 0.3s ease, transform 0.3s ease;
    cursor: pointer;
}
.vpo-tier-svg-thumb-flash-visible {
    opacity: 1;
    transform: scale(1);
}
.vpo-tier-svg-thumb-flash img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid var(--vpo-accent, #2e7d32);
    box-shadow: 0 2px 8px rgba(46,125,50,0.25);
}

/* --- Tier add-on checkbox (link style) --- */
.vpo-tier-svg-checkbox-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}
.vpo-tier-svg-check {
    width: 16px;
    height: 16px;
    min-width: 16px;
    accent-color: var(--vpo-accent);
    cursor: pointer;
    margin: 0;
}
.vpo-tier-svg-check-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--vpo-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.vpo-tier-svg-checkbox-row:hover .vpo-tier-svg-check-label {
    text-decoration-thickness: 2px;
}
.vpo-tier-svg-price-hint {
    font-size: 13px;
    font-weight: 600;
    color: var(--vpo-text-muted);
    margin-left: 2px;
}

/* --- Tier variant expanded panel (multi-variant picker) --- */
.vpo-tier-svg-panel {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 0 4px;
}
.vpo-tier-svg-option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 8px 10px;
    border: 2px solid var(--vpo-border);
    border-radius: 10px;
    background: var(--vpo-card-bg);
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s;
}
.vpo-tier-svg-option:hover {
    border-color: var(--vpo-text-muted);
}
.vpo-tier-svg-option.vpo-tier-svg-option-active {
    border-color: var(--vpo-accent);
    background: var(--vpo-accent-bg, rgba(26,92,46,0.04));
}
.vpo-tier-svg-option img {
    width: 70px;
    height: 70px;
    min-width: 70px;
    border-radius: 8px;
    object-fit: cover;
}
.vpo-tier-svg-option-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.vpo-tier-svg-option-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--vpo-text);
}
.vpo-tier-svg-option-price {
    font-size: 13px;
    font-weight: 600;
    color: var(--vpo-accent);
}

/* --- Addon card injected into gifts section --- */
.vpo-tier-addon-card {
    border: 1.5px solid var(--vpo-accent) !important;
    background: var(--vpo-accent-bg, rgba(26,92,46,0.04)) !important;
}
.vpo-tier-addon-card .vpo-tier-gift-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
}
.vpo-tier-addon-price {
    font-size: 13px;
    font-weight: 700;
    color: var(--vpo-accent);
    white-space: nowrap;
}

/* === Card image variant swatches === */
.vpo-sub-variant-swatches {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 6px;
    justify-content: center;
}

.vpo-sub-variant-img-btn {
    position: relative;
    width: 52px;
    height: 52px;
    min-width: 52px;
    border-radius: 8px;
    border: 2px solid var(--vpo-border, #ddd);
    padding: 0;
    overflow: hidden;
    cursor: pointer;
    background: var(--vpo-card-bg, #fff);
    transition: border-color var(--vpo-transition, 0.25s ease), box-shadow var(--vpo-transition, 0.25s ease);
    display: flex;
    align-items: center;
    justify-content: center;
}

.vpo-sub-variant-img-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 6px;
}

.vpo-sub-variant-img-btn .vpo-sub-variant-img-text {
    font-size: 12px;
    font-weight: 700;
    color: var(--vpo-text, #1a1a1a);
    text-transform: uppercase;
    line-height: 1;
}

.vpo-sub-variant-img-btn .vpo-sub-variant-img-price {
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    color: #fff;
    font-size: 9px;
    font-weight: 600;
    text-align: center;
    padding: 1px 2px;
    line-height: 1.2;
    border-radius: 0 0 6px 6px;
}

.vpo-sub-variant-img-btn:hover:not(.vpo-sub-variant-active) {
    border-color: var(--vpo-text-muted, #757575);
}

.vpo-sub-variant-img-btn.vpo-sub-variant-active {
    border-color: var(--vpo-accent, #2e7d32);
    box-shadow: 0 0 0 2px var(--vpo-accent-bg, #e8f5e9);
}

/* === Expandable variant toggle === */
.vpo-sub-variant-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    margin-top: 6px;
    border: 1.5px solid var(--vpo-border, #ddd);
    border-radius: 8px;
    cursor: pointer;
    min-height: 44px;
    background: var(--vpo-card-bg, #fff);
    transition: border-color var(--vpo-transition, 0.25s ease), background var(--vpo-transition, 0.25s ease);
    user-select: none;
}

.vpo-sub-variant-toggle:hover {
    border-color: var(--vpo-text-muted, #757575);
}

.vpo-sub-variant-toggle-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--vpo-text, #1a1a1a);
}

.vpo-sub-variant-toggle-arrow {
    font-size: 14px;
    color: var(--vpo-text-muted, #757575);
    transition: transform 0.2s ease;
}

.vpo-sub-variant-toggle.vpo-sub-variant-expanded {
    border-color: var(--vpo-accent, #2e7d32);
    background: var(--vpo-accent-bg, #e8f5e9);
}

.vpo-sub-variant-toggle.vpo-sub-variant-expanded .vpo-sub-variant-toggle-arrow {
    transform: rotate(90deg);
}

.vpo-sub-variant-expandable {
    padding-top: 6px;
}

@media (max-width: 600px) {
    .vpo-sub-variant-img-btn {
        width: 48px;
        height: 48px;
        min-width: 48px;
    }
    .vpo-sub-variant-toggle {
        padding: 8px 10px;
    }
}

/* === Sub-Variant Group Redesign: Triggers, Popup, Addon Cards === */

/* Only show triggers when card is selected */
.vpo-option-card:not(.vpo-card-selected) .vpo-svg-checkbox-trigger,
.vpo-option-card:not(.vpo-card-selected) .vpo-svg-link-trigger {
    display: none !important;
}

/* Checkbox trigger inside card */
.vpo-svg-checkbox-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 12px;
    color: #777;
    margin-top: 4px;
    padding: 0;
    line-height: 1.3;
    align-self: flex-start;
}
.vpo-svg-checkbox-trigger:hover {
    color: var(--vpo-accent, #2e7d32);
}
.vpo-svg-check-input {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: var(--vpo-accent, #2e7d32);
    cursor: pointer;
    flex-shrink: 0;
}
.vpo-svg-check-label {
    flex: 1;
}
.vpo-svg-check-price {
    font-size: 12px;
    color: #888;
    white-space: nowrap;
}

/* Link trigger inside card (multi-variant) */
.vpo-svg-link-trigger {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--vpo-accent, #2e7d32);
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 2px;
    cursor: pointer;
    margin-top: 4px;
    transition: color 0.15s;
    align-self: flex-start;
}
.vpo-svg-link-trigger:hover {
    color: var(--vpo-accent, #1b5e20);
    text-decoration-style: solid;
}
.vpo-svg-link-trigger.vpo-svg-link-active {
    text-decoration: none;
    font-weight: 600;
}
.vpo-svg-link-arrow {
    font-size: 16px;
    line-height: 1;
    transition: transform 0.15s;
}
.vpo-svg-link-trigger:hover .vpo-svg-link-arrow {
    transform: translateX(2px);
}

/* Popup for multi-variant selection */
.vpo-svg-popup {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 100;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: var(--vpo-card-radius, 10px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    padding: 6px;
    margin-top: 4px;
}
.vpo-svg-popup-inner {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.vpo-svg-popup-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: none;
    background: none;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    text-align: left;
    transition: background 0.15s;
    font-size: 13px;
    font-family: inherit;
}
.vpo-svg-popup-option:hover {
    background: #f5f5f5;
}
.vpo-svg-popup-option img {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}
.vpo-svg-popup-option-name {
    flex: 1;
    font-weight: 500;
    color: #333;
}
.vpo-svg-popup-option-price {
    font-size: 12px;
    color: #888;
    white-space: nowrap;
}

/* Addon card container (below option card) */
.vpo-card-addon-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: -1px;
    margin-bottom: 4px;
}
.vpo-card-addon-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #fff;
    border: 1.5px dashed var(--vpo-border-selected, #2e7d32);
    border-radius: var(--vpo-card-radius, 10px);
}
.vpo-card-addon-thumb {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}
.vpo-card-addon-name {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    color: #333;
}
.vpo-card-addon-price {
    font-size: 13px;
    font-weight: 600;
    color: var(--vpo-accent, #2e7d32);
    white-space: nowrap;
}
.vpo-card-addon-remove {
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
    transition: color 0.15s;
    flex-shrink: 0;
}
.vpo-card-addon-remove:hover {
    color: #e53935;
}

/* Hide the old sub-options display for redesigned svg groups */
.vpo-svg-redesigned {
    display: none !important;
}

/* Popup inside tier context — compact horizontal layout */
.vpo-tier-svg-section .vpo-svg-popup {
    position: relative;
    left: auto;
    right: auto;
    margin-top: 4px;
    padding: 4px;
}
.vpo-tier-svg-section .vpo-svg-popup-inner {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
}
/* Swatch-style option cards */
.vpo-tier-svg-section .vpo-svg-popup-option {
    flex-direction: column;
    flex: 0 0 auto;
    width: 60px;
    padding: 3px;
    text-align: center;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    gap: 3px;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
    background: none;
}
.vpo-tier-svg-section .vpo-svg-popup-option:hover {
    border-color: var(--vpo-accent, #2e7d32);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.vpo-tier-svg-section .vpo-svg-popup-option img {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    object-fit: cover;
}
.vpo-tier-svg-section .vpo-svg-popup-option-name {
    font-size: 10px;
    line-height: 1.1;
    text-align: center;
}
/* Selected variant indicator next to checkbox */
.vpo-tier-svg-selected {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 6px;
    font-size: 12px;
    color: #555;
    font-weight: 400;
}
.vpo-tier-svg-selected img {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    object-fit: cover;
}
.vpo-tier-svg-selected-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* === End Sub-Variant Group Redesign === */

/* Per-card upload */
.vpo-sub-upload-zone {
    margin-bottom: 6px;
}

.vpo-sub-upload-droparea {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border: none;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    transition: background 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.vpo-sub-upload-droparea:hover {
    background: #f0f0f0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.vpo-sub-upload-text,
.vpo-upload-text {
    font-size: 12px;
    color: var(--vpo-text, #333);
    margin: 0;
    font-weight: 500;
}

.vpo-sub-upload-preview {
    margin-top: 10px;
    text-align: left;
}
.vpo-sub-upload-thumb-wrap {
    position: relative;
    display: inline-block;
    border-radius: 8px;
    overflow: visible;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.vpo-sub-upload-thumb-img {
    display: block;
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
}
.vpo-sub-upload-preview .vpo-sub-upload-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 22px;
    height: 22px;
    background: #e53935;
    color: #fff;
    border: 2px solid #fff;
    border-radius: 50%;
    font-size: 14px;
    line-height: 18px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    padding: 0;
}
.vpo-sub-upload-preview .vpo-sub-upload-remove:hover {
    background: #c62828;
}
/* Legacy inline-style fallback */
.vpo-sub-upload-preview img:not(.vpo-sub-upload-thumb-img) {
    max-width: 100px;
    max-height: 100px;
    border-radius: 8px;
    object-fit: cover;
}

/* Upload zone inside tier product cards — clean dropzone style */
.vpo-tier-product-card .vpo-sub-upload-zone {
    margin-top: 6px;
}
.vpo-tier-product-card .vpo-sub-upload-droparea {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 8px;
    border: 1.5px dashed var(--vpo-border, #ccc);
    border-radius: 8px;
    background: #fafafa;
    cursor: pointer;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    box-shadow: none;
    transition: border-color 0.2s, background 0.2s;
    position: relative;
}
.vpo-tier-product-card .vpo-sub-upload-droparea:hover {
    border-color: var(--vpo-accent, #2e7d32);
    background: #f0f7f0;
    box-shadow: none;
}
.vpo-tier-product-card .vpo-upload-text {
    font-size: 12px;
    margin: 0;
    color: #666;
    pointer-events: none;
}
.vpo-tier-product-card .vpo-sub-upload-droparea::before {
    content: none !important;
    display: none !important;
}
.vpo-tier-product-card .vpo-sub-upload-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Sub-option sections responsive */
@media (max-width: 600px) {
    .vpo-sub-swatch {
        width: 32px;
        height: 32px;
    }
    .vpo-sub-variant-btn {
        padding: 6px 10px;
        font-size: 11px;
    }
}

/* ========================
   BUNDLES (radio list)
   ======================== */
.vpo-bundle-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.vpo-bundle-row {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    border: 2px solid var(--vpo-border, #e0e0e0);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 14px;
    background: #fff;
}
.vpo-bundle-row:hover {
    border-color: var(--vpo-border-selected, #2e7d32);
    background: var(--vpo-accent-bg, #e8f5e9);
}
.vpo-bundle-selected {
    border-color: var(--vpo-border-selected, #2e7d32);
    background: var(--vpo-accent-bg, #e8f5e9);
    box-shadow: 0 0 0 1px var(--vpo-border-selected, #2e7d32);
}

/* Radio circle */
.vpo-bundle-radio {
    flex-shrink: 0;
    position: relative;
}
.vpo-bundle-radio input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.vpo-bundle-radio-dot {
    display: block;
    width: 22px;
    height: 22px;
    border: 2px solid #bbb;
    border-radius: 50%;
    transition: all 0.2s ease;
    position: relative;
}
.vpo-bundle-radio input[type="radio"]:checked + .vpo-bundle-radio-dot {
    border-color: var(--vpo-accent, #2e7d32);
}
.vpo-bundle-radio input[type="radio"]:checked + .vpo-bundle-radio-dot::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 10px;
    height: 10px;
    background: var(--vpo-accent, #2e7d32);
    border-radius: 50%;
}

/* Bundle image */
.vpo-bundle-image {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 8px;
    overflow: hidden;
}
.vpo-bundle-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Info column */
.vpo-bundle-info {
    flex: 1;
    min-width: 0;
}
.vpo-bundle-label-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.vpo-bundle-label {
    font-weight: 600;
    font-size: 15px;
    color: #1a1a1a;
}
.vpo-bundle-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.6;
}
.vpo-bundle-desc {
    display: block;
    font-size: 13px;
    color: #666;
    margin-top: 2px;
    line-height: 1.4;
}

/* Pricing column */
.vpo-bundle-pricing {
    flex-shrink: 0;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}
.vpo-bundle-price {
    font-weight: 700;
    font-size: 16px;
    color: #1a1a1a;
}
.vpo-bundle-compare {
    font-size: 13px;
    color: #999;
    text-decoration: line-through;
}

/* Mobile responsive */
@media (max-width: 480px) {
    .vpo-bundle-row {
        flex-wrap: wrap;
        padding: 12px 14px;
        gap: 10px;
    }
    .vpo-bundle-info {
        flex: 1 1 calc(100% - 50px);
    }
    .vpo-bundle-pricing {
        width: 100%;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        gap: 8px;
        padding-left: 36px;
    }
}

/* === Bundle Items (product combinations) === */
.vpo-bundle-option {
    display: flex;
    flex-direction: column;
}
.vpo-bundle-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 18px 14px 54px;
    margin-top: -2px;
    background: #f8f8f8;
    border: 2px solid var(--vpo-border-selected, #2e7d32);
    border-top: none;
    border-radius: 0 0 10px 10px;
    animation: vpo-slide-down 0.2s ease;
}
.vpo-bundle-items-hidden {
    display: none;
}
.vpo-bundle-has-items .vpo-bundle-row {
    border-radius: 10px 10px 0 0;
}
.vpo-bundle-option:not(.vpo-bundle-option-selected) .vpo-bundle-has-items {
    border-radius: 10px;
}
.vpo-bundle-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: rgba(255,255,255,0.7);
    border-radius: 6px;
    font-size: 13px;
}
.vpo-bundle-item-img {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    object-fit: cover;
}
.vpo-bundle-item-name {
    font-weight: 500;
    color: #333;
}
.vpo-bundle-item-desc {
    font-size: 11px;
    color: #888;
    line-height: 1.3;
}
.vpo-bundle-item-price {
    color: #666;
    font-size: 12px;
    margin-left: auto;
}
@keyframes vpo-slide-down {
    from { opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; }
    to { opacity: 1; max-height: 200px; }
}

/* ========================
   TIERS (Deal Selector)
   Premium visual tier/deal selector — GymLamp-style but better.
   Full-width rows, radio selection, bundle items with product images.
   ======================== */
.vpo-tiers-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: transparent;
}

.vpo-tier-option {
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Badge on top of tier option — like card badges */
.vpo-tier-badge-top {
    display: block;
    width: fit-content;
    margin: 0 auto -12px;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    line-height: 1.5;
    white-space: nowrap;
    background: var(--vpo-badge-bg, #1a5c2e);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    position: relative;
    z-index: 5;
}
.vpo-tier-has-badge .vpo-tier-row {
    padding-top: 20px;
}

/* Tier row — the main clickable row */
.vpo-tier-row {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border: 2px solid var(--vpo-border, #e0e0e0);
    border-radius: var(--vpo-card-radius, 10px);
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 16px;
    background: #fff;
    position: relative;
    z-index: 1;
}

/* Collapse borders between tiers for cleaner look */
.vpo-tier-option + .vpo-tier-option .vpo-tier-row {
    margin-top: -2px;
}
.vpo-tier-option:first-child .vpo-tier-row {
    border-radius: var(--vpo-card-radius, 10px) var(--vpo-card-radius, 10px) 0 0;
}
.vpo-tier-option:last-child .vpo-tier-row {
    border-radius: 0 0 var(--vpo-card-radius, 10px) var(--vpo-card-radius, 10px);
}
.vpo-tier-option:only-child .vpo-tier-row {
    border-radius: var(--vpo-card-radius, 10px);
}
/* Middle tiers */
.vpo-tier-option:not(:first-child):not(:last-child) .vpo-tier-row {
    border-radius: 0;
}

.vpo-tier-row:hover {
    border-color: var(--vpo-border-selected, #2e7d32);
    background: var(--vpo-accent-bg, #e8f5e9);
    z-index: 2;
}

/* Selected tier */
.vpo-tier-selected .vpo-tier-row {
    border-color: var(--vpo-border-selected, #2e7d32);
    background: linear-gradient(135deg, var(--vpo-accent-bg, #e8f5e9) 0%, #fff 100%);
    box-shadow: 0 0 0 1px var(--vpo-border-selected, #2e7d32), 0 4px 12px rgba(0,0,0,0.08);
    z-index: 3;
}

/* De-emphasize first tier */
.vpo-tier-option:first-child .vpo-tier-row {
    border-width: 1px;
}
.vpo-tier-option:first-child.vpo-tier-selected .vpo-tier-row {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Radio circle */
.vpo-tier-radio {
    flex-shrink: 0;
    position: relative;
}
.vpo-tier-radio input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.vpo-tier-radio-dot {
    display: block;
    width: 24px;
    height: 24px;
    border: 2px solid #ccc;
    border-radius: 50%;
    transition: all 0.2s ease;
    position: relative;
    background: #fff;
}
.vpo-tier-selected .vpo-tier-radio-dot,
.vpo-tier-radio input[type="radio"]:checked + .vpo-tier-radio-dot {
    border-color: var(--vpo-accent, #2e7d32);
}
.vpo-tier-selected .vpo-tier-radio-dot::after,
.vpo-tier-radio input[type="radio"]:checked + .vpo-tier-radio-dot::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 12px;
    height: 12px;
    background: var(--vpo-accent, #2e7d32);
    border-radius: 50%;
    animation: vpoBounceIn 0.25s ease forwards;
}

/* Tier image (optional icon in main row) */
.vpo-tier-image {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.vpo-tier-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Tier info */
.vpo-tier-info {
    flex: 1;
    min-width: 0;
}
.vpo-tier-label-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
/* Legacy inline badge (kept for backward compat but hidden with new top badge) */
.vpo-tier-label {
    font-weight: 700;
    font-size: 16px;
    color: var(--vpo-text, #1a1a1a);
    line-height: 1.3;
}
.vpo-tier-badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.5;
    white-space: nowrap;
}
.vpo-tier-desc {
    display: block;
    font-size: 13px;
    color: var(--vpo-text-muted, #666);
    margin-top: 3px;
    line-height: 1.4;
}

/* Tier pricing */
.vpo-tier-pricing {
    flex-shrink: 0;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}
.vpo-tier-price {
    font-weight: 700;
    font-size: 18px;
    color: var(--vpo-text, #1a1a1a);
}
.vpo-tier-compare {
    font-size: 13px;
    color: #999;
    text-decoration: line-through;
}
/* === Tier Items — Full Product Cards (bundle products inside selected tier) === */
.vpo-tier-items {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 4px;
    padding: 12px 8px;
    margin-top: -2px;
    background: linear-gradient(180deg, var(--vpo-accent-bg, #e8f5e9) 0%, #fff 100%);
    border: 2px solid var(--vpo-border-selected, #2e7d32);
    border-top: 1px dashed var(--vpo-border-selected, #2e7d32);
    border-radius: 0 0 var(--vpo-card-radius, 10px) var(--vpo-card-radius, 10px);
    animation: vpo-slide-down 0.25s ease;
    position: relative;
    z-index: 2;
    box-sizing: border-box;
    max-width: 100%;
    overflow: hidden;
}
@keyframes vpo-slide-down {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.vpo-tier-items-hidden {
    display: none !important;
}

/* When tier has items/gifts/personalizations and is selected, adjust row border radius */
.vpo-tier-selected .vpo-tier-row {
    border-radius: var(--vpo-card-radius, 10px) var(--vpo-card-radius, 10px) 0 0 !important;
}
/* Middle sections — no bottom border-radius when followed by more sections */
.vpo-tier-option .vpo-tier-svg-inline:not(:last-child),
.vpo-tier-option .vpo-tier-items:not(.vpo-tier-items-hidden):not(:last-child),
.vpo-tier-option .vpo-picker-slots:not(.vpo-tier-items-hidden):not(:last-child),
.vpo-tier-option .vpo-tier-personalizations:not(.vpo-tier-items-hidden):not(:last-child),
.vpo-tier-option .vpo-tier-upload:not(.vpo-tier-items-hidden):not(:last-child),
.vpo-tier-option .vpo-tier-fields:not(.vpo-tier-items-hidden):not(:last-child) {
    border-radius: 0 !important;
}
/* Last visible section gets bottom border-radius */
.vpo-tier-option .vpo-tier-items:not(.vpo-tier-items-hidden):last-child,
.vpo-tier-option .vpo-picker-slots:not(.vpo-tier-items-hidden):last-child,
.vpo-tier-option .vpo-tier-personalizations:not(.vpo-tier-items-hidden):last-child,
.vpo-tier-option .vpo-tier-upload:not(.vpo-tier-items-hidden):last-child,
.vpo-tier-option .vpo-tier-fields:not(.vpo-tier-items-hidden):last-child,
.vpo-tier-option .vpo-tier-gifts:not(.vpo-tier-items-hidden):last-child {
    border-radius: 0 0 var(--vpo-card-radius, 10px) var(--vpo-card-radius, 10px);
}
/* Dashed border between connected sections */
.vpo-tier-svg-inline + .vpo-tier-items:not(.vpo-tier-items-hidden),
.vpo-tier-svg-inline + .vpo-picker-slots:not(.vpo-tier-items-hidden),
.vpo-tier-items:not(.vpo-tier-items-hidden) + .vpo-tier-personalizations:not(.vpo-tier-items-hidden),
.vpo-tier-items:not(.vpo-tier-items-hidden) + .vpo-tier-upload:not(.vpo-tier-items-hidden),
.vpo-tier-items:not(.vpo-tier-items-hidden) + .vpo-tier-gifts:not(.vpo-tier-items-hidden),
.vpo-picker-slots:not(.vpo-tier-items-hidden) + .vpo-tier-personalizations:not(.vpo-tier-items-hidden),
.vpo-picker-slots:not(.vpo-tier-items-hidden) + .vpo-tier-upload:not(.vpo-tier-items-hidden),
.vpo-picker-slots:not(.vpo-tier-items-hidden) + .vpo-tier-gifts:not(.vpo-tier-items-hidden),
.vpo-tier-personalizations:not(.vpo-tier-items-hidden) + .vpo-tier-upload:not(.vpo-tier-items-hidden),
.vpo-tier-personalizations:not(.vpo-tier-items-hidden) + .vpo-tier-gifts:not(.vpo-tier-items-hidden),
.vpo-tier-upload:not(.vpo-tier-items-hidden) + .vpo-tier-gifts:not(.vpo-tier-items-hidden) {
    border-top: 1px dashed var(--vpo-border-selected, #2e7d32);
}

/* Product card — fills available space */
.vpo-tier-product-card {
    flex: 1 1 0;
    max-width: 260px;
    min-width: 0;
    background: #fff;
    border-radius: var(--vpo-card-radius, 10px);
    overflow: hidden;
    border: 2px solid var(--vpo-border-selected, #2e7d32);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}
.vpo-tier-product-card:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 24px rgba(0,0,0,0.14);
    border-color: var(--vpo-accent, #2e7d32);
}
/* Bundle item badge */
.vpo-tier-product-badge {
    display: inline-block;
    background: var(--vpo-accent, #2e7d32);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 10px;
    border-radius: 0 0 6px 6px;
    margin: 0 auto;
    position: relative;
    top: 0;
    align-self: center;
}

/* Count-based card sizing */
.vpo-tier-items[data-count="2"] .vpo-tier-product-card {
    flex: 1 1 0;
    max-width: 240px;
}
.vpo-tier-items[data-count="3"] .vpo-tier-product-card {
    flex: 1 1 0;
    max-width: 200px;
}
.vpo-tier-items[data-count="4"] .vpo-tier-product-card {
    flex: 1 1 0;
    max-width: 220px;
}
.vpo-tier-items[data-count="5"] .vpo-tier-product-card,
.vpo-tier-items[data-count="6"] .vpo-tier-product-card {
    flex: 0 1 130px;
    max-width: 150px;
}

/* Product image — fills card width edge-to-edge, no gaps */
.vpo-tier-product-img {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f5f5f5;
    position: relative;
    cursor: pointer;
    border-radius: 0;
    margin: 0;
    padding: 0;
}
.vpo-tier-product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0;
}
.vpo-tier-product-img .vpo-zoom-btn {
    width: 32px;
    height: 32px;
    bottom: 8px;
    right: 8px;
    opacity: 0.6;
}
.vpo-tier-product-card:hover .vpo-zoom-btn {
    opacity: 1;
}

/* Product info below image */
.vpo-tier-product-info {
    padding: 8px 10px 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.vpo-tier-product-name {
    font-weight: 700;
    font-size: 13px;
    color: var(--vpo-text, #1a1a1a);
    line-height: 1.3;
    letter-spacing: -0.01em;
}
.vpo-tier-product-desc {
    display: block;
    font-size: 11px;
    color: #666;
    line-height: 1.3;
    margin-top: 1px;
}
.vpo-tier-product-price {
    font-size: 13px;
    color: var(--vpo-accent, #2e7d32);
    font-weight: 700;
}
/* "~~€39.95~~ Included" value display on tier cards */
.vpo-tier-product-value {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
}
.vpo-tier-product-price-strike {
    font-size: 11px;
    color: #999;
    text-decoration: line-through;
    font-weight: 400;
    line-height: 1;
}
.vpo-tier-product-price-strike .woocommerce-Price-amount {
    font-size: inherit;
    color: inherit;
}
.vpo-tier-included-tag {
    font-size: 12px;
    font-weight: 700;
    color: var(--vpo-accent, #2e7d32);
    line-height: 1;
}

/* === In-card feature sections (pers, upload, variants) === */
.vpo-tier-item-feature {
    margin-top: 0;
    padding: 8px 10px;
    border-top: 1px solid rgba(0,0,0,0.06);
    text-align: center;
}
.vpo-tier-item-feature-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--vpo-text, #333);
    padding: 4px 0;
    justify-content: center;
    font-weight: 500;
    transition: color 0.2s;
}
.vpo-tier-item-feature-toggle:hover {
    color: var(--vpo-accent, #2e7d32);
}
.vpo-tier-item-feature-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--vpo-accent, #2e7d32);
    flex-shrink: 0;
}
.vpo-tier-item-feature-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    margin-bottom: 6px;
}
.vpo-tier-item-feature-content {
    overflow: hidden;
    max-height: 300px;
    opacity: 1;
    margin-top: 6px;
    transition: max-height 0.3s ease, opacity 0.25s ease, margin 0.3s ease;
}
.vpo-tier-item-feature-content.vpo-feature-collapsed {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
}
.vpo-tier-item-pers-input {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--vpo-border, #ddd) !important;
    border-radius: 8px;
    font-size: 16px;
    line-height: 1.4;
    box-sizing: border-box;
    height: auto !important;
    min-height: 40px !important;
    box-shadow: none !important;
    text-align: center;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
    background: #fff;
}
.vpo-tier-item-pers-input:focus {
    border-color: var(--vpo-accent, #2e7d32) !important;
    outline: none;
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.12) !important;
}
.vpo-tier-item-pers-input::placeholder {
    color: #bbb;
    font-size: 14px;
}
/* Upload zone inside product card */
.vpo-tier-item-upload .vpo-sub-upload-zone {
    margin-top: 0;
}

/* Tier sub-variant swatches */
.vpo-tier-sv-swatches {
    display: flex;
    gap: 4px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 4px;
    padding: 0 2px;
}
.vpo-tier-sv-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    border: 2px solid var(--vpo-border, #ddd);
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.vpo-tier-sv-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}
.vpo-tier-sv-btn .vpo-tier-sv-text {
    font-size: 10px;
    font-weight: 700;
    color: var(--vpo-text, #1a1a1a);
    line-height: 1;
    text-transform: uppercase;
}
.vpo-tier-sv-btn.vpo-tier-sv-active {
    border-color: var(--vpo-accent, #2e7d32);
    box-shadow: 0 0 0 2px var(--vpo-accent-bg, #e8f5e9);
}
.vpo-tier-sv-btn:hover:not(.vpo-tier-sv-active) {
    border-color: var(--vpo-text-muted, #757575);
}
@media (max-width: 600px) {
    .vpo-tier-sv-btn {
        width: 28px;
        height: 28px;
        min-width: 28px;
    }
}

/* Plus separator — styled circle between cards */
.vpo-tier-item-plus {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    align-self: center;
    border-radius: 50%;
    background: var(--vpo-accent-bg, #e8f5e9);
    color: var(--vpo-accent, #2e7d32);
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    border: 1.5px solid var(--vpo-border-selected, #2e7d32);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    margin: 0 2px;
}

/* Mobile responsive */
@media (max-width: 600px) {
    .vpo-tier-row {
        flex-wrap: nowrap;
        padding: 10px 12px;
        gap: 8px;
    }
    .vpo-tier-image {
        width: 44px;
        height: 44px;
        border-radius: 8px;
    }
    .vpo-tier-info {
        flex: 1;
        min-width: 0;
        overflow: hidden;
    }
    .vpo-tier-label {
        display: block;
        font-size: 13px;
        line-height: 1.3;
        /* Allow wrapping to 2nd line instead of truncating */
    }
    .vpo-tier-desc {
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-size: 11px;
    }
    .vpo-tier-pricing {
        flex-shrink: 0;
        min-width: 55px;
        flex-direction: column;
        align-items: flex-end;
        gap: 0;
    }
    .vpo-tier-price {
        font-size: 13px;
        white-space: nowrap;
    }
    .vpo-tier-compare {
        font-size: 10px;
        white-space: nowrap;
    }
    .vpo-tier-radio {
        flex-shrink: 0;
    }

    /* Hide "+" separators on mobile by default (grid layout) */
    .vpo-tier-item-plus {
        display: none !important;
    }
    /* For 2-item bundles: show "+" floating between side-by-side cards */
    .vpo-tier-items:not(.vpo-tier-items-hidden)[data-count="2"] .vpo-tier-item-plus {
        display: flex !important;
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        z-index: 5;
        margin: 0;
    }

    /* Ensure hidden tier items stay hidden (must come before grid rule) */
    .vpo-tier-items.vpo-tier-items-hidden {
        display: none !important;
    }

    /* Switch tier items to CSS Grid on mobile — only visible ones */
    .vpo-tier-items:not(.vpo-tier-items-hidden) {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 6px;
        padding: 8px;
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }
    .vpo-tier-personalizations {
        padding: 10px 12px;
    }
    .vpo-tier-fields {
        padding: 8px 12px;
    }
    .vpo-tier-gifts {
        padding: 3px 6px 4px;
    }
    .vpo-tier-upload {
        padding: 4px 12px;
    }
    .vpo-tier-product-card {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    /* 2 items: side by side */
    .vpo-tier-items:not(.vpo-tier-items-hidden)[data-count="2"] {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* 3 items: all in one row (!important to override WP Rocket RUCSS cache) */
    .vpo-tier-items:not(.vpo-tier-items-hidden)[data-count="3"] {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    /* 4 items: 2x2 */
    .vpo-tier-items:not(.vpo-tier-items-hidden)[data-count="4"] {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* Compact product info on mobile */
    .vpo-tier-product-info {
        padding: 6px 8px 8px;
    }
    .vpo-tier-product-name {
        font-size: 12px;
    }
    .vpo-tier-product-price {
        font-size: 11px;
    }

    /* Inline sub-variant checkbox on mobile — full width */
    .vpo-tier-svg-inline {
        padding: 4px 12px;
    }
    .vpo-tier-svg-thumb-flash img {
        width: 28px;
        height: 28px;
    }
}


/* === Centered Title with separator lines === */
.vpo-title-centered {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--vpo-title-color, var(--vpo-accent, #c41a1a));
}
.vpo-title-centered::before,
.vpo-title-centered::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(to var(--dir, right), var(--vpo-accent, #ccc), transparent);
    max-width: 120px;
}
.vpo-title-centered::before { --dir: right; }
.vpo-title-centered::after  { --dir: left; }


/* === Per-piece pricing small text === */
.vpo-tier-price small {
    font-size: 0.7em;
    font-weight: 400;
    opacity: 0.7;
    margin-left: 1px;
}


/* === Image Carousel === */
.vpo-carousel {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    touch-action: pan-y;
}
.vpo-carousel-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.vpo-carousel-img.vpo-carousel-active {
    opacity: 1;
    pointer-events: auto;
}
.vpo-carousel-prev,
.vpo-carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.85);
    border: none;
    cursor: pointer;
    font-size: 18px;
    line-height: 28px;
    text-align: center;
    color: #333;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.2s ease;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.vpo-tier-product-card:hover .vpo-carousel-prev,
.vpo-tier-product-card:hover .vpo-carousel-next,
.vpo-card-image:hover .vpo-carousel-prev,
.vpo-card-image:hover .vpo-carousel-next {
    opacity: 1;
}
/* Smaller arrows on bundle product cards */
.vpo-tier-product-card .vpo-carousel-prev,
.vpo-tier-product-card .vpo-carousel-next {
    width: 22px;
    height: 22px;
    font-size: 14px;
    line-height: 22px;
}
.vpo-carousel-prev { left: 6px; }
.vpo-carousel-next { right: 6px; }
.vpo-carousel-prev:hover,
.vpo-carousel-next:hover {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.vpo-carousel-dots {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    z-index: 2;
}
.vpo-carousel-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,0.6);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.vpo-carousel-dot.active {
    background: #fff;
    transform: scale(1.3);
}


/* === Tier Personalizations (between items and gifts) === */
.vpo-tier-personalizations {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 16px;
    background: var(--vpo-accent-bg, #e8f5e9);
    border: 2px solid var(--vpo-border-selected, #2e7d32);
    border-top: 1px dashed var(--vpo-border-selected, #2e7d32);
    border-radius: 0;
    margin-top: -2px;
    animation: vpo-slide-down 0.25s ease;
}
.vpo-tier-pers-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.vpo-tier-pers-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--vpo-text, #1a1a1a);
    line-height: 1.3;
}
.vpo-tier-pers-field input {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--vpo-border-selected, #2e7d32);
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    background: #fff;
    box-sizing: border-box;
    outline: none;
    min-height: 44px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.vpo-tier-pers-field input:focus {
    border-color: var(--vpo-accent, #2e7d32);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.12);
}
.vpo-tier-pers-field input::placeholder {
    color: #999;
    font-size: 14px;
}

/* === Tier Upload === */
.vpo-tier-upload {
    padding: 10px 16px;
    background: var(--vpo-accent-bg, #e8f5e9);
    border: 2px solid var(--vpo-border-selected, #2e7d32);
    border-top: 1px dashed var(--vpo-border-selected, #2e7d32);
    border-radius: 0;
    margin-top: -2px;
    animation: vpo-slide-down 0.25s ease;
}

/* Tier upload label (visible mode) */
.vpo-tier-upload-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--vpo-text, #333);
    margin: 2px 0 6px;
}

/* Tier upload checkbox toggle row */
.vpo-tier-upload-checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--vpo-text, #333);
    padding: 4px 0;
    transition: color 0.2s;
}
.vpo-tier-upload-checkbox-row:hover {
    color: var(--vpo-accent, #2e7d32);
}
.vpo-tier-upload-checkbox-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--vpo-accent, #2e7d32);
    flex-shrink: 0;
}
.vpo-tier-upload-expand {
    margin-top: 8px;
}

/* Tier upload droparea */
.vpo-tier-upload .vpo-sub-upload-droparea {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
    border: 2px dashed #ccc;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    min-height: 60px;
    position: relative;
}
.vpo-tier-upload .vpo-sub-upload-droparea::before {
    content: none !important;
    display: none !important;
}
.vpo-tier-upload .vpo-sub-upload-droparea:hover {
    border-color: var(--vpo-accent, #2e7d32);
    background: #f0f7f0;
}
.vpo-tier-upload .vpo-upload-text {
    font-size: 13px;
    color: #666;
    margin: 0;
    font-weight: 500;
}
.vpo-tier-upload .vpo-sub-upload-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

/* Multiple upload fields stacked */
.vpo-tier-upload + .vpo-tier-upload {
    border-top: 1px dashed var(--vpo-border-selected, #2e7d32);
    margin-top: -2px;
}

/* === Unified Tier Fields (text + upload combined) === */
.vpo-tier-fields {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 8px 12px;
    background: var(--vpo-accent-bg, #e8f5e9);
    border: 2px solid var(--vpo-border-selected, #2e7d32);
    border-top: none;
    margin-top: -2px;
    animation: vpo-slide-down 0.25s ease;
}

.vpo-tier-field {
    padding: 4px 0;
}

.vpo-tier-field + .vpo-tier-field {
    border-top: 1px dashed rgba(46, 125, 50, 0.25);
    padding-top: 10px;
}

/* Tier field label with optional thumbnail */
.vpo-tier-field-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #222;
    margin-bottom: 6px;
}

.vpo-tier-field-label span {
    flex: 1;
}

/* Product thumbnail in personalization fields */
.vpo-tier-field-thumb {
    width: 32px;
    height: 32px;
    border-radius: 5px;
    object-fit: cover;
    border: 1px solid #ddd;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.vpo-tier-field-thumb + .vpo-tier-field-thumb {
    margin-left: -10px;
}

/* Toggle row (checkbox mode) */
.vpo-tier-field-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    padding: 2px 0;
}

.vpo-tier-field-toggle:hover {
    color: var(--vpo-accent, #2e7d32);
}

.vpo-tier-field-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--vpo-accent, #2e7d32);
    flex-shrink: 0;
}

.vpo-tier-field-toggle .vpo-tier-field-thumb {
    margin-left: auto;
}

/* Tier field content (collapsible for checkbox mode) */
.vpo-tier-field-content {
    margin-top: 4px;
}

.vpo-tier-field-content.vpo-feature-collapsed {
    display: none;
}

/* Text field inputs */
.vpo-tier-field--text .vpo-personalization-input {
    width: 100%;
    padding: 7px 10px;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
}

.vpo-tier-field--text .vpo-personalization-input:focus {
    border-color: var(--vpo-accent, #2e7d32);
    outline: none;
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.12);
}

/* Character counter — inside input, right side */
.vpo-char-count-wrap {
    position: relative;
    display: block;
    width: 100%;
}
.vpo-char-count-wrap > .vpo-personalization-input {
    width: 100% !important;
    box-sizing: border-box;
    padding-right: 50px !important;
}
.vpo-char-count {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: #bbb;
    pointer-events: none;
    white-space: nowrap;
    font-weight: 400;
    transition: color 0.2s;
    line-height: 1;
    z-index: 1;
}
.vpo-char-count--warn {
    color: #d32f2f;
    font-weight: 600;
}

textarea.vpo-personalization-input {
    resize: vertical;
    font-family: inherit;
    line-height: 1.5;
    min-height: auto;
}

.vpo-tier-field--text .vpo-personalization-input::placeholder {
    color: #999;
    font-style: italic;
}

.vpo-tier-field-desc {
    margin: 2px 0 4px;
    font-size: 12px;
    color: #888;
    line-height: 1.3;
}

/* Upload field styles */
.vpo-tier-field--upload .vpo-sub-upload-droparea {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 14px;
    min-height: 48px;
    border: 1.5px dashed #ccc;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    transition: border-color 0.2s;
}

.vpo-tier-field--upload .vpo-sub-upload-droparea::before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23999'%3E%3Cpath d='M12 15.2a3.2 3.2 0 1 0 0-6.4 3.2 3.2 0 0 0 0 6.4z'/%3E%3Cpath d='M9 2 7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2H9zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5z'/%3E%3C/svg%3E") center/contain no-repeat;
    flex-shrink: 0;
}

.vpo-tier-field--upload .vpo-sub-upload-droparea:hover {
    border-color: var(--vpo-accent, #2e7d32);
    background: rgba(46, 125, 50, 0.03);
}

.vpo-tier-field--upload .vpo-upload-text {
    font-size: 12px;
    color: #666;
    margin: 0;
}

.vpo-tier-field--upload .vpo-sub-upload-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Variants within unified tier fields — reset standalone SVG section styles */
.vpo-tier-fields .vpo-tier-field--variants {
    padding: 6px 0;
}

.vpo-tier-fields .vpo-tier-field--variants .vpo-tier-svg-checkbox-row {
    padding: 2px 0;
}

.vpo-tier-fields .vpo-tier-field--variants .vpo-tier-field-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

/* Visible mode variant: show swatches directly */
.vpo-tier-field--variants[data-field-mode="visible"] .vpo-svg-popup {
    display: block !important;
    position: static;
    background: transparent;
    border: none;
    box-shadow: none;
    margin-top: 6px;
}

/* === Select (Design) Field === */
.vpo-tier-field--select {
    padding: 4px 0;
}
.vpo-tier-field--select .vpo-design-select {
    width: 100%;
    padding: 7px 28px 7px 10px;
    font-size: 13px;
    border: 1px solid var(--vpo-border, #ddd);
    border-radius: 6px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 8px center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    transition: border-color var(--vpo-transition);
}
.vpo-tier-field--select .vpo-design-select:focus {
    border-color: var(--vpo-accent, #2e7d32);
    outline: none;
}
.vpo-design-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.vpo-design-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 8px;
    border: 2px solid var(--vpo-border, #e0e0e0);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s, transform 0.15s;
    min-width: 80px;
    max-width: 120px;
    flex: 1 1 80px;
}
.vpo-design-btn img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 6px;
}
.vpo-design-btn-label {
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    line-height: 1.3;
    color: var(--vpo-text, #333);
}
.vpo-design-btn:hover {
    border-color: var(--vpo-accent, #2e7d32);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}
.vpo-design-btn--active {
    border-color: var(--vpo-accent, #2e7d32);
    box-shadow: 0 0 0 2px var(--vpo-accent, #2e7d32), 0 2px 8px rgba(46,125,50,0.15);
    background: var(--vpo-accent-light, #f0f9f1);
    position: relative;
}
.vpo-design-btn--active::after {
    content: '\2713';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    background: var(--vpo-accent, #2e7d32);
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
    font-weight: 700;
}
.vpo-design-btn--active .vpo-design-btn-label {
    color: var(--vpo-accent, #2e7d32);
    font-weight: 600;
}
.vpo-design-buttons--text-only .vpo-design-btn {
    flex-direction: row;
    justify-content: center;
    padding: 7px 14px;
    min-width: 0;
    max-width: none;
    flex: 1 1 auto;
    border-radius: 6px;
}
.vpo-design-buttons--text-only .vpo-design-btn-label {
    font-size: 13px;
    font-weight: 500;
}
.vpo-design-buttons--text-only .vpo-design-btn--active .vpo-design-btn-label {
    font-weight: 600;
}
/* Button column layouts */
.vpo-design-buttons--cols-1 { display: grid; grid-template-columns: 1fr; }
.vpo-design-buttons--cols-2 { display: grid; grid-template-columns: repeat(2, 1fr); }
.vpo-design-buttons--cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); }
.vpo-design-buttons--cols-4 { display: grid; grid-template-columns: repeat(4, 1fr); }
.vpo-design-buttons[class*="--cols-"] .vpo-design-btn {
    max-width: none;
    flex: unset;
}
@media (max-width: 480px) {
    .vpo-design-buttons--cols-3,
    .vpo-design-buttons--cols-4 { grid-template-columns: repeat(2, 1fr); }
}

/* Tier field error state */
.vpo-tf-error .vpo-personalization-input {
    border-color: #d32f2f !important;
    box-shadow: 0 0 0 2px rgba(211,47,47,0.15) !important;
}
.vpo-tf-error .vpo-design-btn {
    border-color: #d32f2f !important;
}
.vpo-tf-error .vpo-tier-field-label {
    color: #d32f2f !important;
}
.vpo-tf-error .vpo-sub-upload-droparea {
    border-color: #d32f2f !important;
    box-shadow: 0 0 0 2px rgba(211,47,47,0.15) !important;
}
.vpo-tf-error .vpo-upload-text,
.vpo-tf-error .vpo-tier-upload-label {
    color: #d32f2f !important;
}

/* Border-radius adjustments for tier-fields in tier options */
.vpo-tier-option .vpo-tier-fields:not(.vpo-tier-items-hidden):not(:last-child) {
    border-radius: 0 !important;
}

.vpo-tier-option .vpo-tier-fields:not(.vpo-tier-items-hidden):last-child {
    border-radius: 0 0 var(--vpo-card-radius, 10px) var(--vpo-card-radius, 10px);
}

/* Tier fields adjacency borders */
.vpo-tier-items:not(.vpo-tier-items-hidden) + .vpo-tier-fields:not(.vpo-tier-items-hidden),
.vpo-picker-slots:not(.vpo-tier-items-hidden) + .vpo-tier-fields:not(.vpo-tier-items-hidden),
.vpo-tier-fields:not(.vpo-tier-items-hidden) + .vpo-tier-gifts:not(.vpo-tier-items-hidden) {
    border-top: 1px dashed var(--vpo-border-selected, #2e7d32);
}

/* === Tier Gifts === */
.vpo-tier-gifts {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 4px 8px 5px;
    background: var(--vpo-accent-bg, #e8f5e9);
    border: 2px solid var(--vpo-border-selected, #2e7d32);
    border-top: none;
    border-radius: 0 0 var(--vpo-card-radius, 10px) var(--vpo-card-radius, 10px);
    margin-top: -2px;
    animation: vpo-slide-down 0.25s ease;
}
.vpo-tier-gift-card {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border-radius: 6px;
    padding: 3px 10px;
    border: 1.5px dashed var(--vpo-border-selected, #2e7d32);
}
.vpo-tier-gift-thumb {
    width: 28px;
    height: 28px;
    border-radius: 5px;
    object-fit: cover;
    flex-shrink: 0;
}
.vpo-tier-gift-name {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    flex: 1;
}

/* Tier image size support — tier row thumbnail */
.vpo-type-tiers.vpo-imgsize-thumbnail .vpo-tier-image { width: 48px; height: 48px; }
.vpo-type-tiers.vpo-imgsize-medium .vpo-tier-image    { width: 64px; height: 64px; }
.vpo-type-tiers.vpo-imgsize-large .vpo-tier-image     { width: 90px; height: 90px; }
.vpo-type-tiers.vpo-imgsize-full .vpo-tier-image      { width: 110px; height: 110px; }

@media (max-width: 480px) {
    .vpo-tier-gifts {
        flex-direction: column;
        gap: 3px;
    }
    .vpo-carousel-prev,
    .vpo-carousel-next {
        opacity: 0.15;
        width: 18px;
        height: 18px;
        font-size: 11px;
        line-height: 18px;
    }
}


/* === Card Gifts (free gifts under cards) === */
.vpo-card-gifts {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 10px 10px;
    background: #f8f8f8;
    border: 2px solid var(--vpo-border-selected, #2e7d32);
    border-top: none;
    border-radius: 0 0 var(--vpo-card-radius, 10px) var(--vpo-card-radius, 10px);
    margin-top: -2px;
    animation: vpo-slide-down 0.25s ease;
}
.vpo-card-gift-card {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border-radius: var(--vpo-card-radius, 10px);
    padding: 6px 10px;
    border: 1px dashed var(--vpo-border-selected, #2e7d32);
}
.vpo-card-gift-img {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}
.vpo-card-gift-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.vpo-card-gift-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.vpo-card-gift-name {
    font-size: 12px;
    font-weight: 600;
    color: #333;
}
.vpo-card-gift-price {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
}
/* When card has gifts showing, remove bottom border-radius from card */
.vpo-option-card.vpo-card-selected:has(+ .vpo-card-gifts[style*="flex"]),
.vpo-option-card.vpo-card-selected:has(+ .vpo-card-gifts:not([style*="none"])) {
    border-radius: var(--vpo-card-radius, 10px) var(--vpo-card-radius, 10px) 0 0;
}

/* === Personalization Input === */
.vpo-personalization-input {
    width: 100%;
    padding: 5px 8px;
    border: 1px solid var(--vpo-border, #ddd);
    border-radius: 5px;
    font-size: 13px;
    font-family: var(--vpo-font, inherit);
    color: var(--vpo-text, #1a1a1a);
    background: #fff;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}
.vpo-personalization-input:focus {
    border-color: var(--vpo-accent, #2e7d32);
    outline: none;
    box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.15);
}
.vpo-personalization-input::placeholder {
    color: var(--vpo-text-muted, #757575);
    font-style: italic;
}
.vpo-sub-personalization-section {
    margin-top: 4px;
}
.vpo-tier-product-personalization {
    padding: 6px 0 2px;
}
.vpo-tier-product-personalization .vpo-personalization-input {
    font-size: 12px;
    padding: 6px 8px;
}

/* === Live Preview v2 — CSS Compositor === */
.vpo-live-preview {
    margin: 16px auto 8px;
    padding: 16px 12px 12px;
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.06);
}
.vpo-live-preview__heading {
    font-size: 10px;
    font-weight: 600;
    color: #999;
    text-align: center;
    margin-bottom: 2px;
    letter-spacing: 1.8px;
    text-transform: uppercase;
}
.vpo-live-preview__subheading {
    font-size: 11px;
    color: #aaa;
    text-align: center;
    margin-bottom: 10px;
    font-weight: 400;
}
.vpo-live-preview__slots {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    align-items: flex-start;
}
.vpo-live-preview__slot {
    flex-shrink: 1;
    flex-grow: 1;
    min-width: 0;
    box-sizing: border-box;
    transition: transform 0.2s ease;
}
.vpo-live-preview__slot-inner {
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.vpo-live-preview__bg {
    display: block;
    width: 100%;
    height: auto;
}
.vpo-live-preview__layer {
    pointer-events: none;
}
.vpo-live-preview__layer--text {
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
}
.vpo-live-preview__layer--photo {
    pointer-events: auto;
}
.vpo-live-preview__layer--photo .vpo-photo-inner {
    transition: box-shadow 0.2s ease;
}
.vpo-live-preview__layer--photo:hover .vpo-photo-inner {
    box-shadow: inset 0 0 0 2px rgba(46,125,50,0.3);
}
.vpo-live-preview__layer--photo img:first-child {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: grab;
    transition: opacity 0.2s ease;
}
.vpo-live-preview__layer--photo .vpo-photo-placeholder {
    transition: opacity 0.3s ease;
}
/* Reposition hint — move icon below photo on hover */
.vpo-photo-reposition-hint {
    display: none;
    position: absolute;
    bottom: -22px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.5);
    border-radius: 10px;
    padding: 2px 8px;
    align-items: center;
    justify-content: center;
    gap: 4px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 2;
    white-space: nowrap;
}
.vpo-photo--has-image .vpo-photo-reposition-hint {
    display: flex;
}
.vpo-photo--has-image:hover .vpo-photo-reposition-hint {
    opacity: 1;
}
/* "Move & zoom" toast after upload */
.vpo-photo-position-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 11px;
    color: var(--vpo-accent, #2e7d32);
    font-weight: 500;
    text-align: center;
    margin-top: 6px;
    opacity: 0;
    transition: opacity 0.3s ease;
    width: 100%;
}
.vpo-photo-position-hint.vpo-hint-visible {
    opacity: 1;
}
@media (max-width: 600px) {
    .vpo-live-preview { max-width: 100% !important; padding: 12px 8px 8px; }
    /* Default mobile: horizontal scroll with snap for multi-slot */
    .vpo-live-preview__slots {
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 8px;
        padding-bottom: 4px;
    }
    .vpo-live-preview__slot {
        flex: 0 0 85%;
        scroll-snap-align: center;
        width: 85% !important;
    }
    /* Single slot: full width, no scroll */
    .vpo-live-preview__slots:only-child .vpo-live-preview__slot:only-child {
        flex: 0 0 100%;
        width: 100% !important;
    }
    /* 2 per row on mobile */
    .vpo-live-preview--mobile-2col .vpo-live-preview__slots { flex-wrap: wrap; overflow-x: visible; scroll-snap-type: none; }
    .vpo-live-preview--mobile-2col .vpo-live-preview__slot { flex: 0 0 48%; width: 48% !important; scroll-snap-align: none; }
    /* 3 per row on mobile */
    .vpo-live-preview--mobile-3col .vpo-live-preview__slots { flex-wrap: wrap; overflow-x: visible; scroll-snap-type: none; }
    .vpo-live-preview--mobile-3col .vpo-live-preview__slot { flex: 0 0 31%; width: 31% !important; scroll-snap-align: none; }
}
@media print {
    .vpo-live-preview { display: none !important; }
}

/* === Bundle Picker Slots === */
.vpo-picker-slots {
    padding: 10px 12px;
    background: var(--vpo-card-bg, #fff);
    border: 1.5px solid var(--vpo-border-selected, #2e7d32);
    border-top: none;
}
.vpo-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 10px;
}
.vpo-picker-slot {
    border: 1.5px dashed var(--vpo-border, #ddd);
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    transition: border-color 0.2s, background 0.2s;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.vpo-picker-slot-empty {
    cursor: pointer;
    background: #fafafa;
}
.vpo-picker-slot-empty:hover {
    border-color: var(--vpo-accent, #2e7d32);
    background: #f0f7f0;
}
.vpo-picker-slot-add {
    font-size: 28px;
    color: #bbb;
    line-height: 1;
}
.vpo-picker-slot-label {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}
.vpo-picker-slot-filled {
    border-style: solid;
    border-color: var(--vpo-accent, #2e7d32);
    background: #fff;
}
.vpo-picker-slot-img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 6px;
}
.vpo-picker-slot-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.vpo-picker-slot-info {
    width: 100%;
}
.vpo-picker-slot-name {
    font-size: 12px;
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}
.vpo-picker-slot-actions {
    display: flex;
    gap: 6px;
    justify-content: center;
}
.vpo-picker-change-btn {
    font-size: 11px;
    color: var(--vpo-accent, #2e7d32);
    background: none;
    border: 1px solid var(--vpo-accent, #2e7d32);
    border-radius: 4px;
    padding: 2px 8px;
    cursor: pointer;
}
.vpo-picker-change-btn:hover {
    background: var(--vpo-accent, #2e7d32);
    color: #fff;
}
.vpo-picker-remove-btn {
    font-size: 14px;
    color: #c00;
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0 6px;
    cursor: pointer;
    line-height: 1.4;
}
.vpo-picker-remove-btn:hover {
    background: #fdd;
    border-color: #c00;
}
.vpo-picker-add-slot {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 8px;
    background: none;
    border: 1.5px dashed #ccc;
    border-radius: 8px;
    color: #888;
    font-size: 13px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}
.vpo-picker-add-slot:hover {
    border-color: var(--vpo-accent, #2e7d32);
    color: var(--vpo-accent, #2e7d32);
}
.vpo-picker-counter {
    margin-top: 6px;
    font-size: 12px;
    color: #888;
    text-align: center;
}

/* === Picker Slide-Out Panel === */
.vpo-picker-panel-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 99998;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.vpo-picker-backdrop-open {
    opacity: 1;
}
.vpo-picker-panel {
    position: fixed;
    top: 0;
    right: -400px;
    bottom: 0;
    width: 380px;
    max-width: 90vw;
    background: #fff;
    z-index: 99999;
    box-shadow: -4px 0 24px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
}
.vpo-picker-panel-open {
    right: 0;
}
.vpo-picker-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    font-weight: 700;
    font-size: 16px;
}
.vpo-picker-panel-close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #666;
    padding: 0 4px;
    line-height: 1;
}
.vpo-picker-panel-search {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
}
.vpo-picker-search-input {
    width: 100%;
    padding: 8px 12px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
}
.vpo-picker-panel-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 12px 12px;
}
.vpo-picker-panel-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
}
.vpo-picker-panel-item:hover {
    background: #f5f5f5;
}
.vpo-picker-panel-item-picked {
    opacity: 0.4;
    cursor: default;
}
.vpo-picker-panel-item-picked:hover {
    background: transparent;
}
.vpo-picker-panel-item-img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #eee;
    flex-shrink: 0;
}
.vpo-picker-panel-item-noimg {
    background: #f5f5f5;
}
.vpo-picker-panel-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.vpo-picker-panel-item-name {
    font-weight: 600;
    font-size: 14px;
}
.vpo-picker-panel-item-desc {
    font-size: 12px;
    color: #666;
}
.vpo-picker-panel-item-check {
    color: var(--vpo-accent, #2e7d32);
    font-size: 18px;
    margin-left: auto;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .vpo-picker-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .vpo-picker-slot-img {
        width: 60px;
        height: 60px;
    }
    .vpo-picker-panel {
        width: 100vw;
        max-width: 100vw;
        right: -100vw;
    }
    .vpo-picker-panel-open {
        right: 0;
    }
}

/* === Per-product upload === */
.vpo-per-product-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #555;
    cursor: pointer;
    margin-bottom: 6px;
    user-select: none;
}
.vpo-per-product-toggle input[type="checkbox"] {
    margin: 0;
    accent-color: var(--vpo-accent, #2e7d32);
}
.vpo-upload-per-product-zones {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.vpo-per-product-upload-item {
    flex: 1 1 0;
    min-width: 80px;
    max-width: 200px;
}
.vpo-per-product-upload-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #444;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.vpo-per-product-thumb {
    width: 22px;
    height: 22px;
    object-fit: cover;
    border-radius: 3px;
    flex-shrink: 0;
}
.vpo-per-product-upload-item .vpo-sub-upload-droparea {
    padding: 4px 8px !important;
    font-size: 11px;
}
.vpo-per-product-upload-item .vpo-sub-upload-droparea::before {
    width: 13px !important;
    height: 13px !important;
}
.vpo-per-product-upload-item .vpo-upload-text {
    font-size: 10px !important;
}
.vpo-per-product-upload-item .vpo-sub-upload-thumb-img {
    max-width: 100%;
    max-height: 80px;
    object-fit: cover;
    border-radius: 4px;
}
.vpo-per-product-upload-item .vpo-sub-upload-thumb-wrap {
    position: relative;
    display: inline-block;
}
.vpo-per-product-upload-item .vpo-sub-upload-remove {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #e53935;
    color: #fff;
    border: none;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
    cursor: pointer;
    padding: 0;
}

/* Mobile: stack per-product uploads */
@media (max-width: 480px) {
    .vpo-upload-per-product-zones {
        gap: 6px;
    }
    .vpo-per-product-upload-item {
        min-width: 70px;
    }
}

/* === Print === */
@media print {
    .vpo-option-card { break-inside: avoid; border: 1px solid #999; }
    .vpo-card-check { display: none; }
    .vpo-card-selected { border: 2px solid #000; }
    .vpo-sticky-bar { display: none !important; }
    .vpo-stepper { display: none !important; }
    .vpo-live-preview { display: none !important; }
}
