/* Enhanced Ordering Styles */

/* Favorites Button Styles - Simplified Wishlist Layout */
.favorites-button-container {
    margin: 10px 0;
    padding: 0;
    border: none;
}

.btn-favorites {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 3px;
    color: #666;
    font-size: 13px;
    font-weight: normal;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-favorites:hover {
    background-color: #f5f5f5;
    border-color: #999;
    color: #333;
}

.btn-favorites.added-favorites {
    background-color: #fff;
    border-color: #dc3545;
    color: #dc3545;
}

.btn-favorites.added-favorites:hover {
    background-color: #f8f9fa;
    border-color: #dc3545;
    color: #dc3545;
}

.btn-favorites i {
    font-size: 14px;
}

.btn-favorites.added-favorites i {
    color: #dc3545;
}

/* Loop favorites button - Simplified Wishlist Style (REMOVED - using template-based layout) */
/*
.favorites-button-loop {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 10;
}

.btn-favorites-loop {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background-color: rgba(255, 255, 255, 0.95);
    border: 1px solid #ccc;
    border-radius: 3px;
    color: #666;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-favorites-loop i {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
}

.btn-favorites-loop:hover {
    background-color: rgba(255, 255, 255, 1);
    color: #333;
    border-color: #999;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.btn-favorites-loop.added-favorites {
    background-color: rgba(255, 255, 255, 0.95);
    border-color: #dc3545;
    color: #dc3545;
}

.btn-favorites-loop.added-favorites:hover {
    background-color: rgba(255, 255, 255, 1);
    color: #dc3545;
    border-color: #dc3545;
}
*/



/* Responsive adjustments (REMOVED - using template-based layout) */
/*
@media (max-width: 768px) {
    .favorites-button-loop {
        top: 5px;
        right: 5px;
    }
    
    .btn-favorites-loop {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .btn-favorites-loop i {
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0;
        padding: 0;
    }
}
*/

/* Add to cart loading state styling */
.loading-state {
    opacity: 0.7 !important;
    pointer-events: none !important;
    cursor: not-allowed !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
    /* Prevent all dimension changes */
    transition: none !important;
    transform: none !important;
    animation: none !important;
}

.loading-state:hover,
.loading-state:focus,
.loading-state:active {
    opacity: 0.7 !important;
    transform: none !important;
}

/* Disabled button styling */
.button:disabled,
.btn:disabled,
.add_to_cart_button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
    transition: none !important;
}

/* Prevent button shrinking during text changes */
.product-action .button,
.add_to_cart_button,
.add-to-cart-button {
    box-sizing: border-box;
    white-space: nowrap;
    /* Remove any transitions that could cause flicker */
    transition: opacity 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

/* CSS-only solution: Force fixed width for all add to cart buttons */
.product-action .button,
.add_to_cart_button:not(.add-to-cart-button) {
    width: 100px !important;
    min-width: 100px !important;
    max-width: 100px !important;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    box-sizing: border-box !important;
    display: inline-block !important;
    text-align: center !important;
    line-height: 34px !important;
    padding: 0 8px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    vertical-align: top !important;
    border: 1px solid #ccc !important;
    border-radius: 3px !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
    font-size: 12px !important;
}

/* Fix layout issues with product-action container */
.product-action {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    min-height: 36px !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Ensure icons stay in place */
.product-action .btn-icon-wish,
.product-action .btn-quickview {
    flex-shrink: 0 !important;
    margin: 0 !important;
    width: 36px !important;
    height: 36px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid #ccc !important;
    border-radius: 3px !important;
    background: transparent !important;
    text-decoration: none !important;
    font-size: 12px !important;
}

/* Make sure the product-action container maintains proper layout */
.product-action::before,
.product-action::after {
    display: none !important;
}

/* Prevent any CSS from affecting the layout after AJAX */
.product-action .button.added_to_cart,
.product-action .button.wc-success,
.product-action .button:after {
    margin: 0 !important;
    flex-shrink: 0 !important;
    width: 100px !important;
    height: 36px !important;
    box-sizing: border-box !important;
}

/* Fix for any potential layout shifts */
.product-action .button::before,
.product-action .button::after {
    display: none !important;
}

/* Hide only the "View cart" link that appears after adding to cart */
.product-action a.added_to_cart[href*="cart"],
.product-action .view-cart,
.product-action .wc-forward,
.product-action a[href*="cart"]:not(.button):not(.add_to_cart_button) {
    display: none !important;
}

/* Keep the add to cart button but hide any "View cart" text changes */
.product-action .button.added_to_cart::after,
.product-action .add_to_cart_button.added_to_cart::after {
    display: none !important;
}

/* Alternative sizes for different button types */
.product-action .button.btn-sm,
.add_to_cart_button.btn-sm {
    width: 85px !important;
    min-width: 85px !important;
    max-width: 85px !important;
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    line-height: 30px !important;
    font-size: 11px !important;
}

.product-action .button.btn-lg,
.add_to_cart_button.btn-lg {
    width: 115px !important;
    min-width: 115px !important;
    max-width: 115px !important;
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    line-height: 38px !important;
    font-size: 13px !important;
}

/* Button state styling */
.product-action .button:hover,
.add_to_cart_button:hover {
    border-color: #999 !important;
    opacity: 0.9 !important;
}

.product-action .button:focus,
.add_to_cart_button:focus {
    outline: none !important;
    border-color: #666 !important;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1) !important;
}

.product-action .button:disabled,
.add_to_cart_button:disabled {
    opacity: 0.7 !important;
    cursor: not-allowed !important;
    border-color: #ddd !important;
    color: #888 !important;
}

/* Override any theme transitions for loading state */
.loading-state,
.loading-state:hover,
.loading-state:focus,
.loading-state:active {
    transition: none !important;
    transform: none !important;
    animation: none !important;
}

/* Aggressive WooCommerce override for loading buttons */
.wc-loading,
.wc-loading:hover,
.wc-loading:focus,
.wc-loading:active,
.wc-loading.loading,
.wc-loading.added {
    transition: none !important;
    transform: none !important;
    animation: none !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    box-sizing: border-box !important;
}

/* Block WooCommerce default button states */
.add_to_cart_button.loading::before,
.add_to_cart_button.added::before,
.button.loading::before,
.button.added::before {
    display: none !important;
}

/* Prevent WooCommerce from changing button content */
.wc-loading::before,
.wc-loading::after {
    content: "" !important;
    display: none !important;
}

/* Force dimension stability during WooCommerce AJAX */
.product-action .button.wc-loading,
.add_to_cart_button.wc-loading {
    display: inline-block !important;
    vertical-align: top !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* Stable button wrapper to prevent layout shifts */
.stable-button-wrapper {
    display: inline-block !important;
    vertical-align: top !important;
    flex-shrink: 0 !important;
    position: relative !important;
}

.stable-button-wrapper .button,
.stable-button-wrapper .add_to_cart_button {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    margin: 0 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    box-sizing: border-box !important;
}

/* Ultimate protection against any size changes */
.wc-loading {
    position: relative !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
}

/* Prevent any pseudo-element content that might change size */
.wc-loading::before,
.wc-loading::after,
.loading-state::before,
.loading-state::after {
    display: none !important;
    content: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* Product Availability Information */
.product-availability-info {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    margin: 20px 0;
}

.product-availability-info h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.availability-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.availability-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: white;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.availability-item.in-stock {
    border-color: #28a745;
    background: #f8fff9;
}

.availability-item.backorder {
    border-color: #ffc107;
    background: #fffdf5;
}

.availability-item i {
    font-size: 16px;
}

.availability-item .delivery-date,
.availability-item .availability-date {
    margin-top: 5px;
    font-size: 14px;
    color: #666;
}

.availability-item .delivery-date strong,
.availability-item .availability-date strong {
    color: #333;
}

/* Product Availability Badges in Loops */
.product-availability-badge {
    margin-top: 8px;
}

.product-availability-badge .badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 12px;
}

.product-availability-badge .badge-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.product-availability-badge .badge-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Customer Favorites Widget */
.customer-favorites-widget {
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.customer-favorites-widget h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.customer-favorites-widget h3 i {
    color: #e74c3c;
}

.favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.favorite-product-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    transition: box-shadow 0.3s ease;
}

.favorite-product-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.favorite-product-item .product-image {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
}

.favorite-product-item .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.favorite-product-item .product-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.favorite-product-item .product-name {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}

.favorite-product-item .product-name a {
    color: #333;
    text-decoration: none;
}

.favorite-product-item .product-name a:hover {
    color: #007cba;
}

.favorite-product-item .product-price {
    font-size: 14px;
    font-weight: 600;
    color: #007cba;
}

.favorite-product-item .availability-status {
    font-size: 12px;
}

.favorite-product-item .availability-status .in-stock {
    color: #28a745;
}

.favorite-product-item .availability-status .backorder {
    color: #ffc107;
}

.favorite-product-item .add-to-cart .btn {
    padding: 4px 12px;
    font-size: 12px;
    border-radius: 4px;
}

.add-to-cart-favorite {
    background: #007cba;
    color: white;
    border: none;
    text-decoration: none;
    display: inline-block;
    transition: background 0.3s ease;
}

.add-to-cart-favorite:hover {
    background: #005a87;
    color: white;
}

/* Delivery Options in Checkout */
.woocommerce-checkout .form-row input[type="radio"] {
    margin-right: 10px;
}

.delivery-option-details {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #007cba;
}

.delivery-option-together {
    border-left-color: #ffc107;
}

.delivery-option-asap {
    border-left-color: #28a745;
}

/* Favorites Dashboard Widget */
.favorites-dashboard-widget {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
}

/* Make the dashboard widget more compact on account pages */
.woocommerce-account .favorites-dashboard-widget {
    padding: 12px;
    margin-bottom: 15px;
}

.favorites-dashboard-widget h3 {
    margin-top: 0;
    margin-bottom: 12px;
    color: #333;
    font-size: 16px;
}

.woocommerce-account .favorites-dashboard-widget h3 {
    font-size: 14px;
    margin-bottom: 8px;
}

.favorites-quick-view {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.favorite-quick-item {
    text-align: center;
}

.favorite-quick-item a {
    text-decoration: none;
    color: #333;
    display: block;
    transition: transform 0.3s ease;
}

.favorite-quick-item a:hover {
    transform: translateY(-2px);
}

.favorite-quick-item img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 8px;
}

.favorite-quick-item .product-name {
    font-size: 12px;
    line-height: 1.3;
    font-weight: 500;
}

/* Split Order Notifications */
.split-order-notice {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 6px;
    padding: 15px;
    margin: 15px 0;
}

.split-order-notice .notice-title {
    font-weight: 600;
    color: #0056b3;
    margin-bottom: 8px;
}

.split-order-notice .notice-content {
    color: #004085;
    font-size: 14px;
}

/* Enhanced Checkout Fields */
.woocommerce-checkout .delivery-preference-section {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 20px;
    margin: 20px 0;
}

/* Delivery options styling (shown conditionally) */
.delivery-options {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    margin: 15px 0;
}

.woocommerce-checkout .delivery-preference-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

.woocommerce-checkout .delivery-option-radio {
    margin-bottom: 15px;
}

.woocommerce-checkout .delivery-option-radio label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.woocommerce-checkout .delivery-option-radio label:hover {
    border-color: #007cba;
}

.woocommerce-checkout .delivery-option-radio input[type="radio"]:checked+label {
    border-color: #007cba;
    background: #f0f8ff;
}

.woocommerce-checkout .delivery-option-description {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .favorites-grid {
        grid-template-columns: 1fr;
    }

    .favorite-product-item {
        flex-direction: column;
        text-align: center;
    }

    .favorite-product-item .product-image {
        width: 100%;
        height: 120px;
    }



    .favorites-quick-view {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .customer-favorites-widget {
        padding: 15px;
    }

    .product-availability-info {
        padding: 12px;
    }

    .availability-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* Loading States */
.delivery-info-loading {
    opacity: 0.6;
    pointer-events: none;
}

.delivery-info-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ccc;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: none;
}

/* Order Status Indicators */
.order-shipment-info {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 10px 15px;
    margin: 10px 0;
    font-size: 14px;
}

.order-shipment-info.shipment-1 {
    border-left: 4px solid #28a745;
}

.order-shipment-info.shipment-2 {
    border-left: 4px solid #ffc107;
}

.order-shipment-info.shipment-3 {
    border-left: 4px solid #dc3545;
}

.shipment-number {
    font-weight: 600;
    color: #333;
}

.delivery-date-display {
    color: #666;
    font-size: 13px;
}

/* Subtle cart analysis integration */
.cart-delivery-analysis {
    margin-top: 5px !important;
    font-size: 0.85em !important;
    font-style: italic;
}

/* Order delivery information styling */
.order-delivery-information,
.order-delivery-zone-information {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 20px;
    margin: 20px 0;
}

.order-delivery-information h2,
.order-delivery-zone-information h2 {
    color: #333;
    font-size: 1.2em;
    margin-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 10px;
}

.order-delivery-information h2 i,
.order-delivery-zone-information h2 i {
    color: #007cba;
    margin-right: 10px;
}

.order-delivery-information address,
.order-delivery-zone-information address {
    font-style: normal;
    line-height: 1.6;
}

.order-delivery-information p,
.order-delivery-zone-information p {
    margin-bottom: 10px;
}

.order-delivery-information strong,
.order-delivery-zone-information strong {
    color: #555;
    font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 768px) {

    .order-delivery-information,
    .order-delivery-zone-information {
        margin: 15px 0;
        padding: 15px;
    }
}

.cart-delivery-analysis i {
    margin-right: 3px;
}

/* Hide delivery options by default, show when needed */
.delivery-options {
    display: none;
}

.delivery-options.show-options {
    display: block;
}

/* === BACKORDER STYLES === */

/* Backorder notice on single product page */
.backorder-notice {
    border: 1px solid #f0ad4e;
    border-radius: 4px;
    padding: 10px 15px;
    background-color: #fcf8e3;
    color: #8a6d3b;
    margin-bottom: 15px;
}

.backorder-notice i {
    margin-right: 8px;
}

.backorder-notice small {
    margin-top: 5px;
    display: block;
    opacity: 0.8;
}

/* === ARRIVAL DATE NOTICE STYLES === */

.arrival-date-notice {
    animation: slideInDown 0.3s ease-out;
    transition: all 0.3s ease;
}

.arrival-date-notice:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
}

/* === CART ARRIVAL INFORMATION === */

.cart-item-arrival-info,
.cart-item-delivery-info {
    font-size: 0.85em;
    line-height: 1.4;
    transition: all 0.2s ease;
}

.cart-item-arrival-info:hover,
.cart-item-delivery-info:hover {
    transform: translateX(3px);
}

.cart-item-arrival-info strong,
.cart-item-delivery-info strong {
    font-weight: 600;
}

/* Mobile responsive cart arrival info */
@media (max-width: 768px) {

    .cart-item-arrival-info,
    .cart-item-delivery-info {
        padding: 6px 8px;
        font-size: 0.8em;
    }

    .cart-item-arrival-info br,
    .cart-item-delivery-info br {
        display: none;
    }

    .cart-item-arrival-info i,
    .cart-item-delivery-info i {
        display: none;
    }
}

/* === PRODUCT LOOP ARRIVAL BADGES === */

.product-arrival-badge {
    display: none !important; /* Hide ONLY the orange arrival badge in top-right corner */
}

.product-arrival-badge i {
    margin-right: 3px;
}

/* Stock status badges in product loops */
.backorder-badge,
.in-stock-badge,
.out-of-stock {
    display: inline-block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.9em;
}

.backorder-badge i,
.in-stock-badge i {
    margin-right: 5px;
}

/* Backorder buttons */
.backorder-btn {
    background-color: #f0ad4e !important;
    border-color: #f0ad4e !important;
    color: #fff !important;
    position: relative;
    overflow: hidden;
}

.backorder-btn:hover {
    background-color: #ec971f !important;
    border-color: #d58512 !important;
}

.backorder-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;
}

.backorder-btn:hover::before {
    left: 100%;
}

/* Button variations for different contexts */
.btn-warning.add-to-cart-favorite {
    background-color: #f0ad4e;
    border-color: #f0ad4e;
    color: #fff;
}

.btn-warning.add-to-cart-favorite:hover {
    background-color: #ec971f;
    border-color: #d58512;
}

/* Disabled/unavailable button styling */
.btn.disabled,
.btn:disabled,
.btn-icon.disabled {
    background-color: #ccc !important;
    border-color: #ccc !important;
    color: #666 !important;
    cursor: not-allowed !important;
    opacity: 0.6;
}

/* === ENHANCED PRODUCT AVAILABILITY WIDGET === */

.product-availability-info .backorder {
    color: #f0ad4e;
}

.product-availability-info .backorder i {
    margin-right: 8px;
}

.availability-date,
.delivery-date {
    margin-top: 5px;
    font-size: 0.95em;
}

.availability-date strong,
.delivery-date strong {
    color: #333;
}

/* === CHECKOUT DELIVERY OPTIONS === */

.delivery-options {
    margin-top: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 4px;
    border-left: 4px solid #5cb85c;
}

.delivery-options h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

.delivery-options .option {
    margin-bottom: 15px;
}

.delivery-options .option:last-child {
    margin-bottom: 0;
}

.delivery-options label {
    font-weight: 500;
    margin-bottom: 5px;
    display: block;
    cursor: pointer;
}

.delivery-options input[type="radio"] {
    margin-right: 8px;
}

.delivery-options .option-description {
    margin-left: 20px;
    margin-bottom: 10px;
    color: #666;
    font-size: 0.9em;
    line-height: 1.4;
}

.delivery-message {
    padding: 8px 12px;
    border-radius: 4px;
    margin-top: 10px;
    font-size: 0.9em;
}

.delivery-message.warning {
    background-color: #fcf8e3;
    border: 1px solid #f0ad4e;
    color: #8a6d3b;
}

.delivery-message.success {
    background-color: #dff0d8;
    border: 1px solid #5cb85c;
    color: #3c763d;
}

/* === CART DELIVERY ANALYSIS === */

.cart-delivery-analysis {
    font-size: 0.9em;
    margin-top: 5px;
    color: #666;
}

.cart-delivery-analysis i {
    margin-right: 5px;
}

/* === RESPONSIVE ADJUSTMENTS === */

@media (max-width: 768px) {
    .backorder-notice {
        padding: 8px 12px;
        font-size: 0.9em;
    }

    .delivery-options {
        padding: 12px;
    }

    .delivery-options .option-description {
        margin-left: 16px;
        font-size: 0.85em;
    }

    .backorder-badge,
    .in-stock-badge {
        font-size: 0.8em;
    }
}

/* === LOADING STATES === */

.delivery-info-loading {
    opacity: 0.6;
    position: relative;
}

.delivery-info-loading::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 10;
}

/* === ADMIN STYLES === */

.delivery-admin-info {
    margin-top: 20px;
    padding: 10px;
    background-color: #f0f0f0;
    border-radius: 4px;
    font-size: 0.9em;
}

.delivery-admin-info h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
}

.delivery-admin-info p {
    margin-bottom: 5px;
}

.delivery-admin-info a {
    color: #0073aa;
    text-decoration: none;
}

.delivery-admin-info a:hover {
    text-decoration: underline;
}

/* === ENHANCED CHECKOUT ARRIVAL DISPLAY === */

.checkout-arrival-summary {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 1px solid #2196f3;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
}

.checkout-arrival-summary h4 {
    color: #1976d2;
    margin-bottom: 12px;
    font-size: 1.1em;
}

.checkout-arrival-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(33, 150, 243, 0.1);
}

.checkout-arrival-item:last-child {
    border-bottom: none;
}

.checkout-arrival-date {
    font-weight: 600;
    color: #1976d2;
}

/* === ADMIN PURCHASE ORDERS ENHANCEMENT === */

.po-arrival-highlight {
    background-color: #fff3cd !important;
    border-left: 4px solid #f0ad4e !important;
}

.po-arrival-urgent {
    background-color: #f8d7da !important;
    border-left: 4px solid #dc3545 !important;
}

/* === ANIMATIONS === */

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }

    100% {
        opacity: 1;
    }
}

.arrival-pulse {
    animation: pulse 2s infinite;
}

/* === RESPONSIVE DESIGN === */

@media (max-width: 576px) {
    .arrival-date-notice {
        padding: 12px;
        font-size: 0.9em;
    }

    .arrival-date-notice div[style*="margin-left"] {
        margin-left: 0 !important;
    }

    .checkout-arrival-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* Remove any spin animations from add to cart buttons */
.single_add_to_cart_button,
.button,
.btn,
.single_add_to_cart_button *,
.button *,
.btn * {
    animation: none !important;
    -webkit-animation: none !important;
    -moz-animation: none !important;
    -o-animation: none !important;
    -ms-animation: none !important;
}

/* Add to cart with wishlist container */
.add-to-cart-with-wishlist {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

/* Left-positioned wishlist button (like old layout) */
.btn-wishlist-left {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 3px;
    color: #666;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    flex-shrink: 0;
}

.btn-wishlist-left:hover {
    background-color: #f5f5f5;
    border-color: #999;
    color: #333;
}

.btn-wishlist-left.added-favorites {
    background-color: #fff;
    border-color: #dc3545;
    color: #dc3545;
}

.btn-wishlist-left.added-favorites:hover {
    background-color: #f8f9fa;
    border-color: #dc3545;
    color: #dc3545;
}

.btn-wishlist-left i {
    font-size: 16px;
    margin: 0;
}

.btn-wishlist-left.added-favorites i {
    color: #dc3545;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .add-to-cart-with-wishlist {
        gap: 6px;
    }

    .btn-wishlist-left {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
}

/* Additional animation override for WooCommerce loading states */
.woocommerce .single_add_to_cart_button.loading::after,
.woocommerce .single_add_to_cart_button.loading::before {
    animation: none !important;
}

.woocommerce .single_add_to_cart_button.loading {
    animation: none !important;
}

/* Disable any rotate transformations on buttons */
.single_add_to_cart_button,
.button,
.btn {
    transform: none !important;
}

/* Wishlist functionality styles */
.btn-icon-wish {
    position: relative;
    transition: all 0.3s ease;
    opacity: 1 !important; /* Make wishlist buttons visible by default */
}

.btn-icon-wish.loading {
    opacity: 0.6;
    pointer-events: none;
}

.btn-icon-wish.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.btn-icon-wish.added-wishlist {
    color: #dc3545 !important;
}

.btn-icon-wish.added-wishlist i {
    color: #dc3545 !important;
}

/* Ensure wishlist buttons are visible and properly positioned */
.product-default .btn-icon-wish {
    opacity: 1 !important;
    visibility: visible !important;
}

.product-default:hover .btn-icon-wish {
    opacity: 1 !important;
}

/* Wishlist count badge */
.wishlist-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    line-height: 18px;
    text-align: center;
    font-weight: bold;
}

/* Wishlist success message */
.wishlist-success-msg {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 4px;
    font-weight: 500;
}

/* Header wishlist icon positioning */
.header-icon {
    position: relative;
    display: inline-block;
}

.header-icon .wishlist-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 9px;
    line-height: 16px;
    text-align: center;
    font-weight: bold;
    min-width: 16px;
}