﻿.am-products {
    display: grid;
    gap: 12px;
}

.am-products--fixed {
    justify-content: center;
    grid-template-columns: repeat(auto-fit, minmax(165px, 185px));
}

@media (min-width: 1280px) {
    .am-products--fixed {
        grid-template-columns: repeat(auto-fit, minmax(175px, 200px));
    }
}

.am-products--bestsellers.am-products--fixed {
    grid-template-columns: repeat(auto-fit, minmax(175px, 195px));
}

@media (min-width: 1280px) {
    .am-products--bestsellers.am-products--fixed {
        grid-template-columns: repeat(auto-fit, minmax(185px, 210px));
    }
}

.am-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 14px;
    box-shadow: 0 8px 22px rgba(0,0,0,.06);
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}

    .am-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 14px 34px rgba(0,0,0,.12);
    }

.am-card__imgwrap {
    display: block;
    padding: 6px;
    background: #fff;
    position: relative;
}

    .am-card__imgwrap::after {
        content: "";
        position: absolute;
        inset: 6px 6px 0 6px;
        border-radius: 10px;
        background: rgba(0,0,0,.05);
        opacity: 0;
        transition: opacity .35s ease;
    }

.am-card:hover .am-card__imgwrap::after {
    opacity: 1;
}

.am-card__img {
    position: relative;
    width: 100%;
    aspect-ratio: 2/3;
    border-radius: 10px;
    overflow: hidden;
    background: #f5f5f5;
}

    .am-card__img img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: contain;
        object-position: center;
        transition: opacity .35s ease;
    }

        .am-card__img img:nth-child(2) {
            opacity: 0;
        }

.am-card:hover .am-card__img img:nth-child(1):not(:only-child) {
    opacity: 0;
}

.am-card:hover .am-card__img img:nth-child(2) {
    opacity: 1;
}

.am-card:hover .am-card__img img:only-child {
    opacity: 1;
}

.am-card__badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    background: var(--am-red, #0F4C5C);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 5px 8px;
    border-radius: 8px;
}

.am-card__body {
    padding: 8px 10px 12px;
}

.am-card__brand {
    font-size: 11px;
    color: var(--am-muted, #666);
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.am-card__title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 40px;
    font-family: "Montserrat","Segoe UI",Roboto,Arial,sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.38;
    letter-spacing: -.01em;
    color: #1f2937;
    text-decoration: none;
}

    .am-card__title:hover {
        text-decoration: none;
        color: #111827;
    }

.am-card__price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.am-card__now {
    font-family: "Montserrat","Segoe UI",Roboto,Arial,sans-serif;
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
    line-height: 1.1;
    color: #111827;
    letter-spacing: -.02em;
}

.am-card__old {
    font-family: "Roboto","Segoe UI",Arial,sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: #9ca3af;
    text-decoration: line-through;
    white-space: nowrap;
    line-height: 1.1;
}

@media (min-width: 1024px) {
    .am-card__now {
        font-size: 16.5px;
    }

    .am-card__old {
        font-size: 12.5px;
    }
}

.am-card__actions {
    margin-top: 11px;
}

.am-card__addbtn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    background: var(--am-red, #0F4C5C);
    color: #fff;
    border: 0;
    border-radius: 12px;
    padding: 10px 12px;
    font-family: "Montserrat","Segoe UI",Roboto,Arial,sans-serif;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .01em;
    text-transform: none;
    box-shadow: 0 10px 24px rgba(15, 76, 92, .22);
    transition: transform .15s ease, filter .15s ease, box-shadow .15s ease;
}

.am-card__addico {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
}

.am-card__addtxt {
    font-family: "Montserrat","Segoe UI",Roboto,Arial,sans-serif;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.2;
}

.am-card__addbtn:hover:not([disabled]) {
    transform: translateY(-1px);
    filter: brightness(.98);
    box-shadow: 0 12px 28px rgba(15, 76, 92, .28);
}

.am-card__addbtn:active:not([disabled]) {
    transform: translateY(0);
}

.am-card__addbtn[disabled] {
    opacity: .55;
    cursor: not-allowed;
    box-shadow: none;
}

.am-rowrail {
    margin-top: 28px;
}

.am-rowrail__title {
    text-align: center;
    font-family: "Montserrat","Segoe UI",Roboto,Arial,sans-serif;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #1f2937;
    margin: 0 0 14px;
}

.am-rowrail__view {
    position: relative;
    display: block;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding: 4px 8px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

    .am-rowrail__view::-webkit-scrollbar {
        display: none;
    }

.am-rowrail__track {
    display: flex;
    align-items: stretch;
    gap: 12px;
}

.am-rowrail__item {
    flex: 0 0 195px;
    min-width: 195px;
}

@media (min-width: 1280px) {
    .am-rowrail__item {
        flex-basis: 215px;
        min-width: 215px;
    }
}

.am-rowrail__btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid #e6e6e6;
    background: #fff;
    display: grid;
    place-items: center;
    box-shadow: 0 6px 16px rgba(0,0,0,.08);
    cursor: pointer;
    opacity: 0;
    transition: opacity .2s ease, transform .2s ease;
    z-index: 2;
}

    .am-rowrail__btn svg {
        width: 18px;
        height: 18px;
        fill: none;
        stroke: #222;
        stroke-width: 2;
    }

    .am-rowrail__btn.prev {
        left: 6px;
    }

    .am-rowrail__btn.next {
        right: 6px;
    }

.am-rowrail:hover .am-rowrail__btn {
    opacity: 1;
}

.am-rowrail__btn:active {
    transform: translateY(-50%) scale(.97);
}

@media (max-width: 640px) {
    .am-rowrail__item {
        flex-basis: 195px;
        min-width: 195px;
    }

    .am-card__addbtn .am-card__addico {
        display: none;
    }

    .am-card__addbtn {
        padding: 10px 10px;
        gap: 0;
        text-transform: none;
    }

    .am-card__addtxt {
        font-size: 11.5px;
        line-height: 1.2;
        white-space: normal;
        text-align: center;
    }

    .am-card__price {
        flex-direction: column;
        align-items: flex-start;
        gap: 3px;
        min-height: 38px;
    }

    .am-card__now {
        font-size: 15px;
    }

    .am-card__old {
        font-size: 11.5px;
    }
}

@media (max-width: 420px) {
    .am-card__addtxt {
        font-size: 11px;
    }
}

.am-card__metaRow,
.am-card__qty,
.am-card__cmpbtn {
    display: none;
}

@media (min-width: 769px) {
    .am-product-grid.am-grid-list .am-card__metaRow {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-top: 8px;
        flex-wrap: wrap;
    }

    .am-product-grid.am-grid-list .am-card__rating {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-size: 12px;
        color: #444;
        border: 1px solid rgba(0,0,0,.10);
        background: #fff;
        padding: 6px 10px;
        border-radius: 999px;
        white-space: nowrap;
    }

    .am-product-grid.am-grid-list .am-card__star {
        font-size: 13px;
        line-height: 1;
    }

    .am-product-grid.am-grid-list .am-card__rateval {
        font-weight: 800;
    }

    .am-product-grid.am-grid-list .am-card__ratecnt {
        opacity: .75;
    }

    .am-product-grid.am-grid-list .am-card__norate {
        margin-left: 6px;
        opacity: .7;
        font-weight: 700;
    }

    .am-product-grid.am-grid-list .am-card__actions {
        display: flex;
        align-items: stretch;
        gap: 10px;
        margin-top: 12px;
    }

    .am-product-grid.am-grid-list .am-card__qty {
        display: inline-flex;
        align-items: stretch;
        border: 1px solid rgba(0,0,0,.12);
        border-radius: 12px;
        overflow: hidden;
        height: 40px;
        background: #fff;
        flex: 0 0 auto;
    }

    .am-product-grid.am-grid-list .am-card__qty-btn {
        width: 38px;
        border: 0;
        background: #fff;
        font-weight: 900;
        cursor: pointer;
    }

        .am-product-grid.am-grid-list .am-card__qty-btn:hover {
            background: #f7f7f7;
        }

    .am-product-grid.am-grid-list .am-card__qty-inp {
        width: 48px;
        border: 0;
        text-align: center;
        font-weight: 800;
        outline: none;
    }

    .am-product-grid.am-grid-list .am-card__addbtn {
        flex: 1 1 auto;
        width: 100%;
        height: 40px;
        padding: 0 14px;
        text-transform: none;
        letter-spacing: 0;
        border-radius: 12px;
        justify-content: center;
    }

    .am-product-grid.am-grid-list .am-card__addtxt {
        white-space: nowrap;
    }

    .am-product-grid.am-grid-list .am-card__cmpbtn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        height: 40px;
        padding: 0 12px;
        border-radius: 12px;
        border: 1px solid rgba(0,0,0,.12);
        background: #fff;
        color: inherit;
        font-weight: 800;
        font-size: 12px;
        cursor: pointer;
        white-space: nowrap;
        flex: 0 0 auto;
    }

        .am-product-grid.am-grid-list .am-card__cmpbtn:hover {
            border-color: rgba(0,0,0,.22);
            background: #f9f9f9;
        }
}
