/* New Arrivals category product cards (loaded only by catalog_category_view_id_<ID>.xml). */

#html-body .na-products {
    --na-maroon: #9d1c28;
    --na-maroon-dark: #7d1520;
    --na-maroon-soft: #fbeef0;
    --na-ink: #1f1f1f;
    --na-muted: #6b6b6b;
    --na-line: #ececec;
}

/* Grid: equal-height cards */
#html-body .na-products.products-grid .product-items {
    display: flex;
    flex-wrap: wrap;
}

#html-body .na-products.products-grid .product-item.na-card {
    display: flex;
    float: none;
    margin-bottom: 24px;
}

#html-body .na-products .na-card .product-item-info {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    padding: 0;
    background: #fff;
    border: 1px solid var(--na-line);
    border-radius: 14px;
    overflow: hidden;
    text-align: start;
    transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease;
}

#html-body .na-products .na-card .product-item-info:hover {
    border-color: rgba(157, 28, 40, .35);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .08);
    transform: translateY(-3px);
}

/* Image */
#html-body .na-products .na-card__media {
    position: relative;
    padding: 12px 12px 4px;
    border-bottom: 1px solid var(--na-line);
}

#html-body .na-products .na-card__media img {
    transition: transform .35s ease;
}

#html-body .na-products .na-card .product-item-info:hover .na-card__media img.product-image-photo {
    transform: scale(1.03);
}

/* Body */
#html-body .na-products .na-card__body.product-item-details {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 12px 16px 16px;
    margin: 0;
    text-align: start;
}

#html-body .na-products .na-card__name {
    display: block;
    margin: 0 0 6px;
    min-height: 2.8em;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
}

#html-body .na-products .na-card__name .product-item-link {
    display: block;
    color: var(--na-ink);
}

#html-body .na-products .na-card__name .product-item-link:hover {
    color: var(--na-maroon);
    text-decoration: none;
}

#html-body .na-products .na-card__summary {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0 0 10px;
    color: var(--na-muted);
    font-size: 12.5px;
    line-height: 1.55;
}

/* Tags */
#html-body .na-products .na-card__tags {
    display: flex;
    flex-wrap: wrap;
    margin: 0 0 10px;
}

#html-body .na-products .na-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.35;
}

/* New Arrival tag sits on the image's bottom-left corner so it never meets the Pre-Order badge (top-right) */
#html-body .na-products .na-tag--new {
    position: absolute;
    bottom: 12px;
    left: 12px;
    z-index: 5;
    pointer-events: none;
    background: var(--na-ink);
    color: #fff;
    text-transform: uppercase;
    letter-spacing: .04em;
}

#html-body .na-products .na-tag--delivery {
    background: var(--na-maroon-soft);
    color: var(--na-maroon);
}

#html-body .na-products .na-tag__icon {
    flex: 0 0 auto;
}

/* Price */
#html-body .na-products .na-card__price.price-box {
    margin: auto 0 10px;
    padding: 0;
    text-align: start;
}

#html-body .na-products .na-card__price .price {
    color: var(--na-maroon);
    font-size: 18px;
    font-weight: 700;
}

#html-body .na-products .na-card__price .old-price {
    margin-inline-start: 8px;
    color: var(--na-muted);
    font-size: 13px;
    text-decoration: line-through;
}

/* Actions */
#html-body .na-products .na-card__actions,
#html-body .na-products .na-card__actions .product-item-actions,
#html-body .na-products .na-card__actions .actions-primary,
#html-body .na-products .na-card__actions form {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    position: static;
    opacity: 1;
    visibility: visible;
}

#html-body .na-products .na-card__actions .action.tocart,
#html-body .na-products .na-card__actions .enquiry-now-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 40px;
    margin: 0;
    padding: 0 16px;
    border: 0;
    border-radius: 10px;
    background: var(--na-maroon);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-transform: none;
    transition: background-color .2s ease;
}

#html-body .na-products .na-card__actions .action.tocart:hover,
#html-body .na-products .na-card__actions .action.tocart:focus {
    background: var(--na-maroon-dark);
    color: #fff;
}

/* Keep the label and cart icon visible: product-1 style (Arabic) hides the label up to 480px and the icon on tablets */
#html-body .na-products .na-card__actions .action.tocart span {
    display: inline;
    color: #fff;
    white-space: nowrap;
}

#html-body .na-products .na-card__actions .action.tocart:before {
    display: inline-block;
    position: static;
    margin: 0;
    color: #fff;
}

#html-body .na-products .na-card__actions .actions-secondary:empty {
    display: none;
}

/* Arabic (RTL) */
.rtl-layout#html-body .na-products .na-card .product-item-info,
.rtl-layout#html-body .na-products .na-card__body.product-item-details,
.rtl-layout#html-body .na-products .na-card__price.price-box {
    text-align: right;
}

/* List view: image beside the details */
#html-body .na-products.products-list .na-card {
    width: 100%;
    margin-bottom: 20px;
}

#html-body .na-products.products-list .na-card .product-item-info {
    flex-direction: row;
    align-items: stretch;
}

#html-body .na-products.products-list .na-card__media {
    flex: 0 0 260px;
    width: 260px;
    margin: 0;
    border: 0;
    border-inline-end: 1px solid var(--na-line);
}

.rtl-layout#html-body .na-products.products-list .na-card__media {
    border-right: 0;
    border-left: 1px solid var(--na-line);
}

#html-body .na-products.products-list .na-card__body.product-item-details {
    padding: 20px 24px;
}

#html-body .na-products.products-list .na-card__name {
    min-height: 0;
    font-size: 17px;
}

#html-body .na-products.products-list .na-card__price.price-box {
    margin-top: 0;
}

#html-body .na-products.products-list .na-card__actions .product-item-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

#html-body .na-products.products-list .na-card__actions .actions-primary {
    width: auto;
}

#html-body .na-products.products-list .na-card__actions .action.tocart {
    width: 240px;
}

#html-body .na-products.products-list .na-card__actions .actions-secondary {
    position: static;
    opacity: 1;
    visibility: visible;
    width: auto;
    margin: 0;
}

/* Columns: 3 per row on laptops/desktops (992px+), 2 per row from 414px to 991px, 1 per row below 414px.
   Set explicitly: the theme's settings CSS (media/sm/configed_css) uses 4 per row on staging/live. */
@media (min-width: 992px) {
    #html-body .na-products.products-grid .product-item.na-card {
        flex: 0 0 33.3333%;
        width: 33.3333%;
        max-width: 33.3333%;
    }
}

@media (max-width: 991px) {
    #html-body .na-products.products-grid .product-item.na-card {
        flex: 0 0 50%;
        width: 50%;
        max-width: 50%;
    }
}

@media (max-width: 413px) {
    #html-body .na-products.products-grid .product-item.na-card {
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
    }
}

/* Narrower cards (3 per row on small laptops, 2 per row on large phones): slightly smaller text and button */
@media (min-width: 992px) and (max-width: 1199px), (min-width: 414px) and (max-width: 575px) {
    #html-body .na-products.products-grid .na-card__body.product-item-details {
        padding: 10px 10px 12px;
    }

    #html-body .na-products.products-grid .na-card__name {
        font-size: 13.5px;
    }

    #html-body .na-products.products-grid .na-tag--new {
        bottom: 8px;
        left: 8px;
    }

    #html-body .na-products.products-grid .na-tag {
        font-size: 10px;
        padding: 3px 8px;
    }

    #html-body .na-products.products-grid .na-card__price .price {
        font-size: 16px;
    }

    #html-body .na-products.products-grid .na-card__actions .action.tocart {
        height: 38px;
        gap: 6px;
        padding: 0 8px;
        font-size: 13px;
    }
}

/* List view on tablets and phones: image above the details */
@media (max-width: 767px) {
    #html-body .na-products.products-list .na-card .product-item-info {
        flex-direction: column;
    }

    #html-body .na-products.products-list .na-card__media {
        flex: 0 0 auto;
        width: auto;
        border: 0;
        border-bottom: 1px solid var(--na-line);
    }

    #html-body .na-products.products-list .na-card__body.product-item-details {
        padding: 12px 14px 14px;
    }

    #html-body .na-products.products-list .na-card__actions .actions-primary,
    #html-body .na-products.products-list .na-card__actions .action.tocart {
        width: 100%;
    }
}
