/**
 * Custom Cart Styles for Woodmart Theme
 */

/* CART WRAPPER */
.shopify-cart-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 15px;
    direction: rtl;
}

/* CART ITEM CARD */
.shopify-cart-item {
    position: relative;
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    transition: box-shadow 0.2s ease;
}

.shopify-cart-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* REMOVE BUTTON */
.shopify-cart-item-remove {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 2;
}

.shopify-remove-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    background: #f44336 !important;
    color: #ffffff !important;
    font-size: 18px !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    transition: background 0.2s ease !important;
    border: none !important;
    padding: 0 !important;
}

.shopify-remove-btn:hover {
    background: #d32f2f !important;
    color: #ffffff !important;
}

/* CART ITEM DETAILS */
.shopify-cart-item-details {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    padding-left: 40px;
}

/* IMAGE ON THE RIGHT */
.shopify-cart-item-image {
    order: -1;
    flex-shrink: 0;
    width: 90px;
    height: 90px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #f0f0f0;
}

.shopify-cart-item-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
}

.shopify-cart-item-image a {
    display: block;
    width: 100%;
    height: 100%;
}

/* PRODUCT INFO */
.shopify-cart-item-info {
    flex: 1;
    text-align: right;
}

.shopify-cart-item-name {
    margin-bottom: 4px;
}

.shopify-cart-item-name a {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    text-decoration: none;
    line-height: 1.4;
    display: block;
}

.shopify-cart-item-name a:hover {
    color: #333;
}

.shopify-cart-item-price {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.shopify-cart-item-price .amount {
    font-size: 15px;
}

.shopify-cart-item-weight {
    font-size: 13px;
    color: #999;
    margin-top: 2px;
}

/* BOTTOM ROW - SAME LINE */
.shopify-cart-item-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 18px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

/* SUBTOTAL */
.shopify-cart-item-subtotal {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
}

.shopify-cart-item-subtotal-label {
    font-weight: 600;
    margin-left: 4px;
}

.shopify-cart-item-subtotal .amount {
    font-size: 15px;
    font-weight: 600;
}

/* QUANTITY SELECTOR - + NUMBER - */
.shopify-quantity-selector {
    display: inline-flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.shopify-qty-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 40px !important;
    height: 40px !important;
    border: none !important;
    background: transparent !important;
    font-size: 20px !important;
    font-weight: 400 !important;
    color: #333 !important;
    cursor: pointer !important;
    transition: background 0.2s ease !important;
    padding: 0 !important;
    line-height: 1 !important;
    border-radius: 0 !important;
}

.shopify-qty-btn:hover {
    background: #f5f5f5 !important;
}

.shopify-qty-input {
    width: 50px !important;
    height: 40px !important;
    border: none !important;
    border-left: 1px solid #ddd !important;
    border-right: 1px solid #ddd !important;
    text-align: center !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    color: #1a1a1a !important;
    background: transparent !important;
    outline: none !important;
    padding: 0 !important;
    margin: 0 !important;
    -moz-appearance: textfield !important;
    appearance: textfield !important;
}

.shopify-qty-input::-webkit-outer-spin-button,
.shopify-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

/* =============================================
   PRODUCT PAGE QUANTITY - Cart Style Design
   ============================================= */
.woocommerce div.product .quantity,
.woocommerce-page div.product .quantity,
.woocommerce #content div.product .quantity {
    display: inline-flex !important;
    align-items: center !important;
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    direction: ltr !important;
    background: #fff !important;
}

.woocommerce div.product .quantity .qty,
.woocommerce-page div.product .quantity .qty,
.woocommerce #content div.product .quantity .qty {
    width: 50px !important;
    height: 40px !important;
    border: none !important;
    border-left: 1px solid #ddd !important;
    border-right: 1px solid #ddd !important;
    text-align: center !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    color: #1a1a1a !important;
    background: transparent !important;
    outline: none !important;
    padding: 0 !important;
    margin: 0 !important;
    -moz-appearance: textfield !important;
    appearance: textfield !important;
}

.woocommerce div.product .quantity .qty::-webkit-outer-spin-button,
.woocommerce div.product .quantity .qty::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

/* Product page: + first, number, - last */
.woocommerce div.product form.cart .quantity .plus,
.woocommerce-page div.product form.cart .quantity .plus,
.woocommerce #content div.product form.cart .quantity .plus {
    order: -2 !important;
}

.woocommerce div.product form.cart .quantity .qty,
.woocommerce-page div.product form.cart .quantity .qty,
.woocommerce #content div.product form.cart .quantity .qty {
    order: -1 !important;
}

.woocommerce div.product form.cart .quantity .minus,
.woocommerce-page div.product form.cart .quantity .minus,
.woocommerce #content div.product form.cart .quantity .minus {
    order: 0 !important;
}

/* =============================================
   PRODUCT PAGE: Custom Qty Wrapper + Total (Mobile)
   ============================================= */
.shopify-product-qty-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.shopify-product-qty-box {
    display: inline-flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    direction: ltr;
}

.shopify-product-qty-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 40px !important;
    height: 40px !important;
    border: none !important;
    background: transparent !important;
    font-size: 20px !important;
    font-weight: 400 !important;
    color: #333 !important;
    cursor: pointer !important;
    transition: background 0.2s ease !important;
    padding: 0 !important;
    line-height: 1 !important;
    border-radius: 0 !important;
}

.shopify-product-qty-btn:hover {
    background: #f5f5f5 !important;
}

.shopify-product-qty-input {
    width: 50px !important;
    height: 40px !important;
    border: none !important;
    border-left: 1px solid #ddd !important;
    border-right: 1px solid #ddd !important;
    text-align: center !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    color: #1a1a1a !important;
    background: transparent !important;
    outline: none !important;
    padding: 0 !important;
    margin: 0 !important;
    -moz-appearance: textfield !important;
    appearance: textfield !important;
}

.shopify-product-qty-input::-webkit-outer-spin-button,
.shopify-product-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

.shopify-product-total {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
}

.shopify-product-total-label {
    font-weight: 600;
}

@media screen and (max-width: 480px) {
    .shopify-product-qty-wrapper {
        flex-wrap: nowrap !important;
        gap: 10px !important;
        width: 100% !important;
    }

    .shopify-product-qty-box {
        flex-shrink: 0 !important;
    }

    .shopify-product-total {
        font-size: 14px !important;
        white-space: nowrap !important;
    }
}

/* Hide OLD WooCommerce quantity on product page */
.woocommerce div.product .quantity:not(.shopify-product-qty-wrapper),
.woocommerce-page div.product .quantity:not(.shopify-product-qty-wrapper),
.woocommerce #content div.product .quantity:not(.shopify-product-qty-wrapper) {
    display: none !important;
}

/* Hide WooCommerce form.cart default qty row */
.woocommerce div.product form.cart > .quantity,
.woocommerce-page div.product form.cart > .quantity {
    display: none !important;
}

/* CART ACTIONS */
.shopify-cart-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 25px 0;
    gap: 15px;
    flex-wrap: wrap;
}

.shopify-cart-coupon {
    display: flex;
    align-items: center;
    gap: 10px;
}

.shopify-cart-coupon .coupon {
    display: flex;
    align-items: center;
    gap: 10px;
}

.shopify-cart-coupon input.input-text {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 14px;
    height: 42px;
    direction: rtl;
}

.shopify-cart-actions button[name="update_cart"] {
    display: none !important;
}

.shopify-coupon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    height: 42px;
}

.shopify-coupon-btn:hover,
.shopify-update-btn:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

/* CART TOTALS */
.shopify-cart-totals {
    margin-top: 20px;
}

.shopify-cart-totals-inner {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 25px;
}

.shopify-cart-totals-inner .cart_totals {
    width: 100% !important;
    float: none !important;
}

.shopify-cart-totals-inner .cart_totals table {
    width: 100%;
    border-collapse: collapse;
}

.shopify-cart-totals-inner .cart_totals tr {
    border-bottom: 1px solid #f0f0f0;
}

.shopify-cart-totals-inner .cart_totals tr:last-child {
    border-bottom: none;
}

.shopify-cart-totals-inner .cart_totals td,
.shopify-cart-totals-inner .cart_totals th {
    padding: 12px 0;
    font-size: 14px;
    vertical-align: middle;
}

.shopify-cart-totals-inner .cart_totals th {
    font-weight: 500;
    color: #666;
}

.shopify-cart-totals-inner .cart_totals td {
    text-align: left;
    font-weight: 600;
    color: #1a1a1a;
}

.shopify-cart-totals-inner .cart_totals .order-total td {
    font-size: 18px;
    color: #1a1a1a;
}

.shopify-cart-totals-inner .wc-proceed-to-checkout {
    padding: 15px 0 0;
}

.shopify-cart-totals-inner .checkout-button {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    padding: 14px 20px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    background: #1a1a1a !important;
    color: #fff !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    transition: background 0.2s ease !important;
}

.shopify-cart-totals-inner .checkout-button:hover {
    background: #333 !important;
    color: #fff !important;
}

/* SHIPPING CALCULATOR */
.shipping-calculator-form {
    margin-top: 10px;
}

.shipping-calculator-form .form-row {
    margin-bottom: 10px;
}

.shipping-calculator-form select,
.shipping-calculator-form input.input-text {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 14px;
    height: 42px;
}

.shipping-calculator-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    height: 42px;
    margin-top: 5px;
}

/* RESPONSIVE */
@media screen and (max-width: 768px) {
    .shopify-cart-wrapper {
        padding: 0 10px;
    }

    .shopify-cart-item {
        padding: 15px;
        margin-bottom: 15px;
    }

    .shopify-cart-item-details {
        padding-left: 35px;
    }

    .shopify-cart-item-image {
        width: 75px;
        height: 75px;
    }

    .shopify-cart-item-name a {
        font-size: 14px;
    }

    .shopify-cart-item-price {
        font-size: 14px;
    }

    .shopify-cart-item-subtotal {
        font-size: 14px;
    }

    .shopify-qty-btn {
        width: 36px !important;
        height: 36px !important;
        font-size: 18px !important;
    }

    .shopify-qty-input {
        width: 40px !important;
        height: 36px !important;
        font-size: 14px !important;
    }

    .shopify-cart-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .shopify-cart-coupon .coupon {
        flex-direction: column;
        align-items: stretch;
    }

    .shopify-cart-coupon input.input-text {
        width: 100%;
    }

    .shopify-coupon-btn {
        width: 100%;
    }

    .shopify-cart-totals-inner {
        padding: 20px 15px;
    }
}

@media screen and (max-width: 480px) {
    .shopify-cart-item-details {
        gap: 10px;
    }

    .shopify-cart-item-image {
        width: 65px;
        height: 65px;
    }

    .shopify-remove-btn {
        width: 24px !important;
        height: 24px !important;
        font-size: 16px !important;
    }

    .shopify-cart-item-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .shopify-cart-item-subtotal {
        font-size: 15px;
    }
}

/* ANIMATIONS */
.shopify-cart-item {
    animation: fadeInUp 0.3s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.shopify-qty-input.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* =============================================
   NOTIFICATION BAR
   ============================================= */
.shopify-toast-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 15px;
    pointer-events: none;
}

.shopify-toast {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #1a1a1a;
    color: #ffffff;
    padding: 14px 24px 18px;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    font-weight: 500;
    direction: rtl;
    min-width: 280px;
    max-width: 450px;
    overflow: hidden;
    pointer-events: auto;
    animation: toastSlideIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.shopify-toast.toast-exit {
    animation: toastSlideOut 0.3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.shopify-toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
    font-size: 14px;
}

.shopify-toast-icon.toast-success {
    background: #4caf50;
    color: #fff;
}

.shopify-toast-icon.toast-remove {
    background: #f44336;
    color: #fff;
}

.shopify-toast-icon.toast-info {
    background: #2196f3;
    color: #fff;
}

.shopify-toast-message {
    flex: 1;
    line-height: 1.4;
}

.shopify-toast-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 20px;
    cursor: pointer;
    padding: 0 0 0 8px;
    line-height: 1;
    flex-shrink: 0;
    transition: color 0.2s;
}

.shopify-toast-close:hover {
    color: #fff;
}

.shopify-toast-progress {
    position: absolute;
    bottom: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 0 0 10px 0;
    transition: width linear;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
}

/* RESPONSIVE TOAST */
@media screen and (max-width: 480px) {
    .shopify-toast {
        min-width: auto;
        max-width: calc(100% - 20px);
        margin: 0 10px;
        padding: 12px 16px 16px;
        font-size: 13px;
    }
}

/* =============================================
   HIDE WOODMART DEFAULT NOTIFICATIONS - COMPLETE
   ============================================= */
/* Hide ALL Woodmart/Theme notification elements */
.woodmart-added-notification,
.wd-add-to-cart-notification,
.popup-notification,
.notification-content,
.js-notification-content,
.woodmart-notification,
.added-notification,
.wd-notification,
.woodmart-cart-notification,
.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.woocommerce-notices-wrapper,
.ajax-success-modal,
.wd-fade,
.woodmart-added-product-popup,
.woodmart-popup-content,
.wd-popup,
.popup-wrapper,
.woodmart-added-to-cart,
.woodmart-cart-suitable,
.notification,
.notification-popup,
.mini-cart-notification,
.cart-notification,
.js-cart-notification,
.wd-notification-bar,
.added_to_cart_message,
.wd-popup-notification,
.woodmart-msg,
.woodmart-msg-content,
.js-wd-message,
.wd-message,
.wd-message-bar,
.wd-msg,
.wd-notification-message,
[data-notification],
[data-popup-notification] {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    height: 0 !important;
    overflow: hidden !important;
    max-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    z-index: -9999 !important;
    position: fixed !important;
    top: -9999px !important;
    left: -9999px !important;
}

/* Hide any div that might be Woodmart notification by class pattern */
div[class*="notification"],
div[class*="Notification"],
div[class*="popup"],
div[class*="Popup"],
div[class*="added-to-cart"],
div[class*="add-to-cart-msg"],
div[class*="woodmart-msg"],
div[class*="wd-msg"] {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    height: 0 !important;
    overflow: hidden !important;
    max-height: 0 !important;
    z-index: -9999 !important;
    position: fixed !important;
    top: -9999px !important;
    left: -9999px !important;
}

/* Hide Woodmart notification by ID */
#woodmart-added-notification,
#wc-notification,
#wrapper-notification,
.js-wd-notification {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* Product page: force hide any notification that appears */
.woocommerce div.product .notification,
.woocommerce div.product .popup-notification,
.woocommerce div.product .woodmart-added-notification,
.woocommerce div.product .notification-content,
.woocommerce div.product .js-notification-content,
.woocommerce div.product .wd-add-to-cart-notification,
.woocommerce div.product .added-notification,
.woocommerce div.product .woodmart-notification,
.woocommerce div.product .woodmart-msg,
.woocommerce div.product .wd-msg,
.woocommerce div.product .ajax-success-modal,
.woocommerce div.product .wd-fade,
.woocommerce div.product [class*="notification"],
.woocommerce div.product [class*="popup"],
.woocommerce-page div.product [class*="notification"],
.woocommerce-page div.product [class*="popup"] {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    height: 0 !important;
    overflow: hidden !important;
    max-height: 0 !important;
    position: fixed !important;
    top: -9999px !important;
    left: -9999px !important;
    z-index: -9999 !important;
}

/* Global: any notification-like popup anywhere */
body > div:not(.shopify-toast-container):not([class*="header"]):not([class*="menu"]):not([class*="nav"]):not([class*="content"]):not([class*="wrapper"]):not([class*="container"]):not([class*="main"]):not([class*="footer"]):not([class*="shopify"])[class*="notification"],
body > div:not(.shopify-toast-container):not([class*="header"]):not([class*="menu"]):not([class*="nav"]):not([class*="content"]):not([class*="wrapper"]):not([class*="container"]):not([class*="main"]):not([class*="footer"]):not([class*="shopify"])[class*="popup"],
body > div:not(.shopify-toast-container):not([class*="header"]):not([class*="menu"]):not([class*="nav"]):not([class*="content"]):not([class*="wrapper"]):not([class*="container"]):not([class*="main"]):not([class*="footer"]):not([class*="shopify"])[class*="woodmart-msg"] {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}
