.position-relative{
    position: relative;
}
/* --------------Checkout Page-------------- */
/* Updated styles are in Cart Item Controls section below */
.checkout-page-header {
    margin: 15px 0;
}

#dintero-checkout-order-review .cart_item button {
    margin: 0;
}

/* Cart Item Controls */
.cart-item-info {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.cart-item-info .product-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    margin-right: 0;
    flex-shrink: 0;
}

.cart-item-info .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.remove-cart-item {
    position: absolute;
    top: 10px;
    right: -5px;
    width: 38px;
    height: 20px;
    color: #888;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    line-height: 1;
    z-index: 100;
}

.remove-cart-item:hover {
    color: #f00;
    transform: color 0.2s ease;
}

.remove-cart-item svg {
    width: 45px;
    height: 45px;
    fill: currentColor;
}

.quantity-controls {
    display: flex;
    align-items: center;
    margin: 8px 0;
    gap: 0;
    position: relative;
    z-index: 1;
    max-width: 120px;
}
.quantity-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
    transition: all 0.2s ease;
    border-radius: 4px;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    user-select: none;
    position: relative;
    z-index: 1;
    padding: 5px;
    min-width: 35px !important;
    min-height: 35px;
    margin: 0 !important;
}

.quantity-btn.without-button{
    min-width: 35px !important;
    padding: 2px !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

.quantity-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.quantity-btn:active {
    background: #dee2e6;
    transform: scale(0.95);
}

.quantity-btn:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.quantity-plus::before {
    content: '+';
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
}

.quantity-minus::before {
    content: '−';
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
}

.cart-item-data {
    flex: 1;
    min-width: 0;
}

.qty-input {
    text-align: center !important;
    background: white;
    font-weight: 500;
    margin: 0;
    padding: 0 2px 0 15px !important;
    justify-content: center;
    box-shadow: none !important;
    border: 0 !important;
}

.qty-input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0,124,186,0.1);
}

/* Loading states */
.cart_item.updating {
    opacity: 0.6;
    pointer-events: none;
}

.product-total {
    vertical-align: bottom;
}

.loading-spinner {
    width: 12px;
    height: 12px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Norwegian-style messages */
.woocommerce-message,
.woocommerce-error {
    padding: 12px 16px;
    margin-bottom: 15px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
}

.woocommerce-message {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.woocommerce-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}
.checkout.woocommerce-checkout .col-inner.has-border {
    border: 0;
    padding-top: 0;
}
#customer_details .form-row:first-child .input-text {
    border-right: 0;
}

#customer_details .form-row {
    margin: 0;
}
#customer_details .input-text {
    box-shadow: none;
    height: 50px;
}
#customer_details .form-row-last .input-text {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

#customer_details .form-row-first .input-text {
    border-right: 0;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}
#customer_details .form-row-first, #customer_details .form-row-last {
    flex: 1;
    width: 50%;
}
#customer_details .form-row-wide .input-text {
    border-radius: 8px;
}
/* Coupon form styles */
/*
.coupon {
    transition: all 0.3s ease;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin-bottom: 0;
}

.coupon.active {
    max-height: 100px;
    opacity: 1;
    margin-bottom: 15px;
}
*/
.coupon input[name="coupon_code"] {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
    width: 100%;
}

.coupon input[name="coupon_code"]:focus {
    border-color: #007cba;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0,124,186,0.1);
}

.coupon button[name="apply_coupon"] {
    background: #007cba;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.coupon button[name="apply_coupon"]:hover:not(:disabled) {
    background: #005a87;
}

.coupon button[name="apply_coupon"]:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Coupon message styles */
.coupon-message {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    margin-top: 10px;
    margin-bottom: 15px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    animation: slideDown 0.3s ease-out;
}

.coupon-message-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.coupon-message-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.coupon-message .message-icon {
    flex-shrink: 0;
}

.coupon-message-success .message-icon {
    stroke: #155724;
}

.coupon-message-error .message-icon {
    stroke: #721c24;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#dintero-checkout-order-review .button.expand,
.checkout-form-content .button.expand{
    font-size: 14px;
    line-height: 1;
    font-weight: 400;
    text-transform: capitalize;
    padding: 0 14px !important;
    border-radius: 8px;
    margin-right: 0;
    height: 50px;
    min-width:62px;
    border: 1px solid #ddd;
    background-color: #00000008;
    color: #666;
}
#dintero-checkout-order-review .coupon .flex-row.medium-flex-wrap {
    gap: 15px;
}
.checkout-form-content #payment {
    margin-top: 15px;
}
#dintero-checkout-order-review .coupon {
    margin-top: 15px;
}
#dintero-checkout-order-review .button.expand:hover {
    background-color: rgb(0 0 0 / .4%) !important;
}
#dintero-checkout-order-review .woocommerce-info .message-container {
    margin-bottom: 5px;
    text-align: left !important;
}
#coupon_code {
    padding: 14px 12px !important;
    height: 50px;
    font-weight: 500;
    box-shadow: none;
    border-radius: 8px;
}
.woocommerce-NoticeGroup-checkout .message-container {
    margin-bottom: 0;
    font-size: 14px;
}
.woocommerce-NoticeGroup-checkout {
    margin-bottom: 30px;
}
.button.checkout, .checkout-button {
    background-color: var(--fs-color-primary) !important;
}
.coupon button[name="apply_coupon"] {
    justify-content: center;
    display: flex;
    align-items: center;
}
.coupon button[name="apply_coupon"] .loading-spinner {
    border: 2px solid #666;
    border-top: 2px solid transparent;
    width: 16px;
    height: 16px;
}
.woocommerce-checkout-review-order-table tfoot tr th,
.woocommerce-checkout-review-order-table tfoot tr td,
.woocommerce-checkout-review-order-table thead tr th,
.woocommerce-checkout-review-order-table thead tr td{
    border-bottom: 1px solid #ddd !important;
}
.shipping__table.shipping__table--multiple,
.woocommerce-privacy-policy-text,
#customer_details,#place_order{
    display: none;
}
#place_order {
    border-radius: 8px !important;
}
.woocommerce-billing-fields h3 {
    font-size: 16px !important;
    line-height: 24px;
    margin-top: 0;
    margin-bottom: 16px;
    font-family: Inter, -apple-system !important;
    font-weight: 500 !important;
}
.woocommerce-billing-fields .checkout-title{
    font-size: 20px !important;
    line-height: 28px !important;
    font-style: normal;
    font-weight: 600;
    letter-spacing: -0.4px;
    margin-bottom: 16px !important;
}
.woocommerce-checkout-review-order-table .cart-item-title{
    font-weight: 500 !important;
}
.page-wrapper {
    padding-top: 0 !important;
    padding-bottom : 0 !important;
}
#dintero-checkout-order-review th:last-child {
    text-align: right;
}
#dintero-checkout-select-other{
    display: none;
}
#black-studio-tinymce-9 {
    text-align: center;
}

/* --------------/Checkout Page-------------- */

/*********** Smartphones ************/

@media only screen and (min-width : 320px) and (max-width : 480px) {
    /* Styles */
}

@media only screen and (max-width : 767px) {
    /* Styles */
    .swiper-wrapper.justify-center-m{
        justify-content: center;
    }
    #dintero-checkout-order-review {
        padding: 0 8px;
    }
    .checkout-page-header {
        margin: 15px 0;
        padding: 0 6px;
    }
    .checkout-page-header .page-title {
        font-size: 20px;
        line-height: 28px;
    }
    .shop_table .product-name {
        min-width: 260px;
    }
    
    /* Mobile cart controls */
    .cart-item-info {
        flex-direction: row;
        align-items: flex-start;
        gap: 8px;
    }
    
    .cart-item-info .product-image {
        width: 50px;
        height: 50px;
        margin-right: 0;
    }
    
    .cart-item-data {
        width: 100%;
        flex: 1;
    }
    
    .quantity-controls {
        justify-content: flex-start;
        margin: 4px 0;
    }
    
    .quantity-btn {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    
    .qty-input {
        width: 50px;
        height: 28px;
        font-size: 13px;
    }

    .remove-cart-item {
        width: 38px;
    }
    
    #dintero-checkout-order-review .flex-row .flex-col.flex-grow {
        width: 80% !important;
        flex-grow: 1;
    }
    #dintero-checkout-order-review .flex-row .flex-col {
        width: 20%;
    }
    #dintero-checkout-order-review .woocommerce-info {
        padding-bottom: 0;
    }
    /*
    #dintero-checkout-iframe:after {
        content: '';
        width: 100%;
        position: absolute;
        bottom: 0;
        height: 80px;
        background-color: #fff;
    }
    */
    #dintero-checkout-iframe:after {
        content: '';
        width: 100%;
        position: absolute;
        bottom: 2px;
        height: 60px;
        background-color: #fff;
    }
    .woocommerce-checkout {
        margin-bottom: -25px;
    }
    .qty-input {
        padding: 0 2px 0 2px !important;
    }
    #customer_details .form-row-last .input-text,
    #customer_details .form-row-first .input-text{
        border-radius: 8px !important;
    }
    #customer_details .form-row:first-child .input-text,
    #customer_details .form-row-first .input-text{
        border-right: 1px solid #ddd;
    }
    #customer_details .form-row-first, #customer_details .form-row-last {
        flex: 1;
        width: 100%;
    }
    .checkout.woocommerce-checkout .col-inner.has-border {
        padding: 0 !important;
    }
    .checkout-form-content.row {
        flex-direction: column-reverse !important;
    }
    .checkout-form-content .col {
        padding-left: 23px;
        padding-right: 23px;
    }

}

/************* Tablets **************/

@media only screen and (min-width : 768px) and (max-width : 991px) {
    /* Styles */
    .swiper-wrapper.justify-center-t{
        justify-content: center;
    }
}

@media only screen and (min-width : 768px) and (max-width : 1024px) {

}

/************* Desktops ***************/

@media only screen and (min-width : 992px) and (max-width : 1199px) {
    /* Styles */
}

@media only screen and (max-width : 1200px) {
    /* Styles */
}
@media only screen and (min-width : 992px) {
    /* Styles */
    .checkout-page-header .page-title {
        text-align: center;
    }
    .swiper-wrapper.justify-center-d{
        justify-content: center;
    }
    #dintero-checkout-iframe iframe {
        margin: -30px;
    }
    .dintero-checkout-two-column-left #dintero-express-wrapper,
    .dintero-checkout-two-column-left-sf #dintero-express-wrapper {
        grid-column-gap: 0;
    }
}
@media (min-width: 850px) {
    body.woocommerce-checkout .checkout.woocommerce-checkout {
        margin-top: 40px;
        margin-bottom: 60px;
    }
}