.hhoutdoor-product-addons {
    margin: 20px 0;
}

.hhoutdoor-product-addons .image-wrapper {
    display: block;
    width: 150px !important;
    height: 150px !important;
    overflow: hidden !important;
    position: relative !important;
}

body .hhoutdoor-product-addons .option-image img[srcset],
body .hhoutdoor-product-addons .option-image img[sizes],
body .hhoutdoor-product-addons .addon-product-thumbnail[srcset],
body .hhoutdoor-product-addons .addon-product-thumbnail[sizes],
body .hhoutdoor-product-addons .addon-custom-thumbnail[srcset],
body .hhoutdoor-product-addons .addon-custom-thumbnail[sizes] {
    width: 150px !important;
    height: 150px !important;
}

.hhoutdoor-product-addons .image-wrapper img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.hhoutdoor-product-addons * {
    box-sizing: border-box;
}

body .hhoutdoor-product-addons .option-image a,
body .hhoutdoor-product-addons .option-image .zoom {
    pointer-events: none !important;
    cursor: default !important;
}

.hhoutdoor-product-addons img,
.hhoutdoor-product-addons img.attachment-thumbnail,
.hhoutdoor-product-addons img.attachment-shop_thumbnail,
.hhoutdoor-product-addons img.wp-post-image,
.hhoutdoor-product-addons img.woocommerce-placeholder {
    width: auto;
    height: auto;
    max-width: 100%;
    vertical-align: middle;
    position: static;
    transform: none;
}

body .hhoutdoor-product-addons .option-image img:hover,
body .hhoutdoor-product-addons .addon-product-thumbnail:hover,
body .hhoutdoor-product-addons .addon-custom-thumbnail:hover {
    transform: none !important;
    width: 150px !important;
    height: 150px !important;
    border-color: #0073aa !important;
}

body .hhoutdoor-product-addons .addon-product-thumbnail,
body .hhoutdoor-product-addons .addon-custom-thumbnail,
body .hhoutdoor-product-addons img.addon-product-thumbnail,
body .hhoutdoor-product-addons img.addon-custom-thumbnail {
    width: 150px !important;
    height: 150px !important;
    display: block !important;
}

.addon-notice {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 15px;
    padding: 10px 15px;
    background: #f0f8ff;
    border: 1px solid #d1e7ff;
    border-radius: 4px;
    display: flex;
    align-items: center;
}

.addon-notice .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    line-height: 20px;
}

.addon-field {
    margin-bottom: 20px;
    padding: 20px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
    overflow: hidden;
}

.addon-label {
    display: block;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
    font-size: 16px;
}

.addon-label .required {
    color: #dc3545;
    margin-left: 3px;
}

.addon-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: hidden;
}

.hhoutdoor-product-addons .addon-option {
    position: relative;
    isolation: isolate;
}

.addon-option label {
    display: flex;
    flex-direction: column;
    padding: 16px;
    background: #fff;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
}

.addon-option label:hover {
    border-color: #0073aa;
    background: #f8fbff;
    box-shadow: 0 4px 8px rgba(0,115,170,0.1);
}

.addon-option input[type="checkbox"]:checked ~ label,
.addon-option input[type="radio"]:checked ~ label {
    border-color: #0073aa;
    background: #f0f8ff;
    box-shadow: 0 4px 12px rgba(0,115,170,0.15);
}

.addon-option.out-of-stock label {
    opacity: 0.6;
    background: #f8f8f8;
    cursor: not-allowed;
}

.addon-option.out-of-stock label:hover {
    border-color: #e8e8e8;
    background: #f8f8f8;
    box-shadow: none;
}

.addon-option input[type="checkbox"],
.addon-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.addon-option .option-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.addon-option .checkbox-indicator,
.addon-option .radio-indicator {
    width: 22px;
    height: 22px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    margin-right: 12px;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.addon-option .radio-indicator {
    border-radius: 50%;
}

.addon-option input[type="checkbox"]:checked ~ label .checkbox-indicator,
.addon-option input[type="radio"]:checked ~ label .radio-indicator {
    background: #0073aa;
    border-color: #0073aa;
}

.addon-option input[type="checkbox"]:checked ~ label .checkbox-indicator::after {
    content: '';
    position: absolute;
    left: 7px;
    top: 3px;
    width: 6px;
    height: 11px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.addon-option input[type="radio"]:checked ~ label .radio-indicator::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
}

.addon-option.out-of-stock input[type="checkbox"],
.addon-option.out-of-stock input[type="radio"] {
    cursor: not-allowed;
}

.hhoutdoor-product-addons .option-image,
.hhoutdoor-product-addons .addon-option .option-image {
    width: 150px !important;
    height: 150px !important;
    max-width: 150px !important;
    max-height: 150px !important;
    min-width: 150px !important;
    min-height: 150px !important;
    margin-right: 12px !important;
    flex: 0 0 150px !important;
    display: inline-block !important;
    overflow: hidden !important;
    position: relative !important;
}

.hhoutdoor-product-addons img,
.hhoutdoor-product-addons .addon-product-thumbnail,
.hhoutdoor-product-addons .addon-custom-thumbnail,
.hhoutdoor-product-addons .addon-option img,
.hhoutdoor-product-addons .option-image img,
.hhoutdoor-product-addons .addon-option label img {
    width: 150px !important;
    height: 150px !important;
    max-width: 150px !important;
    max-height: 150px !important;
    min-width: 150px !important;
    min-height: 150px !important;
    object-fit: cover !important;
    border-radius: 6px !important;
    border: 1px solid #e0e0e0 !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}

.option-label {
    flex: 1;
    font-weight: 500;
    color: #333;
    line-height: 1.4;
}

.addon-option input[type="checkbox"]:checked ~ label .option-label,
.addon-option input[type="radio"]:checked ~ label .option-label {
    color: #0073aa;
}

.option-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.option-price {
    font-size: 18px;
    font-weight: 700;
    color: #0073aa;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.addon-sale-price del {
    color: #999;
    font-weight: 400;
    font-size: 16px;
}

.addon-sale-price {
    color: #dc3545;
}

.option-stock-info {
    display: flex;
    align-items: center;
    gap: 4px;
}

.stock-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    padding: 4px 0;
}

.stock-status .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    line-height: 18px;
}

.stock-status.in-stock {
    color: #46b450;
}

.stock-status.in-stock .dashicons {
    color: #46b450;
}

.stock-status.out-of-stock {
    color: #dc3232;
}

.stock-status.out-of-stock .dashicons {
    color: #dc3232;
}

.stock-status.on-backorder {
    color: #ff9800;
}

.stock-status.on-backorder .dashicons {
    color: #ff9800;
}

.stock-notice {
    font-size: 12px;
    color: #666;
    font-style: italic;
    line-height: 1.4;
    display: block;
    margin-top: 4px;
}

.stock-notice.out-of-stock-notice {
    color: #dc3232;
}

.select-stock-notice {
    margin-top: 8px;
}

.select-stock-notice .stock-notice {
    display: block;
    padding: 8px 12px;
    background: #fff5f5;
    border: 1px solid #ffcccc;
    border-radius: 4px;
}

.select-image-preview {
    margin-top: 10px;
    text-align: center;
}

.select-image-preview img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.addon-select option:disabled {
    color: #999;
    font-style: italic;
}

.option-quantity {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.option-quantity label {
    font-size: 14px;
    font-weight: 600;
    color: #555;
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    min-height: auto;
    cursor: default;
}

.option-quantity .addon-quantity-input,
.addon-select-quantity .addon-quantity-input {
    width: 80px;
    height: 44px;
    padding: 0 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    background: #fff;
    transition: all 0.2s ease;
    color: #333;
}

.option-quantity .addon-quantity-input:hover,
.addon-select-quantity .addon-quantity-input:hover {
    border-color: #0073aa;
}

.option-quantity .addon-quantity-input:focus,
.addon-select-quantity .addon-quantity-input:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
    outline: none;
}

.addon-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.addon-select:hover {
    border-color: #0073aa;
}

.addon-select:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
    outline: none;
}

.addon-custom-dropdown {
    position: relative;
    width: 100%;
    font-size: 16px;
}

.addon-dropdown-selected {
    padding: 12px 40px 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.addon-dropdown-selected:hover {
    border-color: #0073aa;
}

.addon-dropdown-selected.open {
    border-color: #0073aa;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.dropdown-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    transition: transform 0.2s ease;
    pointer-events: none;
}

.addon-dropdown-selected.open .dropdown-arrow {
    transform: translateY(-50%) rotate(180deg);
}

.addon-dropdown-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 2px solid #0073aa;
    border-top: none;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 99999 !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: none !important;
}

.addon-dropdown-options.dropdown-above {
    border-top: 2px solid #0073aa;
    border-bottom: 2px solid #0073aa;
    border-radius: 8px;
}

.dropdown-option {
    padding: 10px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-option:last-child {
    border-bottom: none;
}

.dropdown-option:hover:not(.disabled) {
    background-color: #f0f8ff;
}

.dropdown-option.selected {
    background-color: #e6f4ff;
    font-weight: 600;
}

.dropdown-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.dropdown-option .option-thumbnail {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    min-height: 30px !important;
    max-width: 30px !important;
    max-height: 30px !important;
    object-fit: cover !important;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.dropdown-option .option-text {
    flex: 1;
    line-height: 1.4;
}

.addon-select.has-custom-dropdown {
    display: none;
}

@media screen and (max-width: 768px) {
    .addon-custom-dropdown {
        font-size: 14px;
    }
    
    .addon-dropdown-selected {
        padding: 10px 35px 10px 12px;
    }
    
    .dropdown-option {
        padding: 8px 12px;
    }
    
    .dropdown-option .option-thumbnail {
        width: 25px;
        height: 25px;
    }
}

.addon-select-quantity {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.addon-select-quantity label {
    font-size: 14px;
    font-weight: 600;
    color: #555;
}

.select-image-preview {
    margin-top: 10px;
    text-align: center;
}

.select-image-preview img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.addon-text,
.addon-textarea,
.addon-number {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    font-size: 16px;
    transition: all 0.2s ease;
}

.addon-text:hover,
.addon-textarea:hover,
.addon-number:hover {
    border-color: #0073aa;
}

.addon-text:focus,
.addon-textarea:focus,
.addon-number:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
    outline: none;
}

.addon-textarea {
    resize: vertical;
    min-height: 100px;
}

.addon-price-summary {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f4ff 100%);
    border: 2px solid #0073aa;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,115,170,0.1);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.summary-row.addon-row {
    color: #666;
    font-size: 14px;
}

.summary-row.total-row {
    margin-top: 12px;
    padding-top: 16px;
    border-top: 2px solid #0073aa;
    font-size: 18px;
    font-weight: 700;
    color: #0073aa;
}

.summary-label {
    flex: 1;
}

.summary-value {
    font-weight: 600;
    white-space: nowrap;
}

.base-price-row .summary-value {
    color: #333;
}

.addon-row .summary-value {
    color: #0073aa;
}

.total-row .summary-value {
    font-size: 22px;
}

.product-addons-container .hhoutdoor-product-addons {
    margin: 0;
}

.customize-product-wrapper .product-addons-container {
    max-height: 500px;
    overflow-y: auto;
    padding: 15px;
}

.hhoutdoor-addon-parent-info {
    display: block;
    color: #666;
    font-size: 0.9em;
    margin-top: 5px;
}

.single-product .hhoutdoor-product-addons img.addon-product-thumbnail,
.single-product .hhoutdoor-product-addons img.addon-custom-thumbnail,
.single-product .hhoutdoor-product-addons .option-image img,
#main .hhoutdoor-product-addons img.addon-product-thumbnail,
#main .hhoutdoor-product-addons img.addon-custom-thumbnail,
#main .hhoutdoor-product-addons .option-image img,
.woocommerce .hhoutdoor-product-addons img.addon-product-thumbnail,
.woocommerce .hhoutdoor-product-addons img.addon-custom-thumbnail,
.woocommerce .hhoutdoor-product-addons .option-image img {
    width: 150px !important;
    height: 150px !important;
    max-width: 150px !important;
    max-height: 150px !important;
}

body .hhoutdoor-product-addons .woocommerce-product-gallery__image,
body .hhoutdoor-product-addons .woocommerce-product-gallery__wrapper,
body .hhoutdoor-product-addons .wp-post-image {
    width: auto !important;
    height: auto !important;
    max-width: none !important;
    max-height: none !important;
}

body .hhoutdoor-product-addons .option-image img[srcset],
body .hhoutdoor-product-addons .option-image img[sizes],
body .hhoutdoor-product-addons .addon-product-thumbnail[srcset],
body .hhoutdoor-product-addons .addon-product-thumbnail[sizes],
body .hhoutdoor-product-addons .addon-custom-thumbnail[srcset],
body .hhoutdoor-product-addons .addon-custom-thumbnail[sizes] {
    width: 150px !important;
    height: 150px !important;
}

body .hhoutdoor-product-addons .dropdown-option .option-thumbnail,
body .hhoutdoor-product-addons .addon-dropdown-options .option-thumbnail {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    min-height: 30px !important;
    max-width: 30px !important;
    max-height: 30px !important;
}

.price-amount {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.price-amount .base-price {
    text-decoration: line-through;
    opacity: 0.7;
    font-size: 0.9em;
}

.price-amount .addon-price-info {
    color: #666;
    font-size: 0.85em;
    margin: 0;
}

.price-amount .total-price {
    color: #0073aa;
    font-weight: bold;
    font-size: 1.1em;
}

.addon-products-preview {
    margin-top: 15px;
    padding: 15px;
    background: #f0f8ff;
    border: 1px solid #0073aa;
    border-radius: 5px;
}

.addon-products-preview h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
}

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

.addon-products-preview li {
    padding: 5px 0;
    border-bottom: 1px dotted #ddd;
}

.addon-products-preview li:last-child {
    border-bottom: none;
}

.addon-product-price {
    font-weight: 600;
    color: #0073aa;
}

@media screen and (max-width: 782px) {
    .addon-field {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .addon-label {
        font-size: 15px;
        margin-bottom: 12px;
    }
    
    .addon-option label {
        padding: 14px;
    }
    
    .option-header {
        margin-bottom: 10px;
    }
    
    body .hhoutdoor-product-addons .option-image {
        width: 100px !important;
        height: 100px !important;
        flex: 0 0 100px !important;
        margin-right: 10px !important;
    }
    
    body .hhoutdoor-product-addons .option-image img,
    body .hhoutdoor-product-addons .addon-product-thumbnail,
    body .hhoutdoor-product-addons .addon-custom-thumbnail {
        width: 100px !important;
        height: 100px !important;
        min-width: 100px !important;
        min-height: 100px !important;
        max-width: 100px !important;
        max-height: 100px !important;
    }
    
    .select-image-preview img {
        width: 100px;
        height: 100px;
    }
    
    .option-price {
        font-size: 16px;
    }
    
    .addon-sale-price del {
        font-size: 14px;
    }
    
    .stock-status {
        font-size: 13px;
    }
    
    .stock-status .dashicons {
        font-size: 16px;
        width: 16px;
        height: 16px;
    }
    
    .stock-notice {
        font-size: 11px;
    }
    
    .option-quantity {
        padding: 12px;
        gap: 10px;
    }
    
    .option-quantity label {
        font-size: 13px;
    }
    
    .option-quantity .addon-quantity-input,
    .addon-select-quantity .addon-quantity-input {
        width: 70px;
        height: 40px;
        font-size: 15px;
    }
    
    .addon-select,
    .addon-text,
    .addon-textarea,
    .addon-number {
        font-size: 16px;
        padding: 12px;
    }
    
    .addon-price-summary {
        padding: 16px;
    }
    
    .summary-row {
        font-size: 14px;
    }
    
    .summary-row.total-row {
        font-size: 16px;
    }
    
    .total-row .summary-value {
        font-size: 18px;
    }
    
    .customize-product-wrapper .product-addons-container {
        max-height: 400px;
    }
}

@media screen and (max-width: 480px) {
    .addon-field {
        padding: 12px;
    }
    
    .addon-options {
        gap: 10px;
    }
    
    .addon-option label {
        padding: 12px;
    }
    
    .option-details {
        margin-top: 10px;
        padding-top: 10px;
    }
    
    .option-price {
        font-size: 15px;
    }
    
    .option-quantity {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 12px;
    }
    
    .option-quantity .addon-quantity-input {
        width: 100%;
        height: 44px;
    }
    
    .addon-select-quantity {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .addon-select-quantity .addon-quantity-input {
        width: 100%;
    }
    
    .addon-price-summary {
        padding: 12px;
        border-radius: 8px;
    }
    
    .summary-row {
        padding: 6px 0;
    }
    
    .summary-row.total-row {
        padding-top: 12px;
        margin-top: 10px;
    }
}

.addon-field.has-error {
    border-color: #dc3545;
    background-color: #fff5f5;
}

.error-message {
    color: #dc3545;
    font-size: 14px;
    margin-top: 8px;
    font-weight: 600;
}

.conditional-indicator {
    display: inline-block;
    background: #0073aa;
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    margin-left: 10px;
    cursor: help;
}

.conditional-indicator .dashicons {
    font-size: 14px !important;
    width: 14px !important;
    height: 14px !important;
    line-height: 20px !important;
}

.location-price-display {
    margin-top: 10px;
    padding: 10px;
    background: #f0f8ff;
    border: 1px solid #0073aa;
    border-radius: 4px;
    font-weight: 600;
    color: #0073aa;
}

.addon-quantity-input[readonly] {
    background-color: #f8f9fa;
    cursor: not-allowed;
    opacity: 0.8;
    border-color: #dee2e6;
}

.addon-quantity-input[readonly]:hover,
.addon-quantity-input[readonly]:focus {
    border-color: #dee2e6;
    box-shadow: none;
}

.addon-option[data-disable-quantity="1"] .option-quantity,
.addon-select[data-disable-quantity="1"] ~ .addon-select-quantity {
    display: none !important;
}