/* Product catalog page */
.product-catalog {
    padding: 0 0 60px;
}

.product-catalog__layout {
    align-items: flex-start;
}

/* Sidebar */
.catalog-sidebar {
    position: sticky;
    top: 110px;
}

.catalog-sidebar__card {
    background: var(--servixa-white);
    border: 1px solid var(--servixa-bdr-color);
    border-radius: var(--servixa-bdr-radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 8px 30px rgba(var(--servixa-black-rgb), 0.04);
}

.catalog-sidebar__title {
    font-size: 18px;
    font-weight: 700;
    color: var(--servixa-black);
    margin: 0 0 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--servixa-primary);
    position: relative;
}

.catalog-sidebar__title::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 48px;
    height: 2px;
    background: var(--servixa-base);
}

.catalog-search {
    position: relative;
}

.catalog-search input {
    width: 100%;
    height: 48px;
    border: 1px solid var(--servixa-bdr-color);
    border-radius: 999px;
    padding: 0 48px 0 18px;
    font-size: 14px;
    color: var(--servixa-black);
    background: var(--servixa-white);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.catalog-search input:focus {
    outline: none;
    border-color: var(--servixa-base);
    box-shadow: 0 0 0 3px rgba(var(--servixa-base-rgb), 0.12);
}

.catalog-search button {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: var(--servixa-base);
    color: var(--servixa-white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.catalog-search button:hover {
    opacity: 0.88;
}

.catalog-categories {
    list-style: none;
    margin: 0;
    padding: 0;
}

.catalog-categories li + li {
    margin-top: 4px;
}

.catalog-categories a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 8px;
    color: var(--servixa-gray);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
}

.catalog-categories a:hover,
.catalog-categories li.is-active a {
    background: rgba(var(--servixa-base-rgb), 0.08);
    color: var(--servixa-base);
    padding-left: 18px;
}

.catalog-categories li.is-active a {
    font-weight: 700;
}

.catalog-recent {
    list-style: none;
    margin: 0;
    padding: 0;
}

.catalog-recent li + li {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--servixa-bdr-color);
}

.catalog-recent__item {
    display: flex;
    gap: 12px;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.catalog-recent__thumb {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--servixa-primary);
}

.catalog-recent__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.catalog-recent__name {
    font-size: 14px;
    font-weight: 600;
    color: var(--servixa-black);
    line-height: 1.4;
    margin: 0 0 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.catalog-recent__price {
    font-size: 14px;
    font-weight: 700;
    color: var(--servixa-base);
    margin: 0;
}

/* Main content */
.catalog-main__panel {
    background: var(--servixa-white);
    border: 1px solid var(--servixa-bdr-color);
    border-radius: calc(var(--servixa-bdr-radius) + 2px);
    padding: 18px;
    box-shadow: 0 10px 40px rgba(var(--servixa-black-rgb), 0.05);
}

.catalog-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--servixa-bdr-color);
}

.catalog-toolbar__count {
    margin: 0;
    font-size: 15px;
    color: var(--servixa-gray);
}

.catalog-toolbar__count strong {
    color: var(--servixa-black);
    font-weight: 700;
}

.catalog-toolbar__sort {
    display: flex;
    align-items: center;
    gap: 10px;
}

.catalog-toolbar__sort label {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--servixa-black);
    white-space: nowrap;
}

.catalog-sort-select {
    min-width: 190px;
    height: 44px;
    border: 1px solid var(--servixa-bdr-color);
    border-radius: 999px;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--servixa-black);
    background: var(--servixa-white);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.catalog-sort-select:focus {
    outline: none;
    border-color: var(--servixa-base);
    box-shadow: 0 0 0 3px rgba(var(--servixa-base-rgb), 0.12);
}

.catalog-category-scroll {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 6px;
    margin-bottom: 24px;
    scrollbar-width: thin;
    scrollbar-color: var(--servixa-bdr-color) transparent;
}

.catalog-category-scroll::-webkit-scrollbar {
    height: 6px;
}

.catalog-category-scroll::-webkit-scrollbar-thumb {
    background: var(--servixa-bdr-color);
    border-radius: 999px;
}

#product-tabs .product-tab {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid var(--servixa-bdr-color);
    background: var(--servixa-white);
    color: var(--servixa-gray);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
}

#product-tabs .product-tab:hover {
    border-color: rgba(var(--servixa-base-rgb), 0.35);
    color: var(--servixa-base);
}

#product-tabs .product-tab.active {
    border-color: var(--servixa-base);
    background: var(--servixa-base);
    color: var(--servixa-white);
    box-shadow: 0 8px 20px rgba(var(--servixa-base-rgb), 0.25);
}

.product-catalog-grid,
#product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
}

@media (min-width: 768px) {
    .product-catalog-grid,
    #product-grid {
        gap: 16px;
    }
}

@media (min-width: 992px) {
    .product-catalog-grid,
    #product-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 18px;
    }
}

.product-catalog-grid > .product-card-col,
#product-grid > .product-card-col {
    min-width: 0;
}

/* Equal-height product cards */
.product-card-col {
    display: flex;
    flex-direction: column;
}

.product-card-col__card {
    display: flex;
    flex-direction: column;
    flex: 1;
    width: 100%;
    height: 100%;
    margin-bottom: 0 !important;
}

.product-card-col__card .single-product-style1__img {
    flex-shrink: 0;
    aspect-ratio: 1 / 1;
}

.product-card-col__card .single-product-style1__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card-col__card .single-product-style1__img img:first-child {
    height: 100%;
    object-fit: cover;
}

.product-card-col__card .single-product-style1__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
}

.product-card-col__card .single-product-style1__content-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 72px;
}

.product-card-col__card .single-product-style1__content-left h4 {
    flex: 1;
    margin-top: 0;
}

.product-card-col__card .single-product-style1__content-left h4 a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.35;
}

.product-card-col__card .single-product-style1__content-left p {
    margin-top: auto;
    padding-top: 10px;
    color: var(--servixa-base);
    font-family: "Google Sans Flex", sans-serif;
}

.single-product-style1__info li a,
.single-product-style1__info li a.product-card-action {
    color: var(--tds-red, var(--servixa-base));
}

.single-product-style1__info li a.product-card-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.single-product-style1__info li a.product-card-action.is-loading {
    opacity: 0.6;
    pointer-events: none;
}

.single-product-style1__info li a .product-card-action-icon,
.single-product-style1__info li a.product-card-action .product-card-action-icon {
    display: block;
    flex-shrink: 0;
}

.single-product-style1__info li a .product-card-action-icon path,
.single-product-style1__info li a.product-card-action .product-card-action-icon path {
    transition: fill 0.2s ease, stroke 0.2s ease;
}

.single-product-style1__info li a:hover,
.single-product-style1__info li a.product-card-action:hover {
    color: #fff;
}

.catalog-empty {
    text-align: center;
    padding: 56px 24px;
    border: 1px dashed var(--servixa-bdr-color);
    border-radius: var(--servixa-bdr-radius);
    background: rgba(var(--servixa-primary-rgb), 0.45);
}

.catalog-empty__icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--servixa-white);
    color: var(--servixa-base);
    font-size: 28px;
    box-shadow: 0 8px 24px rgba(var(--servixa-black-rgb), 0.06);
}

.catalog-empty p {
    margin: 0;
    font-size: 16px;
    color: var(--servixa-gray);
}

.catalog-load-more {
    margin-top: 36px;
    text-align: center;
}

.catalog-load-more .thm-btn {
    min-width: 180px;
}

/* Subcategory layout */
.catalog-subcategory-intro {
    margin-bottom: 28px;
    padding: 20px 24px;
    border-radius: var(--servixa-bdr-radius);
    background: linear-gradient(135deg, rgba(var(--servixa-base-rgb), 0.08), rgba(var(--servixa-primary-rgb), 0.9));
    border: 1px solid rgba(var(--servixa-base-rgb), 0.12);
}

.catalog-subcategory-intro h2 {
    margin: 0 0 6px;
    font-size: 24px;
    font-weight: 700;
    color: var(--servixa-black);
}

.catalog-subcategory-intro p {
    margin: 0;
    color: var(--servixa-gray);
    font-size: 15px;
}

.subcategory-section {
    margin-bottom: 40px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--servixa-bdr-color);
}

.subcategory-section:last-child {
    border-bottom: 0;
    margin-bottom: 0;
    padding-bottom: 0;
}

.subcategory-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.subcategory-section-title h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--servixa-black);
    position: relative;
    padding-left: 16px;
}

.subcategory-section-title h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    border-radius: 999px;
    background: var(--servixa-base);
}

.subcategory-load-more .subcategory-load-more-btn,
.subcategory-load-more .thm-btn {
    min-width: 160px;
}

@media (max-width: 1199px) {
    .catalog-sidebar {
        position: static;
        margin-bottom: 24px;
    }

    .catalog-main__panel {
        padding: 20px 16px;
    }
}

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

    .catalog-toolbar__sort {
        width: 100%;
    }

    .catalog-sort-select {
        width: 100%;
        min-width: 0;
    }
}

/* Cart page */
.cart-catalog {
    padding-bottom: 72px;
}

.cart-catalog__empty-action {
    margin-top: 24px;
}

.cart-catalog__aside {
    top: 110px;
}

.cart-catalog__items {
    margin-bottom: 24px;
}

.cart-catalog__table-wrap {
    margin: 0 -4px;
}

.cart-catalog__table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
}

.cart-catalog__table thead th {
    padding: 0 12px 16px;
    border-bottom: 1px solid var(--servixa-bdr-color);
    font-size: 14px;
    font-weight: 700;
    color: var(--servixa-black);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.cart-catalog__table thead th:last-child {
    width: 48px;
    text-align: center;
}

.cart-catalog__table tbody td {
    padding: 20px 12px;
    border-bottom: 1px solid var(--servixa-bdr-color);
    vertical-align: middle;
    color: var(--servixa-gray);
    font-size: 15px;
}

.cart-catalog__table tbody tr:last-child td {
    border-bottom: 0;
}

.cart-catalog__product {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 220px;
}

.cart-catalog__thumb {
    flex-shrink: 0;
    display: block;
    width: 88px;
    height: 88px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--servixa-bdr-color);
    background: #fff;
}

.cart-catalog__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-catalog__product-name {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.cart-catalog__product-name a {
    color: var(--servixa-black);
    text-decoration: none;
    transition: color 0.2s ease;
}

.cart-catalog__product-name a:hover {
    color: var(--servixa-base);
}

.cart-catalog__product-meta {
    margin: 0;
    font-size: 13px;
    color: var(--servixa-gray);
    line-height: 1.45;
}

.cart-catalog__price,
.cart-catalog__line-total {
    font-weight: 700;
    color: var(--servixa-base);
    white-space: nowrap;
}

.cart-catalog__qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--servixa-bdr-color);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.cart-catalog__qty button {
    width: 36px;
    height: 40px;
    border: 0;
    background: rgba(var(--servixa-primary-rgb), 0.55);
    color: var(--servixa-black);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease;
}

.cart-catalog__qty button:hover:not(:disabled) {
    background: rgba(var(--servixa-base-rgb), 0.12);
}

.cart-catalog__qty button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.cart-catalog__qty input {
    width: 48px;
    height: 40px;
    border: 0;
    border-left: 1px solid var(--servixa-bdr-color);
    border-right: 1px solid var(--servixa-bdr-color);
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: var(--servixa-black);
    -moz-appearance: textfield;
}

.cart-catalog__qty input::-webkit-outer-spin-button,
.cart-catalog__qty input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cart-catalog__remove {
    width: 36px;
    height: 36px;
    border: 1px solid var(--servixa-bdr-color);
    border-radius: 50%;
    background: #fff;
    color: var(--servixa-gray);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.cart-catalog__remove:hover {
    border-color: var(--servixa-base);
    color: var(--servixa-base);
    background: rgba(var(--servixa-base-rgb), 0.06);
}

.cart-catalog__totals {
    margin: 0 0 24px;
    padding: 0;
}

.cart-catalog__totals li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--servixa-bdr-color);
    font-size: 15px;
    color: var(--servixa-gray);
}

.cart-catalog__totals li.is-total {
    border-bottom: 0;
    padding-top: 16px;
    margin-top: 4px;
    font-size: 17px;
    font-weight: 700;
    color: var(--servixa-black);
}

.cart-catalog__totals li.is-total span:last-child {
    color: var(--servixa-base);
    font-size: 20px;
}

.cart-catalog__actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cart-catalog__actions .thm-btn {
    width: 100%;
    justify-content: center;
    min-height: 48px;
}

.cart-catalog__btn-secondary {
    background: transparent !important;
    color: var(--servixa-black) !important;
    border: 1px solid var(--servixa-bdr-color) !important;
    box-shadow: none !important;
}

.cart-catalog__btn-secondary:hover {
    border-color: var(--servixa-base) !important;
    color: var(--servixa-base) !important;
}

.cart-catalog .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 991px) {
    .cart-catalog__aside {
        position: static;
    }
}

@media (max-width: 767px) {
    .cart-catalog__table thead {
        display: none;
    }

    .cart-catalog__table tbody tr {
        display: block;
        padding: 16px 0;
        border-bottom: 1px solid var(--servixa-bdr-color);
    }

    .cart-catalog__table tbody tr:last-child {
        border-bottom: 0;
    }

    .cart-catalog__table tbody td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 10px 0;
        border-bottom: 0;
    }

    .cart-catalog__table tbody td::before {
        content: attr(data-label);
        flex: 0 0 96px;
        font-size: 13px;
        font-weight: 600;
        color: var(--servixa-black);
    }

    .cart-catalog__table tbody td:first-child {
        display: block;
        padding-top: 0;
    }

    .cart-catalog__table tbody td:first-child::before {
        display: none;
    }

    .cart-catalog__table tbody td:last-child {
        justify-content: flex-end;
        padding-bottom: 0;
    }

    .cart-catalog__table tbody td:last-child::before {
        display: none;
    }

    .cart-catalog__product {
        min-width: 0;
    }
}
