/* =========================================================
   COD SHOP - PROFESSIONAL STOREFRONT
========================================================= */


/* Main product area */
#product-listing {
    padding-top: 5px;
}


/* ---------------------------------------------------------
   CUSTOM SEARCH
--------------------------------------------------------- */

#cod-search-wrapper {
    position: relative;
    margin-bottom: 25px !important;
}

#cod-product-search {
    width: 100% !important;
    height: 50px !important;
    padding: 0 18px !important;

    border: 1px solid #d8dee8 !important;
    border-radius: 10px !important;

    background: #ffffff !important;

    font-size: 15px !important;
    font-weight: 400;

    box-shadow:
        0 1px 2px rgba(0,0,0,0.03),
        0 3px 10px rgba(0,0,0,0.04);

    transition:
        border-color .2s ease,
        box-shadow .2s ease;
}

#cod-product-search:focus {
    border-color: #2563eb !important;
    box-shadow:
        0 0 0 3px rgba(37,99,235,0.10) !important;

    outline: none !important;
}


/* ---------------------------------------------------------
   NORMAL PRODUCT CARDS
--------------------------------------------------------- */

#products-grid-area .item-card {
    border: 1px solid #e7eaf0 !important;
    border-radius: 12px !important;

    background: #ffffff;

    overflow: hidden;

    transition:
        transform .2s ease,
        box-shadow .2s ease,
        border-color .2s ease;
}

#products-grid-area .item-card:hover {
    transform: translateY(-3px);

    border-color: #d5dae3 !important;

    box-shadow:
        0 10px 25px rgba(0,0,0,0.08);
}


/* Product image */
#products-grid-area .card-img-container {
    background: #ffffff;

    padding: 15px;

    min-height: 190px;

    display: flex;
    align-items: center;
    justify-content: center;
}

#products-grid-area .card-img-container img {
    max-height: 180px;
    object-fit: contain;

    transition: transform .25s ease;
}

#products-grid-area .item-card:hover img {
    transform: scale(1.03);
}


/* ---------------------------------------------------------
   ADD TO CART BUTTON
--------------------------------------------------------- */

.cod-buy-button,
.cod-search-add {
    width: 100% !important;

    min-height: 44px;

    border: none !important;

    border-radius: 8px !important;

    background: #2563eb !important;

    color: #ffffff !important;

    font-size: 14px !important;
    font-weight: 600 !important;

    cursor: pointer;

    transition:
        background .2s ease,
        transform .1s ease,
        box-shadow .2s ease;
}

.cod-buy-button:hover,
.cod-search-add:hover {
    background: #1d4ed8 !important;

    box-shadow:
        0 5px 12px rgba(37,99,235,0.22);
}

.cod-buy-button:active,
.cod-search-add:active {
    transform: scale(.98);
}


/* ---------------------------------------------------------
   SEARCH RESULT GRID
--------------------------------------------------------- */

#cod-search-results {
    display: none;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 22px !important;

    width: 100%;
}


/* Search result cards */
#cod-search-results > div {
    border: 1px solid #e7eaf0 !important;

    border-radius: 12px !important;

    background: #ffffff !important;

    overflow: hidden;

    box-shadow:
        0 1px 3px rgba(0,0,0,0.03);

    transition:
        transform .2s ease,
        box-shadow .2s ease;
}

#cod-search-results > div:hover {
    transform: translateY(-3px);

    box-shadow:
        0 10px 25px rgba(0,0,0,0.08);
}


/* Search result images */
#cod-search-results img {
    max-width: 100%;
    max-height: 190px;

    object-fit: contain;
}


/* ---------------------------------------------------------
   CART BUTTON
--------------------------------------------------------- */

#cod-cart-link {
    position: fixed !important;

    top: 18px !important;
    right: 25px !important;

    z-index: 9999 !important;

    padding: 11px 18px !important;

    border-radius: 10px !important;

    background: #111827 !important;

    color: #ffffff !important;

    text-decoration: none !important;

    font-size: 14px !important;
    font-weight: 600 !important;

    box-shadow:
        0 5px 18px rgba(0,0,0,0.18) !important;

    transition:
        transform .2s ease,
        box-shadow .2s ease;
}

#cod-cart-link:hover {
    transform: translateY(-1px);

    box-shadow:
        0 8px 22px rgba(0,0,0,0.22) !important;

    color: #ffffff !important;
}


/* ---------------------------------------------------------
   CATEGORY / PAGE HEADING
--------------------------------------------------------- */

.page-title,
.product-listing-heading,
h1 {
    font-weight: 700;
}


/* ---------------------------------------------------------
   MOBILE / TABLET
--------------------------------------------------------- */

@media (max-width: 991px) {

    #cod-search-results {
        grid-template-columns:
            repeat(2, minmax(0, 1fr)) !important;
    }

}


@media (max-width: 600px) {

    #cod-search-results {
        grid-template-columns:
            1fr !important;
    }

    #cod-product-search {
        height: 46px !important;
    }

    #cod-cart-link {
        top: 10px !important;
        right: 10px !important;

        padding: 9px 13px !important;

        font-size: 13px !important;
    }

}

/* Hide Webshop stock warning in Grid + List view */
.out-of-stock {
    display: none !important;
    visibility: hidden !important;
}

/* Fix Add to Cart position in list view */
#products-grid-area .card.text-left .card-body {
    display: flex !important;
    flex-direction: column !important;
}

#products-grid-area .card.text-left .cod-buy-button {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    margin-top: 12px !important;
    flex: 0 0 auto !important;
}
