/* Karma Activator Frontend Styles */

/* Safari-specific fixes */
@supports (-webkit-appearance: none) {
    /* Safari only */
    body {
        -webkit-text-size-adjust: 100% !important;
        text-size-adjust: 100% !important;
    }
}

#ka2-shop,
.karma-shop-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    overflow-x: hidden;
    position: relative;
}

/* Header */
.karma-shop-header {
    text-align: center;
    margin-bottom: 40px;
}

.karma-shop-header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 700;
}

.shop-subtitle {
    font-size: 1.1rem;
    color: #7f8c8d;
    margin: 0;
}

/* Cart Badge - Verde: notifica positiva (elementi nel carrello) */
.karma-cart-badge {
    position: fixed;
    top: 100px;
    right: 20px;
    background: #27ae60;
    color: white;
    padding: 10px 15px;
    border-radius: 25px;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
    z-index: 1000;
    cursor: pointer;
    transition: all 0.3s ease;
}

.karma-cart-badge:hover {
    background: #219a52;
    transform: translateY(-2px);
}

.cart-count {
    background: white;
    color: #27ae60;
    border-radius: 50%;
    padding: 2px 8px;
    font-weight: bold;
    margin-right: 8px;
}

/* Products Grid */
.karma-products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 50px;
    padding-top: 50px;
    overflow: visible;
}

/* Tablet and up: 2 columns */
@media (min-width: 768px) {
    .karma-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.karma-product-card {
    background: white;
    border: 2px solid #ecf0f1;
    border-radius: 12px;
    padding: 30px;
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
    align-self: start;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.karma-product-card:hover {
    border-color: #e5a000;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(229, 160, 0, 0.15);
}

/* Popular Badge - Centrato sopra la card */
.popular-badge {
    position: absolute;
    top: -22px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    pointer-events: none;
}

.popular-badge img {
    width: 120px;
    height: auto;
    max-width: 120px;
    display: block;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
}

/* Offer Badge - A sinistra della card */
.offer-badge {
    position: absolute;
    left: -18px;
    top: 65px;
    transform: translateY(-50%);
    z-index: 10;
    pointer-events: auto;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.offer-badge:hover {
    transform: translateY(-50%) scale(1.05);
}

.offer-badge img {
    width: 90px;
    height: auto;
    max-width: 90px;
    display: block;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
}

.product-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    position: relative;
}

.product-icon {
    margin-right: 15px;
}

.product-icon .dashicons {
    font-size: 32px;
    color: #e5a000;
}

.product-name {
    font-size: 1.5rem;
    color: #2c3e50;
    margin: 0;
    font-weight: 600;
    flex: 1;
    text-align: center;
}

/* Product Toggle Button */
.product-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
    color: #e5a000;
    font-size: 20px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-toggle:hover {
    background: rgba(229, 160, 0, 0.1);
    transform: scale(1.1);
}

.product-toggle .dashicons {
    transition: transform 0.3s ease;
    transform: rotate(0deg);
    display: inline-block;
}

.product-toggle.expanded .dashicons {
    transform: rotate(180deg);
}

/* Product Collapsible Content */
.product-collapsible {
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    max-height: 0;
    opacity: 0;
}

/* Expanded state will be handled by JavaScript inline styles */

.product-description {
    margin-bottom: 20px;
}

.product-description p {
    color: #353535;
    line-height: 1.6;
    margin: 0;
}

.product-full-description {
    margin-bottom: 20px;
}

.product-full-description p {
    color: #353535;
    line-height: 1.4;
    margin: 0;
      margin-bottom: 0px;
    font-size: 14px !important;
  }

/* Product Images */
.product-images {
    margin: 10px 0;
}

/* Slideshow Container */
.images-slideshow {
    position: relative;
    width: 100%;
    padding: 0 20px;
    margin: 0 auto;
}

.slideshow-container {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    margin-left: -20px;
    box-sizing: border-box;
}

.slide-item {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    display: none;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.slide-item.active {
    opacity: 1;
    display: flex;
    z-index: 2;
    animation: slideIn 0.5s ease-in-out;
}

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

.slide-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: pointer;
}

/* Slideshow Dots Navigation */
.slideshow-dots {
    text-align: center;
    padding: 10px 0 5px 0;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.slideshow-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    display: inline-block;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.slideshow-dots .dot:hover {
    background: #bbb;
    transform: scale(1.2);
}

.slideshow-dots .dot.active {
    background: #e5a000;
    border-color: #fff;
    box-shadow: 0 0 0 2px #e5a000;
    transform: scale(1.3);
}

/* Image Modal Lightbox */
.image-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.image-modal-content {
    position: relative;
    max-width: 95%;
    max-height: 95%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    color: white;
    font-size: 40px;
    cursor: pointer;
    background: transparent;
    border: none;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
    font-weight: 300;
    line-height: 1;
}

.image-modal-close:hover {
    transform: scale(1.2);
}

.image-modal-content img {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.image-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.modal-prev,
.modal-next {
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 24px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    pointer-events: auto;
}

.modal-prev {
    margin-left: 20px;
}

.modal-next {
    margin-right: 20px;
}

.modal-prev:hover,
.modal-next:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
}

/* Order error modal (checkout submit failure) */
.ka2-order-error-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999998;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
    padding: 20px;
    box-sizing: border-box;
}

.ka2-order-error-overlay.show {
    display: flex;
    opacity: 1;
}

.ka2-order-error-box {
    position: relative;
    background: #fff;
    border-radius: 12px;
    max-width: 480px;
    width: 100%;
    padding: 28px 24px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.ka2-order-error-close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 28px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    transition: color 0.2s ease;
}

.ka2-order-error-close:hover {
    color: #333;
}

.ka2-order-error-text {
    margin: 0 0 16px;
    font-size: 1.05rem;
    line-height: 1.5;
    color: #333;
}

.ka2-order-error-hint {
    margin: 0 0 20px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #666;
}

.ka2-order-error-btn {
    display: inline-block;
    padding: 12px 20px;
    background: #27ae60;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.2s ease;
}

.ka2-order-error-btn:hover {
    background: #219a52;
    color: #fff;
}

/* Order success modal */
.ka2-order-success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999998;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
    padding: 20px;
    box-sizing: border-box;
}

.ka2-order-success-overlay.show {
    display: flex;
    opacity: 1;
}

.ka2-order-success-box {
    position: relative;
    background: #fff;
    border-radius: 12px;
    max-width: 440px;
    width: 100%;
    padding: 32px 24px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    text-align: center;
}

.ka2-order-success-close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 28px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    transition: color 0.2s ease;
}

.ka2-order-success-close:hover {
    color: #333;
}

.ka2-order-success-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    background: #28a745;
    color: #fff;
    font-size: 28px;
    font-weight: bold;
    line-height: 56px;
    border-radius: 50%;
}

.ka2-order-success-title {
    margin: 0 0 8px;
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
}

.ka2-order-success-text {
    margin: 0 0 24px;
    font-size: 1rem;
    line-height: 1.5;
    color: #555;
}

.ka2-order-success-btn {
    display: inline-block;
    padding: 12px 28px;
    background: #28a745;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.ka2-order-success-btn:hover {
    background: #218838;
    color: #fff;
}

.ka2-paypal-redirect-same-window {
    margin-top: 12px;
    font-size: 0.9rem;
}

.ka2-paypal-same-window-link {
    color: #667eea;
    text-decoration: underline;
}

.ka2-paypal-same-window-link:hover {
    color: #764ba2;
}

/* Responsive modal */
@media (max-width: 768px) {
    .image-modal-close {
        top: -35px;
        font-size: 24px;
        width: 35px;
        height: 35px;
    }
    
    .modal-prev,
    .modal-next {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .modal-prev {
        margin-left: 10px;
    }
    
    .modal-next {
        margin-right: 10px;
    }
}

.product-features {
    margin-bottom: 25px;
}

.product-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
}

.product-features li {
    padding: 4px 0;
    color: #34495e;
    position: relative;
    padding-left: 20px;
    font-size: 0.9rem;
    line-height: 1.3;
}

.product-features li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #27ae60;
    font-weight: bold;
    font-size: 0.85rem;
}

/* Responsive: single column on mobile */
@media (max-width: 767px) {
    .product-features ul {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .pricing-column .price-amount {
        font-size: 1.5rem;
    }
    
    .countdown-timer {
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .countdown-item {
        min-width: 55px;
        padding: 6px 10px;
    }
    
    .countdown-number {
        font-size: 1.1rem;
    }
    
    .countdown-label {
        font-size: 0.7rem;
    }
    
    /* Badge adjustments for mobile - restore original position */
    .popular-badge {
        top: -15px !important;
        left: 50%;
        transform: translateX(-50%);
        z-index: 9999 !important;
        position: absolute !important;
    }
    
    .popular-badge img {
        width: 90px;
        max-width: 90px;
    }
    
    .offer-badge {
        left: 10px;
        top: 10px;
        transform: none;
    }
    
    .offer-badge img {
        width: 70px;
        max-width: 70px;
    }
    
    /* Mobile: Reduced font sizes for product cards */
    .karma-product-card .product-name {
        font-size: 1.2rem !important;
    }
    
    .karma-product-card .product-description p,
    .karma-product-card .product-description {
        font-size: 0.85rem !important;
        line-height: 1.5 !important;
    }
    
    .karma-product-card .product-full-description p,
    .karma-product-card .product-full-description {
        font-size: 0.8rem !important;
        line-height: 1.4 !important;
    }
    
    .karma-product-card .product-features li {
        font-size: 0.8rem !important;
        line-height: 1.3 !important;
    }
    
    .karma-product-card .product-features li:before {
        font-size: 0.75rem !important;
    }
    
    .pricing-column .price-amount {
        font-size: 1.2rem !important;
    }
    
    /* Mobile discount pricing - reduced */
    .pricing-column .price-amount.price-discounted {
        font-size: 1.3rem !important;
    }
    
    .pricing-column .price-amount.price-original {
        font-size: 0.9rem !important;
    }
    
    .pricing-column .price-period {
        font-size: 0.75rem !important;
    }
    
    .promo-text {
        font-size: 0.85rem !important;
    }
    
    /* Mobile countdown - remove borders/background and reduce spacing */
    .countdown-timer {
        gap: 3px !important;
        padding: 0 5px !important;
    }
    
    .countdown-item {
        border: none !important;
        background: none !important;
        padding: 2px 4px !important;
        margin: 0 !important;
        min-width: 65px !important;
        max-width: 45px !important;
    }
    
    .countdown-number {
        font-size: 1.3rem !important;
    }
    
    .countdown-label {
        font-size: 0.55rem !important;
    }
    
    /* Ensure add-to-cart button is visible on mobile - reduced font */
    .btn-add-to-cart,
    .ka2-btn-add-cart {
        margin-top: 15px !important;
        padding: 10px 20px !important;
        font-size: 0.85rem !important;
        width: 100% !important;
        max-width: 200px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        display: block !important;
    }
}

.product-pricing {
    margin-bottom: 25px;
    text-align: center;
}

.pricing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #e9ecef;
}

.pricing-column {
    text-align: center;
}

.pricing-column .price-amount {
    font-size: 1.7rem;
    font-weight: inherit;
    color: #2c3e50;
    margin-bottom: 5px;
    display: block;
}

.pricing-column .price-period {
    font-size: 0.9rem;
    color: #6c757d;
    display: block;
    font-weight: 500;
}

/* Discount pricing styles */
.price-original {
    font-size: 1.1rem !important;
    text-decoration: line-through;
    color: #6c757d !important;
    margin-bottom: 2px;
}

.price-discounted {
    font-size: 1.7rem !important;
    color: #e74c3c !important;
    font-weight: bold !important;
}

/* Discount promotion styles */
.discount-promotion {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e9ecef;
}

.promo-text {
    font-size: 1rem;
    color: #e74c3c;
    font-weight: 600;
    margin-bottom: 15px;
    font-style: italic;
}

.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.countdown-item {
    text-align: center;
    background: #f8f9fa;
    border: 2px solid #e74c3c;
    border-radius: 8px;
    padding: 10px 15px;
    min-width: 70px;
}

.countdown-number {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: #e74c3c;
    line-height: 1;
}

.countdown-label {
    display: block;
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-actions {
    text-align: center;
}

.btn-add-to-cart,
.ka2-btn-add-cart {
    background: #e5a000;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-add-to-cart:hover,
.ka2-btn-add-cart:hover {
    background: #cc8f00;
    transform: translateY(-2px);
}

.btn-add-to-cart:disabled,
.ka2-btn-add-cart:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
}

/* Card disabilitata dal prodotto sito web */
.disabled-by-website {
    opacity: 0.6;
    pointer-events: none;
}

.disabled-by-website .product-card-content {
    filter: grayscale(50%);
}

/* Duration Selection */
/* Optional Addons Section (for website products) */
.karma-optional-addons-section {
    background: #fff9e6;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 2px solid #ffc107;
}

.karma-optional-addons-section h3 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 10px;
}

.addons-note {
    text-align: center;
    color: #6c757d;
    margin-bottom: 25px;
    line-height: 1.6;
}

.optional-addons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    max-width: 900px;
    margin: 0 auto 20px auto;
}

.optional-addon-item {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.optional-addon-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.optional-addon-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #667eea;
}

.optional-addon-item input[type="checkbox"]:checked + .addon-info {
    color: #667eea;
}

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

.addon-info strong {
    font-size: 1rem;
    color: #2c3e50;
}

.addon-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #28a745;
}

.addons-summary-box {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.addons-summary-box .summary-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.addons-summary-box strong {
    font-size: 1.2rem;
    color: #667eea;
}

.karma-duration-section {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 2px solid #e9ecef;
}

.karma-duration-section h3 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 10px;
}

.duration-note {
    text-align: center;
    color: #6c757d;
    margin-bottom: 25px;
    font-style: italic;
    padding-bottom: 20px;
    line-height: 1;
}

.duration-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    max-width: 800px;
    margin: 30px auto 30px auto;
}

.duration-option {
    cursor: pointer;
}

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

.duration-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.duration-option input[type="radio"]:checked + .duration-card {
    border-color: #667eea;
    background: #f0f4ff;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.duration-card.duration-recommended {
    border-color: #28a745;
}

.recommended-badge {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    background: #28a745;
    color: white;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: bold;
    white-space: nowrap;
}

.duration-card h4 {
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 1.2rem;
}

.duration-card p {
    color: #6c757d;
    margin: 0 0 10px 0;
}

.duration-card small {
    color: #999;
    font-size: 0.85rem;
}

.duration-price {
    margin-top: 10px;
    text-align: center;
    font-size: 1.8rem;
    font-weight: bold;
    color: #667eea;
}

.duration-price .price-amount {
    font-size: 1.4rem;
    font-weight: bold;
    color: #e5a000;
    display: block;
    margin-bottom: 2px;
}

    .duration-price .price-period {
        font-size: 0.9rem;
        color: #666;
        font-style: italic;
    }

    /* Duration Actions */
    .duration-actions {
        text-align: center;
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid #e0e0e0;
    }

    .btn-add-to-cart-final {
        background: #e5a000;
        color: white;
        border: none;
        padding: 15px 30px;
        border-radius: 8px;
        font-size: 1.1rem;
        font-weight: bold;
        cursor: pointer;
        transition: all 0.3s ease;
        display: inline-flex;
        align-items: center;
        gap: 10px;
        min-width: 150px;
        justify-content: center;
    }

    .btn-add-to-cart-final:hover:not(:disabled) {
        background: #cc8f00;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(229, 160, 0, 0.3);
    }

    .btn-add-to-cart-final:disabled {
        background: #ccc;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
    }

    .btn-add-to-cart-final .dashicons {
        font-size: 18px;
        width: 18px;
        height: 18px;
    }

    .duration-help {
        margin-top: 10px;
        font-size: 0.9rem;
        color: #666;
        font-style: italic;
        text-align: center;
    }

/* Recommended Badge */
.recommended-badge {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    background: #28a745;
    color: white;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: bold;
    white-space: nowrap;
    z-index: 5;
}

.duration-card.duration-recommended {
    border-color: #28a745 !important;
}

.duration-option input[type="radio"]:checked + .duration-card.duration-recommended {
    background: #f0fff4;
}

/* Cart Summary Box */
.cart-summary-box {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    margin: 30px auto;
    max-width: 500px;
}

.cart-summary-box .summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e9ecef;
    font-size: 1rem;
}

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

.cart-summary-box .summary-total {
    border-top: 2px solid #2c3e50;
    padding-top: 15px;
    margin-top: 10px;
    font-size: 1.3rem;
}

.cart-summary-box .summary-total strong {
    color: #667eea;
}

.summary-products-list {
    display: none;
    padding: 10px 0;
    margin: 0;
}

.summary-products-list ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.summary-products-list li {
    padding: 8px 0;
    color: #495057;
    font-size: 0.95rem;
    border-bottom: 1px solid #f8f9fa;
    display: flex;
    align-items: center;
}

.summary-products-list li:last-child {
    border-bottom: none;
}

.summary-products-list li::before {
    content: "✓";
    color: #28a745;
    font-weight: bold;
    margin-right: 8px;
    font-size: 1.1rem;
}

/* Proceed to Checkout Button */
.btn-proceed-checkout {
    display: block;
    width: 100%;
    max-width: 500px;
    margin: 20px auto;
    padding: 18px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-proceed-checkout:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-proceed-checkout:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Checkout Section */
.karma-checkout-section {
    background: #f8f9fa;
    padding: 40px;
    border-radius: 12px;
    border: 2px solid #e9ecef;
}

.checkout-container {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 50px;
    max-width: 1000px;
    margin: 0 auto;
}

.checkout-form h3,
.order-summary h3 {
    color: #000;
    margin-bottom: 25px;
    font-size: 2em;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 8px;
}

.form-group label small {
    color: #6c757d;
    font-weight: 400;
    font-size: 0.85rem;
    font-style: italic;
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 8px;
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.password-strength-bar {
    height: 100%;
    transition: all 0.3s ease;
}

.password-strength.weak .password-strength-bar {
    width: 33%;
    background: #dc3545;
}

.password-strength.medium .password-strength-bar {
    width: 66%;
    background: #ffc107;
}

.password-strength.strong .password-strength-bar {
    width: 100%;
    background: #28a745;
}

.password-strength-text {
    font-size: 0.85rem;
    margin-top: 4px;
    font-weight: 500;
}

.password-strength.weak .password-strength-text {
    color: #dc3545;
}

.password-strength.medium .password-strength-text {
    color: #ffc107;
}

.password-strength.strong .password-strength-text {
    color: #28a745;
}

/* Fiscal Disclaimer */
.fiscal-disclaimer {
    margin-top: 15px;
    padding: 15px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
}

/* Checkbox styles */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-weight: 400;
    line-height: 1.5;
    margin: 0;
    padding: 0;
    margin-top: 10px;
}

.checkbox-label input[type="checkbox"] {
    margin: 0;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    display: inline-block;
    visibility: visible;
    opacity: 1;
    appearance: checkbox;
    -webkit-appearance: checkbox;
    -moz-appearance: checkbox;
}

.checkbox-text {
    color: #2c3e50;
    font-size: 0.9rem;
    flex: 1;
}

.form-group input,
.form-group textarea {
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

/* Placeholder: grigio molto chiaro e nascosto al focus (sembra cella vuota) */
#checkout-form .form-group input::placeholder,
#checkout-form .form-group textarea::placeholder,
#checkout-form input::placeholder,
#checkout-form textarea::placeholder {
    color: #b8b8b8;
    opacity: 1;
}
#checkout-form .form-group input::-webkit-input-placeholder,
#checkout-form .form-group textarea::-webkit-input-placeholder {
    color: #b8b8b8;
}
#checkout-form .form-group input:focus::placeholder,
#checkout-form .form-group textarea:focus::placeholder,
#checkout-form input:focus::placeholder,
#checkout-form textarea:focus::placeholder {
    color: transparent;
    opacity: 0;
}
#checkout-form .form-group input:focus::-webkit-input-placeholder,
#checkout-form .form-group textarea:focus::-webkit-input-placeholder {
    color: transparent;
    opacity: 0;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #e5a000;
    -webkit-box-shadow: 0 0 4px 0 #ff7800 !important;
    box-shadow: 0 0 4px 0 #ff7800 !important;
}

/* Campi obbligatori non compilati dopo click su Completa ordine: bordo rosso */
#checkout-form.checkout-validation-shown .form-group input:invalid,
#checkout-form.checkout-validation-shown .form-group select:invalid,
#checkout-form.checkout-validation-shown .form-group textarea:invalid {
    border-color: #e74c3c;
    -webkit-box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.25);
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.25);
}

#checkout-form.checkout-validation-shown .form-group input:invalid:focus,
#checkout-form.checkout-validation-shown .form-group select:invalid:focus,
#checkout-form.checkout-validation-shown .form-group textarea:invalid:focus {
    border-color: #e74c3c;
    -webkit-box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.35);
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.35);
}

input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):focus, textarea:focus, .fancy-select .trigger.open {
    -webkit-box-shadow: 0 0 4px 0 #ff7800 !important;
    box-shadow: 0 0 4px 0 #ff7800 !important;
}

/* Messages Container */
#messages-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 400px;
}

#messages-container .message {
    margin-bottom: 10px;
    padding: 15px 20px;
    border-radius: 8px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideInUp 0.3s ease-out;
}

#messages-container .message.success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

#messages-container .message.error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

#messages-container .message.info {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Purchase Info Section */
.purchase-info {
    margin-top: 30px;
    padding: 15px 0;
    background: #f8f9fa;
    border-radius: 8px;
    border: 0px solid #e9ecef;
}

.purchase-info h4 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.2rem;
    text-align: center;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.info-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: #e5a000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-icon .dashicons {
    color: white;
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.info-content h5 {
    color: #2c3e50;
    margin: 0 0 8px 0;
    font-size: 1rem;
    font-weight: 600;
}

.info-content p {
    color: #6c757d;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Order Summary */
.order-summary {
    background: white;
    padding: 30px;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    height: fit-content;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
}

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

.order-item-details {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-item-actions {
    margin-left: 15px;
}

.order-empty {
    padding: 15px 0;
    color: #6c757d;
    text-align: center;
    font-style: italic;
}

/* Coupon Section */
.coupon-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e9ecef;
}

.coupon-section h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1rem;
    font-weight: 600;
}

.coupon-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.coupon-input-group input {
    flex: 1;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.coupon-input-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 4px 0 rgba(102, 126, 234, 0.3);
}

.coupon-input-group button {
    padding: 12px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.coupon-input-group button:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

#coupon-message {
    font-size: 0.9rem;
    padding: 8px 0;
}

#coupon-message.success {
    color: #28a745;
}

#coupon-message.error {
    color: #dc3545;
}

    .btn-remove-item {
        background: #e74c3c;
        color: white;
        border: none;
        padding: 8px;
        border-radius: 6px;
        font-size: 0.85rem;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        min-width: 32px;
    }

.btn-remove-item:hover {
    background: #c0392b;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(231, 76, 60, 0.3);
}

    .btn-remove-item .dashicons {
        font-size: 14px;
        width: 14px;
        height: 14px;
    }

    /* License duration info styling */
    .order-item.license-info {
        background: #f8f9fa;
        border: 1px solid #e9ecef;
        border-radius: 6px;
        margin: 10px 0;
        padding: 12px 15px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .order-item.license-info .order-item-details span:first-child {
        color: #e5a000;
        font-weight: 600;
    }


    .btn-change-duration {
        background: #e5a000;
        color: white;
        border: none;
        padding: 8px 12px;
        border-radius: 6px;
        font-size: 0.85rem;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        gap: 5px;
        min-width: 120px;
        justify-content: center;
    }

    .btn-change-duration:hover {
        background: #cc8f00;
        transform: translateY(-1px);
        box-shadow: 0 2px 4px rgba(229, 160, 0, 0.3);
    }

    .btn-change-duration .dashicons {
        font-size: 14px;
        width: 14px;
        height: 14px;
    }

.order-totals {
    margin: 25px 0;
    padding-top: 20px;
    border-top: 2px solid #e9ecef;
}

.total-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: #2c3e50;
}

.total-line-final {
    font-weight: bold;
    font-size: 1.2rem;
    padding-top: 15px;
    border-top: 2px solid #e9ecef;
    margin-top: 15px;
}

.discount-line {
    color: #27ae60;
}

.checkout-actions {
    text-align: center;
}

.btn-checkout {
    background: #27ae60;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-checkout:hover {
    background: #229954;
    transform: translateY(-2px);
}

.btn-checkout:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
}

/* Payment Methods */
/* Payment Section Wrapper - Full Width */
.payment-section-wrapper {
    margin-top: 40px;
    padding: 40px;
    background: white;
    border-radius: 12px;
    border: 2px solid #e9ecef;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.payment-methods {
    margin-bottom: 30px;
}

.payment-methods h3 {
    color: #000;
    margin-bottom: 25px;
    font-size: 2rem;
    text-align: center;
    font-weight: 700;
}

.payment-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.payment-option {
    cursor: pointer;
}

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

.payment-card {
    background: white;
    border: 3px solid #e9ecef;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    min-height: 150px;
}

.payment-card span:not(.dashicons) {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
}

.payment-card .dashicons {
    font-size: 60px;
    width: 60px;
    height: 60px;
    color: #1e3a8a;
}

.paypal-logo {
    max-width: 250px !important;
    height: auto;
    padding-bottom: 7px;
}

.payment-option input[type="radio"]:checked + .payment-card {
    border-color: #e5a000;
    background: #fff9f0;
    box-shadow: 0 4px 12px rgba(229, 160, 0, 0.2);
    transform: scale(1.02);
}

/* PayPal Disabled State (for lifetime duration) */
.payment-card.disabled-payment {
    position: relative;
}

.payment-card.disabled-payment::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(2px) grayscale(100%);
    -webkit-backdrop-filter: blur(2px) grayscale(100%);
    border-radius: 12px;
    z-index: 1;
    pointer-events: none;
}

.payment-discouraged-badge {
    position: absolute;
    top: 110px;
    left: 50%;
    transform: translateX(-50%);
    background: #dc3545;
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
    white-space: nowrap;
    pointer-events: none;
    transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

/* Badge attenuato quando PayPal viene abilitato per lifetime */
.payment-discouraged-badge.badge-attenuated {
    background: #d1d1d1;
    color: #7a7a7a;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.paypal-enable-section {
    margin-top: 20px;
    padding: 15px 20px;
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 12px;
    text-align: center;
}

.paypal-enable-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: #856404;
}

.paypal-enable-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.paypal-enable-checkbox span {
    flex: 1;
    text-align: left;
}

#paypal-fee-preview {
    font-weight: 700;
    color: #dc3545;
}

.paypal-fee-note {
    text-align: center;
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.paypal-fee-note small {
    font-size: 0.85rem;
    color: #6c757d;
    font-style: italic;
}

/* Submit Order Button */
.btn-submit-order {
    display: block;
    width: 100%;
    max-width: 500px;
    margin: 30px auto;
    padding: 18px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-submit-order .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.btn-submit-order:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-submit-order:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.payment-icon {
    font-size: 1.5rem;
}

.bank-icon {
    color: #1e3a8a !important;
}

.paypal-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    vertical-align: middle;
}

/* Payment Security Info */
.payment-security-info {
    margin-top: 20px;
    padding: 20px 20px 0 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.security-item {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 0px;
    padding: 5px 0;
}

.security-item:last-child {
    margin-bottom: 0;
}

.security-icon {
    color: #28a745;
    font-size: 20px;
    margin-top: 2px;
    flex-shrink: 0;
}

.security-text {
    flex: 1;
    font-size: 0.8rem;
    line-height: 1.5;
    color: #495057;
}

.security-text strong {
    color: #2c3e50;
    font-weight: 600;
}

.payment-logos {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.payment-logo {
    height: 24px;
    width: auto;
    object-fit: contain;
    vertical-align: middle;
}

.payment-logo-text {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
    background: #e9ecef;
    padding: 2px 8px;
    border-radius: 4px;
}

.payment-logos-full {
    width: 100%;
    text-align: center;
    margin-top: 0px;
}

.payment-logo-full {
    width: 100%;
    max-width: 300px;
    height: auto;
    object-fit: contain;
}

/* FAQ Section */
.karma-faq-section {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid #e9ecef;
}

.karma-faq-section h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
}

.faq-category {
    margin-bottom: 30px;
}

.faq-category h3 {
    color: #2c3e50;
    margin-bottom: 20px;
}

.faq-item {
    border: 1px solid #e9ecef;
    border-radius: 6px;
    margin-bottom: 10px;
    overflow: hidden;
}

.faq-question {
    background: #f8f9fa;
    padding: 15px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: #e9ecef;
}

.faq-question h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 1rem;
}

.faq-toggle {
    font-size: 1.5rem;
    color: #e5a000;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 20px;
    max-height: 200px;
}

.faq-answer p {
    margin: 0;
    color: #6c757d;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 767px) {
    /* Safari-specific debugging and fixes */
    .karma-shop-container,
    #ka2-shop {
        padding: 30px 15px 15px 15px !important;
        overflow-x: hidden !important;
        overflow-y: visible !important;
        width: 100% !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
        -webkit-box-sizing: border-box !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        position: relative !important;
        z-index: 0 !important;
        -webkit-text-size-adjust: none !important;
        text-size-adjust: none !important;
    }
    
    
    .karma-shop-header h1 {
        font-size: 2rem;
    }
    
    .karma-products-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
        padding-top: 30px !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: visible !important;
        position: relative !important;
        z-index: 1 !important;
    }
    
    .karma-product-card {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        -webkit-box-sizing: border-box !important;
        padding: 20px 15px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        overflow: visible !important;
        position: relative !important;
        z-index: 1 !important;
        /* Safari-specific text handling */
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        -webkit-hyphens: auto !important;
        hyphens: auto !important;
        /* Force font sizes for Safari */
        -webkit-text-size-adjust: none !important;
        text-size-adjust: none !important;
    }
    
    /* Safari-specific font size overrides - more specific selectors */
    @supports (-webkit-appearance: none) {
        .karma-product-card .product-name {
            font-size: 1.1rem !important;
            -webkit-text-size-adjust: none !important;
            text-size-adjust: none !important;
        }
        
        .karma-product-card .product-description,
        .karma-product-card .product-description p {
            font-size: 0.8rem !important;
            line-height: 1.4 !important;
            -webkit-text-size-adjust: none !important;
            text-size-adjust: none !important;
        }
        
        .karma-product-card .product-full-description,
        .karma-product-card .product-full-description p {
            font-size: 0.75rem !important;
            line-height: 1.3 !important;
            -webkit-text-size-adjust: none !important;
            text-size-adjust: none !important;
        }
        
        .karma-product-card .product-features li {
            font-size: 0.75rem !important;
            -webkit-text-size-adjust: none !important;
            text-size-adjust: none !important;
        }
        
        .karma-product-card .pricing-column .price-amount {
            font-size: 1.1rem !important;
            -webkit-text-size-adjust: none !important;
            text-size-adjust: none !important;
        }
        
        .karma-product-card .pricing-column .price-period {
            font-size: 0.7rem !important;
            -webkit-text-size-adjust: none !important;
            text-size-adjust: none !important;
        }
    }
    
    /* Fix slideshow container on mobile - remove negative margin */
    .karma-product-card .images-slideshow {
        padding: 0 !important;
        width: 100% !important;
    }
    
    .karma-product-card .slideshow-container {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 0 !important;
    }
    
    /* Ensure all child elements respect card boundaries */
    .karma-product-card * {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Fix product header to prevent overflow */
    .karma-product-card .product-header {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    /* Fix product name to prevent overflow - Safari specific */
    .karma-product-card .product-name {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        -webkit-hyphens: auto !important;
        hyphens: auto !important;
        white-space: normal !important;
        box-sizing: border-box !important;
        -webkit-box-sizing: border-box !important;
    }
    
    /* Fix product description - Safari specific */
    .karma-product-card .product-description,
    .karma-product-card .product-description p,
    .karma-product-card .product-full-description,
    .karma-product-card .product-full-description p {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        -webkit-hyphens: auto !important;
        hyphens: auto !important;
        white-space: normal !important;
        padding: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
        -webkit-box-sizing: border-box !important;
    }
    
    /* Fix pricing grid */
    .karma-product-card .pricing-grid {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    /* Fix product actions */
    .karma-product-card .product-actions {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .checkout-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .duration-options {
        grid-template-columns: 1fr;
    }
    
    .payment-options {
        grid-template-columns: 1fr;
    }
    
    .payment-section-wrapper {
        padding: 20px;
    }
    
    .karma-cart-badge {
        position: relative;
        top: auto;
        right: auto;
        display: inline-block;
        margin: 20px auto;
    }
}

/* Outside Italy checkout */
.ka2-outside-italy-notice {
    max-width: 800px;
    margin: 8px auto 22px;
    padding: 16px 18px;
    background: #f7f4ef;
    border: 1px solid #e4d9c8;
    border-radius: 8px;
    text-align: left;
}

.ka2-outside-italy-notice p {
    margin: 0 0 12px;
    color: #3d3d3d;
    line-height: 1.5;
    font-size: 0.95rem;
}

.ka2-outside-italy-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    font-weight: 600;
    cursor: pointer;
    color: #243044;
}

.ka2-outside-italy-check input {
    margin-top: 3px;
}

.ka2-foreign-only {
    display: none;
}

.ka2-foreign-only.is-visible {
    display: block;
}

span.ka2-foreign-only.is-visible {
    display: inline;
}

.ka2-italy-only.is-hidden {
    display: none !important;
}

.ka2-unlimited-license-box {
    display: none;
    margin: 8px 0 22px;
    padding: 16px 18px;
    background: #fff8e8;
    border: 1px solid #e6c98a;
    border-left: 4px solid #d4a017;
    border-radius: 8px;
}

.ka2-unlimited-license-box.is-visible {
    display: block;
}

.ka2-unlimited-license-box p {
    margin: 0 0 12px;
    line-height: 1.5;
    color: #3d3d3d;
}

.ka2-unlimited-license-box label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

.ka2-unlimited-license-warning {
    display: none;
    margin-top: 14px;
    padding: 14px 16px;
    background: #fde8e8;
    border: 1px solid #e07a7a;
    border-left: 6px solid #c0392b;
    border-radius: 6px;
}

.ka2-unlimited-license-warning.is-visible {
    display: block;
}

.ka2-unlimited-license-warning p {
    margin: 0;
    color: #7a1f1f;
    font-weight: 700;
    line-height: 1.5;
}

.ka2-unlimited-license-box input {
    width: 100%;
    max-width: 420px;
}

.ka2-email-hint {
    color: #e74c3c;
}

#foreign-country-field select {
    width: 100%;
    max-width: 420px;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #e5a000;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

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

.btn-submit-order .spin,
.spin {
    display: inline-block;
    animation: spin 1s linear infinite;
}

/* Success/Error Messages */
.message {
    padding: 15px;
    border-radius: 6px;
    margin: 20px 0;
    font-weight: 500;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* ====================
   KA2 V2 Specific Styles
   ==================== */

/* Shop Container V2 */
.ka2-shop-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.ka2-shop-header {
    text-align: center;
    margin: 30px 0;
}

.ka2-shop-header h2 {
    font-size: 32px;
    color: #2c3e50;
    margin-bottom: 10px;
}

.ka2-shop-header p {
    color: #666;
    font-size: 16px;
}

/* Products Grid V2 */
.ka2-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.ka2-product-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    position: relative;
    transition: all 0.3s;
}

.ka2-product-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.2);
}

.ka2-product-card.selected {
    border-color: #28a745;
    background: #f0fff4;
}

.ka2-product-header {
    text-align: center;
    margin-bottom: 15px;
    position: relative;
}

.ka2-product-toggle {
    position: absolute;
    top: 0;
    right: 0;
    background: none;
    border: none;
    font-size: 24px;
    color: #667eea;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.3s;
}

.ka2-product-toggle:hover {
    color: #5568d3;
}

.ka2-product-icon {
    font-size: 48px;
    color: #667eea;
    margin-bottom: 10px;
}

.ka2-product-short-desc {
    color: #555;
    font-size: 14px;
    line-height: 1.6;
    margin: 15px 0;
    text-align: center;
}

.ka2-product-collapsible {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.ka2-product-full-desc {
    margin: 15px 0;
    color: #333;
    line-height: 1.8;
}

.ka2-product-images {
    margin: 20px 0;
}

.ka2-images-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.ka2-product-image img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    cursor: pointer;
    transition: all 0.3s;
}

.ka2-product-image img:hover {
    transform: scale(1.05);
    border-color: #667eea;
}

.ka2-product-features {
    margin: 20px 0;
}

.ka2-product-features h4 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 16px;
}

.ka2-product-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ka2-product-features li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    font-size: 14px;
    color: #555;
}

.ka2-product-features li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

.ka2-product-pricing {
    margin: 20px 0;
}

.ka2-product-pricing h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 16px;
}

.ka2-pricing-grid-inline {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.ka2-pricing-item {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
}

.ka2-pricing-item.ka2-pricing-lifetime {
    border-color: #ffc107;
    background: #fffbf0;
}

.ka2-pricing-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 8px;
}

.ka2-price-original {
    text-decoration: line-through;
    color: #999;
    font-size: 14px;
}

.ka2-price-current {
    font-size: 20px;
    font-weight: 700;
    color: #667eea;
}

.ka2-discount-countdown {
    background: #fff3cd;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    margin: 15px 0;
}

.ka2-promo-text {
    color: #e67e22;
    font-weight: 600;
    margin-bottom: 10px;
}

.ka2-countdown-timer {
    font-size: 14px;
    color: #e67e22;
    font-weight: 600;
}

.ka2-btn-add-cart {
    width: 100%;
    padding: 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
}

.ka2-btn-add-cart:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

.ka2-btn-add-cart.selected {
    background: #28a745;
}

/* Duration Selection Section V2 */
.ka2-duration-section {
    max-width: 900px;
    margin: 50px auto;
    padding: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.ka2-duration-section h3 {
    text-align: center;
    color: #2c3e50;
    font-size: 24px;
    margin-bottom: 10px;
}

.ka2-duration-note {
    text-align: center;
    color: #e67e22;
    margin-bottom: 30px;
    padding: 15px;
    background: #fff3cd;
    border-radius: 8px;
    font-size: 14px;
}

.ka2-duration-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 30px 0;
}

.ka2-duration-option {
    cursor: pointer;
}

.ka2-duration-option input[type="radio"] {
    display: none;
}

.ka2-duration-card {
    padding: 20px;
    border: 3px solid #e0e0e0;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s;
    position: relative;
}

.ka2-duration-option input:checked + .ka2-duration-card {
    border-color: #667eea;
    background: #f0f4ff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.ka2-duration-card.ka2-recommended {
    border-color: #28a745;
}

.ka2-recommended-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #28a745;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
}

.ka2-duration-price {
    font-size: 28px;
    font-weight: 700;
    color: #667eea;
    margin: 15px 0;
}

.ka2-cart-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 30px 0;
    border: 2px solid #e0e0e0;
}

.ka2-summary-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 16px;
}

.ka2-summary-total {
    border-top: 2px solid #ddd;
    margin-top: 10px;
    padding-top: 15px;
    font-size: 20px;
    color: #667eea;
}

.ka2-btn-proceed {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s;
}

.ka2-btn-proceed:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.ka2-duration-help {
    text-align: center;
    color: #666;
    margin-top: 20px;
    font-size: 14px;
}

/* Cart Badge V2 */
.ka2-cart-badge {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #667eea;
    color: white;
    padding: 15px 20px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
}

.ka2-cart-badge:hover {
    background: #5568d3;
    transform: scale(1.05);
}

.ka2-cart-count {
    background: white;
    color: #667eea;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

/* Checkout Modal V2 */
.ka2-checkout-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 10000;
    overflow-y: auto;
    padding: 20px;
}

.ka2-checkout-container {
    max-width: 800px;
    margin: 20px auto;
    background: white;
    border-radius: 12px;
    padding: 30px;
    position: relative;
}

.ka2-btn-close-checkout {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}

.ka2-btn-close-checkout:hover {
    color: #333;
}

.ka2-form-section {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.ka2-form-section h3 {
    margin-top: 0;
    color: #2c3e50;
    font-size: 18px;
    margin-bottom: 15px;
}

.ka2-form-row {
    display: flex;
    gap: 15px;
    margin: 10px 0;
}

.ka2-form-row input, 
.ka2-form-section input, 
.ka2-form-section select {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.ka2-form-row input:focus,
.ka2-form-section input:focus,
.ka2-form-section select:focus {
    border-color: #667eea;
    outline: none;
}

.ka2-checkout-summary {
    background: #f0f4ff;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    margin-bottom: 20px;
}

.ka2-btn-submit-order {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s;
}

.ka2-btn-submit-order:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.ka2-payment-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.ka2-payment-option {
    cursor: pointer;
}

.ka2-payment-option input[type="radio"] {
    display: none;
}

.ka2-payment-card {
    padding: 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s;
}

.ka2-payment-card img {
    max-width: 100px;
    margin-bottom: 10px;
}

.ka2-payment-option input:checked + .ka2-payment-card {
    border-color: #667eea;
    background: #f0f4ff;
}

.ka2-checkbox-label {
    display: block;
    margin: 10px 0;
    cursor: pointer;
    font-size: 14px;
}

.ka2-checkbox-label input {
    margin-right: 8px;
}

.ka2-fiscal-private,
.ka2-fiscal-company {
    margin-top: 15px;
}

.checkout-note {
    margin-top: 20px;
    margin-left: auto;
    margin-right: auto;
    max-width: 700px;
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.1;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 18px 20px;
    text-align: center;
}
