﻿/* ad-subcategories */

.ah-category-page {
            --ah-category-accent: #f59f00;
            --ah-category-accent-dark: #d97706;
            --ah-category-text: #172033;
            --ah-category-muted: #64748b;
            --ah-category-border: #e5eaf1;
            --ah-category-soft: #f8fafc;
            --ah-category-surface: #fff;
            min-height: 720px;
            padding-bottom: 3rem;
            background:
                radial-gradient(circle at 10% 0%, rgba(245, 159, 0, .09), transparent 28%),
                linear-gradient(180deg, #fff 0%, #f8fafc 100%);
        }

        .ah-category-hero {
            position: relative;
            overflow: hidden;
            padding: clamp(2rem, 5vw, 3.8rem) 0;
            color: #fff;
            background:
                radial-gradient(circle at 82% 12%, rgba(255, 255, 255, .2), transparent 27%),
                linear-gradient(135deg, #f7aa16 0%, #e98c00 58%, #d97706 100%);
        }

        .ah-category-hero::after {
            position: absolute;
            right: -70px;
            bottom: -120px;
            width: 300px;
            height: 300px;
            content: "";
            background: rgba(255, 255, 255, .08);
            border-radius: 999px;
        }

        .ah-category-hero__content {
            position: relative;
            z-index: 1;
        }

        .ah-category-hero__breadcrumb {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: .45rem;
            margin: 0 0 .8rem;
            padding: 0;
            color: rgba(255, 255, 255, .86);
            font-size: .78rem;
            font-weight: 700;
            list-style: none;
        }

        .ah-category-hero__breadcrumb a {
            color: inherit;
            text-decoration: none;
        }

        .ah-category-hero__breadcrumb a:hover {
            color: #fff;
            text-decoration: underline;
        }

        .ah-category-hero__title {
            max-width: 780px;
            margin: 0;
            color: #fff;
            font-size: clamp(1.8rem, 5vw, 3rem);
            font-weight: 880;
            letter-spacing: -.045em;
        }

        .ah-category-hero__meta {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: .55rem;
            margin-top: 1rem;
        }

        .ah-category-hero__badge {
            display: inline-flex;
            align-items: center;
            gap: .4rem;
            min-height: 32px;
            padding: .38rem .72rem;
            color: #fff;
            background: rgba(255, 255, 255, .14);
            border: 1px solid rgba(255, 255, 255, .18);
            border-radius: 999px;
            font-size: .76rem;
            font-weight: 800;
        }

        .ah-category-shell {
            padding-top: 1.35rem;
        }

        .ah-category-layout {
            display: grid;
            grid-template-columns: minmax(245px, 285px) minmax(0, 1fr);
            gap: 1.25rem;
            align-items: start;
        }

        .ah-category-sidebar {
            --bs-offcanvas-width: min(88vw, 340px);
        }

        .ah-category-sidebar__inner {
            display: grid;
            gap: .9rem;
        }

        .ah-category-widget {
            overflow: hidden;
            background: var(--ah-category-surface);
            border: 1px solid var(--ah-category-border);
            border-radius: 18px;
            box-shadow: 0 12px 32px rgba(15, 23, 42, .055);
        }

        .ah-category-widget__header {
            display: flex;
            align-items: center;
            gap: .6rem;
            padding: .9rem 1rem;
            color: var(--ah-category-text);
            background: linear-gradient(135deg, #fff8e8, #fff);
            border-bottom: 1px solid var(--ah-category-border);
            font-size: .86rem;
            font-weight: 850;
        }

        .ah-category-widget__header-icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 32px;
            height: 32px;
            color: var(--ah-category-accent-dark);
            background: #fff1cc;
            border-radius: 10px;
        }

        .ah-category-widget__body {
            padding: .95rem 1rem;
        }

        .ah-category-menu {
            display: grid;
            gap: .25rem;
            margin: 0;
            padding: 0;
            list-style: none;
        }

        .ah-category-menu__link {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: .65rem;
            min-height: 42px;
            padding: .55rem .65rem;
            color: #334155;
            border-radius: 10px;
            font-size: .79rem;
            font-weight: 750;
            text-decoration: none;
            transition: background-color .18s ease, color .18s ease;
        }

        .ah-category-menu__link:hover,
        .ah-category-menu__link.is-active {
            color: #92400e;
            background: #fff7e6;
        }

        .ah-category-menu__count {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 30px;
            min-height: 25px;
            padding: .2rem .42rem;
            color: #64748b;
            background: #f1f5f9;
            border-radius: 999px;
            font-size: .67rem;
            font-weight: 850;
        }

        .ah-category-form-label {
            margin-bottom: .38rem;
            color: #334155;
            font-size: .74rem;
            font-weight: 800;
        }

        .ah-category-filter .form-control,
        .ah-category-filter .form-select {
            min-height: 44px;
            color: #172033;
            border-color: #dbe2ea;
            border-radius: 11px;
            font-size: .8rem;
        }

        .ah-category-filter .form-control:focus,
        .ah-category-filter .form-select:focus {
            border-color: rgba(245, 159, 0, .7);
            box-shadow: 0 0 0 .2rem rgba(245, 159, 0, .12);
        }

        .ah-category-price-group {
            display: grid;
            grid-template-columns: minmax(0, 1fr) 44px;
            gap: .45rem;
        }

        .ah-category-price-group .input-group-text {
            min-width: 44px;
            justify-content: center;
            color: #64748b;
            background: #f8fafc;
            border-color: #dbe2ea;
            border-radius: 0 11px 11px 0;
            font-weight: 800;
        }

        .ah-category-filter__error {
            padding: .65rem .75rem;
            color: #991b1b;
            background: #fee2e2;
            border-radius: 10px;
            font-size: .74rem;
            font-weight: 750;
        }

        .ah-category-filter__actions {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: .5rem;
            margin-top: .85rem;
        }

        .ah-category-filter__button {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: .4rem;
            min-height: 42px;
            border-radius: 10px;
            font-size: .76rem;
            font-weight: 820;
        }

        .ah-category-filter__button--apply {
            color: #111827;
            background: linear-gradient(135deg, #ffc21c, #f2a000);
            border: 0;
        }

        .ah-category-filter__button--reset {
            color: #475569;
            background: #fff;
            border: 1px solid #dbe2ea;
        }

        .ah-category-save-search {
            display: grid;
            gap: .55rem;
        }

        .ah-category-save-search .btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: .45rem;
            min-height: 42px;
            border-radius: 10px;
            font-size: .75rem;
            font-weight: 800;
        }

        .ah-popular-list {
            display: grid;
            gap: .65rem;
        }

        .ah-popular-item {
            display: grid;
            grid-template-columns: 74px minmax(0, 1fr);
            gap: .65rem;
            align-items: center;
            color: inherit;
            text-decoration: none;
        }

        .ah-popular-item__image {
            width: 74px;
            height: 58px;
            overflow: hidden;
            background: #e2e8f0;
            border-radius: 10px;
        }

        .ah-popular-item__image img {
            display: block;
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .ah-popular-item__title {
            display: -webkit-box;
            overflow: hidden;
            color: #334155;
            font-size: .75rem;
            font-weight: 800;
            line-height: 1.35;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 2;
        }

        .ah-popular-item__price {
            display: block;
            margin-top: .2rem;
            color: #b45309;
            font-size: .72rem;
            font-weight: 850;
        }

        .ah-category-main {
            min-width: 0;
        }

        .ah-category-toolbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: .75rem;
            padding: .85rem 1rem;
            margin-bottom: .9rem;
            background: #fff;
            border: 1px solid var(--ah-category-border);
            border-radius: 16px;
            box-shadow: 0 10px 28px rgba(15, 23, 42, .05);
        }

        .ah-category-toolbar__left,
        .ah-category-toolbar__right {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: .55rem;
        }

        .ah-category-toolbar__count {
            display: inline-flex;
            align-items: center;
            gap: .45rem;
            color: #334155;
            font-size: .8rem;
            font-weight: 800;
        }

        .ah-category-toolbar__count-dot {
            width: 10px;
            height: 10px;
            background: linear-gradient(135deg, #ffc21c, #f2a000);
            border-radius: 999px;
            box-shadow: 0 0 0 .3rem rgba(245, 159, 0, .11);
        }

        .ah-category-sort {
            min-width: 205px;
            min-height: 40px;
            border-color: #dbe2ea;
            border-radius: 10px;
            font-size: .76rem;
            font-weight: 700;
        }

        .ah-category-view-switch {
            display: inline-flex;
            gap: .3rem;
            padding: .25rem;
            background: #f1f5f9;
            border-radius: 10px;
        }

        .ah-category-view-switch__link {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 34px;
            height: 34px;
            color: #64748b;
            background: transparent;
            border-radius: 8px;
            text-decoration: none;
        }

        .ah-category-view-switch__link.is-active {
            color: #92400e;
            background: #fff;
            box-shadow: 0 4px 12px rgba(15, 23, 42, .08);
        }

        .ah-category-mobile-filter {
            display: none;
        }

        .ah-advertisement {
            overflow: hidden;
            margin-bottom: .9rem;
            background: #fff;
            border: 1px solid var(--ah-category-border);
            border-radius: 16px;
            box-shadow: 0 10px 28px rgba(15, 23, 42, .05);
        }

        .ah-advertisement img {
            display: block;
            width: 100%;
            height: auto;
        }

        .ah-advertisement__empty {
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 110px;
            padding: 1rem;
            color: #64748b;
            background: linear-gradient(135deg, #fff7e6, #fff);
            font-size: .83rem;
            font-weight: 800;
            text-align: center;
        }

        .ah-listing-grid {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: .9rem;
        }

        .ah-listing-card {
            position: relative;
            min-width: 0;
            overflow: hidden;
            background: #fff;
            border: 1px solid var(--ah-category-border);
            border-radius: 17px;
            box-shadow: 0 12px 30px rgba(15, 23, 42, .055);
            transition: transform .2s ease, box-shadow .2s ease;
        }

        .ah-listing-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 18px 38px rgba(15, 23, 42, .1);
        }

        .ah-listing-card__image {
            position: relative;
            display: block;
            height: 205px;
            overflow: hidden;
            background: #e2e8f0;
        }

        .ah-listing-card__image img {
            display: block;
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform .3s ease;
        }

        .ah-listing-card:hover .ah-listing-card__image img {
            transform: scale(1.035);
        }

        .ah-listing-card__favorite {
            position: absolute;
            top: .65rem;
            right: .65rem;
            z-index: 2;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 38px;
            height: 38px;
            color: #475569;
            background: rgba(255, 255, 255, .94);
            border: 1px solid rgba(255, 255, 255, .85);
            border-radius: 999px;
            box-shadow: 0 8px 20px rgba(15, 23, 42, .12);
        }

        .ah-listing-card__favorite.is-active {
            color: #dc2626;
        }

        .ah-listing-card__favorite:disabled {
            opacity: .65;
        }

        .ah-listing-card__featured {
            position: absolute;
            top: .65rem;
            left: .65rem;
            z-index: 2;
            display: inline-flex;
            align-items: center;
            gap: .3rem;
            min-height: 28px;
            padding: .3rem .55rem;
            color: #92400e;
            background: rgba(254, 243, 199, .95);
            border-radius: 999px;
            font-size: .67rem;
            font-weight: 850;
        }

        .ah-listing-card__body {
            padding: .9rem;
        }

        .ah-listing-card__title {
            display: -webkit-box;
            min-height: 43px;
            overflow: hidden;
            color: var(--ah-category-text);
            font-size: .86rem;
            font-weight: 850;
            line-height: 1.45;
            text-decoration: none;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 2;
        }

        .ah-listing-card__title:hover {
            color: var(--ah-category-accent-dark);
        }

        .ah-listing-card__footer {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: .6rem;
            margin-top: .8rem;
        }

        .ah-listing-card__price {
            color: #b45309;
            font-size: .95rem;
            font-weight: 900;
        }

        .ah-listing-card__views {
            display: inline-flex;
            align-items: center;
            gap: .3rem;
            color: #94a3b8;
            font-size: .69rem;
            font-weight: 750;
        }

        .ah-listing-list {
            display: grid;
            gap: .75rem;
        }

        .ah-listing-row {
            display: grid;
            grid-template-columns: 180px minmax(0, 1fr) auto;
            gap: 1rem;
            align-items: center;
            padding: .8rem;
            background: #fff;
            border: 1px solid var(--ah-category-border);
            border-radius: 16px;
            box-shadow: 0 10px 26px rgba(15, 23, 42, .05);
        }

        .ah-listing-row__image {
            position: relative;
            display: block;
            height: 125px;
            overflow: hidden;
            background: #e2e8f0;
            border-radius: 13px;
        }

        .ah-listing-row__image img {
            display: block;
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .ah-listing-row__content {
            min-width: 0;
        }

        .ah-listing-row__title {
            display: inline-block;
            max-width: 100%;
            overflow: hidden;
            color: var(--ah-category-text);
            font-size: .95rem;
            font-weight: 850;
            text-decoration: none;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .ah-listing-row__description {
            display: -webkit-box;
            max-width: 650px;
            margin: .55rem 0 0;
            overflow: hidden;
            color: #64748b;
            font-size: .76rem;
            line-height: 1.55;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 2;
        }

        .ah-listing-row__meta {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: .65rem;
            margin-top: .7rem;
        }

        .ah-listing-row__price {
            color: #b45309;
            font-size: 1rem;
            font-weight: 900;
        }

        .ah-listing-row__views {
            display: inline-flex;
            align-items: center;
            gap: .35rem;
            color: #94a3b8;
            font-size: .7rem;
            font-weight: 750;
        }

        .ah-listing-row__featured {
            display: inline-flex;
            align-items: center;
            gap: .32rem;
            min-height: 27px;
            padding: .28rem .52rem;
            color: #92400e;
            background: #fef3c7;
            border-radius: 999px;
            font-size: .67rem;
            font-weight: 850;
        }

        .ah-listing-row__actions {
            display: flex;
            align-items: center;
            gap: .45rem;
        }

        .ah-listing-row__button {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-height: 40px;
            padding: .55rem .75rem;
            border-radius: 10px;
            font-size: .73rem;
            font-weight: 820;
            text-decoration: none;
        }

        .ah-listing-row__favorite {
            width: 40px;
            padding: 0;
            color: #64748b;
            background: #fff;
            border: 1px solid #dbe2ea;
        }

        .ah-listing-row__favorite.is-active {
            color: #dc2626;
            background: #fff1f2;
            border-color: #fecdd3;
        }

        .ah-listing-row__detail {
            color: #111827;
            background: linear-gradient(135deg, #ffc21c, #f2a000);
            border: 0;
        }

        .ah-category-empty {
            padding: 3.2rem 1rem;
            color: #64748b;
            background: #fff;
            border: 1px solid var(--ah-category-border);
            border-radius: 18px;
            text-align: center;
        }

        .ah-category-empty__icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 66px;
            height: 66px;
            margin-bottom: .9rem;
            color: #b45309;
            background: #fff7e6;
            border-radius: 19px;
            font-size: 1.35rem;
        }

        .ah-category-empty__title {
            margin: 0 0 .35rem;
            color: var(--ah-category-text);
            font-size: 1rem;
            font-weight: 850;
        }

        .ah-category-pagination {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: .35rem;
            margin: 1.25rem 0 0;
            padding: 0;
            list-style: none;
        }

        .ah-category-pagination__link {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 38px;
            min-height: 38px;
            padding: .4rem .55rem;
            color: #475569;
            background: #fff;
            border: 1px solid #dbe2ea;
            border-radius: 10px;
            font-size: .75rem;
            font-weight: 800;
            text-decoration: none;
        }

        .ah-category-pagination__link:hover,
        .ah-category-pagination__link.is-active {
            color: #fff;
            background: var(--ah-category-accent-dark);
            border-color: var(--ah-category-accent-dark);
        }

        .ah-category-toast-container {
            position: fixed;
            right: 1rem;
            bottom: 1rem;
            z-index: 1090;
        }

        .ah-category-toast {
            min-width: min(360px, calc(100vw - 2rem));
            color: #334155;
            background: rgba(255, 255, 255, .98);
            border: 1px solid #e5eaf1;
            border-radius: 14px;
            box-shadow: 0 18px 50px rgba(15, 23, 42, .16);
        }

        @media (max-width: 1199.98px) {
            .ah-listing-grid {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }
        }

        @media (min-width: 992px) {
            .ah-category-sidebar.offcanvas-lg {
                position: sticky;
                top: 1rem;
                z-index: 1;
                width: auto;
                height: auto;
                visibility: visible !important;
                background: transparent;
                border: 0;
                transform: none !important;
            }

            .ah-category-sidebar .offcanvas-body {
                display: block;
                padding: 0;
                overflow: visible;
            }
        }

        @media (max-width: 991.98px) {
            .ah-category-layout {
                grid-template-columns: 1fr;
            }

            .ah-category-mobile-filter {
                display: inline-flex;
                align-items: center;
                justify-content: center;
                gap: .4rem;
                min-height: 40px;
                padding: .5rem .7rem;
                color: #334155;
                background: #fff;
                border: 1px solid #dbe2ea;
                border-radius: 10px;
                font-size: .75rem;
                font-weight: 800;
            }

            .ah-category-sidebar .offcanvas-header {
                background: linear-gradient(135deg, #fff8e8, #fff);
                border-bottom: 1px solid var(--ah-category-border);
            }

            .ah-category-sidebar .offcanvas-title {
                color: var(--ah-category-text);
                font-size: 1rem;
                font-weight: 850;
            }

            .ah-category-sidebar .offcanvas-body {
                padding: .9rem;
                background: #f8fafc;
            }
        }

        @media (max-width: 767.98px) {
            .ah-category-toolbar {
                align-items: stretch;
                flex-direction: column;
            }

            .ah-category-toolbar__left,
            .ah-category-toolbar__right {
                width: 100%;
                justify-content: space-between;
            }

            .ah-category-sort {
                flex: 1 1 190px;
            }

            .ah-listing-grid {
                grid-template-columns: 1fr;
            }

            .ah-listing-row {
                grid-template-columns: 125px minmax(0, 1fr);
            }

            .ah-listing-row__image {
                height: 110px;
            }

            .ah-listing-row__actions {
                grid-column: 1 / -1;
                justify-content: flex-end;
            }
        }

        @media (max-width: 479.98px) {
            .ah-category-toolbar__right {
                align-items: stretch;
                flex-direction: column;
            }

            .ah-category-sort,
            .ah-category-mobile-filter {
                width: 100%;
            }

            .ah-category-view-switch {
                align-self: flex-end;
            }

            .ah-listing-row {
                grid-template-columns: 1fr;
            }

            .ah-listing-row__image {
                height: 210px;
            }

            .ah-listing-row__title {
                white-space: normal;
            }

            .ah-listing-row__actions {
                justify-content: stretch;
            }

            .ah-listing-row__detail {
                flex: 1 1 auto;
            }
        }

        @media (prefers-reduced-motion: reduce) {
            .ah-category-page *,
            .ah-category-page *::before,
            .ah-category-page *::after {
                scroll-behavior: auto !important;
                transition-duration: .01ms !important;
                animation-duration: .01ms !important;
                animation-iteration-count: 1 !important;
            }
        }