/* ==========================================================================
   Homepage redesign v3 — match customer mock closely
   ========================================================================== */

.gm-theme {
    background-color: #F7F8FA;
}

.gm-home {
    padding-bottom: 1.5rem;
}

.gm-home .container {
    max-width: 1180px;
}

/* ---- Header v3 ---- */
.gm-header--v3.page-header {
    background: #fff;
    border-bottom: 1px solid #EEEEEE;
    box-shadow: none;
}

.gm-header--v3 .gm-header__inner--nav {
    min-height: 70px;
    padding: 0.55rem 0;
}

.gm-header--v3 .gm-header__nav {
    gap: 0.15rem 1.35rem;
    margin-right: 1.5rem;
}

.gm-header--v3 .gm-header__nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: #333 !important;
}

.gm-header--v3 .gm-header__nav-link:hover {
    color: var(--gm-green) !important;
}

.gm-header--v3 .gm-header__actions {
    gap: 0.5rem;
}

.gm-header--v3 .gm-header__icon-btn,
.gm-header--v3 .gm-header__cart > a.dropdown--btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid #E8E8E8;
    background: #fff !important;
    color: #444;
}

.gm-header--v3 .gm-header__icon-btn:hover,
.gm-header--v3 .gm-header__cart > a.dropdown--btn:hover {
    border-color: var(--gm-green);
    background: var(--gm-green-light) !important;
    color: var(--gm-green-dark);
}

.gm-header--v3 .gm-header__cart .cart-count {
    background: #E91E8C !important;
    top: -3px !important;
    right: -3px !important;
}

/* ---- Hero ---- */
.gm-hero {
    margin-top: 1.25rem;
}

.gm-hero__grid--with-side {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 1rem;
    align-items: stretch;
}

.gm-hero__slider,
.gm-hero__side {
    border-radius: 16px !important;
    overflow: hidden;
    min-height: 260px;
}

.gm-hero__slider img,
.gm-hero__side-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 260px;
}

.gm-hero__side-overlay {
    background: linear-gradient(180deg, transparent 20%, rgba(80, 70, 40, 0.55) 100%);
    padding: 1.25rem;
    align-items: flex-start;
}

.gm-hero__side-cta {
    display: inline-flex;
    margin-top: 0.75rem;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    background: #2F3A2E;
    color: #fff !important;
    font-size: 0.8rem;
    font-weight: 700;
}

@media (max-width: 991.98px) {
    .gm-hero__grid--with-side {
        grid-template-columns: 1fr !important;
    }

    .gm-hero__side-col {
        display: block !important;
    }

    .gm-hero__slider,
    .gm-hero__side,
    .gm-hero__slider img,
    .gm-hero__side-img {
        min-height: 180px;
    }
}

/* ---- Categories: always circles ---- */
.gm-categories {
    margin: 2rem 0 1.5rem;
    background: transparent;
}

.gm-categories__title {
    display: none;
}

.gm-categories__track {
    padding: 0 2.5rem;
}

.gm-category-card {
    background: transparent !important;
    border: none !important;
}

.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: 78px !important;
    width: 78px !important;
    height: 78px !important;
    aspect-ratio: 1 !important;
    border-radius: 50% !important;
    background: #fff !important;
    border: 1.5px solid #E5E7EB !important;
    box-shadow: none !important;
    padding: 0.65rem !important;
}

.gm-category-card.is-active .gm-category-card__icon-wrap,
.gm-category-card:hover .gm-category-card__icon-wrap {
    border-color: var(--gm-green) !important;
    box-shadow: 0 0 0 3px rgba(0, 166, 81, 0.12) !important;
}

.gm-category-card__icon {
    width: 42px !important;
    height: 42px !important;
}

.gm-category-card__fallback {
    width: 100% !important;
    height: 100% !important;
    border-radius: 50% !important;
    background: transparent !important;
    font-size: 1.25rem !important;
    color: #6B7280 !important;
}

.gm-category-card__label {
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    color: #374151 !important;
}

.gm-categories__nav {
    display: inline-flex !important;
    width: 36px;
    height: 36px;
    background: #fff;
    border: 1px solid #E5E7EB;
    color: #9CA3AF;
    box-shadow: none;
}

.gm-categories__nav--prev { right: 0; }
.gm-categories__nav--next { left: 0; }

.gm-categories__footer {
    margin-top: 0.35rem;
}

@media (max-width: 767.98px) {
    .gm-categories__track {
        padding: 0 0.25rem;
    }

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

    .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: 68px !important;
        width: 68px !important;
        height: 68px !important;
        border-radius: 50% !important;
    }
}

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

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

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

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

.gm-bestsellers__track {
    position: relative;
    padding: 0 2.75rem;
}

.gm-bestsellers__nav {
    position: absolute;
    top: 42%;
    transform: translateY(-50%);
    z-index: 2;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #E5E7EB;
    background: #fff;
    color: #6B7280;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.gm-bestsellers__nav--prev { right: 0; }
.gm-bestsellers__nav--next { left: 0; }

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

.gm-bestseller-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

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

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

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

.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;
}

.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.88rem;
    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: 767.98px) {
    .gm-bestsellers__track { padding: 0; }
    .gm-bestsellers__nav { display: none; }
}

/* ---- Catalog ---- */
.gm-home-catalog {
    margin: 2rem 0 2.5rem;
}

.gm-home-catalog__layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 1.35rem;
    align-items: start;
}

.gm-home-catalog__sidebar {
    background: #fff;
    border: 1px solid #EEEEEE;
    border-radius: 14px;
    padding: 1.1rem 1rem 1.15rem;
    position: sticky;
    top: 84px;
}

.gm-home-catalog__sidebar-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
}

.gm-home-catalog__sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.85rem;
}

.gm-filter-box {
    border-top: 1px solid #F0F0F0;
    padding: 0.9rem 0;
}

.gm-filter-box:first-of-type {
    border-top: none;
    padding-top: 0.2rem;
}

.gm-filter-box__title {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.65rem;
    color: #1F2937;
}

.gm-filter-box__body {
    max-height: 200px;
    overflow-y: auto;
}

.gm-filter-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    margin: 0;
    position: relative;
}

.gm-filter-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.gm-filter-toggle__slider {
    width: 44px;
    height: 24px;
    border-radius: 999px;
    background: #D1D5DB;
    position: relative;
    flex-shrink: 0;
    transition: background 0.2s;
}

.gm-filter-toggle__slider::after {
    content: "";
    position: absolute;
    top: 3px;
    right: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.gm-filter-toggle input:checked + .gm-filter-toggle__slider {
    background: var(--gm-green);
}

.gm-filter-toggle input:checked + .gm-filter-toggle__slider::after {
    transform: translateX(-20px);
}

.gm-filter-search input {
    width: 100%;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    height: 36px;
    padding: 0 0.7rem;
    font-size: 0.8rem;
    margin-bottom: 0.55rem;
}

.gm-filter-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0;
    margin: 0;
    cursor: pointer;
    font-size: 0.84rem;
    position: relative;
}

.gm-filter-check input { position: absolute; opacity: 0; }

.gm-filter-check__box {
    width: 17px;
    height: 17px;
    border: 1.5px solid #D1D5DB;
    border-radius: 4px;
    flex-shrink: 0;
    position: relative;
}

.gm-filter-check input:checked + .gm-filter-check__box {
    background: var(--gm-green);
    border-color: var(--gm-green);
}

.gm-filter-check input:checked + .gm-filter-check__box::after {
    content: "";
    position: absolute;
    top: 1px;
    right: 5px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.gm-filter-price__range {
    margin-bottom: 0.75rem;
}

.gm-filter-price__range input[type="range"] {
    width: 100%;
    accent-color: var(--gm-green);
}

.gm-filter-price__inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.gm-filter-price__inputs label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.72rem;
    color: #9CA3AF;
    margin: 0;
}

.gm-filter-price__inputs input {
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    height: 36px;
    padding: 0 0.5rem;
    font-size: 0.8rem;
}

.gm-filter-apply {
    width: 100%;
    border: none;
    background: var(--gm-green);
    color: #fff;
    border-radius: 10px;
    height: 44px;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    margin-top: 0.35rem;
}

.gm-filter-apply:hover {
    background: var(--gm-green-dark);
}

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

.gm-home-catalog__toolbar-right {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.gm-home-catalog__title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: #1F2937;
}

.gm-home-catalog__count {
    font-size: 0.8rem;
    color: #9CA3AF;
}

.gm-home-catalog__sort {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.gm-home-catalog__sort-btn {
    border: none;
    background: transparent;
    color: #6B7280;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    cursor: pointer;
}

.gm-home-catalog__sort-btn.is-active {
    background: var(--gm-green);
    color: #fff;
}

.gm-home-catalog__filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid #E5E7EB;
    background: #fff;
    border-radius: 10px;
    padding: 0.45rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 700;
}

.gm-home-catalog__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.gm-home-catalog .gm-product-card--grid {
    background: #fff;
    border: 1px solid #EEEEEE;
    border-radius: 14px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    padding: 0 0 0.9rem;
}

.gm-home-catalog .gm-product-card__image {
    display: block;
    aspect-ratio: 1;
    background: #FAFAFA;
    padding: 1rem;
    min-height: 0 !important;
}

.gm-home-catalog .gm-product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-height: none !important;
}

.gm-home-catalog .gm-product-card__body {
    padding: 0.75rem 0.9rem 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.gm-home-catalog .gm-product-card__title {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.55;
}

.gm-home-catalog .gm-product-card__title a {
    color: #1F2937 !important;
    text-decoration: none !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gm-product-card__meta-row {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: auto;
}

.gm-product-card__stars {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    font-size: 0.72rem;
    color: #F5A623;
}

.gm-product-card__stars span {
    margin-right: 0.25rem;
    color: #6B7280;
    font-weight: 700;
}

.gm-product-card__price-block {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.gm-product-card__price-block del {
    color: #9CA3AF;
    font-size: 0.75rem;
}

.gm-product-card__price-now {
    font-size: 0.95rem;
    font-weight: 800;
    color: #1F2937;
}

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

.gm-product-card__price-now--muted {
    color: #9CA3AF;
    font-size: 0.85rem;
}

.gm-product-card__discount-badge {
    background: var(--gm-green);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    border-radius: 6px;
    padding: 0.12rem 0.35rem;
}

.gm-home-catalog .gm-product-card__footer {
    margin-top: 0.65rem;
}

.gm-product-card__cta--solid {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 42px;
    border-radius: 10px;
    background: var(--gm-green);
    color: #fff !important;
    border: none;
    font-size: 0.84rem;
    font-weight: 700;
    text-decoration: none !important;
    cursor: pointer;
}

.gm-product-card__cta--solid:hover {
    background: var(--gm-green-dark);
}

.gm-product-card__cta--outline {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 42px;
    border-radius: 10px;
    border: 1px solid #E5E7EB;
    background: #fff;
    color: #6B7280 !important;
    font-size: 0.84rem;
    font-weight: 700;
    text-decoration: none !important;
}

.gm-home-catalog__pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.35rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.gm-page-btn {
    min-width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid #E5E7EB;
    background: #fff;
    color: #374151 !important;
    text-decoration: none !important;
    font-size: 0.85rem;
    font-weight: 600;
}

.gm-page-btn.is-active {
    background: var(--gm-green);
    border-color: var(--gm-green);
    color: #fff !important;
}

.gm-page-btn.is-disabled,
.gm-page-btn.is-ellipsis {
    opacity: 0.4;
    pointer-events: none;
}

.gm-home-catalog__empty {
    background: #fff;
    border-radius: 14px;
    padding: 3rem 1.5rem;
    text-align: center;
    color: #9CA3AF;
}

.gm-home-catalog.is-loading .gm-home-catalog__grid-wrap {
    opacity: 0.5;
    pointer-events: none;
}

.gm-home-catalog__overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1040;
}

body.gm-catalog-drawer-open { overflow: hidden; }

/* ---- Brands ---- */
.gm-brands {
    margin: 2.5rem 0 2rem;
}

.gm-brands__head {
    margin-bottom: 1.15rem;
}

.gm-brands__title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 800;
    color: #1F2937;
    text-align: center;
}

.gm-brands__track {
    position: relative;
    padding: 0 2.5rem;
}

.gm-brands__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #E5E7EB;
    background: #fff;
    color: #9CA3AF;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.gm-brands__nav--prev { right: 0; }
.gm-brands__nav--next { left: 0; }

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

.gm-brand-card {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
}

.gm-brand-card__logo {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #EEEEEE;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0.65rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

.gm-brand-card__logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(0.15);
}

.gm-brand-card__fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    font-weight: 800;
    color: #9CA3AF;
}

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

.gm-brands__pagination .swiper-pagination-bullet-active {
    background: var(--gm-green);
}

@media (max-width: 767.98px) {
    .gm-brands__track { padding: 0; }
    .gm-brands__nav { display: none; }
}

/* ---- Support ---- */
.gm-support-banner {
    display: flex;
    align-items: center;
    gap: 1.15rem;
    background: #EAF7F0 !important;
    border-radius: 16px !important;
    padding: 1.35rem 1.75rem !important;
    margin: 2rem 0 1.5rem !important;
    flex-wrap: wrap;
}

.gm-support-banner__icon {
    color: var(--gm-green);
    flex-shrink: 0;
}

.gm-support-banner__text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.gm-support-banner__text strong {
    font-size: 1rem;
    color: #1F2937;
}

.gm-support-banner__text span {
    font-size: 0.85rem;
    color: #6B7280;
}

.gm-support-banner__phone {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--gm-green) !important;
    text-decoration: none !important;
    direction: ltr;
}

/* ---- Footer polish ---- */
.gm-footer {
    background: #fff !important;
    border-top: 1px solid #EEEEEE !important;
    padding-top: 2.75rem !important;
}

/* ---- Responsive catalog ---- */
@media (max-width: 991.98px) {
    .gm-home-catalog__layout {
        grid-template-columns: 1fr;
    }

    .gm-home-catalog__sidebar {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(340px, 92vw);
        z-index: 1050;
        border-radius: 0;
        transform: translateX(105%);
        transition: transform 0.28s ease;
        overflow-y: auto;
        margin: 0;
    }

    .gm-home-catalog__sidebar.is-open {
        transform: translateX(0);
    }

    .gm-home-catalog__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575.98px) {
    .gm-home-catalog__grid {
        grid-template-columns: 1fr;
    }

    .gm-support-banner {
        flex-direction: column;
        text-align: center;
        padding: 1.2rem 1rem !important;
    }

    .gm-header--v3 .gm-header__search-wrap {
        display: none;
    }
}
