/* MN Add To Cart Widget Styles */

.mn-atc-wrapper {
    width: 100%;
    max-width: 600px;
}

.mn-atc-notice {
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    text-align: center;
    color: #666;
}

/* Price */
.mn-atc-price {
    margin-bottom: 15px;
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.mn-atc-price del {
    font-size: 18px;
    color: #999;
    margin-right: 10px;
}

.mn-atc-price ins {
    text-decoration: none;
    color: #e74c3c;
}

/* Stock Status */
.mn-atc-stock {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 15px;
}

.mn-atc-stock.in-stock {
    background: #d4edda;
    color: #155724;
}

.mn-atc-stock.out-of-stock {
    background: #f8d7da;
    color: #721c24;
}

/* Variations Wrapper */
.mn-atc-variations-wrapper {
    margin-bottom: 20px;
}

.mn-atc-variation-group {
    margin-bottom: 20px;
}

.mn-atc-variation-label {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.mn-atc-selected-value {
    font-weight: 400;
    color: #F6A756;
    margin-left: 5px;
}

/* Variations Container */
.mn-atc-variations {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Variation Items */
.mn-atc-variation-item {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.mn-atc-variation-item:hover {
    border-color: #F6A756;
    transform: scale(1.05);
}

.mn-atc-variation-item.active {
    border-color: #F6A756;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

.mn-atc-variation-item.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Variation Shapes - ONLY affects color and thumbnail, NOT text */
.mn-atc-shape-circle .mn-atc-variation-color,
.mn-atc-shape-circle .mn-atc-variation-thumb {
    border-radius: 50%;
}

.mn-atc-shape-square .mn-atc-variation-color,
.mn-atc-shape-square .mn-atc-variation-thumb {
    border-radius: 0;
}

.mn-atc-shape-rounded .mn-atc-variation-color,
.mn-atc-shape-rounded .mn-atc-variation-thumb {
    border-radius: 6px;
}

.mn-atc-shape-plain .mn-atc-variation-color,
.mn-atc-shape-plain .mn-atc-variation-thumb {
    border-radius: 6px;
}

/* Text variations - ALWAYS auto-width, never affected by shape setting */
.mn-atc-variation-text {
    background: #f5f5f5;
    color: #333;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 12px;
    min-width: 40px;
    width: auto !important;
    height: auto !important;
    border-radius: 6px;
}

.mn-atc-variation-text:hover {
    background: #e0e0e0;
}

.mn-atc-variation-text.active {
    background: #F6A756;
    color: #fff;
}

/* Plain style - text without border/background */
.mn-atc-shape-plain .mn-atc-variation-text {
    border: none;
    background: transparent;
    padding: 4px 8px;
    border-radius: 0;
    min-width: auto;
    box-shadow: none;
}

.mn-atc-shape-plain .mn-atc-variation-text:hover {
    border: none;
    background: transparent;
    transform: none;
    color: #F6A756;
}

.mn-atc-shape-plain .mn-atc-variation-text.active {
    border: none;
    background: transparent;
    box-shadow: none;
    color: #F6A756;
    font-weight: 700;
    text-decoration: underline;
}

/* Variation Type: Color */
.mn-atc-variation-color {
    border: 3px solid #fff;
    box-shadow: 0 0 0 1px #ddd;
}

.mn-atc-variation-color:hover {
    box-shadow: 0 0 0 2px #F6A756;
}


/* Variation Type: Thumbnail */
.mn-atc-variation-thumb {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 3px solid #fff;
    box-shadow: 0 0 0 1px #ddd;
}

.mn-atc-variation-thumb:hover {
    box-shadow: 0 0 0 2px #F6A756;
}

.mn-atc-variation-thumb.active {
    box-shadow: 0 0 0 3px #F6A756;
}

/* Variation Dropdown */
.mn-atc-variation-select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.mn-atc-variation-select:focus {
    outline: none;
    border-color: #F6A756;
}

/* Clear Button */
.mn-atc-clear-variations {
    margin-top: 10px;
    padding: 6px 12px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mn-atc-clear-variations:hover {
    background: #e0e0e0;
    color: #333;
}

/* Actions Container */
.mn-atc-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

/* Quantity */
.mn-atc-quantity {
    display: flex;
    align-items: center;
}

.mn-atc-quantity-default .mn-atc-qty-input {
    width: 80px;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    text-align: center;
    transition: border-color 0.3s ease;
}

.mn-atc-quantity-default .mn-atc-qty-input:focus {
    outline: none;
    border-color: #F6A756;
}

/* Plus/Minus Quantity */
.mn-atc-quantity-plusminus {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.mn-atc-qty-btn {
    width: 40px;
    height: 44px;
    background: #f5f5f5;
    border: none;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mn-atc-qty-btn:hover {
    background: #F6A756;
    color: #fff;
}

.mn-atc-quantity-plusminus .mn-atc-qty-input {
    width: 60px;
    height: 44px;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
}

.mn-atc-quantity-plusminus .mn-atc-qty-input:focus {
    outline: none;
}

/* Add to Cart Button */
.mn-atc-button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 30px;
    background: #F6A756;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mn-atc-button:hover {
    background: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

.mn-atc-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.mn-atc-button i {
    font-size: 18px;
}

/* Loading State */
.mn-atc-wrapper.loading .mn-atc-button {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.mn-atc-wrapper.loading .mn-atc-button::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: mn-atc-spin 0.8s linear infinite;
}

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

/* Messages */
.mn-atc-message {
    padding: 12px 15px;
    border-radius: 4px;
    font-size: 14px;
    margin-top: 15px;
    display: none;
}

.mn-atc-message.show {
    display: block;
}

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

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

/* Buy Now Button */
.mn-atc-buy-now {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 30px;
    background: #27ae60;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.mn-atc-buy-now:hover {
    background: #1e8449;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.mn-atc-buy-now:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.mn-atc-buy-now i {
    font-size: 16px;
}

/* Buy Now Layout: Inline (side by side) */
.mn-atc-buynow-inline .mn-atc-actions {
    flex-wrap: wrap;
}

.mn-atc-buynow-inline .mn-atc-button,
.mn-atc-buynow-inline .mn-atc-buy-now {
    flex: 1;
    min-width: 0;
}

/* Buy Now Layout: Stacked (below) */
.mn-atc-buynow-stacked .mn-atc-actions {
    flex-wrap: wrap;
}

.mn-atc-buynow-stacked .mn-atc-buy-now {
    width: 100%;
    flex: 0 0 100%;
    order: 10;
}

/* Loading State for Buy Now */
.mn-atc-wrapper.loading .mn-atc-buy-now {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.mn-atc-wrapper.loading .mn-atc-buy-now::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: mn-atc-spin 0.8s linear infinite;
}

/* Sticky Bottom Bar */
.mn-atc-sticky-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    padding: 10px 15px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.mn-atc-sticky-bar.visible {
    transform: translateY(0);
}

.mn-atc-sticky-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    gap: 15px;
}

.mn-atc-sticky-product {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.mn-atc-sticky-row1 {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mn-atc-sticky-thumb {
    flex-shrink: 0;
}

.mn-atc-sticky-thumb img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #eee;
}

.mn-atc-sticky-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    flex: 1;
    min-width: 0;
}

.mn-atc-sticky-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    line-height: 1.3;
}

.mn-atc-sticky-price {
    font-size: 15px;
    font-weight: 700;
    color: #e74c3c;
}

.mn-atc-sticky-price del {
    font-size: 12px;
    color: #999;
    margin-right: 4px;
}

.mn-atc-sticky-price ins {
    text-decoration: none;
}

.mn-atc-sticky-variation {
    font-size: 12px;
    color: #666;
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.mn-atc-sticky-variation.selected {
    background: #e8f5e9;
    color: #2e7d32;
}

/* Sticky bar quantity - hidden on desktop by default */
.mn-atc-sticky-quantity {
    display: none;
}

.mn-atc-sticky-buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.mn-atc-sticky-addtocart,
.mn-atc-sticky-buynow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.mn-atc-sticky-addtocart {
    background: #333;
    color: #fff;
}

.mn-atc-sticky-addtocart:hover {
    background: #555;
}

.mn-atc-sticky-buynow {
    background: #e74c3c;
    color: #fff;
}

.mn-atc-sticky-buynow:hover {
    background: #c0392b;
}

.mn-atc-sticky-addtocart:disabled,
.mn-atc-sticky-buynow:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.mn-atc-sticky-addtocart i,
.mn-atc-sticky-buynow i {
    font-size: 14px;
}

/* Sticky bar loading state */
.mn-atc-sticky-addtocart.loading,
.mn-atc-sticky-buynow.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.mn-atc-sticky-addtocart.loading::after,
.mn-atc-sticky-buynow.loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: mn-atc-spin 0.8s linear infinite;
}

/* Hide sticky bar on desktop when option enabled */
@media (min-width: 1025px) {
    .mn-atc-sticky-bar.mn-atc-sticky-hide-desktop {
        display: none !important;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .mn-atc-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .mn-atc-quantity {
        justify-content: center;
    }
    
    .mn-atc-button,
    .mn-atc-buy-now {
        width: 100%;
    }
    
    .mn-atc-price {
        font-size: 20px;
    }
    
    /* Sticky bar mobile - optimized layout */
    .mn-atc-sticky-bar {
        padding: 10px 12px;
    }
    
    .mn-atc-sticky-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .mn-atc-sticky-product {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }
    
    /* Row 1: Image + Title */
    .mn-atc-sticky-row1 {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    
    .mn-atc-sticky-thumb img {
        width: 36px;
        height: 36px;
    }
    
    .mn-atc-sticky-title {
        font-size: 13px;
        flex: 1;
    }
    
    /* Row 2: Price + Variation Summary */
    .mn-atc-sticky-meta {
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .mn-atc-sticky-price {
        font-size: 14px;
        font-weight: 700;
    }
    
    .mn-atc-sticky-variation {
        font-size: 11px;
        padding: 3px 8px;
        max-width: none;
        background: #f0f0f0;
        border-radius: 4px;
    }
    
    /* Row 3: Quantity */
    .mn-atc-sticky-quantity {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
    }
    
    .mn-atc-sticky-qty-label {
        font-size: 12px;
        font-weight: 600;
        color: #666;
    }
    
    .mn-atc-sticky-qty-controls {
        display: flex;
        align-items: center;
        border: 1px solid #ddd;
        border-radius: 6px;
        overflow: hidden;
        background: #fff;
    }
    
    .mn-atc-sticky-qty-btn {
        width: 32px;
        height: 32px;
        border: none;
        background: #f5f5f5;
        cursor: pointer;
        font-size: 16px;
        font-weight: 600;
        color: #333;
        transition: background 0.2s ease;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .mn-atc-sticky-qty-btn:hover {
        background: #e0e0e0;
    }
    
    .mn-atc-sticky-qty-input {
        width: 40px;
        height: 32px;
        border: none;
        border-left: 1px solid #ddd;
        border-right: 1px solid #ddd;
        text-align: center;
        font-size: 13px;
        font-weight: 600;
        -moz-appearance: textfield;
        appearance: textfield;
    }
    
    .mn-atc-sticky-qty-input::-webkit-outer-spin-button,
    .mn-atc-sticky-qty-input::-webkit-inner-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }
    
    /* Row 4: Buttons */
    .mn-atc-sticky-buttons {
        width: 100%;
        display: flex;
        gap: 8px;
    }
    
    .mn-atc-sticky-addtocart,
    .mn-atc-sticky-buynow {
        flex: 1;
        width: 100%;
        padding: 12px 16px;
        font-size: 13px;
        justify-content: center;
    }
    
    .mn-atc-sticky-addtocart span,
    .mn-atc-sticky-buynow span {
        display: inline;
    }
    
    .mn-atc-sticky-addtocart i,
    .mn-atc-sticky-buynow i {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .mn-atc-sticky-bar {
        padding: 8px 10px;
    }
    
    .mn-atc-sticky-thumb img {
        width: 32px;
        height: 32px;
    }
    
    .mn-atc-sticky-title {
        font-size: 12px;
    }
    
    .mn-atc-sticky-price {
        font-size: 13px;
    }
    
    .mn-atc-sticky-variation {
        font-size: 10px;
        padding: 2px 6px;
    }
    
    .mn-atc-sticky-buttons {
        gap: 6px;
    }
    
    .mn-atc-sticky-addtocart,
    .mn-atc-sticky-buynow {
        padding: 10px 12px;
        font-size: 12px;
    }
}
