/* ==============================================
   ONE ADD TO CART BUTTON - BASE STYLES
   ============================================== */
.oe-add-to-cart-wrapper {
    position: relative;
}

.oe-add-to-cart-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    border: none;
    outline: none;
    transition: all 0.3s ease;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.oe-add-to-cart-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Image Button */
.oe-add-to-cart-btn.image-button {
    padding: 0;
    background: transparent;
    border: none;
}

.oe-add-to-cart-btn.image-button img {
    display: block;
    max-width: 100%;
    height: auto;
    transition: all 0.3s ease;
}

/* ==============================================
   POPUP STYLES
   ============================================== */
.oe-atc-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.oe-atc-popup.active {
    opacity: 1;
    visibility: visible;
}

.oe-atc-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.oe-atc-popup-content {
    position: relative;
    background: #ffffff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 90%;
    z-index: 2;
    transition: all 0.3s ease;
}

/* Modal Style (Center) */
.oe-atc-popup.modal .oe-atc-popup-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
}

.oe-atc-popup.modal.active .oe-atc-popup-content {
    transform: translate(-50%, -50%) scale(1);
}

/* Slide Style (Right) */
.oe-atc-popup.slide .oe-atc-popup-content {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    max-width: 400px;
    transform: translateX(100%);
    border-radius: 0;
}

.oe-atc-popup.slide.active .oe-atc-popup-content {
    transform: translateX(0);
}

/* Close Button */
.oe-atc-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: #666;
    transition: all 0.3s ease;
    z-index: 10;
}

.oe-atc-popup-close:hover {
    color: #333;
    transform: rotate(90deg);
}

.oe-atc-popup-close svg {
    display: block;
}

/* Product Info */
.oe-atc-popup-product {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

.oe-atc-popup-product-image {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
}

.oe-atc-popup-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.oe-atc-popup-product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.oe-atc-popup-product-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
}

.oe-atc-popup-product-price {
    font-size: 20px;
    font-weight: bold;
    color: #8B4513;
}

.oe-atc-popup-product-price del {
    font-size: 16px;
    color: #999;
    margin-right: 10px;
}

.oe-atc-popup-product-description {
    margin-top: 10px;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

/* Quantity Section */
.oe-atc-popup-quantity {
    margin-bottom: 25px;
}

.oe-atc-popup-quantity label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
}

/* Variations Section */
.oe-atc-popup-variations {
    margin-bottom: 25px;
}

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

.oe-variation-group:last-child {
    margin-bottom: 0;
}

.oe-variation-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.oe-variation-select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 15px;
    color: #333;
    background-color: #fff;
    transition: all 0.3s ease;
    cursor: pointer;
}

.oe-variation-select:focus {
    outline: none;
    border-color: #8B4513;
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1);
}

.oe-variation-select:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.6;
}

.oe-quantity-selector {
    display: flex;
    align-items: center;
    gap: 0;
    max-width: 150px;
}

.oe-qty-minus,
.oe-qty-plus {
    width: 40px;
    height: 40px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    transition: all 0.3s ease;
}

.oe-qty-minus {
    border-radius: 5px 0 0 5px;
}

.oe-qty-plus {
    border-radius: 0 5px 5px 0;
}

.oe-qty-minus:hover,
.oe-qty-plus:hover {
    background: #8B4513;
    color: #fff;
    border-color: #8B4513;
}

.oe-quantity-input {
    width: 70px;
    height: 40px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    border: 1px solid #ddd;
    border-left: none;
    border-right: none;
    color: #333;
}

.oe-quantity-input:focus {
    outline: none;
    border-color: #8B4513;
}

/* Add to Cart Button in Popup */
.oe-atc-popup-add-btn {
    width: 100%;
    padding: 15px;
    background: #8B4513;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.oe-atc-popup-add-btn:hover {
    background: #5d2e0f;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 69, 19, 0.3);
}

.oe-atc-popup-add-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.oe-atc-popup-add-btn.loading {
    pointer-events: none;
}

.oe-atc-popup-add-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: oe-spin 0.6s linear infinite;
}

@keyframes oe-spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.oe-atc-popup-add-btn.loading span {
    opacity: 0;
}

/* ==============================================
   TOAST NOTIFICATION
   ============================================== */
/* ==============================================
   Toast Notification
   ============================================== */
.oe-atc-toast {
    position: fixed;
    background-color: #4caf50;
    color: #ffffff;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999999;
    font-size: 14px;
    font-weight: 500;
    min-width: 250px;
    max-width: 400px;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Position variants */
.oe-atc-toast.top-left {
    top: 20px;
    left: 20px;
    transform: translateX(-500px);
}

.oe-atc-toast.top-center {
    top: 20px;
    left: 50%;
    transform: translate(-50%, -100px);
}

.oe-atc-toast.top-right {
    top: 20px;
    right: 20px;
    transform: translateX(500px);
}

.oe-atc-toast.bottom-left {
    bottom: 20px;
    left: 20px;
    transform: translateX(-500px);
}

.oe-atc-toast.bottom-center {
    bottom: 20px;
    left: 50%;
    transform: translate(-50%, 100px);
}

.oe-atc-toast.bottom-right {
    bottom: 20px;
    right: 20px;
    transform: translateX(500px);
}

/* Show state */
.oe-atc-toast.show.top-left,
.oe-atc-toast.show.top-right,
.oe-atc-toast.show.bottom-left,
.oe-atc-toast.show.bottom-right {
    opacity: 1;
    transform: translateX(0);
}

.oe-atc-toast.show.top-center,
.oe-atc-toast.show.bottom-center {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* Error state */
.oe-atc-toast.error {
    background-color: #f44336;
}

/* ==============================================
   Responsive
   ============================================== */

/* ==============================================
   ICON ALIGNMENT
   ============================================== */
.oe-add-to-cart-btn.icon-left {
    flex-direction: row;
}

.oe-add-to-cart-btn.icon-right {
    flex-direction: row-reverse;
}

/* ==============================================
   RESPONSIVE
   ============================================== */
@media (max-width: 768px) {
    .oe-add-to-cart-btn {
        font-size: 14px;
        padding: 12px 24px;
    }

    .oe-atc-popup-content {
        width: 95%;
        max-width: none;
    }

    .oe-atc-popup.slide .oe-atc-popup-content {
        max-width: 100%;
        width: 85%;
    }

    .oe-atc-popup-product {
        flex-direction: column;
        text-align: center;
    }

    .oe-atc-popup-product-image {
        width: 100%;
        height: 200px;
    }

    .oe-atc-toast {
        right: 10px !important;
        left: 10px !important;
        min-width: auto;
        max-width: none;
        transform: translateY(-100px) !important;
    }

    .oe-atc-toast.show {
        transform: translateY(0) !important;
    }
}

@media (max-width: 480px) {
    .oe-atc-popup-product-title {
        font-size: 16px;
    }

    .oe-atc-popup-product-price {
        font-size: 18px;
    }

    .oe-atc-toast {
        padding: 12px 15px;
        font-size: 13px;
    }
}