/* Product card buttons: Add To Cart (light) + Order Now (green) */
.pro_btn .cart_btn a,
.pro_btn .cart_btn button,
.pro_btn .cart_btns a,
.pro_btn .cart_btns button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 38px;
    padding: 0 6px;
    border-radius: 6px !important;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, transform .1s ease;
}

.pro_btn .cart_btn a,
.pro_btn .cart_btn button {
    background: #f8f9f9;
    color: #222;
    border: 1px solid #e1e4e4;
}

/* hover / click swaps the colours: Add To Cart turns green, Order Now turns light */
.pro_btn .cart_btn a:not(.out_of_stock):hover,
.pro_btn .cart_btn a:not(.out_of_stock):active,
.pro_btn .cart_btn button:hover,
.pro_btn .cart_btn button:active {
    background: #0b9345;
    border-color: #0b9345;
    color: #fff;
}

.pro_btn .cart_btns a,
.pro_btn .cart_btns button {
    background: #0b9345;
    color: #fff;
    border: 1px solid #0b9345;
}

.pro_btn .cart_btns a:hover,
.pro_btn .cart_btns a:active,
.pro_btn .cart_btns button:hover,
.pro_btn .cart_btns button:active {
    background: #f8f9f9;
    border-color: #e1e4e4;
    color: #222;
}

.pro_btn .cart_btn a.out_of_stock,
.pro_btn .cart_btn a.out_of_stock:hover {
    background: #fff4d6;
    border-color: #f5d98b;
    color: #7a5b00;
    cursor: not-allowed;
}

/* Regular (crossed-out) price: smaller and ash grey next to the sale price */
.pro_price del {
    color: #9e9e9e;
    font-size: 13px;
    font-weight: 400;
    margin-right: 4px;
}

.big-pro-price del {
    font-size: 15px;
}

/* "% Discount" badge on product cards: slightly smaller text */
.product_item .discount p {
    font-size: 12px;
}

@media only screen and (max-width: 767px) {
    /* smaller space between the two cards side by side (homepage + listing pages) */
    .product_sliders,
    .category-product {
        column-gap: 8px;
    }

    .product_item .discount p {
        font-size: 11px;
    }

    .pro_price del {
        font-size: 12px;
    }

    .big-pro-price del {
        font-size: 13px;
    }

    /* same space on the left, right and bottom of the button row */
    .pro_btn {
        grid-gap: 6px;
        padding: 0 6px 6px;
    }

    .pro_btn .cart_btn a,
    .pro_btn .cart_btn button,
    .pro_btn .cart_btns a,
    .pro_btn .cart_btns button {
        height: 30px;
        padding: 0 3px;
        border-radius: 5px !important;
        font-size: 11px;
    }
}

@media only screen and (max-width: 360px) {
    .pro_btn .cart_btn a,
    .pro_btn .cart_btn button,
    .pro_btn .cart_btns a,
    .pro_btn .cart_btns button {
        height: 28px;
        font-size: 10px;
    }
}

/* Homepage, desktop only: the large first card fills the full height of the
   product grid beside it. The image keeps its size (so text on it is never
   cropped); the extra height is shared above the name and above the buttons,
   which then line up with the bottom row of small cards. */
@media only screen and (min-width: 768px) {
    .one-porduct,
    .one-porduct .single-product,
    .one-porduct .product_item_inners {
        height: 100%;
    }

    .one-porduct .product_item_inners {
        display: flex;
        flex-direction: column;
    }

    .one-porduct .pro_imgs {
        flex: 0 0 auto;
    }

    .one-porduct .pro_des {
        flex: 1 0 auto;
        display: flex;
        flex-direction: column;
        padding-top: 22px;
    }

    .one-porduct .pro_des .big-pro,
    .one-porduct .pro_des .pro_btn {
        margin-top: auto;
    }
}

/* Phone search bar: the text field fills all the space after the search icon,
   so no grey strip of the form background shows at the right end */
.main-search.mobile-search form input {
    flex: 1 1 auto;
    width: auto !important;
    min-width: 0;
}

/* Single product page: same colours as the product card buttons
   (the yellow "Out Of Stock" button keeps its own colour) */
.single_product .add_cart_btn:not(.bg-warning) {
    background-color: #f8f9f9;
    border: 1px solid #e1e4e4;
    color: #222;
}

.single_product .add_cart_btn:not(.bg-warning):hover,
.single_product .add_cart_btn:not(.bg-warning):active,
.single_product .add_cart_btn:not(.bg-warning):focus {
    background-color: #0b9345 !important;
    border-color: #0b9345 !important;
    color: #fff !important;
}

.single_product .order_now_btn {
    background-color: #0b9345;
    border: 1px solid #0b9345;
    color: #fff;
}

.single_product .order_now_btn:hover,
.single_product .order_now_btn:active,
.single_product .order_now_btn:focus {
    background-color: #f8f9f9 !important;
    border-color: #e1e4e4 !important;
    color: #222 !important;
}

/* Click feedback on Add To Cart / Order Now (product cards and product page):
   the button dips while pressed, and button-click.js plays a short pulse with a
   green ring on every click/tap */
.pro_btn .cart_btn a,
.pro_btn .cart_btn button,
.pro_btn .cart_btns a,
.pro_btn .cart_btns button,
.single_product .add_cart_btn:not(.bg-warning),
.single_product .order_now_btn {
    --btn-pulse: rgba(11, 147, 69, .55);
}

.single_product .add_cart_btn:not(.bg-warning),
.single_product .order_now_btn {
    transition: background-color .2s ease, border-color .2s ease, transform .1s ease;
}

.pro_btn .cart_btn a:not(.out_of_stock):active,
.pro_btn .cart_btn button:active,
.pro_btn .cart_btns a:active,
.pro_btn .cart_btns button:active,
.single_product .add_cart_btn:not(.bg-warning):active,
.single_product .order_now_btn:active {
    transform: scale(.95);
}

.btn-clicked {
    animation: btn-click-pulse .45s ease-out;
}

@keyframes btn-click-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 var(--btn-pulse);
    }
    30% {
        transform: scale(.93);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 6px transparent;
    }
}

@media (prefers-reduced-motion: reduce) {
    .btn-clicked {
        animation: none;
    }
}

/* Phone: the top bar (menu, logo, cart) stays at the top while scrolling.
   The search bar sits just after the header in the page, so it scrolls away normally. */
@media only screen and (max-width: 767px) {
    header#navbar_top {
        position: sticky;
        top: 0;
        z-index: 999;
        background-color: #fff;
        box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
    }
}

/* Footer headings (Information, Customer, Follow Us, ...) shown as written, not all capitals */
.footer-menu .title {
    text-transform: none;
}
