/* Shared layout */
.custom-cart-ui {
    width: 100%;
    margin: 20px 0;
}

/* Row for qty + button */
.custom-atc-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Quantity wrapper */
.custom-qty-wrapper {
    display: flex;
    align-items: center;
    border: 2px solid #dcdcdc;
    border-radius: 10px;
    overflow: hidden;
    height: 48px;
    flex-shrink: 0;
}

.custom-qty-wrapper input.qty {
    width: 55px;
    text-align: center;
    border: none;
    font-size: 18px;
    font-weight: 500;
    outline: none;
}

/* +/- buttons */
.qty-btn {
    background: #f5f5f5;
    border: none;
    width: 48px;
    height: 48px;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.qty-btn:hover {
    background: #e8e8e8;
}

/* Add to basket button */
.custom-atc-btn {
    background: #4cd6c0;
    color: #000;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.25s;
    flex: 1;
    text-align: center;
}

.custom-atc-btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

.custom-atc-btn:hover:not([disabled]) {
    background: #3fcab4;
}

/* Variation dropdown row (full width) */
.custom-variation-wrapper {
    width: 100%;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.custom-variation-select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #dcdcdc;
    border-radius: 10px;
    font-size: 16px;
}

.reset_variations {
    margin-top: 4px;
    font-size: 14px;
    color: #c0392b;
}

/* Mobile layout */
@media (max-width: 600px) {

    .custom-atc-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .custom-qty-wrapper {
        width: 100%;
    }

    .custom-atc-btn {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .custom-cart-ui {
        width: 100%;
    }

    .custom-atc-row {
        width: 100%;
    }

    .custom-qty-wrapper {
        width: 100%;
    }

    .custom-atc-btn {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .custom-qty-wrapper input.qty {
        width: 100%;
        max-width: none;
    }
}

@media (max-width: 600px) {
    .custom-qty-wrapper {
        width: 100%;
    }

    .custom-qty-wrapper input.qty {
        width: 100%;
        max-width: none;
        flex: 1;
    }

    .qty-btn {
        flex-shrink: 0;
    }
}



/* Hide ONLY Woo's default qty + button for variations */
.single_variation_wrap .woocommerce-variation-add-to-cart .quantity,
.single_variation_wrap .woocommerce-variation-add-to-cart .single_add_to_cart_button {
    display: none !important;
}


.reset_variations {
    display: none !important;
}


/* Remove extra spacing from Woo's variation table */
.variations {
    margin-bottom: 10px !important;
}

/* Remove spacing Woo adds around variation output */
.single_variation_wrap {
    margin: 0 !important;
    padding: 0 !important;
}

/* Tighten spacing above your custom ATC row */
.custom-atc-row {
    margin-top: 10px !important;
}




/* Remove background + borders from WooCommerce variation table */
table.variations,
table.variations tr,
table.variations td {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}



.variations select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    font-size: 16px;
}



@media (max-width: 768px) {
    .custom-qty-wrapper {
        width: 100% !important;
        display: flex;
        justify-content: space-between;
    }

    .custom-qty-wrapper input.qty {
        width: 100% !important;
        max-width: none !important;
        text-align: center;
        border: none !important;
        box-shadow: none !important;
    }

    .custom-qty-wrapper .qty-btn {
        flex: 0 0 auto;
    }
}



.custom-qty-wrapper input.qty {
    width: 70px !important;      /* enough for 4–5 digits */
    min-width: 90px !important;
    text-align: center;
    font-size: 16px;
}


.custom-atc-btn {
    height: 48px !important;          /* match qty height */
    line-height: 48px !important;     /* vertically center text */
    padding: 0 20px !important;       /* keep horizontal padding */
    display: flex;
    align-items: center;
    justify-content: center;
}