﻿
:root {
    --wine: #762d43;
    --wine-dark: #572033;
    --wine-soft: #a45b6e;
    --gold: #bd9854;
    --gold-light: #e8d8b5;
    --ink: #30272a;
    --muted: #94878b;
    --surface: #ffffff;
    --page-bg: #fbfaf8;
    --border: rgba(189, 152, 84, 0.19);
    --shadow: 0 8px 30px rgba(65, 35, 45, 0.045);
}


/* ================================
   MAIN PAGE
================================ */

.products-section {
    width: 100%;
    max-width: 1500px;
    margin-inline: auto;
    padding: 65px 35px 90px;
}


/* ================================
   HEADER
================================ */

.products-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    padding-bottom: 32px;
    margin-bottom: 35px;
    border-bottom: 1px solid var(--border);
}

.header-content {
    min-width: 0;
}

.section-kicker {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 13px;
    color: var(--gold);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
}

    .section-kicker span {
        width: 28px;
        height: 1px;
        background: var(--gold);
    }

.section-title {
    margin: 0;
    color: var(--wine-dark);
    font-size: clamp(25px, 3vw, 36px);
    font-weight: 900;
    line-height: 1.7;
}

.section-caption {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 2;
}


/* PRODUCT COUNT */

.header-count {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 125px;
    padding: 15px 22px;
    border: 1px solid var(--border);
    border-radius: 17px;
    background: var(--surface);
}

.count-label {
    color: var(--muted);
    font-size: 11px;
}

.header-count strong {
    margin: 2px 0;
    color: var(--wine);
    font-size: 27px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.count-caption {
    color: var(--muted);
    font-size: 10px;
}


/* ================================
   PRODUCTS GRID
================================ */

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 25px;
}


/* ================================
   PRODUCT CARD
================================ */

.product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 11px;
    overflow: hidden;
    color: var(--ink);
    text-decoration: none;
    background: var(--surface);
    border: 1px solid rgba(189, 152, 84, 0.16);
    border-radius: 21px;
    box-shadow: var(--shadow);
    transition: transform .35s ease, border-color .35s ease, box-shadow .35s ease;
}

    .product-card:hover {
        color: var(--ink);
        text-decoration: none;
        transform: translateY(-6px);
        border-color: rgba(189, 152, 84, .65);
        box-shadow: 0 18px 40px rgba(87, 32, 51, .09), 0 5px 15px rgba(189, 152, 84, .07);
    }


/* ================================
   IMAGE
================================ */

.product-image-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 15px;
    background: #f4f0eb;
}

.product-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .65s cubic-bezier(.2, .7, .2, 1);
}

.product-card:hover .product-image {
    transform: scale(1.06);
}

.image-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient( 180deg, rgba(48, 39, 42, .10), transparent 30%, transparent 75%, rgba(48, 39, 42, .07) );
}

.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border: 1px solid rgba(189, 152, 84, .2);
    border-radius: 30px;
    background: rgba(255, 255, 255, .92);
    color: var(--wine);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 1px;
    backdrop-filter: blur(8px);
}

.image-arrow {
    position: absolute;
    left: 12px;
    bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, .6);
    border-radius: 50%;
    background: rgba(87, 32, 51, .7);
    color: white;
    font-size: 17px;
    opacity: 0;
    transform: translateY(5px);
    transition: .3s ease;
}

.product-card:hover .image-arrow {
    opacity: 1;
    transform: translateY(0);
}


/* ================================
   PRODUCT INFORMATION
================================ */

.product-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 17px 8px 5px;
}

.product-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 13px;
}

.product-name {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    color: var(--wine-dark);
    font-size: 15px;
    font-weight: 850;
    line-height: 1.9;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-mark {
    flex: 0 0 7px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 0 4px rgba(189, 152, 84, .12);
}

.product-divider {
    width: 100%;
    height: 1px;
    margin-bottom: 14px;
    background: linear-gradient( 90deg, transparent, rgba(189, 152, 84, .35), transparent );
}


/* ================================
   PRODUCT META
================================ */

.product-meta {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid rgba(189, 152, 84, .13);
    border-radius: 11px;
    background: #fcfaf7;
}

.meta-icon {
    flex: 0 0 auto;
    color: var(--gold);
    font-size: 18px;
}

.meta-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 2px;
}

    .meta-text span {
        color: var(--muted);
        font-size: 10px;
    }

    .meta-text strong {
        overflow: hidden;
        color: var(--wine);
        font-size: 12px;
        font-weight: 900;
        text-overflow: ellipsis;
        white-space: nowrap;
    }


/* ================================
   CARD FOOTER
================================ */

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    padding-top: 16px;
    color: var(--wine-soft);
    font-size: 10px;
    font-weight: 700;
}

.footer-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: rgba(189, 152, 84, .11);
    color: var(--gold);
    font-size: 14px;
    transition: .3s ease;
}

.product-card:hover .footer-arrow {
    background: var(--wine);
    color: white;
    transform: translateX(-3px);
}


/* ================================
   PAGINATION
================================ */

.pagination-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 55px;
    padding-top: 25px;
    border-top: 1px solid var(--border);
}

.pagination-info {
    color: var(--muted);
    font-size: 12px;
}

    .pagination-info strong {
        color: var(--wine);
        font-weight: 900;
    }

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    direction: ltr;
}

.page-number,
.page-control {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 39px;
    height: 39px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: white;
    color: var(--wine);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    transition: .25s ease;
}

    .page-number:hover,
    .page-control:hover {
        border-color: var(--wine);
        background: var(--wine);
        color: white;
    }

    .page-number.active {
        border-color: var(--wine);
        background: var(--wine);
        color: white;
        box-shadow: 0 5px 13px rgba(87, 32, 51, .16);
    }

.page-control {
    font-size: 17px;
}

    .page-control.disabled {
        opacity: .35;
        cursor: not-allowed;
    }

.page-dots {
    color: var(--muted);
    font-size: 13px;
}


/* ================================
   EMPTY PRODUCTS
================================ */

.empty-products {
    padding: 75px 20px;
    border: 1px dashed rgba(189, 152, 84, .4);
    border-radius: 22px;
    background: white;
    text-align: center;
}

.empty-icon {
    margin-bottom: 12px;
    color: var(--gold);
    font-size: 45px;
}

.empty-products h3 {
    color: var(--wine-dark);
    font-size: 19px;
    font-weight: 850;
}

.empty-products p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
}


/* ================================
   LARGE TABLET
================================ */

@media (max-width: 1199.98px) {

    .products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 20px;
    }
}


/* ================================
   TABLET
================================ */

@media (max-width: 991.98px) {

    .products-section {
        padding: 45px 24px 65px;
    }

    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 19px;
    }

    .product-name {
        font-size: 14px;
    }
}


/* ================================
   MOBILE - HORIZONTAL CARDS
================================ */

@media (max-width: 575.98px) {

    .products-section {
        padding: 30px 13px 50px;
    }

    .products-header {
        align-items: center;
        gap: 10px;
        margin-bottom: 22px;
        padding-bottom: 18px;
    }

    .section-kicker {
        gap: 6px;
        margin-bottom: 6px;
        font-size: 9px;
        letter-spacing: 1.3px;
    }

        .section-kicker span {
            width: 17px;
        }

    .section-title {
        font-size: 22px;
        line-height: 1.8;
    }

    .section-caption {
        font-size: 10px;
        line-height: 1.9;
    }

    .header-count {
        min-width: 82px;
        padding: 10px 9px;
        border-radius: 13px;
    }

    .count-label {
        font-size: 9px;
    }

    .header-count strong {
        font-size: 21px;
    }

    .count-caption {
        font-size: 8px;
    }


    /* One column */

    .products-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }


    /* Horizontal card */

    .product-card {
        flex-direction: row;
        align-items: stretch;
        gap: 12px;
        min-height: 125px;
        padding: 8px;
        border-radius: 17px;
    }

        .product-card:hover {
            transform: translateY(-2px);
        }


    /* Image on the right */

    .product-image-wrap {
        flex: 0 0 116px;
        width: 116px;
        height: 116px;
        aspect-ratio: auto;
        border-radius: 12px;
    }

    .product-image {
        width: 100%;
        height: 100%;
    }

    .product-badge {
        top: 7px;
        right: 7px;
        padding: 4px 6px;
        font-size: 7px;
    }

    .image-arrow {
        display: none;
    }


    /* Information */

    .product-info {
        flex: 1;
        min-width: 0;
        justify-content: center;
        padding: 4px 0;
    }

    .product-title-row {
        gap: 7px;
        margin-bottom: 9px;
    }

    .product-name {
        font-size: 12px;
        line-height: 1.9;
    }

    .product-mark {
        flex-basis: 6px;
        width: 6px;
        height: 6px;
    }

    .product-divider {
        margin-bottom: 9px;
    }

    .product-meta {
        gap: 6px;
    }

    .meta-item {
        flex: 0 1 auto;
        gap: 5px;
        padding: 6px 8px;
        border-radius: 8px;
    }

    .meta-icon {
        font-size: 14px;
    }

    .meta-text span {
        font-size: 8px;
    }

    .meta-text strong {
        font-size: 10px;
    }

    .product-footer {
        padding-top: 9px;
        font-size: 9px;
    }

    .footer-arrow {
        width: 21px;
        height: 21px;
        font-size: 12px;
    }


    /* Pagination */

    .pagination-wrapper {
        flex-direction: column;
        gap: 15px;
        margin-top: 30px;
        padding-top: 20px;
    }

    .pagination {
        gap: 5px;
        max-width: 100%;
    }

    .page-number,
    .page-control {
        width: 34px;
        height: 34px;
        border-radius: 9px;
        font-size: 11px;
    }

    .page-control {
        font-size: 15px;
    }
}


/* ================================
   SMALL MOBILE
================================ */

@media (max-width: 360px) {

    .products-section {
        padding-inline: 9px;
    }

    .products-header {
        gap: 6px;
    }

    .header-count {
        min-width: 73px;
        padding-inline: 6px;
    }

    .product-card {
        gap: 9px;
        min-height: 108px;
        padding: 7px;
    }

    .product-image-wrap {
        flex-basis: 96px;
        width: 96px;
        height: 96px;
    }

    .product-name {
        font-size: 11px;
    }

    .meta-item {
        gap: 4px;
        padding: 5px 6px;
    }

    .meta-text strong {
        font-size: 9px;
    }

    .product-footer {
        font-size: 8px;
    }

    .page-number,
    .page-control {
        width: 30px;
        height: 30px;
    }
}


/* ================================
   ACCESSIBILITY
================================ */

@media (prefers-reduced-motion: reduce) {

    .product-card,
    .product-image,
    .image-arrow,
    .footer-arrow,
    .page-number,
    .page-control {
        transition: none !important;
    }
}
