/* ==========================================================================
   Home sliders — symmetrical rails (categories + bestsellers)
   ========================================================================== */

/* Kill old absolute-nav / uneven padding layouts */
.gm-categories__track.gm-slider-rail,
.gm-bestsellers__track.gm-slider-rail {
    position: relative !important;
    padding: 0 !important;
}

.gm-categories__nav.gm-slider-nav,
.gm-bestsellers__nav.gm-slider-nav {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    margin: 0 !important;
    z-index: auto !important;
}

.gm-slider-rail {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    gap: 0.75rem;
    align-items: center;
    width: 100%;
}

.gm-slider-rail__viewport {
    position: relative;
    min-width: 0;
    overflow: hidden;
}

.gm-slider-rail__viewport::before,
.gm-slider-rail__viewport::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 36px;
    z-index: 3;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.gm-slider-rail__viewport::before {
    right: 0;
    background: linear-gradient(to left, #F7F8FA 10%, transparent);
}

.gm-slider-rail__viewport::after {
    left: 0;
    background: linear-gradient(to right, #F7F8FA 10%, transparent);
}

.gm-slider-rail.is-faded-start .gm-slider-rail__viewport::before,
.gm-slider-rail.is-faded-end .gm-slider-rail__viewport::after {
    opacity: 1;
}

.gm-slider-nav {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid #E8E8EA;
    background: #fff;
    color: #6B7280;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    transition: color 0.15s, border-color 0.15s, background 0.15s, opacity 0.2s, transform 0.15s;
    padding: 0;
}

.gm-slider-nav:hover:not(:disabled) {
    color: var(--gm-green, #00A651);
    border-color: var(--gm-green, #00A651);
    background: #F0FDF6;
}

.gm-slider-nav:disabled,
.gm-slider-nav.swiper-button-disabled {
    opacity: 0.28;
    cursor: default;
    pointer-events: none;
    box-shadow: none;
}

.gm-slider-nav i {
    font-size: 0.95rem;
    line-height: 1;
}

/* ---- Categories ---- */
.gm-categories {
    margin: 1.75rem 0 1.75rem;
    background: transparent;
}

.gm-categories__head {
    display: none;
}

.gm-categories__title {
    display: none;
}

.gm-categories__track {
    padding: 0 !important;
}

.gm-categories__fade {
    display: none !important;
}

.gm-categories__slider {
    overflow: hidden;
    width: 100%;
    padding: 0.35rem 0 0.15rem;
}

.gm-categories__slider .swiper-slide {
    height: auto;
    display: flex;
    justify-content: center;
}

.gm-category-card {
    width: 100%;
    max-width: 104px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
    background: transparent !important;
    border: none !important;
    padding: 0.15rem;
    cursor: pointer;
    text-align: center;
}

.gm-category-card__icon-wrap,
.gm-category-card__icon-wrap--tone-1,
.gm-category-card__icon-wrap--tone-2,
.gm-category-card__icon-wrap--tone-3,
.gm-category-card__icon-wrap--tone-4,
.gm-category-card__icon-wrap--tone-5 {
    max-width: 80px !important;
    width: 80px !important;
    height: 80px !important;
    aspect-ratio: 1 !important;
    border-radius: 50% !important;
    background: #fff !important;
    border: 1.5px solid #E8E8EA !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03) !important;
    padding: 0.7rem !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.gm-category-card.is-active .gm-category-card__icon-wrap,
.gm-category-card:hover .gm-category-card__icon-wrap {
    border-color: var(--gm-green, #00A651) !important;
    box-shadow: 0 0 0 4px rgba(0, 166, 81, 0.12) !important;
    transform: translateY(-2px);
}

.gm-category-card__icon {
    width: 44px !important;
    height: 44px !important;
    object-fit: contain;
}

.gm-category-card__fallback {
    width: 100% !important;
    height: 100% !important;
    border-radius: 50% !important;
    background: transparent !important;
    font-size: 1.35rem !important;
    font-weight: 800;
    color: #6B7280 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gm-category-card__label {
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    color: #374151 !important;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.25em;
    width: 100%;
}

.gm-category-card__dot {
    display: none;
}

.gm-categories__footer {
    margin-top: 0.85rem;
    display: flex;
    justify-content: center;
}

.gm-categories__pagination {
    position: static !important;
    width: auto !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.gm-categories__pagination .swiper-pagination-bullet {
    width: 7px;
    height: 7px;
    margin: 0 !important;
    background: #D1D5DB;
    opacity: 1;
    border-radius: 999px;
    transition: width 0.25s, background 0.2s;
}

.gm-categories__pagination .swiper-pagination-bullet-active {
    width: 18px;
    background: var(--gm-green, #00A651);
}

/* ---- Bestsellers ---- */
.gm-bestsellers {
    margin: 2rem 0 2.25rem;
}

.gm-bestsellers__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.15rem;
    gap: 1rem;
}

.gm-bestsellers__title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    color: #1F2937;
}

.gm-bestsellers__view-all {
    color: var(--gm-green, #00A651) !important;
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}

.gm-bestsellers__track {
    padding: 0 !important;
    position: static !important;
}

.gm-bestsellers__slider {
    overflow: hidden;
    width: 100%;
    padding: 0.35rem 0 0.5rem;
}

.gm-bestsellers__slider .swiper-slide {
    height: auto;
}

.gm-bestseller-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none !important;
    color: #1F2937 !important;
    border: 1px solid #EEEEEE;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    height: 100%;
    transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}

.gm-bestseller-card:hover {
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
    border-color: #E5E7EB;
}

.gm-bestseller-card__image {
    display: block;
    aspect-ratio: 1;
    background: #FAFAFA;
    padding: 1.15rem;
}

.gm-bestseller-card__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.gm-bestseller-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 0.85rem 1rem 1.1rem;
    flex: 1;
}

.gm-bestseller-card__title {
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7em;
}

.gm-bestseller-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: auto;
}

.gm-bestseller-card__rating {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: #6B7280;
}

.gm-bestseller-card__rating i {
    color: #F5A623;
    font-size: 0.72rem;
}

.gm-bestseller-card__price {
    font-size: 0.9rem;
    font-weight: 800;
    color: #1F2937;
}

.gm-bestseller-card__price small {
    font-size: 0.7rem;
    font-weight: 600;
    color: #9CA3AF;
}

.gm-bestseller-card__price--muted {
    color: #9CA3AF;
    font-weight: 600;
    font-size: 0.8rem;
}

@media (max-width: 991.98px) {
    .gm-slider-rail {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .gm-slider-rail .gm-slider-nav {
        display: none;
    }

    .gm-slider-rail__viewport {
        margin: 0 -0.15rem;
        padding: 0 0.15rem;
    }

    .gm-slider-rail__viewport::before,
    .gm-slider-rail__viewport::after {
        width: 28px;
    }
}

@media (max-width: 575.98px) {
    .gm-category-card__icon-wrap,
    .gm-category-card__icon-wrap--tone-1,
    .gm-category-card__icon-wrap--tone-2,
    .gm-category-card__icon-wrap--tone-3,
    .gm-category-card__icon-wrap--tone-4,
    .gm-category-card__icon-wrap--tone-5 {
        max-width: 70px !important;
        width: 70px !important;
        height: 70px !important;
    }

    .gm-bestsellers__title {
        font-size: 1.1rem;
    }
}

/* ---- Catalog pager (customer design) ---- */
.gm-pager {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid #EEEEEE;
    flex-wrap: wrap;
    position: relative;
}

@media (min-width: 992px) {
    .gm-pager {
        display: flex;
    }
}

.gm-pager__nav {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: #4B5563 !important;
    text-decoration: none !important;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.35rem 0.15rem;
    white-space: nowrap;
    transition: color 0.15s;
    position: absolute;
}

.gm-pager__nav:first-child {
    right: 0;
}

.gm-pager__nav:last-child {
    left: 0;
    right: auto;
}

.gm-pager__nav:hover:not(.is-disabled) {
    color: var(--gm-green, #00A651) !important;
}

.gm-pager__nav.is-disabled {
    opacity: 0.35;
    pointer-events: none;
}

.gm-pager__nav i {
    font-size: 0.85rem;
}

.gm-pager__pages {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    flex-wrap: wrap;
    margin: 0 auto;
}

.gm-pager__page {
    min-width: 36px;
    height: 36px;
    padding: 0 0.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #4B5563 !important;
    text-decoration: none !important;
    font-size: 0.9rem;
    font-weight: 600;
    background: transparent;
    border: none;
    transition: background 0.15s, color 0.15s;
}

.gm-pager__page:hover:not(.is-active) {
    background: #F3F4F6;
}

.gm-pager__page.is-active {
    background: #E8F6F0;
    color: #0F766E !important;
    font-weight: 800;
}

.gm-pager__ellipsis {
    min-width: 28px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #9CA3AF;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.gm-catalog-infinite {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 1.25rem 0 0.5rem;
    color: #9CA3AF;
    font-size: 0.85rem;
    font-weight: 600;
}

.gm-catalog-infinite:not([hidden]) {
    display: flex;
}

@media (min-width: 992px) {
    .gm-catalog-infinite {
        display: none !important;
    }
}

.gm-catalog-infinite__spinner {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #E5E7EB;
    border-top-color: var(--gm-green, #00A651);
    animation: gm-spin 0.7s linear infinite;
    opacity: 0;
}

.gm-catalog-infinite.is-loading .gm-catalog-infinite__spinner {
    opacity: 1;
}

@keyframes gm-spin {
    to { transform: rotate(360deg); }
}

/* ---- Acceptors (پذیرندگان) ---- */
.gm-acceptors {
    margin: 2.5rem 0 1.5rem;
    padding: 0.5rem 0 1rem;
}

.gm-acceptors__head {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 1.35rem;
}

.gm-acceptors__title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    color: #1F2937;
    text-align: right;
}

.gm-acceptors__viewport {
    position: relative;
    overflow: hidden;
    margin: 0 -0.25rem;
    padding: 0.5rem 0.25rem;
}

.gm-acceptors__swiper {
    overflow: visible;
    width: 100%;
}

.gm-acceptors__swiper .swiper-slide {
    width: 112px;
    height: auto;
    display: flex;
    justify-content: center;
}

.gm-acceptor-logo {
    width: 104px;
    height: 104px;
    border-radius: 50%;
    background: #fff;
    border: 1.5px solid #EEEEEE;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    text-decoration: none !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
    overflow: hidden;
}

.gm-acceptor-logo:hover {
    border-color: var(--gm-green, #00A651);
    box-shadow: 0 8px 22px rgba(0, 166, 81, 0.12);
    transform: translateY(-3px);
}

.gm-acceptor-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.gm-acceptor-logo__fallback {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--gm-green, #00A651);
    line-height: 1;
}

.gm-acceptors__pagination {
    position: static !important;
    margin-top: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100% !important;
}

.gm-acceptors__pagination .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    margin: 0 !important;
    border-radius: 999px;
    background: #D1D5DB;
    opacity: 1;
    transition: width 0.25s ease, background 0.2s ease;
}

.gm-acceptors__pagination .swiper-pagination-bullet-active {
    width: 28px;
    background: var(--gm-green, #00A651);
}

@media (max-width: 767.98px) {
    .gm-pager {
        gap: 0.75rem;
    }

    .gm-pager__pages {
        order: 3;
        flex: 1 1 100%;
        justify-content: center;
        margin: 0;
    }

    .gm-acceptors__swiper .swiper-slide {
        width: 96px;
    }

    .gm-acceptor-logo {
        width: 88px;
        height: 88px;
        padding: 0.85rem;
    }

    /* Bestsellers — Digikala-like minimal cards */
    .gm-bestseller-card {
        border-radius: 12px;
    }

    .gm-bestseller-card__image {
        aspect-ratio: 1;
        padding: 0.65rem;
    }

    .gm-bestseller-card__body {
        padding: 0.55rem 0.7rem 0.75rem;
        gap: 0.4rem;
    }

    .gm-bestseller-card__title {
        font-size: 0.78rem;
        min-height: 2.4em;
        -webkit-line-clamp: 2;
    }

    .gm-bestseller-card__rating {
        display: none;
    }

    .gm-bestseller-card__price {
        font-size: 0.88rem;
    }

    .gm-bestseller-card__meta {
        justify-content: flex-start;
    }
}

