/**
 * Custom Checkout Widget Styles - Complete Version
 * File: assets/css/custom-checkout.css
 */

 .custom-checkout-widget {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: #f0f8f0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.checkout-title {
    font-size: 35px;
    margin-bottom: 25px;
    color: #2c3e50;
    font-weight: 600;
    text-align: center;
}

/* Default Products (Hidden Data) */
.default-products-data {
    display: none !important;
}

/* Product Selection Styles */
.product-selection {
    margin-bottom: 30px;
}

.showcase-title {
    font-size: 20px;
    margin-bottom: 20px;
    color: #2c3e50;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e6ed;
}

.product-option {
    background: #ffffff;
    padding: 18px;
    margin-bottom: 12px;
    border-radius: 10px;
    border: 2px solid #e0e6ed;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.product-option:hover {
    border-color: #e74c3c;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.1);
    transform: translateY(-2px);
}

.product-option.selected {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1) !important;
    background: #fff5f5 !important;
}

.product-option.selected::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 15px;
    width: 25px;
    height: 25px;
    background: #27ae60;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    animation: checkmarkPop 0.3s ease;
}

@keyframes checkmarkPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.product-option input[type="radio"]:checked + .product-info,
.product-option input[type="checkbox"]:checked + .product-info {
    opacity: 1;
}

.product-option input[type="radio"]:not(:checked) + .product-info,
.product-option input[type="checkbox"]:not(:checked) + .product-info {
    opacity: 0.7;
}

.product-option label {
    cursor: pointer;
    width: 100%;
    margin: 0;
    display: block;
}

.product-option input[type="radio"],
.product-option input[type="checkbox"] {
    margin-right: 15px;
    transform: scale(1.2);
    accent-color: #e74c3c;
    display: none;
}

.product-info {
    display: flex;
    align-items: center;
    transition: opacity 0.3s ease;
}

.product-info img {
    width: 70px;
    height: 60px;
    margin-right: 15px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid #f8f9fa;
    flex-shrink: 0;
}

.product-name {
    flex: 1;
    font-weight: 500;
    color: #2c3e50;
    font-size: 16px;
    margin-right: 10px;
}

.product-price {
    font-weight: 700;
    color: #e74c3c;
    font-size: 18px;
    background: #fff5f5;
    padding: 4px 8px;
    border-radius: 4px;
    flex-shrink: 0;
}

/* Deselect Controls */
.deselect-controls {
    margin-bottom: 20px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.deselect-all-btn, 
.select-all-btn {
    padding: 8px 16px;
    border: 2px solid #e74c3c;
    background: white;
    color: #e74c3c;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    min-width: 100px;
}

.deselect-all-btn:hover, 
.select-all-btn:hover {
    background: #e74c3c;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.deselect-all-btn:active,
.select-all-btn:active {
    transform: translateY(0);
}

/* Layout */
.checkout-wrapper {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 40px;
    align-items: start;
}

/* Billing Section */
.billing-section {
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.billing-section h3 {
    margin-bottom: 25px;
    color: #2c3e50;
    font-size: 24px;
    font-weight: 600;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 10px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #34495e;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-group input:focus {
    outline: none;
    border-color: #e74c3c;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.form-group input.error {
    border-color: #e74c3c !important;
    background-color: #fff5f5 !important;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1) !important;
}

.form-group input::placeholder {
    color: #95a5a6;
    font-style: italic;
}

.error-message {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
    animation: fadeInError 0.3s ease;
}

@keyframes fadeInError {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Shipping and Payment Sections */
.shipping-section, 
.payment-section {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid #ecf0f1;
}

.shipping-section h4, 
.payment-section h4 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
}

/* Shipping Methods */
.shipping-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.shipping-method {
    background: #f8f9fa;
    border: 2px solid #e0e6ed;
    border-radius: 10px;
    padding: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.shipping-method:hover {
    border-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.shipping-method:has(input:checked) {
    border-color: #e74c3c;
    background: linear-gradient(135deg, #fff5f5 0%, #ffffff 100%);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.15);
}

.shipping-method:has(input:checked)::after {
    content: '✓';
    position: absolute;
    top: 12px;
    right: 16px;
    width: 24px;
    height: 24px;
    background: #27ae60;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
    animation: checkmarkBounce 0.3s ease;
}

@keyframes checkmarkBounce {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.shipping-method label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    margin: 0;
    width: 100%;
}

.shipping-method input[type="radio"] {
    margin-right: 12px;
    transform: scale(1.3);
    accent-color: #e74c3c;
}

.shipping-text {
    flex: 1;
    font-weight: 600;
    color: #2c3e50;
    font-size: 15px;
}

.shipping-cost {
    font-weight: 700;
    color: #e74c3c;
    font-size: 16px;
    background: rgba(231, 76, 60, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
}

/* Payment Methods */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.payment-method {
    background: #f8f9fa;
    border: 2px solid #e0e6ed;
    border-radius: 10px;
    padding: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.payment-method:hover {
    border-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.payment-method:has(input:checked) {
    border-color: #e74c3c;
    background: linear-gradient(135deg, #fff5f5 0%, #ffffff 100%);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.15);
}

.payment-method:has(input:checked)::after {
    content: '✓';
    position: absolute;
    top: 12px;
    right: 16px;
    width: 24px;
    height: 24px;
    background: #27ae60;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
    animation: checkmarkBounce 0.3s ease;
}

.payment-method label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
    width: 100%;
}

.payment-method input[type="radio"] {
    margin-right: 12px;
    transform: scale(1.3);
    accent-color: #e74c3c;
}

.payment-title {
    font-weight: 600;
    color: #2c3e50;
    font-size: 15px;
    flex: 1;
}

.payment-description {
    background: linear-gradient(135deg, #fff9c4 0%, #ffeaa7 100%);
    padding: 12px;
    border-radius: 8px;
    color: #856404;
    margin: 12px 0 0 0;
    font-size: 13px;
    border-left: 4px solid #ffc107;
    font-weight: 500;
    line-height: 1.4;
}

.payment-privacy {
    color: #6c757d;
    font-size: 11px;
    line-height: 1.5;
    margin-top: 20px;
    display: block;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #6c757d;
}

/* Order Summary */
.order-summary {
    background: linear-gradient(135deg, #e8f5e8 0%, #d4edda 100%);
    padding: 30px;
    border-radius: 12px;
    height: fit-content;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 20px;
}

.order-summary h3 {
    margin-bottom: 25px;
    color: #2c3e50;
    font-size: 22px;
    font-weight: 600;
    text-align: center;
    border-bottom: 2px solid #c3e6cb;
    padding-bottom: 15px;
}

/* Product Lists in Order Summary */
.default-products-list,
.showcase-products-list {
    margin-bottom: 20px;
}

.default-products-title,
.showcase-products-title {
    font-size: 16px;
    color: #2c3e50;
    margin: 20px 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #c3e6cb;
    font-weight: 600;
}

.default-products-title:first-child {
    margin-top: 0;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid rgba(195, 230, 203, 0.5);
    animation: fadeInUp 0.3s ease;
}

.order-item:last-child {
    border-bottom: none;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.item-info {
    display: flex;
    align-items: center;
    flex: 1;
}

.item-info img {
    width: 45px;
    height: 45px;
    margin-right: 12px;
    border-radius: 6px;
    object-fit: cover;
    border: 2px solid #ffffff;
    flex-shrink: 0;
}

.item-details {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.item-name {
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 4px;
    font-size: 14px;
    line-height: 1.3;
}

.quantity {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 2px;
}

.product-type-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    width: fit-content;
}

.default-badge {
    background: #27ae60;
    color: white;
}

.showcase-badge {
    background: #3498db;
    color: white;
}

.item-price {
    font-weight: 700;
    color: #e74c3c;
    font-size: 16px;
    flex-shrink: 0;
}

/* Order Totals */
.order-totals {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid #c3e6cb;
    transition: all 0.3s ease;
}

.order-totals.updated {
    animation: pulse 0.3s ease;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.subtotal, 
.shipping-total,
.total {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 16px;
}

.subtotal,
.shipping-total {
    color: #495057;
    border-bottom: 1px solid rgba(195, 230, 203, 0.3);
}

.total {
    font-weight: 700;
    font-size: 20px;
    border-top: 2px solid #28a745;
    color: #2c3e50;
    padding-top: 15px;
    margin-top: 10px;
    background: rgba(255, 255, 255, 0.3);
    padding: 15px;
    border-radius: 8px;
    margin: 10px -15px 0 -15px;
}

/* Complete Order Button */
.complete-order-btn {
    width: 100%!important;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%)!important;
    color: #ffffff!important;
    padding: 18px 24px!important;
    border: none!important;
    border-radius: 10px!important;
    font-size: 16px!important;
    font-weight: 700!important;
    cursor: pointer;
    margin-top: 25px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.complete-order-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.complete-order-btn:hover::before {
    left: 100%;
}

.complete-order-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.3);
}

.complete-order-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.complete-order-btn:disabled {
    background: linear-gradient(135deg, #bdc3c7 0%, #95a5a6 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.complete-order-btn:disabled::before {
    display: none;
}

/* Loading State */
.complete-order-btn.loading {
    pointer-events: none;
    position: relative;
}

.complete-order-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success Popup Styles */
.checkout-success-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 99999;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.checkout-success-popup {
    background: #ffffff;
    border-radius: 15px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: popupSlideIn 0.3s ease;
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

@keyframes popupSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
        scale: 0.95;
    }
    to {
        transform: translateY(0);
        opacity: 1;
        scale: 1;
    }
}

.popup-header {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    padding: 20px 25px;
    border-radius: 15px 15px 0 0;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.popup-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.popup-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.popup-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.popup-content {
    padding: 25px;
}

.order-summary-popup {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 25px;
}

.order-info,
.customer-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #27ae60;
}

.order-info h3,
.customer-info h3 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
}

.order-info p,
.customer-info p {
    margin: 8px 0;
    color: #34495e;
    font-size: 14px;
    line-height: 1.5;
}

.order-items-popup {
    margin-bottom: 25px;
}

.order-items-popup h3 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 10px;
}

.items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.popup-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.popup-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.item-image {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 15px;
    flex-shrink: 0;
    border: 2px solid #ffffff;
}

.item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.item-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
    font-size: 15px;
}

.item-quantity {
    color: #6c757d;
    font-size: 13px;
}

.item-price {
    font-weight: 700;
    color: #e74c3c;
    font-size: 16px;
    flex-shrink: 0;
}

.order-totals-popup {
    background: linear-gradient(135deg, #e8f5e8, #d4edda);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
}

.total-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 15px;
    color: #2c3e50;
}

.total-line.total {
    border-top: 2px solid #27ae60;
    padding-top: 15px;
    margin-top: 15px;
    font-weight: 700;
    font-size: 18px;
    color: #27ae60;
}

.popup-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.popup-btn {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.popup-btn.primary {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.popup-btn.primary:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.3);
}

.popup-btn.secondary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.popup-btn.secondary:hover {
    background: linear-gradient(135deg, #2980b9, #21618c);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.3);
}

.popup-message {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #28a745;
    text-align: center;
}

.popup-message p {
    margin: 0;
    color: #155724;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.6;
}

/* Prevent body scroll when popup is open */
body.popup-open {
    overflow: hidden;
}

/* Notifications */
.checkout-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    max-width: 350px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    animation: slideInRight 0.3s ease;
}

.checkout-notification-error {
    background: #e74c3c;
}

.checkout-notification-success {
    background: #27ae60;
}

.checkout-notification-info {
    background: #3498db;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Enhanced Product Selection Styles */
.product-option.selected::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 0%, rgba(231, 76, 60, 0.05) 50%, transparent 100%);
    pointer-events: none;
    border-radius: 8px;
}

/* Loading States */
.shipping-method.loading,
.payment-method.loading {
    pointer-events: none;
    opacity: 0.7;
}

.shipping-method.loading::before,
.payment-method.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .checkout-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .order-summary {
        position: static;
        order: -1;
    }
}

@media (max-width: 768px) {
    .custom-checkout-widget {
        padding: 15px;
        margin: 10px;
    }
    
    .checkout-title {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .billing-section,
    .order-summary {
        padding: 20px;
    }
    
    .product-option {
        padding: 15px;
    }
    
    .product-info {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .product-name {
        flex: 1 1 100%;
        order: 2;
    }
    
    .product-price {
        order: 3;
        align-self: flex-start;
    }
    
    .complete-order-btn {
        font-size: 14px;
        padding: 16px 20px;
    }
    
    .item-info img {
        width: 40px;
        height: 40px;
    }
    
    .checkout-notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    /* Responsive popup styles */
    .checkout-success-popup {
        width: 95%;
        margin: 20px;
    }
    
    .popup-header {
        padding: 15px 20px;
    }
    
    .popup-header h2 {
        font-size: 20px;
    }
    
    .popup-content {
        padding: 20px;
    }
    
    .order-summary-popup {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .order-info,
    .customer-info {
        padding: 15px;
    }
    
    .popup-item {
        padding: 12px;
    }
    
    .item-image {
        width: 40px;
        height: 40px;
        margin-right: 12px;
    }
    
    .popup-actions {
        flex-direction: column;
    }
    
    .popup-btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .deselect-controls {
        justify-content: center;
    }
    
    .deselect-all-btn,
    .select-all-btn {
        flex: 1;
        text-align: center;
    }
    
    .shipping-method,
    .payment-method {
        padding: 14px;
    }
    
    .shipping-method:has(input:checked)::after,
    .payment-method:has(input:checked)::after {
        width: 20px;
        height: 20px;
        font-size: 10px;
        top: 10px;
        right: 14px;
    }
    
    .shipping-text,
    .payment-title {
        font-size: 14px;
    }
    
    .shipping-cost {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .checkout-title {
        font-size: 20px;
    }
    
    .billing-section h3,
    .order-summary h3 {
        font-size: 18px;
    }
    
    .showcase-title {
        font-size: 16px;
    }
    
    .product-info img {
        width: 45px;
        height: 45px;
    }
    
    .form-group input {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    .product-option input[type="radio"],
    .product-option input[type="checkbox"] {
        transform: scale(1);
        margin-right: 10px;
    }
    
    .order-item {
        padding: 12px 0;
    }
    
    .item-name {
        font-size: 13px;
    }
    
    .item-price {
        font-size: 14px;
    }
    
    /* Mobile popup styles */
    .checkout-success-popup {
        width: 98%;
        margin: 10px;
        max-height: 95vh;
    }
    
    .popup-header {
        padding: 12px 15px;
    }
    
    .popup-header h2 {
        font-size: 18px;
    }
    
    .popup-content {
        padding: 15px;
    }
    
    .order-info h3,
    .customer-info h3,
    .order-items-popup h3 {
        font-size: 16px;
    }
    
    .item-name {
        font-size: 14px;
    }
    
    .total-line {
        font-size: 14px;
    }
    
    .total-line.total {
        font-size: 16px;
    }
    
    .popup-btn {
        font-size: 14px;
        padding: 12px 16px;
    }
    
    .shipping-methods,
    .payment-methods {
        gap: 10px;
    }
    
    .shipping-method label,
    .payment-method label {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .shipping-cost {
        align-self: flex-end;
        margin-top: 5px;
    }
    
    .payment-description {
        margin-left: 0;
        font-size: 12px;
    }
}

/* Print Styles */
@media print {
    .custom-checkout-widget {
        box-shadow: none;
        background: white;
    }
    
    .complete-order-btn {
        display: none;
    }
    
    .product-option:hover {
        transform: none;
        box-shadow: none;
    }
    
    .checkout-notification,
    .checkout-success-popup-overlay {
        display: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .custom-checkout-widget {
        border: 2px solid #000000;
    }
    
    .product-option {
        border-color: #000000;
    }
    
    .form-group input {
        border-color: #000000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .product-option,
    .form-group input,
    .complete-order-btn,
    .order-item,
    .popup-item,
    .shipping-method,
    .payment-method {
        transition: none;
        animation: none;
    }
    
    .complete-order-btn::before {
        display: none;
    }
    
    .order-totals.updated {
        animation: none;
    }
    
    .checkout-notification,
    .checkout-success-popup {
        animation: none;
    }
    
    .popup-close:hover {
        transform: none;
    }
}