/* =========================================================
   RAL CARDS / DETAIL
   MetalVal
========================================================= */

.ralCardsPage,
.ralDetailPage {
    padding: 42px 20px 80px;
}

.ralCardsPage .wrapper,
.ralDetailPage .wrapper {
    width: min(1280px, 100%);
    margin: 0 auto;
}

article.itemCharacteristics.ralCardsIntro,
article.itemCharacteristics.ralCardsIntro p {
    background: none;
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
}

/* =========================================================
   LISTING HEADER
========================================================= */

.ralCardsHead {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;

    margin-bottom: 26px;
}

.ralCardsHead h1 {
    margin: 0 0 8px;

    font-size: clamp(32px, 4vw, 52px);
    line-height: 1.08;
    font-weight: 700;

    color: #222;
}

.ralCardsHead p {
    margin: 0;

    max-width: 760px;

    font-size: 16px;
    line-height: 1.5;

    color: #666;
}

.ralCardsCount {
    flex: 0 0 auto;

    font-size: 14px;
    color: #777;

    white-space: nowrap;
}


/* =========================================================
   LISTING FILTERS
========================================================= */

.ralCardsFilters {
    display: block;
    margin-top: 15px;
    margin-bottom: 15px;
}

@media (min-width:768px) {
    .ralCardsFilters label {
        display: inline-block;
        width: calc(33% - 20px);
    }
    .ralCardsFilters label:first-child,
    .ralCardsFilters label:nth-child(2) {
        margin-right: 20px;
    }
}

@media (max-width:767px) {
    .ralCardsFilters label {
        display: block;
        width: 100%;
    }
}


.ralCardsFilters label > span {
    font-size: 13px;
    line-height: 1.2;
    color: #414141;
}

.ralCardsFilters select {
    width: 100%;
    min-height: 36px;
    padding: 0 6px;
    background: #fff;
    border: 1px solid #989898;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
}

.ralCardsFilters button,
.ralCardsReset,
a.ralCardQuote {
    display: inline-block;
    width: 132px;
    height: 36px;
    margin-right: 15px;
    padding: 4px 0;
    background: linear-gradient(rgb(242 242 242), rgb(214 214 214));
    border-radius: 4px;
    border: 1px solid rgb(196 196 196);
    font-family: Arial, sans-serif;
    font-weight: normal;
    font-size: 15px;
    color: rgb(82, 82, 82);
    text-shadow: rgb(255 255 255) 0px 1px 1px;
    text-align: center;
}

a.ralCardsReset {
    height: 28px;
    line-height: 28px;
    padding: 3px;
}

.ralCardsResultInfo {
    display: block;
    margin: 0 0 10px 0;
    padding: 0;
    font-size: 13px;
    font-weight: normal;
    color: #3b3b3b;
}
.ralFilterBox,
.ralFilters,
.ralCardsFilterActions {
    display: block;
    min-width: 100%;
    width: 100%;
}

.ralCardsFilterActions { 
    margin: 20px 0 0 0;
}


/* =========================================================
   LISTING GRID
========================================================= */

.ralCardsGrid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 22px;
}

.ralCard {
    min-width: 0;

    overflow: hidden;

    background: #fff;

    border: 1px solid #e2e2e2;
    border-radius: 14px;
}


/* =========================================================
   LISTING IMAGE / CANVAS
========================================================= */

.ralCardImage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1 / 1;
    padding: 0;
    overflow: hidden;
    background: #f7f7f7;
    text-decoration: none;
}

.ralCardCanvas {
    display: block;

    max-width: 100%;
    max-height: 100%;

    width: auto;
    height: auto;

    opacity: 0;

    transition: opacity .2s ease;
}

.ralCardCanvas.isReady {
    opacity: 1;
}

.ralCardImageLoader {
    position: absolute;

    left: 50%;
    top: 50%;

    transform: translate(-50%, -50%);

    font-size: 13px;
    line-height: 1.2;

    color: #999;

    pointer-events: none;
}

.ralCardImage.isReady .ralCardImageLoader {
    display: none;
}

.ralCardImage.isError .ralCardImageLoader {
    font-size: 0;
}

.ralCardImage.isError .ralCardImageLoader::after {
    content: 'Изображение недоступно';

    font-size: 13px;
}


/* =========================================================
   LISTING CARD CONTENT
========================================================= */

.ralCardBody {
    padding: 18px;
}

.ralCardMeta {
    margin-bottom: 6px;

    font-size: 13px;
    line-height: 1.2;

    color: #777;
}

.ralCardBody h2 {
    margin: 0 0 5px;
    font-size: 15px;
    line-height: 1.25;
    font-weight: 400;
}

.ralCardBody h2 a {
    color: #222;
    text-decoration: none;
}

.ralCardBody h2 a:hover {
    text-decoration: underline;
}

.ralCardColor {
    display: flex;
    align-items: center;
    gap: 10px;

    margin-bottom: 14px;
}

.ralCardSwatch {
    flex: 0 0 auto;

    width: 34px;
    height: 34px;

    border-radius: 50%;

    border: 1px solid rgba(0, 0, 0, .15);
}

.ralCardColor > span:last-child {
    display: grid;
    gap: 0;
    font-size: 13px;
    color: #555;
}

.ralCardColor strong {
    color: #222;
}

.ralCardBody p {
    visibility: hidden;
    display: none;
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #555;
}

.ralCardActions {
    display: flex;
    flex-wrap: wrap;

    gap: 10px;

    margin-top: 18px;
}

.ralCardActions a {
    display: inline-block;
    width: 120px;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    height: 30px;
    line-height: 30px;
    padding: 0 8px;
    border-radius: 4px;
    font-size: 14px !important;
    text-decoration: none;
    border: 1px solid #d3d3d3;
    color: #333;
    background: linear-gradient(rgb(242 242 242), rgb(214 214 214));
    text-shadow: none;
    text-align: center;    
}

.ralCardActions a:first-child {
    width: 100px;
    letter-spacing: -0.02em;
}

.ralCardActions a:last-child {
    display: inline-block;
    width: 132px;
    margin-right: 0;
    padding: 0;
    background: linear-gradient(rgb(242 242 242), rgb(214 214 214));
    border-radius: 4px;
    border: 1px solid rgb(196 196 196);
    font-family: Arial, sans-serif;
    font-weight: normal;
    font-size: 15px;
    color: rgb(82, 82, 82);
    text-shadow: rgb(255 255 255) 0px 1px 1px;
    text-align: center;
}

.ralCardsFilters button:hover,
.ralCardsReset:hover,
a.ralCardQuote:hover,
.ralCardActions a:hover {
    background: orange;
    border: 1px solid orange;
    color: #fff;
    text-shadow: none;
    text-decoration: none;
}


/* =========================================================
   BREADCRUMBS
========================================================= */

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
    font-size: 13px;
    line-height: 1.3;
    color: #777;
}

.breadcrumbs a {
    color: #555;
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}


/* =========================================================
   DETAIL LAYOUT
========================================================= */

.ralDetailGrid {
    display: grid;
    grid-template-columns:
        minmax(0, 1.12fr)
        minmax(420px, .88fr);

    gap: 34px;

    align-items: start;
}

.ralDetailGallery,
.ralDetailInfo {
    min-width: 0;
}


/* =========================================================
   DETAIL MAIN GALLERY
========================================================= */

.ralDetailGalleryMain {
    position: relative;

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

    width: 100%;
    height: 430px;

    padding: 20px;

    overflow: hidden;

    background: #f5f5f5;

    border-radius: 16px;
}

.ralDetailMainCanvas {
    display: block;

    max-width: 100%;
    max-height: 100%;

    width: auto;
    height: auto;

    opacity: 0;

    transition: opacity .2s ease;
}

.ralDetailMainCanvas.isReady {
    opacity: 1;
}

.ralDetailGalleryMain .ralCardImageLoader {
    position: absolute;

    left: 50%;
    top: 50%;

    transform: translate(-50%, -50%);

    font-size: 13px;
    color: #999;

    pointer-events: none;
}

.ralDetailGalleryMain.isReady .ralCardImageLoader {
    display: none;
}

.ralDetailGalleryMain.isError .ralCardImageLoader {
    font-size: 0;
}

.ralDetailGalleryMain.isError .ralCardImageLoader::after {
    content: 'Изображение недоступно';

    font-size: 13px;
}


/* =========================================================
   DETAIL THUMBNAILS
========================================================= */

.ralDetailThumbs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));

    gap: 10px;

    margin-top: 12px;
}

.ralDetailThumb {
    appearance: none;

    position: relative;

    display: grid;
    grid-template-rows: 88px auto;

    gap: 6px;

    min-width: 0;

    padding: 6px;

    cursor: pointer;

    background: #fff;

    border: 1px solid #dedede;
    border-radius: 10px;

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

.ralDetailThumb:hover {
    border-color: #999;
}

.ralDetailThumb.isActive {
    border-color: #333;

    box-shadow: 0 0 0 1px #333;
}

.ralDetailThumbCanvas {
    display: block;

    max-width: 100%;
    max-height: 88px;

    width: auto;
    height: auto;

    margin: auto;
}

.ralDetailThumb span {
    display: block;

    font-size: 12px;
    line-height: 1.2;

    text-align: center;

    color: #666;
}


/* =========================================================
   DETAIL INFO
========================================================= */

.ralDetailCategory {
    margin-bottom: 10px;

    font-size: 14px;
    line-height: 1.3;

    color: #777;
}

.ralDetailInfo h1 {
    margin: 0 0 20px;

    font-size: clamp(30px, 3vw, 44px);
    line-height: 1.08;
    font-weight: 700;

    color: #222;
}

.ralDetailRal {
    display: flex;
    align-items: center;

    gap: 12px;

    margin: 18px 0 24px;
}

.ralDetailSwatch {
    flex: 0 0 auto;

    width: 40px;
    height: 40px;

    border-radius: 50%;

    border: 1px solid rgba(0, 0, 0, .15);
}

.ralDetailRal > div {
    display: grid;
    gap: 2px;
}

.ralDetailRal strong {
    font-size: 16px;
    color: #222;
}

.ralDetailRal span {
    font-size: 14px;
    color: #555;
}


/* =========================================================
   DETAIL SPECS
========================================================= */

.ralDetailSpecs {
    margin: 20px 0 24px;
}

.ralDetailSpecs > div {
    display: grid;
    grid-template-columns: 145px 1fr;

    gap: 14px;

    padding: 11px 0;

    border-bottom: 1px solid #e5e5e5;
}

.ralDetailSpecs dt {
    color: #777;

    font-size: 14px;
    line-height: 1.4;
}

.ralDetailSpecs dd {
    margin: 0;

    font-size: 15px;
    line-height: 1.4;

    color: #333;
}


/* =========================================================
   DETAIL TEXT
========================================================= */

.ralDetailIntro {
    margin: 24px 0 0;

    font-size: 16px;
    line-height: 1.55;

    color: #444;
}

.ralDetailInfo h2 {
    margin: 28px 0 10px;

    font-size: 24px;
    line-height: 1.15;

    color: #222;
}

.ralDetailInfo p {
    font-size: 15px;
    line-height: 1.55;

    color: #444;
}


/* =========================================================
   DETAIL ACTIONS
========================================================= */

.ralDetailActions {
    display: flex;
    flex-wrap: wrap;

    gap: 10px;

    margin-top: 28px;
}

.ralDetailActions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 46px;

    padding: 0 18px;

    border-radius: 8px;

    font-size: 14px;
    font-weight: 500;

    text-decoration: none;
}

.buttonPrimary {
    background: #2f2f2f;
    color: #fff;

    border: 1px solid #2f2f2f;
}

.buttonSecondary {
    background: #fff;
    color: #333;

    border: 1px solid #d3d3d3;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1100px) {

    .ralCardsGrid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ralDetailGrid {
        grid-template-columns:
            minmax(0, 1fr)
            minmax(360px, .8fr);
    }

    .ralDetailGalleryMain {
        height: 400px;
    }

    .ralDetailInfo h1 {
        font-size: 34px;
    }
}


/* =========================================================
   TABLET / SMALL DESKTOP
========================================================= */

@media (max-width: 900px) {

    .ralCardsFilters {
        grid-template-columns: 1fr 1fr;
    }

    .ralDetailGrid {
        grid-template-columns: 1fr;
    }

    .ralDetailGalleryMain {
        height: 420px;
    }

    .ralDetailThumbs {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {

    .ralCardsPage,
    .ralDetailPage {
        padding: 28px 14px 60px;
    }

    .ralCardsHead {
        display: grid;
        align-items: start;

        gap: 10px;
    }

    .ralCardsFilters {
        grid-template-columns: 1fr;
    }

    .ralCardsGrid {
        grid-template-columns: 1fr;
    }

    .ralDetailGalleryMain {
        height: 320px;

        padding: 12px;

        border-radius: 12px;
    }

    .ralDetailThumbs {
        display: flex;

        overflow-x: auto;

        gap: 8px;

        padding-bottom: 4px;

        scrollbar-width: thin;
    }

    .ralDetailThumb {
        flex: 0 0 105px;

        grid-template-rows: 76px auto;
    }

    .ralDetailThumbCanvas {
        max-height: 76px;
    }

    .ralDetailInfo h1 {
        font-size: 30px;
        line-height: 1.1;
    }

    .ralDetailSpecs > div {
        grid-template-columns: 1fr;

        gap: 4px;
    }

    .ralDetailActions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .ralDetailActions a {
        width: 100%;
    }
}


/* =========================================================
   VERY SMALL MOBILE
========================================================= */

@media (max-width: 420px) {

    .ralDetailGalleryMain {
        height: 270px;
    }

    .ralDetailInfo h1 {
        font-size: 27px;
    }

    .ralCardBody h2 {
        font-size: 18px;
    }
}