/**
 * Advanced Product Customizer - Stylesheet
 * Version: 2.9.25
 * Author: 4theloveofpi
 * Description: Professional styling for the multi-step product customizer wizard
 * 
 * CHANGES (2.9.3):
 * - Added WC addon text field styles
 * - Layout/size/cover option text top-aligned
 * - Price badge stays at bottom of card
 * 
 * CHANGES (2.9):
 * - Removed legacy category-tab CSS
 * 
 * CHANGES (2.8.39):
 * - Added Honey Charm font
 * - Fixed fallback preview font sizing (line 1: 24px, lines 2-6: 14px)
 * 
 * CHANGES (2.8.38):
 * - Added fullscreen preview modal styles
 * - Added View Full Size link styles
 * 
 * CHANGES (2.8.37):
 * - Added cover preview disclaimer styling
 * - Added Review step cover preview styling
 */

/* ===============================================
   Custom Font Definitions
   =============================================== */

@font-face {
    font-family: 'Champagne-Limousines';
    src: url('/wp-content/themes/fonts/Champagne-Limousines.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'King-Basil';
    src: url('/wp-content/themes/fonts/King-Basil.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Cakepop';
    src: url('/wp-content/themes/fonts/Cakepop.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'SuperMario256';
    src: url('/wp-content/themes/fonts/SuperMario256.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Waltograph';
    src: url('/wp-content/themes/fonts/waltograph42.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Farmhouse';
    src: url('/wp-content/themes/fonts/Farmhouse.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'EssentialSans';
    src: url('/wp-content/themes/fonts/EssentialSans-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'AGLazyLevel';
    src: url('/wp-content/themes/fonts/AGLazyLevelExpertBold-2.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'KGTheFighter';
    src: url('/wp-content/themes/fonts/KGTheFighter.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'PBBeanThereDunnThat';
    src: url('/wp-content/themes/fonts/PBBeanThereDunnThat.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'PBCoffeeBreak';
    src: url('/wp-content/themes/fonts/PBCoffeeBreak.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'ShorelinesDisplay';
    src: url('/wp-content/themes/fonts/ShorelinesDisplay.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'ShorelinesScriptBold';
    src: url('/wp-content/themes/fonts/ShorelinesScriptBold.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'DarlingHarbourBrush';
    src: url('/wp-content/themes/fonts/DarlingHarbourBrush.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'KGWrittenOnHisHands';
    src: url('/wp-content/themes/fonts/KGWrittenOnHisHands.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'HoneyCharm';
    src: url('/wp-content/themes/fonts/Honey Charm.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ===============================================
   Hide Default WooCommerce Add to Cart Button
   Only on products with customizer enabled
   =============================================== */

/* Hide Elementor's add to cart wrapper */
.has-product-customizer .e-atc-qty-button-holder {
    display: none !important;
}

/* Hide standard WooCommerce add to cart elements that are siblings of our customizer */
.has-product-customizer form.cart > .quantity,
.has-product-customizer form.cart > .single_add_to_cart_button,
.has-product-customizer .woocommerce-variation-add-to-cart {
    display: none !important;
}

/* Hide Square digital wallet buttons */
.has-product-customizer #wc-square-digital-wallet {
    display: none !important;
}

/* ===============================================
   Product Customizer Wizard Styles
   =============================================== */

/* Main Container */
#product-customizer-wizard {
    margin: 30px 0;
    padding: 40px;
    background: #ffffff;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* Messages */
.customizer-message {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 6px;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}

.customizer-message.error {
    background: #fee;
    border: 1px solid #fcc;
    color: #c33;
}

.customizer-message.success {
    background: #efe;
    border: 1px solid #cfc;
    color: #3c3;
}

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

/* Progress Bar */
.wizard-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
    padding: 0 20px;
}

.wizard-progress::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 50px;
    right: 50px;
    height: 2px;
    background: #ddd;
    z-index: 0;
}

.progress-step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 0 auto 10px;
    background: #f5f5f5;
    border: 2px solid #ddd;
    border-radius: 50%;
    font-weight: bold;
    font-size: 16px;
    color: #999;
    transition: all 0.3s ease;
}

.step-label {
    display: block;
    font-size: 13px;
    color: #666;
    font-weight: 500;
    margin-top: 8px;
}

.progress-step.active .step-number {
    background: #2271b1;
    border-color: #2271b1;
    color: white;
    box-shadow: 0 0 0 4px rgba(34, 113, 177, 0.1);
}

.progress-step.active .step-label {
    color: #2271b1;
    font-weight: 700;
}

.progress-step.completed .step-number {
    background: #00a32a;
    border-color: #00a32a;
    color: white;
}

.progress-step.completed .step-label {
    color: #00a32a;
}

/* Wizard Content */
.wizard-content {
    min-height: 400px;
    margin-bottom: 30px;
}

.wizard-step {
    display: none;
    animation: fadeIn 0.4s ease;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.wizard-step h3 {
    font-size: 26px;
    margin-bottom: 25px;
    color: #1e1e1e;
    font-weight: 700;
}

.wizard-step h4 {
    font-size: 20px;
    margin: 30px 0 15px;
    color: #333;
    font-weight: 600;
}

/* Option Cards with Checkmark */
.option-card {
    display: block;
    padding: 0;
    background: #fafafa;
    border: 3px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

/* ===============================================
   3-Wide Grid Layout for Option Cards
   =============================================== */

.size-options,
.layout-options,
.cover-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

/* Mobile: 1 column */
@media (max-width: 480px) {
    .size-options,
    .layout-options,
    .cover-selection {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .price-badge {
        font-size: 10px;
        padding: 2px 8px;
    }
}

.option-card:hover {
    border-color: #2271b1;
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.15);
    transform: translateY(-2px);
}

.option-card input[type="radio"],
.option-card input[type="checkbox"] {
    display: none;
}

/* Green Checkmark Indicator - HIDDEN BY DEFAULT */
.checkmark-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: #00a32a;
    color: white;
    border-radius: 50%;
    display: none; /* Hidden until selected */
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 163, 42, 0.4);
}

/* Show checkmark when option is selected */
.option-card.selected .checkmark-indicator {
    display: flex;
    animation: checkmarkPop 0.3s ease;
}

@keyframes checkmarkPop {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.option-card.selected {
    border-color: #00a32a;
    background: #f0fff4;
    box-shadow: 0 4px 12px rgba(0, 163, 42, 0.25);
}

.option-content {
    padding: 20px;
    text-align: center;
}

.option-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin-bottom: 12px;
}

.option-content strong {
    display: block;
    font-size: 16px;
    margin-bottom: 8px;
    color: #1e1e1e;
}

.option-content span,
.option-content p {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
}

.price-badge {
    display: inline-flex;
    align-items: center;
    margin-top: auto;
    padding: 3px 10px;
    background: #2271b1;
    color: #fff !important;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.2;
}

/* Ensure all WooCommerce price elements inside badge are white and inline */
.price-badge span,
.price-badge bdi,
.price-badge .woocommerce-Price-amount,
.price-badge .woocommerce-Price-currencySymbol {
    color: #fff !important;
    display: inline !important;
    font-size: inherit !important;
    line-height: inherit !important;
}

/* Layout Cards - Responsive image sizing */
.layout-card .option-content img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: top;
    max-height: 180px;
}

/* Cover Cards - Responsive image sizing */
.cover-card .option-content img {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    max-height: 220px;
}

/* Ensure cards in grid have equal height */
.size-options .option-card,
.layout-options .option-card,
.cover-selection .option-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.size-options .option-content,
.layout-options .option-content,
.cover-selection .option-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Cover Personalization Section */
.cover-personalization {
    margin-top: 35px;
    padding: 25px;
    background: #f9f9f9;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
}

.cover-personalization label {
    display: block;
    margin: 20px 0;
}

.cover-personalization label > span {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.cover-personalization input[type="text"],
.cover-personalization select {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.cover-personalization input[type="text"]:focus,
.cover-personalization select:focus {
    outline: none;
    border-color: #2271b1;
}

/* Add-ons Section - 3-Wide Grid */
.addon-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 25px 0;
}

/* Tablet: 2 columns */
@media (max-width: 900px) {
    .addon-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

/* Mobile: 1 column */
@media (max-width: 550px) {
    .addon-options {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

.addon-item {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: #fafafa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.addon-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
    accent-color: #00a32a;
}

.addon-thumbnail-wrapper {
    position: relative;
    flex-shrink: 0;
    width: 70px;
    height: 70px;
}

.addon-item .addon-image {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
    cursor: zoom-in;
    transition: opacity 0.2s ease;
}

.addon-thumbnail-wrapper:hover .addon-image {
    opacity: 0.85;
}

.addon-image-expand {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 10px;
    padding: 2px 4px;
    border-radius: 3px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.addon-thumbnail-wrapper:hover .addon-image-expand {
    opacity: 1;
}

.addon-item:hover {
    border-color: #2271b1;
    background: #f5f9ff;
}

.addon-item.selected {
    border-color: #00a32a;
    background: #f0fff4;
    box-shadow: 0 2px 8px rgba(0, 163, 42, 0.2);
}

.addon-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    text-align: left;
    min-width: 0;
}

.addon-content strong {
    display: block;
    font-size: 14px;
    margin-bottom: 4px;
    color: #1e1e1e;
    line-height: 1.3;
}

.addon-content p {
    font-size: 12px;
    color: #666;
    margin: 0 0 6px 0;
    flex: 1;
}

.addon-price {
    color: #2271b1;
    font-weight: 600;
    font-size: 14px;
    display: block;
    margin-top: auto;
}

/* Ensure WooCommerce price elements inherit styling */
.addon-price span,
.addon-price bdi {
    color: inherit !important;
}

.addon-quantity {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e0e0e0;
}

/* Duration Options (if needed in future) */
.duration-options label,
.personalization-options label {
    display: block;
    margin: 20px 0;
}

.duration-options label > span,
.personalization-options label > span {
    display: inline-block;
    margin-left: 8px;
    font-weight: 600;
    color: #333;
}

.duration-options select {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    margin-top: 5px;
}

/* Personalization Options */
.personalization-options textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
}

.personalization-options textarea:focus {
    outline: none;
    border-color: #2271b1;
}

.personalization-options input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
    vertical-align: middle;
}

/* Customization Summary */
.customization-summary {
    margin-top: 30px;
    padding: 25px;
    background: #f9f9f9;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
}

.customization-summary h4 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #1e1e1e;
    font-size: 20px;
}

.summary-items {
    margin-bottom: 20px;
}

.summary-item {
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item strong {
    color: #1e1e1e;
    margin-right: 8px;
}

.summary-item ul {
    margin: 8px 0 0 20px;
    padding: 0;
}

.summary-item li {
    margin: 5px 0;
    color: #666;
}

.summary-item .price-add {
    color: #2271b1;
    font-weight: 600;
    font-size: 13px;
}

.total-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 3px solid #2271b1;
    font-size: 22px;
    font-weight: 700;
}

.total-price strong {
    color: #1e1e1e;
}

#total-price-display {
    color: #2271b1;
    font-size: 26px;
}

/* Navigation Buttons */
.wizard-navigation {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 35px;
    padding-top: 25px;
    border-top: 2px solid #e5e5e5;
}

.wizard-navigation .button {
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #ddd;
    background: white;
    color: #333;
}

.wizard-navigation .button:hover {
    background: #f5f5f5;
    border-color: #999;
}

.wizard-navigation .button-primary {
    background: #2271b1;
    border-color: #2271b1;
    color: white;
}

.wizard-navigation .button-primary:hover {
    background: #135e96;
    border-color: #135e96;
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);
}

.wizard-prev {
    margin-right: auto;
}

.wizard-next,
.wizard-complete {
    margin-left: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    #product-customizer-wizard {
        padding: 20px;
    }
    
    .wizard-progress {
        flex-wrap: wrap;
        padding: 0;
    }
    
    .wizard-progress::before {
        display: none;
    }
    
    .progress-step {
        flex: 0 0 50%;
        margin-bottom: 15px;
    }
    
    .step-label {
        font-size: 11px;
    }
    
    .wizard-step h3 {
        font-size: 22px;
    }
    
    .total-price {
        font-size: 18px;
    }
    
    #total-price-display {
        font-size: 22px;
    }
    
    .wizard-navigation {
        flex-direction: column;
    }
    
    .wizard-navigation .button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .progress-step {
        flex: 0 0 100%;
    }
    
    .addon-options-grid {
        grid-template-columns: 1fr;
    }
}

/* Add-on Cards with Images */
.addon-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.addon-item-card {
    background: #fafafa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.addon-item-card:hover {
    border-color: #2271b1;
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.15);
}

.addon-item-card img {
    max-width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 10px;
}

.addon-item-card strong {
    display: block;
    font-size: 16px;
    margin-bottom: 8px;
    color: #1e1e1e;
}

.addon-item-card p {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
    min-height: 40px;
}

.addon-pricing {
    margin: 10px 0;
}

.addon-price {
    display: block;
    color: #2271b1;
    font-weight: 700;
    font-size: 16px;
}

.addon-discount {
    display: block;
    color: #00a32a;
    font-size: 12px;
    font-weight: 600;
    margin-top: 5px;
}

.addon-quantity-selector {
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.addon-qty-input {
    width: 80px;
    padding: 8px;
    border: 2px solid #ddd;
    border-radius: 4px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
}

.addon-qty-input:focus {
    outline: none;
    border-color: #2271b1;
}

/* NEW: Personalization Text Inputs */
.personalization-text-inputs {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.personalization-text-inputs label {
    display: block;
    margin-bottom: 15px;
}

.personalization-text-inputs label > span {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.personalization-text-inputs input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.personalization-text-inputs input[type="text"]:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}
/* Text Lines Input */
.text-lines-input {
    margin-bottom: 20px;
}

.text-line-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 15px;
}

.text-line-field span {
    font-weight: 600;
    color: #1e1e1e;
}

.text-line-field input {
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.2s;
    background: #fff;
    color: #333;
}

.text-line-field input:focus {
    outline: none;
    border-color: #2271b1;
}

.text-line-field .char-count {
    font-size: 12px;
    color: #666;
    text-align: right;
}

.text-line-field .char-count .current {
    font-weight: 600;
}

.text-line-field input:focus + .char-count {
    color: #2271b1;
}

/* Explicit styling for cover text inputs */
.cover-text-input {
    background: #fff !important;
    color: #333 !important;
}

/* Checkbox options styling */
.checkbox-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: #f9f9f9;
    border-radius: 6px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.checkbox-option:hover {
    background: #f0f0f0;
}

.checkbox-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

/* ===============================================
   Add-On Category Accordion (v2.5.0)
   =============================================== */

.step-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

.addon-categories-accordion {
    margin: 20px 0;
}

.addon-category-section {
    margin-bottom: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.addon-category-section:hover {
    border-color: #2271b1;
}

.addon-category-section.expanded {
    border-color: #2271b1;
}

/* Layout-based filtering - hidden items */
.addon-category-section.layout-hidden,
.addon-item.layout-hidden {
    display: none !important;
}

.addon-category-header {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 18px 20px;
    background: #fafafa;
    border: none;
    cursor: pointer;
    text-align: left;
    font-size: 16px;
    font-weight: 600;
    color: #1e1e1e;
    transition: background-color 0.2s ease;
}

.addon-category-header:hover {
    background: #f0f0f0;
}

.addon-category-section.expanded .addon-category-header {
    background: #f0f6fc;
    border-bottom: 2px solid #e0e0e0;
}

.addon-category-header .category-name {
    flex: 1;
}

.addon-category-header .category-product-count {
    color: #666;
    font-size: 13px;
    font-weight: normal;
    margin-right: 15px;
}

.addon-category-header .category-toggle-icon {
    font-size: 12px;
    color: #666;
    transition: transform 0.3s ease;
}

.addon-category-section.expanded .category-toggle-icon {
    transform: rotate(180deg);
}

.addon-category-products {
    padding: 20px;
    background: #fff;
}

/* Single column layout for addon cards - full width to match accordion */
.addon-category-products .addon-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

/* Addon card styling */
.addon-category-products .addon-item {
    width: 100%;
}

/* Select option hint */
.select-option-hint {
    color: #666;
    font-style: italic;
    font-size: 13px;
}

/* Selected add-on count badge on category header */
.addon-category-header .selected-count {
    display: none;
    background: #00a32a;
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    margin-right: 10px;
}

.addon-category-section.has-selected .selected-count {
    display: inline-block;
}

/* ===============================================
   Cover Style Tabs (v2.6.0)
   =============================================== */

.cover-style-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e5e5e5;
    justify-content: center;
}

.cover-style-tab {
    width: 100px;
    height: 50px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    transition: all 0.3s ease;
    text-align: center;
}

.cover-style-tab:hover {
    background: #e8e8e8;
    border-color: #999;
    color: #333;
}

.cover-style-tab.active {
    background: #2271b1;
    border-color: #1a5a8a;
    color: #fff;
    box-shadow: 0 2px 8px rgba(34, 113, 177, 0.3);
}

.cover-products-container {
    min-height: 200px;
}

.cover-products-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.cover-products-loading span {
    display: inline-block;
    padding: 10px 20px;
    background: #f5f5f5;
    border-radius: 4px;
}

/* ===============================================
   Cover Personalization Preview (v2.8.17)
   =============================================== */

.cover-personalize-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 20px;
}

/* When there's no cover step, text inputs take full width */
.cover-personalize-container.no-cover-step {
    display: block;
}

.cover-personalize-container.no-cover-step .cover-text-inputs-section {
    max-width: 600px;
    margin: 0 auto;
}

/* Preview section first (on top) */
.cover-preview-section {
    order: 1;
}

/* Text inputs section second (below) */
.cover-text-inputs-section {
    order: 2;
}

@media (min-width: 769px) {
    .cover-personalize-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    
    /* No cover step - single column */
    .cover-personalize-container.no-cover-step {
        display: block;
    }
    
    /* On desktop, preview on right, inputs on left */
    .cover-preview-section {
        order: 2;
    }
    
    .cover-text-inputs-section {
        order: 1;
    }
}

.cover-preview-section h4,
.cover-text-inputs-section h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #1e1e1e;
}

.cover-preview-wrapper {
    background: #f9f9f9;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    padding: 20px;
}

.cover-preview-image {
    position: relative;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    background: #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    min-height: 200px;
}

.cover-preview-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

/* SVG Overlay for precise text positioning */
.cover-preview-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: visible;
}

.cover-preview-svg text {
    /* Ensure text renders crisply */
    text-rendering: optimizeLegibility;
}

/* Fallback text-only preview (when no valid text position) */
.cover-preview-fallback {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 30px 20px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fallback-text-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    width: 100%;
}

.fallback-line {
    display: block;
    line-height: 1.3;
    min-height: 1.3em;
}

/* Fallback line sizes - proportional to SVG config */
.fallback-line-1 { font-size: 24px; }
.fallback-line-2 { font-size: 14px; }
.fallback-line-3 { font-size: 14px; }
.fallback-line-4 { font-size: 14px; }
.fallback-line-5 { font-size: 14px; }
.fallback-line-6 { font-size: 14px; }

/* Review fallback line sizes */
.review-fallback-line-1 { font-size: 24px; }
.review-fallback-line-2 { font-size: 14px; }
.review-fallback-line-3 { font-size: 14px; }
.review-fallback-line-4 { font-size: 14px; }
.review-fallback-line-5 { font-size: 14px; }
.review-fallback-line-6 { font-size: 14px; }

.fallback-line:empty {
    display: none;
}

/* Fallback color schemes */
.cover-preview-fallback.color-black .fallback-line { color: #000000; }
.cover-preview-fallback.color-white .fallback-line { color: #666666; } /* Use gray so visible on light bg */
.cover-preview-fallback.color-gold .fallback-line { color: #b8860b; }
.cover-preview-fallback.color-silver .fallback-line { color: #708090; }

/* Fallback font classes */
.fallback-line.line-font-champagne-limousines { font-family: 'Champagne-Limousines', sans-serif; }
.fallback-line.line-font-king-basil { font-family: 'King-Basil', cursive; }
.fallback-line.line-font-cakepop { font-family: 'Cakepop', cursive; }
.fallback-line.line-font-supermario256 { font-family: 'SuperMario256', fantasy; }
.fallback-line.line-font-waltograph { font-family: 'Waltograph', fantasy; }
.fallback-line.line-font-farmhouse { font-family: 'Farmhouse', serif; }
.fallback-line.line-font-essentialsans { font-family: 'EssentialSans', sans-serif; }
.fallback-line.line-font-aglazylevel { font-family: 'AGLazyLevel', sans-serif; }
.fallback-line.line-font-kgthefighter { font-family: 'KGTheFighter', sans-serif; }
.fallback-line.line-font-pbbeantheredunnthat { font-family: 'PBBeanThereDunnThat', cursive; }
.fallback-line.line-font-pbcoffeebreak { font-family: 'PBCoffeeBreak', cursive; }
.fallback-line.line-font-shorelinesdisplay { font-family: 'ShorelinesDisplay', cursive; }
.fallback-line.line-font-shorelinesscriptbold { font-family: 'ShorelinesScriptBold', cursive; }
.fallback-line.line-font-darlingharbourbrush { font-family: 'DarlingHarbourBrush', cursive; }
.fallback-line.line-font-kgwrittenonhishands { font-family: 'KGWrittenOnHisHands', cursive; }
.fallback-line.line-font-honeycharm { font-family: 'HoneyCharm', cursive; }
.fallback-line.line-font-serif { font-family: Georgia, 'Times New Roman', serif; }
.fallback-line.line-font-sans { font-family: Arial, Helvetica, sans-serif; }
.fallback-line.line-font-script { font-family: 'Brush Script MT', cursive; }
.fallback-line.line-font-mono { font-family: 'Courier New', monospace; }

/* Cover Preview Disclaimer */
.cover-preview-disclaimer {
    font-size: 11px;
    color: #666;
    text-align: center;
    margin: 10px 0 0 0;
    padding: 0 10px;
    line-height: 1.4;
}

.cover-preview-disclaimer em {
    font-style: italic;
}

/* Review Step Cover Preview */
.review-cover-preview-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.review-cover-preview-section h4 {
    margin-bottom: 15px;
    font-size: 16px;
}

.review-cover-preview-wrapper {
    max-width: 350px;
    margin: 0 auto;
}

.review-cover-preview-image {
    position: relative;
    width: 100%;
    background: #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    min-height: 200px;
}

.review-cover-preview-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

.review-cover-preview-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #999;
    font-style: italic;
}

.review-cover-preview-image img[src]:not([src=""]) + .review-cover-preview-placeholder {
    display: none;
}

.review-cover-preview-text {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px;
    pointer-events: none;
    text-align: center;
    width: 80%;
    left: 10%;
}

/* Review fallback preview */
.review-cover-preview-fallback {
    width: 100%;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 30px 20px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.review-cover-preview-fallback.color-black .fallback-line { color: #000000; }
.review-cover-preview-fallback.color-white .fallback-line { color: #666666; }
.review-cover-preview-fallback.color-gold .fallback-line { color: #b8860b; }
.review-cover-preview-fallback.color-silver .fallback-line { color: #708090; }

/* View Full Size Link */
.cover-preview-fullsize-link {
    text-align: center;
    margin-top: 8px;
    font-size: 13px;
}

.cover-preview-fullsize-link a {
    color: #2271b1;
    text-decoration: none;
    cursor: pointer;
}

.cover-preview-fullsize-link a:hover {
    text-decoration: underline;
}

/* Fullscreen Preview Modal */
.cover-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cover-preview-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
}

.cover-preview-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cover-preview-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 36px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    z-index: 10;
}

.cover-preview-modal-close:hover {
    color: #ccc;
}

.cover-preview-modal-image-container {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
}

.cover-preview-modal-image-container img {
    max-width: 100%;
    max-height: 85vh;
    width: auto;
    height: auto;
    display: block;
    border-radius: 4px;
}

.cover-preview-modal-text {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px;
    pointer-events: none;
    text-align: center;
    width: 80%;
    left: 10%;
}

/* Addon Image Lightbox Modal */
.addon-image-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.addon-image-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    cursor: pointer;
}

.addon-image-modal-content {
    position: relative;
    z-index: 1;
    max-width: 90vw;
    max-height: 90vh;
}

.addon-image-modal-content img {
    max-width: 90vw;
    max-height: 85vh;
    width: auto;
    height: auto;
    display: block;
    border-radius: 4px;
    box-shadow: 0 4px 30px rgba(0,0,0,0.5);
}

.addon-image-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255,255,255,0.9);
    color: #333;
    font-size: 24px;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.addon-image-modal-close:hover {
    background: #fff;
    transform: scale(1.1);
}

.cover-preview-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #999;
    font-style: italic;
}

.cover-preview-image img[src]:not([src=""]) + .cover-preview-placeholder {
    display: none;
}

.cover-preview-text {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px;
    pointer-events: none;
    text-align: center;
    width: 80%;
    left: 10%;
}

.preview-line {
    display: block;
    font-size: 14px;
    line-height: 1.3;
    word-break: break-word;
}

/* Text position classes */
.cover-preview-text.pos-top-left { top: 10%; left: 5%; align-items: flex-start; text-align: left; }
.cover-preview-text.pos-top-center { top: 10%; left: 10%; }
.cover-preview-text.pos-top-right { top: 10%; right: 5%; left: auto; align-items: flex-end; text-align: right; }
.cover-preview-text.pos-center { top: 50%; transform: translateY(-50%); }
.cover-preview-text.pos-bottom-left { bottom: 10%; top: auto; left: 5%; align-items: flex-start; text-align: left; }
.cover-preview-text.pos-bottom-center { bottom: 10%; top: auto; }
.cover-preview-text.pos-bottom-right { bottom: 10%; top: auto; right: 5%; left: auto; align-items: flex-end; text-align: right; }

/* Note: option1 and other "option" positions are handled via SVG overlay in JavaScript
   See customizer.js svgPositionConfigs for configuration */

/* Font classes */
.cover-preview-text.font-serif .preview-line { font-family: Georgia, 'Times New Roman', serif; }
.cover-preview-text.font-sans .preview-line { font-family: Arial, Helvetica, sans-serif; }
.cover-preview-text.font-script .preview-line { font-family: 'Brush Script MT', cursive; font-size: 18px; }
.cover-preview-text.font-mono .preview-line { font-family: 'Courier New', monospace; }

/* Color classes - no shadows */
.cover-preview-text.color-black .preview-line { color: #000; }
.cover-preview-text.color-white .preview-line { color: #fff; }
.cover-preview-text.color-gold .preview-line { color: #d4af37; }
.cover-preview-text.color-silver .preview-line { color: #c0c0c0; }

.cover-text-inputs-section {
    padding: 20px;
    background: #f9f9f9;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
}

.cover-text-inputs-section .text-lines-input {
    margin-bottom: 20px;
}

.cover-text-inputs-section .select-field {
    display: block;
    margin-bottom: 15px;
}

.cover-text-inputs-section .select-field span {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #1e1e1e;
}

.cover-text-inputs-section select {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.cover-text-inputs-section select:focus {
    outline: none;
    border-color: #2271b1;
}

/* ===============================================
   Summary Pricing Display (v2.6.1)
   =============================================== */

.customization-summary {
    background: #f9f9f9;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    padding: 25px;
    margin-top: 30px;
}

.customization-summary h4 {
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #e5e5e5;
    font-size: 18px;
    color: #1e1e1e;
}

.summary-items {
    margin-bottom: 20px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item strong {
    color: #333;
    min-width: 120px;
}

.summary-base-price {
    background: #f0f6fc;
    margin: -10px -15px 10px -15px;
    padding: 15px !important;
    border-radius: 6px;
    border-bottom: none !important;
}

.price-base {
    font-weight: 600;
    color: #1e1e1e;
    font-size: 16px;
}

.price-add {
    color: #00a32a;
    font-weight: 600;
    white-space: nowrap;
}

.summary-item ul {
    margin: 5px 0 0 0;
    padding: 0;
    list-style: none;
    width: 100%;
}

.summary-item ul li {
    display: flex;
    justify-content: space-between;
    padding: 5px 0 5px 15px;
    font-size: 14px;
}

.total-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0 0 0;
    margin-top: 15px;
    border-top: 3px solid #2271b1;
    font-size: 20px;
}

.total-price strong {
    color: #1e1e1e;
}

#total-price-display {
    font-size: 24px;
    font-weight: 700;
    color: #2271b1;
}

/* ===============================================
   Per-Line Font Selection (v2.7.7)
   =============================================== */

.text-line-field-group {
    margin-bottom: 15px;
    padding: 12px;
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
}

.text-line-field-group .text-line-field {
    display: block;
    margin-bottom: 0;
}

.text-line-field-group .line-label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #1e1e1e;
}

.text-line-field-group .input-with-count {
    display: flex;
    align-items: center;
    gap: 10px;
}

.text-line-field-group .input-with-count input[type="text"] {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.text-line-field-group .input-with-count input[type="text"]:focus {
    outline: none;
    border-color: #2271b1;
}

.text-line-field-group .char-count {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
}

.font-select-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e5e5e5;
}

.font-select-label {
    font-weight: 600;
    font-size: 13px;
    color: #1e1e1e;
    white-space: nowrap;
}

.line-font-select {
    flex: 1;
    padding: 10px 36px 10px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 12px center;
    background-size: 12px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    color: #333;
    min-width: 150px;
}

.line-font-select:hover {
    border-color: #999;
}

.line-font-select:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.15);
}

/* Per-line font classes for preview */
.preview-line.line-font-champagne-limousines { font-family: 'Champagne-Limousines', sans-serif; }
.preview-line.line-font-king-basil { font-family: 'King-Basil', cursive; }
.preview-line.line-font-cakepop { font-family: 'Cakepop', cursive; }
.preview-line.line-font-supermario256 { font-family: 'SuperMario256', fantasy; }
.preview-line.line-font-waltograph { font-family: 'Waltograph', fantasy; }
.preview-line.line-font-farmhouse { font-family: 'Farmhouse', serif; }
.preview-line.line-font-essentialsans { font-family: 'EssentialSans', sans-serif; }
.preview-line.line-font-aglazylevel { font-family: 'AGLazyLevel', sans-serif; }
.preview-line.line-font-kgthefighter { font-family: 'KGTheFighter', sans-serif; }
.preview-line.line-font-pbbeantheredunnthat { font-family: 'PBBeanThereDunnThat', cursive; }
.preview-line.line-font-pbcoffeebreak { font-family: 'PBCoffeeBreak', cursive; }
.preview-line.line-font-shorelinesdisplay { font-family: 'ShorelinesDisplay', cursive; }
.preview-line.line-font-shorelinesscriptbold { font-family: 'ShorelinesScriptBold', cursive; }
.preview-line.line-font-darlingharbourbrush { font-family: 'DarlingHarbourBrush', cursive; }
.preview-line.line-font-kgwrittenonhishands { font-family: 'KGWrittenOnHisHands', cursive; }
.preview-line.line-font-honeycharm { font-family: 'HoneyCharm', cursive; }

.text-line-field-group.conditional-line {
    background: #f0f6fc;
    border-color: #74c0fc;
}

/* ===============================================
   WooCommerce Product Add-Ons Integration (v2.7.9)
   =============================================== */

.wc-product-addons-section {
    margin-bottom: 25px;
}

.wc-addon-group {
    margin-bottom: 20px;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
}

.wc-addon-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1e1e1e;
}

.wc-addon-title .required {
    color: #dc3545;
}

.wc-addon-description {
    margin: 0 0 12px 0;
    font-size: 13px;
    color: #666;
}

.wc-addon-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wc-addon-option {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: #fff;
    border: 2px solid #e5e5e5;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wc-addon-option:hover {
    border-color: #2271b1;
    background: #f0f6fc;
}

.wc-addon-option input[type="checkbox"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
}

.wc-addon-option .addon-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
}

.wc-addon-option .addon-content strong {
    font-weight: 500;
}

.wc-addon-option .addon-price {
    font-weight: 600;
    color: #2271b1;
}

.wc-addon-option.selected,
.wc-addon-option:has(input:checked) {
    border-color: #2271b1;
    background: #f0f6fc;
}

.category-addons-title {
    margin: 25px 0 15px 0;
    padding-top: 20px;
    border-top: 1px solid #e5e5e5;
    font-size: 16px;
    font-weight: 600;
    color: #1e1e1e;
}

/* ===============================================
   WC Product Add-Ons per Addon Product (v2.8.2)
   =============================================== */

.addon-item.has-wc-options {
    flex-wrap: wrap;
}

.addon-item .addon-wc-options {
    width: 100%;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #ddd;
}

.wc-addon-group-inline {
    margin-bottom: 10px;
}

.wc-addon-group-inline:last-child {
    margin-bottom: 0;
}

.wc-addon-label {
    display: block;
    font-weight: 600;
    font-size: 12px;
    margin-bottom: 6px;
    color: #666;
}

.wc-addon-checkboxes {
    display: grid;
    grid-template-columns: repeat(3, auto);
    gap: 8px;
    justify-content: start;
}

.wc-inline-option {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.wc-inline-option:hover {
    border-color: #2271b1;
    background: #f0f6fc;
}

.wc-inline-option input[type="checkbox"] {
    margin: 0;
    width: 14px;
    height: 14px;
}

.wc-opt-price {
    color: #2271b1;
    font-size: 11px;
    font-weight: 500;
}

.wc-addon-select {
    width: 100%;
    max-width: 250px;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    background: #fff;
}

.wc-addon-select:focus {
    outline: none;
    border-color: #2271b1;
}

/* WC addon text field styles */
.wc-addon-text-field,
.wc-addon-textarea-field {
    width: 100%;
    margin-top: 4px;
}

.wc-addon-text-input {
    width: 100%;
    max-width: 300px;
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: #fff !important;
    color: #333;
    transition: border-color 0.2s;
}

.wc-addon-textarea-input {
    width: 100%;
    max-width: 300px;
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: #fff !important;
    color: #333;
    resize: vertical;
    min-height: 60px;
    transition: border-color 0.2s;
}

.wc-addon-text-input:hover,
.wc-addon-textarea-input:hover {
    border-color: #999;
}

.wc-addon-text-input:focus,
.wc-addon-textarea-input:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.15);
}

.wc-addon-char-count {
    display: block;
    font-size: 11px;
    color: #666;
    text-align: right;
    margin-top: 4px;
}

.wc-addon-char-count .current {
    font-weight: 600;
}

.wc-addon-char-count.near-limit {
    color: #d63638;
}

.wc-addon-char-count.near-limit .current {
    color: #d63638;
}

.wc-text-price {
    display: inline-block;
    margin-left: 8px;
    font-size: 11px;
    color: #666;
}

.wc-addon-label .required {
    color: #d63638;
    font-weight: bold;
}

/* Summary WC addon sub-list styling (v2.8.10) */
.addons-summary-list {
    margin: 5px 0 0 0;
    padding-left: 15px;
    list-style: none;
    width: 100%;
    box-sizing: border-box;
}

.addon-summary-item {
    margin-bottom: 8px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.wc-addon-sub-list {
    margin: 4px 0 0 0;
    padding-left: 10px;
    list-style: none;
}

.wc-addon-sub-list li {
    font-size: 13px;
    color: #666;
    margin-bottom: 2px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.wc-addon-sub-list .price-sub {
    color: #2271b1;
    font-size: 12px;
}

/* Summary item layout fix for add-ons */
.summary-item.summary-addons {
    flex-direction: column;
    align-items: flex-start;
}

.summary-item.summary-addons > strong {
    margin-bottom: 5px;
}

/* ===============================================
   Mobile Responsive Styles (v2.8.9)
   =============================================== */

/* Hide mobile nav buttons on desktop */
.mobile-nav-buttons {
    display: none;
}

/* Tablet and below - Fixed bottom navigation bar */
@media (max-width: 768px) {
    #product-customizer-wizard {
        padding: 20px 15px;
        padding-bottom: 100px; /* Space for fixed bottom bar */
        margin: 15px 0;
    }
    
    /* Hide original navigation buttons on mobile */
    .wizard-navigation {
        display: none;
    }
    
    /* Fixed bottom navigation container */
    .wizard-progress {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 999;
        background: #fff;
        border-top: 1px solid #e0e0e0;
        box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
        margin: 0;
        padding: 0;
        flex-direction: row;
        flex-wrap: wrap;
        max-height: 15vh;
    }
    
    .wizard-progress::before {
        display: none; /* Hide connector line */
    }
    
    /* Progress steps - horizontal row */
    .progress-step {
        flex: 1;
        min-width: auto;
        padding: 6px 2px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        background: transparent;
        border: none;
        text-align: center;
        cursor: pointer;
    }
    
    .progress-step::after {
        display: none;
    }
    
    .progress-step .step-label {
        font-size: 9px;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        max-width: 100%;
        line-height: 1.1;
        word-wrap: break-word;
        hyphens: auto;
    }
    
    .progress-step .step-number {
        width: 24px;
        height: 24px;
        font-size: 11px;
        margin: 0;
    }
    
    .progress-step.active {
        background: #f0f6fc;
        border-radius: 4px;
    }
    
    .progress-step.completed .step-number {
        background: #00a32a;
        border-color: #00a32a;
        color: #fff;
    }
    
    /* Mobile nav buttons - inline with progress */
    .mobile-nav-buttons {
        display: flex;
        gap: 6px;
        padding: 6px 8px;
        background: #f5f5f5;
        border-top: 1px solid #eee;
        width: 100%;
        order: 2;
    }
    
    .mobile-nav-buttons .mobile-prev,
    .mobile-nav-buttons .mobile-next,
    .mobile-nav-buttons .mobile-complete {
        flex: 1;
        padding: 8px 10px;
        border: none;
        border-radius: 4px;
        font-size: 12px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s;
    }
    
    .mobile-nav-buttons .mobile-prev {
        background: #e8e8e8;
        color: #333;
        flex: 0.8;
    }
    
    .mobile-nav-buttons .mobile-prev:disabled {
        opacity: 0.4;
        cursor: not-allowed;
    }
    
    .mobile-nav-buttons .mobile-next,
    .mobile-nav-buttons .mobile-complete {
        background: #2271b1;
        color: #fff;
        flex: 1.2;
    }
    
    .mobile-nav-buttons .mobile-complete {
        background: #00a32a;
    }
    
    /* Wizard step content */
    .wizard-step h3 {
        font-size: 20px;
    }
    
    .step-description {
        font-size: 14px;
    }
    
    /* Option cards - 2 columns on tablet */
    .options-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .option-card {
        padding: 15px;
    }
    
    /* Addon cards */
    .addon-category-products .addon-options {
        max-width: 100%;
    }
    
    .addon-category-products .addon-item {
        max-width: 100%;
    }
    
    /* WC addon options - 2 columns */
    .wc-addon-checkboxes {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Cover grid */
    .cover-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

/* Phone screens */
@media (max-width: 480px) {
    #product-customizer-wizard {
        padding: 15px 12px;
        padding-bottom: 95px;
        margin: 10px 0;
        border-radius: 8px;
    }
    
    .wizard-progress {
        max-height: 15vh;
    }
    
    .progress-step {
        padding: 4px 2px;
    }
    
    .progress-step .step-label {
        font-size: 7px;
    }
    
    .progress-step .step-number {
        width: 22px;
        height: 22px;
        font-size: 10px;
    }
    
    .mobile-nav-buttons {
        padding: 5px 6px;
        gap: 5px;
    }
    
    .mobile-nav-buttons .mobile-prev,
    .mobile-nav-buttons .mobile-next,
    .mobile-nav-buttons .mobile-complete {
        padding: 7px 8px;
        font-size: 11px;
    }
    
    /* Wizard content */
    .wizard-step h3 {
        font-size: 18px;
        margin-bottom: 10px;
    }
    
    .step-description {
        font-size: 13px;
        margin-bottom: 15px;
    }
    
    /* Option cards - single column */
    .options-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .option-card {
        padding: 12px;
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }
    
    .option-card img {
        width: 60px;
        height: 60px;
        margin-bottom: 0;
    }
    
    .option-card .option-details {
        flex: 1;
        text-align: left;
    }
    
    /* Addon category accordion */
    .addon-category-header {
        padding: 12px;
        font-size: 14px;
    }
    
    .addon-category-products {
        padding: 10px;
    }
    
    /* Addon items */
    .addon-item {
        padding: 10px;
    }
    
    .addon-thumbnail-wrapper {
        width: 60px;
        height: 60px;
    }
    
    .addon-item .addon-image {
        width: 60px;
        height: 60px;
    }
    
    .addon-item .addon-content {
        flex: 1;
        min-width: 0;
    }
    
    .addon-item .addon-content strong {
        font-size: 13px;
        display: block;
        word-wrap: break-word;
    }
    
    .addon-item .addon-price {
        font-size: 12px;
    }
    
    /* WC addon options - single column on phone */
    .wc-addon-checkboxes {
        grid-template-columns: 1fr;
    }
    
    .wc-inline-option {
        padding: 8px 10px;
        font-size: 13px;
    }
    
    .addon-wc-options {
        margin-top: 10px;
        padding-top: 10px;
    }
    
    .wc-addon-label {
        font-size: 12px;
    }
    
    .wc-addon-select {
        max-width: 100%;
        font-size: 14px;
        padding: 10px;
    }
    
    /* Cover grid - keep 2 columns on phones */
    .cover-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    /* Cover style tabs - fit 2-3 per row on mobile */
    .cover-style-tabs {
        flex-wrap: wrap;
        gap: 6px;
        justify-content: center;
    }
    
    .cover-style-tab {
        flex: 1 1 calc(33.333% - 4px);
        min-width: 0;
        max-width: calc(33.333% - 4px);
        height: 40px;
        font-size: 11px;
        border-radius: 6px;
    }
    
    /* Text personalization */
    .text-line-field-group {
        margin-bottom: 15px;
    }
    
    .cover-text-input {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 10px;
    }
    
    .line-font-select {
        font-size: 16px;
        padding: 10px;
    }
    
    /* Preview */
    .cover-preview-container {
        max-width: 100%;
    }
    
    .cover-preview-image {
        max-height: none;
    }
    
    .cover-preview-image img {
        width: 100%;
        height: auto;
        object-fit: contain;
    }
    
    /* Summary */
    .customization-summary {
        padding: 15px;
        overflow-x: hidden;
    }
    
    .summary-item {
        font-size: 14px;
        padding: 8px 0;
        flex-wrap: wrap;
    }
    
    .summary-item strong {
        min-width: auto;
        width: 100%;
        margin-bottom: 5px;
    }
    
    .addons-summary-list {
        padding-left: 10px;
        width: 100%;
    }
    
    .addon-summary-item {
        font-size: 13px;
    }
    
    .wc-addon-sub-list {
        padding-left: 8px;
    }
    
    .wc-addon-sub-list li {
        font-size: 12px;
    }
    
    .summary-items ul {
        padding-left: 15px;
    }
    
    /* Total price */
    .total-price-container {
        padding: 12px 15px;
        font-size: 16px;
    }
    
    /* Error messages */
    .customizer-message {
        padding: 12px 15px;
        font-size: 14px;
    }
}

/* Very small phones */
@media (max-width: 360px) {
    #product-customizer-wizard {
        padding: 12px 10px;
        padding-bottom: 90px;
    }
    
    .progress-step .step-label {
        font-size: 7px;
        line-height: 1;
    }
    
    .progress-step .step-number {
        width: 20px;
        height: 20px;
        font-size: 9px;
    }
    
    .mobile-nav-buttons .mobile-prev,
    .mobile-nav-buttons .mobile-next,
    .mobile-nav-buttons .mobile-complete {
        padding: 6px;
        font-size: 10px;
    }
    
    .wizard-step h3 {
        font-size: 16px;
    }
    
    .option-card img {
        width: 50px;
        height: 50px;
    }
    
    .addon-item .addon-image {
        width: 45px;
        height: 45px;
    }
    
    /* Cover style tabs - 2 per row on very small phones */
    .cover-style-tab {
        width: calc(50% - 4px);
        min-width: 70px;
        max-width: none;
        height: 36px;
        font-size: 10px;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    /* Larger tap targets */
    .option-card,
    .addon-item,
    .wc-inline-option,
    .cover-style-tab {
        min-height: 44px;
    }
    
    input[type="checkbox"],
    input[type="radio"] {
        width: 20px;
        height: 20px;
    }
    
    /* Remove hover effects that don't work well on touch */
    .option-card:hover,
    .addon-item:hover,
    .wc-inline-option:hover {
        transform: none;
    }
}

/* ===============================================
   Out of Stock Styling (v2.8.14)
   =============================================== */

/* Out of stock badge */
.out-of-stock-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #d63638;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    z-index: 5;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Out of stock card styling */
.option-card.out-of-stock,
.addon-item.out-of-stock {
    opacity: 0.6;
    cursor: not-allowed;
    position: relative;
}

.option-card.out-of-stock::after,
.addon-item.out-of-stock::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.3);
    pointer-events: none;
    z-index: 1;
}

.option-card.out-of-stock:hover,
.addon-item.out-of-stock:hover {
    border-color: #ddd;
    transform: none;
    box-shadow: none;
    cursor: not-allowed;
}

.option-card.out-of-stock input,
.addon-item.out-of-stock input {
    pointer-events: none;
}

/* Out of stock text */
.out-of-stock-text {
    color: #d63638;
    font-style: italic;
    font-size: 13px;
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .out-of-stock-badge {
        font-size: 9px;
        padding: 3px 6px;
        top: 5px;
        right: 5px;
    }
}

/* ===============================================
   Phase 1 Fixes (v2.8.45)
   =============================================== */

/* Large screens (>1400px) - Prevent cover style button font overflow */
@media (min-width: 1400px) {
    .cover-style-tab {
        width: auto;
        min-width: 100px;
        max-width: 140px;
        height: auto;
        min-height: 50px;
        font-size: 13px; /* Cap font size to prevent overflow */
        padding: 8px 12px;
        line-height: 1.3;
        white-space: normal;
    }
    
    .cover-style-tabs {
        gap: 12px;
    }
}

/* Very large screens - still keep constrained */
@media (min-width: 1600px) {
    .cover-style-tab {
        min-width: 110px;
        max-width: 150px;
        font-size: 13px; /* Keep capped */
    }
}

/* Note: Phone/tablet styles already handled by existing 768px media query above */

/* ===============================================
   Cart Edit Mode (v2.8.52)
   =============================================== */

.customizer-edit-banner {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 12px 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: 500;
    color: #856404;
}

.customizer-edit-banner span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.customizer-edit-banner .cancel-edit {
    color: #856404;
    text-decoration: underline;
    font-weight: normal;
    font-size: 13px;
}

.customizer-edit-banner .cancel-edit:hover {
    color: #533f03;
}

/* Cart edit link styling */
.customizer-edit-link {
    display: inline-block;
    margin-top: 5px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.customizer-edit-link:hover {
    color: #135e96;
    text-decoration: underline;
}

/* ===============================================
   No Personalization Option (v2.8.52)
   =============================================== */

/* Checkbox container */
.no-personalization-option {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.no-personalization-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 500;
    color: #333;
}

.no-personalization-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #2271b1;
}

.no-personalization-text {
    font-size: 15px;
}

.no-personalization-hint {
    margin: 8px 0 0 30px;
    font-size: 13px;
    color: #666;
    font-style: italic;
}

/* Disabled state for text inputs when no personalization is checked */
.text-line-field-group.no-personalization-disabled,
label.no-personalization-disabled {
    opacity: 0.5;
    pointer-events: none;
}

.text-line-field-group.no-personalization-disabled input,
.text-line-field-group.no-personalization-disabled select {
    background-color: #f0f0f0;
    cursor: not-allowed;
}

/* No Personalization badge on preview */
.no-personalization-badge {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
}

/* No Personalization fallback message */
.no-personalization-preview-message {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    background: #f8f9fa;
    border: 2px dashed #ccc;
    border-radius: 8px;
    color: #666;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    padding: 20px;
}

/* Summary styling for no personalization */
.no-personalization-summary {
    background: #f0f7ff;
    padding: 8px 12px;
    border-radius: 4px;
    margin: 4px 0;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .no-personalization-option {
        padding: 12px;
    }
    
    .no-personalization-label {
        gap: 8px;
    }
    
    .no-personalization-hint {
        margin-left: 28px;
        font-size: 12px;
    }
    
    .no-personalization-badge {
        font-size: 11px;
        padding: 6px 12px;
    }
}

/* ==========================================================================
   SIDE CART Z-INDEX OVERRIDES
   Ensure side cart popouts appear above customizer navigation
   ========================================================================== */

/* Elementor cart widget / drawer */
.elementor-menu-cart__main,
.elementor-menu-cart__container,
.elementor-menu-cart__wrapper,
.elementor-menu-cart,
.elementor-widget-woocommerce-menu-cart {
    z-index: 10000 !important;
}

/* Hide progress bar when sidecart is open - handled by JS observer */

/* Common side cart / mini cart selectors */
.xoo-wsc-container,
.xoo-wsc-modal,
.cart-drawer,
.side-cart,
.mini-cart-panel,
.cart-sidebar,
.offcanvas-cart {
    z-index: 10000 !important;
}

/* Side cart overlay/backdrop */
.xoo-wsc-overlay,
.elementor-menu-cart__overlay,
.cart-overlay {
    z-index: 9999 !important;
}
