/* ──────────────────────────────────────────────────────────────
   HK Senior Mall - WooCommerce Custom Styles
   ────────────────────────────────────────────────────────────── */

/* ── Product Card ─────────────────────────────────────────── */
.hksm-product-card {
    position: relative;
    border: 1px solid var(--hksm-border);
    border-radius: 0.875rem;
    overflow: hidden;
    transition:
        transform var(--hksm-transition),
        box-shadow var(--hksm-transition),
        border-color var(--hksm-transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #fff;
    padding: 1rem;
    gap: 0.75rem;
}

.hksm-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
    border-color: #d8dee7;
}

.hksm-product-card__media {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    background: #fff;
    width: 100%;
    max-width: 190px;
    margin: 0 auto;
}

.hksm-product-card__media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0;
    transition: transform 0.3s ease;
}

.hksm-product-card:hover .hksm-product-card__media img {
    transform: scale(1.05);
}

.hksm-product-card__body {
    padding: 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hksm-product-card__title {
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--hksm-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
    min-height: 3em;
    line-break: anywhere;
}

.hksm-product-card__title a {
    color: inherit;
    text-decoration: none;
}

.hksm-product-card__price {
    margin-top: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--hksm-danger);
}

.hksm-product-card__price del {
    color: var(--hksm-text-muted);
    font-weight: 400;
    font-size: 0.8125rem;
}

.hksm-product-card__price ins {
    text-decoration: none;
    color: var(--hksm-danger);
}

.hksm-product-card__actions {
    padding: 0;
    margin-top: auto;
}

.hksm-product-card__actions .btn,
.hksm-product-card__actions .button {
    width: 100%;
    font-size: 0.9375rem;
}

/* ── Product Grid ─────────────────────────────────────────── */
.hksm-product-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1.5rem;
}

.hksm-product-grid--list {
    grid-template-columns: 1fr;
    gap: 0;
}

.hksm-product-grid--list .hksm-product-card {
    flex-direction: row;
    align-items: flex-start;
    padding: 1rem 0;
    border: none;
    border-radius: 0;
    border-bottom: 1px solid var(--hksm-border);
    box-shadow: none;
}

.hksm-product-grid--list .hksm-product-card__media {
    width: 155px;
    max-width: 155px;
    flex: 0 0 155px;
    aspect-ratio: 1;
    margin: 0;
}

.hksm-product-grid--list .hksm-product-card__body {
    padding: 0.25rem 1.25rem 0 0;
    min-width: 0;
}

.hksm-product-grid--list .hksm-product-card__actions {
    flex: 0 0 180px;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding-top: 0.25rem;
}

@media (max-width: 1399.98px) {
    .hksm-product-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 1.25rem;
    }
}

@media (max-width: 991.98px) {
    .hksm-product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1rem;
    }

    .hksm-product-grid--list .hksm-product-card__actions {
        flex-basis: 160px;
    }

    .hksm-pdp-summary .hksm-variation-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .hksm-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }

    .hksm-product-grid--list {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .hksm-archive-panel__body [data-hksm-product-grid],
    [data-hksm-related-grid] {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .hksm-product-card {
        padding: 0.875rem;
    }

    .hksm-product-grid--list .hksm-product-card {
        flex-direction: row;
        padding: 1rem 0;
        gap: 0.875rem;
    }

    .hksm-archive-panel__body [data-hksm-product-grid] .hksm-product-card,
    [data-hksm-related-grid] .hksm-product-card {
        flex-direction: row;
        align-items: flex-start;
        gap: 0.875rem;
        padding: 1rem 0;
        border: none;
        border-radius: 0;
        border-bottom: 1px solid var(--hksm-border);
        box-shadow: none;
    }

    .hksm-product-grid--list .hksm-product-card__media {
        width: 128px;
        max-width: 128px;
        flex-basis: 128px;
    }

    .hksm-archive-panel__body [data-hksm-product-grid] .hksm-product-card__media,
    [data-hksm-related-grid] .hksm-product-card__media {
        width: 128px;
        max-width: 128px;
        flex: 0 0 128px;
        margin: 0;
    }

    .hksm-product-grid--list .hksm-product-card__body {
        padding-right: 0;
    }

    .hksm-archive-panel__body [data-hksm-product-grid] .hksm-product-card__body,
    [data-hksm-related-grid] .hksm-product-card__body {
        min-width: 0;
        padding-right: 0;
        gap: 0.375rem;
    }

    .hksm-archive-panel__body [data-hksm-product-grid] .hksm-product-card__title,
    [data-hksm-related-grid] .hksm-product-card__title {
        min-height: 0;
        -webkit-line-clamp: 3;
        font-size: 0.95rem;
    }

    .hksm-product-grid--list .hksm-product-card__actions {
        display: none;
    }

    .hksm-archive-panel__body [data-hksm-product-grid] .hksm-product-card__actions,
    [data-hksm-related-grid] .hksm-product-card__actions {
        display: none;
    }

    .hksm-archive-panel__body [data-hksm-product-grid] > .hksm-product-card:last-child,
    [data-hksm-related-grid] > .hksm-product-card:last-child {
        border-bottom: none;
    }

    .hksm-pdp-summary .hksm-variation-cards {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        margin-bottom: 12px !important;
    }

    .hksm-pdp-summary .hksm-variation-card {
        flex: 0 0 auto !important;
        width: auto !important;
        display: inline-flex !important;
        flex-direction: row !important;
        padding: 6px 14px !important;
        border-radius: 30px !important;
        gap: 8px !important;
        align-items: center !important;
        min-height: 0 !important;
        box-shadow: none !important;
        background: #fff !important;
    }

    .hksm-pdp-summary .hksm-variation-card--active {
        background: #f0fdfa !important;
        border-color: var(--hksm-primary) !important;
    }

    .hksm-pdp-summary .hksm-variation-card__image {
        flex: 0 0 auto !important;
    }

    .hksm-pdp-summary .hksm-variation-card__image img {
        width: 24px !important;
        height: 24px !important;
        border-radius: 50% !important;
    }

    .hksm-pdp-summary .hksm-variation-card__info {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 8px !important;
        flex: 0 0 auto !important;
    }

    .hksm-pdp-summary .hksm-variation-card__name,
    .hksm-pdp-summary .hksm-variation-card__price {
        font-size: 13px !important;
        line-height: 1 !important;
        margin: 0 !important;
        white-space: nowrap !important;
    }

    .hksm-pdp-summary .hksm-variation-card__price .price {
        margin: 0 !important;
        font-size: inherit !important;
    }
}

/* ── Shop Filters ─────────────────────────────────────────── */
.hksm-archive-panel {
    background: #fff;
    border: 1px solid var(--hksm-border);
    border-radius: 0.875rem;
    overflow: hidden;
}

.hksm-archive-panel__body {
    padding: 1.25rem;
}

.hksm-shop-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--hksm-border);
}

.hksm-filter-sidebar .form-label {
    font-weight: 600;
    font-size: 0.875rem;
}

.hksm-filter-sidebar {
    background: #fff;
    border: 1px solid var(--hksm-border);
    border-radius: var(--hksm-radius);
    padding: 1.25rem;
}

.hksm-filter-sidebar ul {
    margin-bottom: 0;
}

.hksm-filter-sidebar .hksm-cat-expandable,
.hksm-filter-sidebar .hksm-brand-expandable {
    font-size: 0.875rem;
    padding: 0.25rem 0;
}

.hksm-filter-sidebar .hksm-cat-expandable .hksm-cat-meta {
    gap: 0.35rem;
    margin-left: auto;
    min-width: 70px;
    justify-content: flex-end;
}

.hksm-filter-sidebar .hksm-cat-leaf .hksm-cat-meta {
    margin-left: auto;
    min-width: 70px;
    justify-content: flex-end;
}

.hksm-filter-sidebar a.small {
    font-size: 0.8125rem;
    padding: 0.2rem 0;
}

.hksm-filter-apply {
    margin-top: 0.5rem;
}

.woocommerce-ordering {
    display: inline-flex;
    align-items: center;
    margin: 0;
}

.woocommerce-ordering select {
    border: 1px solid var(--hksm-border);
    border-radius: var(--hksm-radius);
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    background: #fff;
}

.woocommerce-result-count {
    margin: 0;
    font-size: 0.8125rem;
}

.hksm-result-count .woocommerce-result-count {
    margin: 0;
}

.woocommerce-products-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--hksm-border);
}

/* ── Subcategory Thumbnail Row ──────────────────────────── */
.subcat-grid-wrap {
    margin: 16px 0 12px;
}

.subcat-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 12px 10px;
}

.subcat-grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #444;
}

.subcat-grid-item.subcat-active .subcat-grid-name {
    color: var(--hksm-primary);
    font-weight: 600;
}

.subcat-grid-img {
    width: 100%;
    aspect-ratio: 1;
    background: #f7f7f7;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
}

.subcat-grid-img img {
    width: 78%;
    height: 78%;
    object-fit: contain;
}

.subcat-grid-name {
    font-size: 0.78rem;
    text-align: center;
    line-height: 1.25;
    word-break: keep-all;
}

.subcat-grid-toggle {
    display: none;
    margin: 12px auto 0;
    padding: 8px 20px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 0.82rem;
    color: #555;
    cursor: pointer;
    align-items: center;
    gap: 4px;
}

.subcat-grid-toggle i {
    transition: transform 0.2s;
}

.subcat-grid-toggle.expanded i {
    transform: rotate(180deg);
}

@media (max-width: 1024px) {
    .subcat-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

.hksm-product-card .price {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--hksm-danger);
    margin-bottom: 0.25rem;
}

.hksm-product-card .price del {
    color: var(--hksm-text-muted);
    font-weight: 400;
    font-size: 0.8125rem;
}

.hksm-product-card .price ins {
    text-decoration: none;
    color: var(--hksm-danger);
}

.hksm-product-card .button {
    display: inline-block;
    padding: 0.75rem 1rem;
    background: var(--hksm-primary);
    color: #fff;
    border: none;
    border-radius: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background var(--hksm-transition);
    width: 100%;
    min-height: 48px;
}

.hksm-product-card .button:hover {
    background: var(--hksm-primary-dark);
    color: #fff;
}

.hksm-product-card .added_to_cart {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--hksm-success);
    margin-top: 0.25rem;
}

/* ── Price Range ──────────────────────────────────────────── */
.hksm-price-range {
    padding: 0 0.5rem;
}

.noUi-connect {
    background: var(--hksm-primary);
}
.noUi-horizontal .noUi-handle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--hksm-primary);
    background: #fff;
    box-shadow: none;
    top: -6px;
    right: -10px;
    cursor: pointer;
}

.noUi-handle::before,
.noUi-handle::after {
    display: none;
}

/* ── PDP ──────────────────────────────────────────────────── */
.hksm-pdp-layout {
    display: grid;
    grid-template-columns: minmax(0, 40%) minmax(0, 60%);
    gap: 3rem;
    align-items: start;
}

.hksm-pdp-layout__media,
.hksm-pdp-layout__summary {
    min-width: 0;
}

.hksm-pdp-gallery-shell {
    position: relative;
}

.hksm-pdp-gallery {
    position: sticky;
    top: 96px;
}

.hksm-pdp-gallery .woocommerce-product-gallery {
    margin-bottom: 0;
    position: relative;
    padding-left: 92px;
}

.hksm-pdp-gallery .woocommerce-product-gallery__image img {
    border-radius: 0.75rem;
    width: 100%;
    object-fit: contain;
}

.hksm-pdp-gallery .flex-control-thumbs {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0;
    margin: 0;
    list-style: none;
    position: absolute;
    top: 1rem;
    left: 0;
    width: 72px;
    max-height: 420px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
}

.hksm-pdp-gallery .flex-control-thumbs li {
    width: 72px;
    height: 72px;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 2px solid var(--hksm-border);
    cursor: pointer;
}

.hksm-pdp-gallery .flex-control-thumbs li img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hksm-pdp-gallery .flex-control-thumbs li .flex-active {
    border-color: var(--hksm-primary);
}

.hksm-pdp-gallery .flex-viewport {
    border: 2px solid var(--hksm-border);
    border-radius: 0.75rem;
    background: #fff;
    overflow: hidden;
}

.hksm-pdp-left-description {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid var(--hksm-border);
    border-radius: 0.75rem;
    background: #fff;
    color: #1f2937;
    line-height: 1.65;
}

.hksm-pdp-left-description p:last-child {
    margin-bottom: 0;
}

@media (max-width: 991.98px) {
    .single-product .hksm-pdp-left-description {
        display: none !important;
    }
}

.hksm-pdp-summary-card {
    border: 1px solid var(--hksm-border);
    border-radius: 0.75rem;
    background: #fff;
    padding: 1.25rem;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.06);
}

.hksm-pdp-summary {
    margin: 0;
}

.hksm-pdp-summary .price {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--hksm-danger);
    margin-bottom: 1rem;
}

.hksm-pdp-summary .price del {
    order: 2;
    font-size: 1.125rem;
    color: var(--hksm-text-muted);
    font-weight: 400;
}

.hksm-pdp-summary form.cart {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    align-items: flex-start;
}

.hksm-pdp-summary form.cart > * {
    width: 100%;
}

/* Hide woovr plugin output – replaced by our own variation cards */
.woovr-variations {
    display: none !important;
}

/* Hide redundant variation price/description (cards already show this) */
.hksm-pdp-summary .woocommerce-variation.single_variation {
    display: none;
}
.single-product .summary .added_to_cart,
.single-product .hksm-pdp-summary .added_to_cart {
    display: none !important;
}

/* ── Variation Cards ─────────────────────────────────────── */
.hksm-pdp-summary .hksm-variation-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.625rem;
    margin-bottom: 0.25rem;
}

.hksm-pdp-summary .hksm-variation-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin: 0;
    border: 1px solid var(--hksm-border);
    border-radius: 0.75rem;
    background: #fff;
    overflow: hidden;
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
    padding: 0.7rem 0.8rem;
}

.hksm-pdp-summary .hksm-variation-card:hover {
    border-color: rgba(10, 149, 154, 0.45);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.hksm-pdp-summary .hksm-variation-card--active {
    border-color: var(--hksm-primary);
    box-shadow: 0 0 0 2px rgba(10, 149, 154, 0.14);
    background: linear-gradient(180deg, #ffffff, #f7fcfc);
}

.hksm-pdp-summary .hksm-variation-card--disabled {
    opacity: 0.4;
    pointer-events: none;
}

.hksm-pdp-summary .hksm-variation-card__image {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hksm-pdp-summary .hksm-variation-card__image img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 0.5rem;
    background: #fff;
}

.hksm-pdp-summary .hksm-variation-card__info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.2rem;
    min-width: 0;
}

.hksm-pdp-summary .hksm-variation-card__name {
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--hksm-text);
}

.hksm-pdp-summary .hksm-variation-card__price {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--hksm-danger);
}

.hksm-pdp-summary .hksm-variation-card__price .amount {
    font-size: inherit;
}

.hksm-pdp-summary .woovr-variation-price .amount {
    font-size: inherit;
}

.hksm-pdp-summary .single_variation_wrap,
.hksm-pdp-summary .woocommerce-variation-add-to-cart,
.hksm-pdp-summary .variations_button {
    display: flex;
    flex-wrap: wrap;
    gap: 0.875rem;
    align-items: center;
    width: 100%;
}

.hksm-pdp-summary .single_add_to_cart_button {
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0 !important;
    background: var(--hksm-primary);
    border-color: var(--hksm-primary);
    color: #fff;
    min-height: 52px;
    flex: 1 1 240px;
    max-height: 50px;
}

.hksm-pdp-summary .single_add_to_cart_button:hover {
    background: var(--hksm-primary-dark);
    border-color: var(--hksm-primary-dark);
}

.hksm-pdp-summary .quantity {
    display: flex;
    align-items: center;
    max-width: 190px;
}

.hksm-pdp-summary .quantity .hksm-qty-minus,
.hksm-pdp-summary .quantity .hksm-qty-plus {
    display: none;
}

.hksm-pdp-summary .quantity .qty {
    width: 96px;
    text-align: center;
    border: 1px solid var(--hksm-border);
    border-radius: 0.375rem;
    padding: 0.5rem;
    font-size: 1rem;
}

@media (max-width: 767.98px) {
    .hksm-pdp-summary .quantity {
        width: 100%;
        max-width: none;
    }

    .hksm-pdp-summary .quantity .hksm-qty-minus,
    .hksm-pdp-summary .quantity .hksm-qty-plus {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 44px;
        padding: 0;
        border: 1px solid var(--hksm-border);
        background: #fff;
        color: var(--hksm-text);
        font-size: 1.1rem;
        line-height: 1;
        flex: 0 0 42px;
    }

    .hksm-pdp-summary .quantity .hksm-qty-minus {
        border-radius: 0.375rem 0 0 0.375rem;
        border-right: 0;
    }

    .hksm-pdp-summary .quantity .qty {
        width: auto;
        min-width: 0;
        flex: 1 1 auto;
        border-radius: 0;
        border-left: 0;
        border-right: 0;
    }

    .hksm-pdp-summary .quantity .hksm-qty-plus {
        border-radius: 0 0.375rem 0.375rem 0;
        border-left: 0;
    }
}

.hksm-pdp-summary .product_meta {
    font-size: 0.8125rem;
    color: var(--hksm-text-muted);
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--hksm-border);
}

.hksm-pdp-summary .product_meta > span {
    display: block;
    margin-bottom: 0.25rem;
}

.hksm-pdp-meta {
    font-size: 0.875rem;
}

.hksm-pdp-trust {
    background: transparent;
    border-radius: 0;
    padding: 1rem 0 0;
    margin-top: 1.25rem;
}

.hksm-pdp-trust .text-primary {
    color: var(--hksm-primary) !important;
}

.hksm-pdp-trust .col-4 > div {
    height: 100%;
    background: #f9fafb;
    border: 1px solid var(--hksm-border);
    border-radius: 0.75rem;
    padding: 0.85rem 0.7rem;
}

/* ── PDP Tabs ─────────────────────────────────────────────── */
.hksm-pdp-tabs .nav-tabs {
    border-bottom: 2px solid var(--hksm-border);
}

.hksm-pdp-tabs .nav-link {
    font-weight: 600;
    color: var(--hksm-text-muted);
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.hksm-pdp-tabs .nav-link.active {
    color: var(--hksm-primary);
    border-bottom-color: var(--hksm-primary);
    background: none;
}

.hksm-pdp-tab-single {
    border-top: 1px solid var(--hksm-border);
}

.hksm-pdp-info {
    margin-top: 1.5rem;
}

.hksm-pdp-info-card {
    background: #fff;
    border: 1px solid var(--hksm-border);
    border-radius: 1rem;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
    padding: 1rem;
}

.hksm-pdp-info-card > * + * {
    margin-top: 1rem;
}

.hksm-pdp-info-card .wct-product-managed-content {
    display: grid;
    gap: 1rem;
}

.hksm-pdp-info-card .wct-description-section {
    background: linear-gradient(180deg, #fff, #fbfdff);
    border: 1px solid #e6ebf2;
    border-radius: 0.9rem;
    padding: 1rem 1.1rem;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.03);
}

.hksm-pdp-info-card .wct-description-info {
    border-left: 4px solid var(--hksm-primary);
    background: linear-gradient(180deg, rgba(108, 55, 211, 0.04), #fff);
}

.hksm-pdp-info-card .wct-description-section h3 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    line-height: 1.35;
    font-weight: 800;
    color: #111827;
}

.hksm-pdp-info-card .wct-description-section p {
    margin-bottom: 0;
    color: #334155;
    line-height: 1.85;
}

.hksm-pdp-info-card .wct-description-section ul {
    margin: 0;
    padding-left: 1.2rem;
    color: #334155;
}

.hksm-pdp-info-card .wct-description-section li + li {
    margin-top: 0.35rem;
}

.hksm-pdp-info-card .wct-description-section a {
    word-break: break-word;
}

.hksm-desc-wrap {
    position: relative;
}

.hksm-desc-content {
    max-height: 360px;
    overflow: hidden;
    position: relative;
    transition: max-height 0.3s ease;
}

.hksm-desc-wrap:not(.is-expanded) .hksm-desc-content::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 72px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff);
    pointer-events: none;
}

.hksm-desc-wrap.is-expanded .hksm-desc-content {
    max-height: none;
}

/* ── FAQ list block (no JS required) ────────────────────── */
.faqs-list-wrap {
    border: 1px solid var(--hksm-border);
    border-radius: 1rem;
    background: #fff;
    padding: 0.75rem;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.faqs-list-wrap .faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.faqs-list-wrap .faq-item {
    border: 1px solid #e8edf3;
    border-radius: 0.9rem;
    background: linear-gradient(180deg, #fff, #f8fbff);
    padding: 0.95rem 1rem;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.faqs-list-wrap .faq-item.active {
    border-color: rgba(10, 149, 154, 0.35);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.faqs-list-wrap .faq-question {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 800;
    line-height: 1.45;
    color: #0f172a;
}

.faqs-list-wrap .faq-answer {
    margin-top: 0.7rem;
    padding: 0.75rem 0 0;
    border-top: 1px dashed #d7e0ea;
    font-size: 0.92rem;
    line-height: 1.75;
    color: #334155;
}

.faqs-list-wrap .faq-answer a {
    word-break: break-word;
}

/* ── Cart Page ────────────────────────────────────────────── */
.hksm-cart-table th {
    font-size: 0.875rem;
    font-weight: 600;
}

.hksm-cart-table .hksm-cart-item-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.hksm-cart-table .hksm-cart-qty {
    width: 60px;
    text-align: center;
}

.hksm-cart-table td img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    border-radius: var(--hksm-radius);
    background: var(--hksm-bg-light);
}

.hksm-cart-totals {
    position: sticky;
    top: 96px;
    border-radius: 0.875rem;
    border: 1px solid var(--hksm-border);
    overflow: hidden;
}

.cart-collaterals .shop_table {
    width: 100%;
}

.cart-collaterals .shop_table th,
.cart-collaterals .shop_table td {
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--hksm-border);
    font-size: 0.875rem;
}

.cart-collaterals .shop_table .order-total th,
.cart-collaterals .shop_table .order-total td {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--hksm-text);
    border-bottom: none;
    padding-top: 0.75rem;
}

.wc-proceed-to-checkout {
    margin-top: 1rem;
}

.wc-proceed-to-checkout .checkout-button {
    display: block;
    width: 100%;
    padding: 14px 20px;
    background: var(--hksm-primary);
    color: #fff;
    text-decoration: none;
    text-align: center;
    border-radius: var(--hksm-radius);
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    border: none;
}

.wc-proceed-to-checkout .checkout-button:hover {
    background: var(--hksm-primary-dark);
    color: #fff;
}

.woocommerce-cart .quantity .qty {
    width: 50px;
    text-align: center;
    border: 1px solid var(--hksm-border);
    border-radius: var(--hksm-radius);
    padding: 0.375rem;
}

/* ── Mini Cart ────────────────────────────────────────────── */
.hksm-minicart-content .woocommerce-mini-cart {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hksm-minicart-content .woocommerce-mini-cart-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--hksm-border);
}

.hksm-minicart-content .woocommerce-mini-cart-item img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 4px;
}

.hksm-minicart-content .woocommerce-mini-cart__total {
    padding: 0.75rem 1rem;
    font-weight: 700;
}

.hksm-minicart-content .woocommerce-mini-cart__buttons {
    padding: 0.75rem 1rem;
    display: flex;
    gap: 0.5rem;
}

.hksm-minicart-content .woocommerce-mini-cart__buttons a {
    flex: 1;
    text-align: center;
}

/* ── Empty Cart ───────────────────────────────────────────── */
.hksm-empty-cart {
    text-align: center;
    padding: 3rem 1rem;
}

/* ── Breadcrumb ───────────────────────────────────────────── */
.hksm-breadcrumb {
    font-size: 0.8125rem;
    color: var(--hksm-text-muted);
    margin-bottom: 1rem;
}

.hksm-breadcrumb a {
    color: var(--hksm-text-muted);
}
.hksm-breadcrumb a:hover {
    color: var(--hksm-primary);
}

/* ── Related Products ─────────────────────────────────────── */
.hksm-related-products h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

/* ── Pagination ───────────────────────────────────────────── */
.woocommerce-pagination {
    text-align: center;
    margin-top: 2rem;
}

.woocommerce-pagination ul {
    list-style: none;
    display: inline-flex;
    gap: 0.25rem;
    padding: 0;
}

.woocommerce-pagination ul li a,
.woocommerce-pagination ul li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem;
    border: 1px solid var(--hksm-border);
    border-radius: var(--hksm-radius);
    font-size: 0.875rem;
    color: var(--hksm-text);
    transition: all var(--hksm-transition);
}

.woocommerce-pagination ul li a:hover {
    background: var(--hksm-primary);
    color: #fff;
    border-color: var(--hksm-primary);
}

.woocommerce-pagination ul li span.current {
    background: var(--hksm-primary);
    color: #fff;
    border-color: var(--hksm-primary);
}

/* ── Notices ──────────────────────────────────────────────── */
.woocommerce-message,
.woocommerce-info {
    padding: 0.75rem 1rem;
    border-radius: var(--hksm-radius);
    border-left: 4px solid var(--hksm-primary);
    background: #eff6ff;
    margin-bottom: 1rem;
}

.woocommerce-error {
    padding: 0.75rem 1rem;
    border-radius: var(--hksm-radius);
    border-left: 4px solid var(--hksm-danger);
    background: #fef2f2;
    margin-bottom: 1rem;
    list-style: none;
}

/* ── Homepage Carousel Product Images ────────────────────── */
.hksm-product-carousel .hksm-product-card__media img {
    object-fit: contain;
    padding: 0.5rem;
}

/* ── Footer Payment Icons ────────────────────────────────── */
.hksm-payment-icons-footer img {
    display: inline-block;
    vertical-align: middle;
    width: 56px;
    height: 34px;
    object-fit: contain;
    border-radius: 10px;
}

/* ── WooCommerce default overrides ───────────────────────── */
.woocommerce table.shop_table {
    border: none;
}

.woocommerce a.remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: var(--hksm-danger) !important;
    font-weight: 700;
}

.woocommerce .coupon .button {
    background: var(--hksm-primary);
    color: #fff;
    border: none;
}

.hksm-product-card .add_to_cart_button.loading::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: hksm-spin 0.6s linear infinite;
    margin-left: 0.5rem;
    vertical-align: middle;
}

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

/* ── WooCommerce star rating ─────────────────────────────── */
.star-rating {
    color: var(--hksm-accent);
    font-size: 0.875rem;
}

/* ── Subcategory Thumbnail Row ───────────────────────────── */
.hksm-subcategory-row {
    background: #fff;
    border: 1px solid var(--hksm-border);
    border-radius: var(--hksm-radius);
    padding: 1rem;
}

.hksm-subcat-card {
    transition: transform 0.2s ease;
}

.hksm-subcat-card:hover {
    transform: translateY(-2px);
}

.hksm-subcat-thumb {
    aspect-ratio: 1;
    background: var(--hksm-bg-light);
}

.hksm-subcat-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.25rem;
}

.hksm-subcat-name {
    font-weight: 500;
    line-height: 1.3;
}

/* ── PDP Payment Icons (SVG) ─────────────────────────────── */
.cart-payment-block {
    margin-top: 1.5rem;
    padding: 1.25rem;
    border: 1px solid #f0f0f0;
    border-radius: 0.875rem;
    background: #f8f9fa;
}

.cart-payment-heading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

.cart-payment-heading i {
    font-size: 1.125rem;
    color: #1fa67a;
}

.cart-payment-icons {
    border-top: 1px dashed #e0e0e0;
    padding-top: 1rem;
}

.hksm-payment-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px !important;
    justify-content: center;
    align-items: center;
    margin-top: 0 !important;
}

.hksm-payment-icons img {
    display: inline-block;
    vertical-align: middle;
    width: 56px;
    height: 34px;
    object-fit: contain;
    background: transparent;
}

/* ── WooCommerce Product Loop (archive grid) ─────────────── */
.woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

@media (max-width: 767.98px) {
    .woocommerce ul.products:not(.hksm-product-grid--list) {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    .woocommerce ul.products.hksm-product-grid--list {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

.woocommerce ul.products li.product {
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
}

@media (max-width: 991.98px) {
    .hksm-pdp-layout {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }

    .hksm-pdp-gallery {
        position: static;
    }
}

@media (max-width: 767.98px) {
    .subcat-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px 8px;
    }

    .subcat-grid-item.subcat-grid-hidden {
        display: none;
    }

    .subcat-grid-wrap.expanded .subcat-grid-item.subcat-grid-hidden {
        display: flex;
    }

    .subcat-grid-toggle {
        display: inline-flex;
    }

    .hksm-pdp-gallery .woocommerce-product-gallery {
        padding-left: 0;
    }

    .hksm-pdp-gallery .flex-control-thumbs {
        position: static;
        width: 100%;
        max-height: none;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        margin-top: 0.75rem;
    }

    .hksm-pdp-gallery .flex-control-thumbs li {
        flex: 0 0 64px;
        width: 64px;
        height: 64px;
    }

    .hksm-pdp-summary-card {
        padding: 1rem;
    }

    .hksm-pdp-summary .single_add_to_cart_button {
        flex-basis: 100%;
    }

    .hksm-pdp-trust .row {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.25rem;
    }

    .hksm-pdp-trust .col-4 {
        min-width: 180px;
    }
}

/* ── WooCommerce default notices in archive ──────────────── */
.woocommerce-notices-wrapper {
    display: none !important;
}

/* ── Hide variation description on PDP summary card ───────── */
.hksm-pdp-summary .woocommerce-variation-description,
.hksm-pdp-summary-card .woocommerce-variation-description {
    display: none !important;
}

/* ── Cart: shipping methods list cleanup ──────────────────── */
.woocommerce-cart .woocommerce-shipping-methods {
    list-style: none;
    padding: 0;
    margin: 0;
}
.woocommerce-cart .woocommerce-shipping-methods li {
    margin: 0;
    padding: 0;
}
.woocommerce-cart .woocommerce-shipping-destination {
    display: none;
}

/* ── WooCommerce My Account ─────────────────────────────────── */

.woocommerce-account .hksm-page-content > .woocommerce,
.woocommerce-account .entry-content > .woocommerce,
.woocommerce-account .woocommerce {
    display: flex;
    gap: 0;
    max-width: 1100px;
    margin: 30px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    overflow: hidden;
}

.woocommerce-account .woocommerce-MyAccount-navigation {
    width: 240px;
    flex-shrink: 0;
    background: #f8f9fa;
    border-right: 1px solid #eee;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li {
    border-bottom: 1px solid #eee;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    color: #444;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background .15s, color .15s;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover {
    background: #e9ecef;
    color: #0066cc;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a {
    background: #fff;
    color: #0066cc;
    font-weight: 600;
    border-right: 3px solid #0066cc;
}

.woocommerce-account .woocommerce-MyAccount-content {
    flex: 1;
    padding: 30px;
    min-height: 400px;
}

.woocommerce-account .woocommerce-MyAccount-content h2,
.woocommerce-account .woocommerce-MyAccount-content h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 16px;
}

.woocommerce-account .woocommerce-MyAccount-content p {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
}

.woocommerce-account .woocommerce-MyAccount-content a {
    color: #0066cc;
}

/* Form fields */
.woocommerce-account .woocommerce-MyAccount-content .form-row {
    margin-bottom: 16px;
}

.woocommerce-account .woocommerce-MyAccount-content .form-row label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.woocommerce-account .woocommerce-MyAccount-content .input-text,
.woocommerce-account .woocommerce-MyAccount-content input[type="text"],
.woocommerce-account .woocommerce-MyAccount-content input[type="email"],
.woocommerce-account .woocommerce-MyAccount-content input[type="tel"],
.woocommerce-account .woocommerce-MyAccount-content input[type="password"],
.woocommerce-account .woocommerce-MyAccount-content select,
.woocommerce-account .woocommerce-MyAccount-content textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    background: #fafafa;
    transition: border-color .15s;
}

.woocommerce-account .woocommerce-MyAccount-content .input-text:focus,
.woocommerce-account .woocommerce-MyAccount-content input:focus,
.woocommerce-account .woocommerce-MyAccount-content select:focus,
.woocommerce-account .woocommerce-MyAccount-content textarea:focus {
    border-color: #0066cc;
    outline: none;
    background: #fff;
}

/* Buttons */
.woocommerce-account .woocommerce-MyAccount-content .button,
.woocommerce-account .woocommerce-MyAccount-content button[type="submit"],
.woocommerce-account .woocommerce-MyAccount-content input[type="submit"] {
    display: inline-block;
    padding: 10px 24px;
    background: #0066cc;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}

.woocommerce-account .woocommerce-MyAccount-content .button:hover,
.woocommerce-account .woocommerce-MyAccount-content button[type="submit"]:hover,
.woocommerce-account .woocommerce-MyAccount-content input[type="submit"]:hover {
    background: #0052a3;
}

/* Orders table */
.woocommerce-account .woocommerce-orders-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.woocommerce-account .woocommerce-orders-table th {
    text-align: left;
    padding: 12px 10px;
    border-bottom: 2px solid #eee;
    font-weight: 600;
    color: #333;
    font-size: 13px;
}

.woocommerce-account .woocommerce-orders-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #f0f0f0;
    color: #555;
}

.woocommerce-account .woocommerce-orders-table .button {
    padding: 6px 14px;
    font-size: 12px;
}

/* Addresses */
.woocommerce-account .woocommerce-Addresses {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.woocommerce-account .woocommerce-Addresses .woocommerce-Address {
    flex: 1;
    min-width: 260px;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
}

.woocommerce-account .woocommerce-Addresses .woocommerce-Address header h3 {
    font-size: 16px;
    margin-bottom: 12px;
}

.woocommerce-account .woocommerce-Addresses .woocommerce-Address address {
    font-style: normal;
    font-size: 14px;
    color: #555;
    line-height: 1.7;
}

/* Fieldset */
.woocommerce-account .woocommerce-MyAccount-content fieldset {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.woocommerce-account .woocommerce-MyAccount-content fieldset legend {
    font-weight: 600;
    font-size: 15px;
    padding: 0 8px;
}

/* WooCommerce notices */
.woocommerce-account .woocommerce-message,
.woocommerce-account .woocommerce-info,
.woocommerce-account .woocommerce-error {
    padding: 14px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.woocommerce-account .woocommerce-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.woocommerce-account .woocommerce-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.woocommerce-account .woocommerce-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    list-style: none;
    padding-left: 20px;
}

/* Mobile responsive */
@media (max-width: 767px) {
    .woocommerce-account .hksm-page-content > .woocommerce,
    .woocommerce-account .entry-content > .woocommerce,
    .woocommerce-account .woocommerce {
        flex-direction: column;
        margin: 16px;
        border-radius: 10px;
    }

    .woocommerce-account .woocommerce-MyAccount-navigation {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #eee;
    }

    .woocommerce-account .woocommerce-MyAccount-navigation ul {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .woocommerce-account .woocommerce-MyAccount-navigation ul::-webkit-scrollbar {
        display: none;
    }

    .woocommerce-account .woocommerce-MyAccount-navigation ul li {
        border-bottom: none;
        flex-shrink: 0;
    }

    .woocommerce-account .woocommerce-MyAccount-navigation ul li a {
        padding: 12px 16px;
        white-space: nowrap;
        font-size: 13px;
    }

    .woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a {
        border-right: none;
        border-bottom: 3px solid #0066cc;
    }

    .woocommerce-account .woocommerce-MyAccount-content {
        padding: 20px 16px;
        min-height: auto;
    }

    .woocommerce-account .woocommerce-orders-table {
        display: block;
        overflow-x: auto;
    }

    .woocommerce-account .woocommerce-Addresses {
        flex-direction: column;
    }
}

/* My Account polish */
.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
    border-radius: 10px;
    margin: 6px 10px;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a {
    background: #0a6a43;
    border-right: 0;
    color: #fff;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover {
    background: #eef8f3;
    color: #0a6a43;
}

.woocommerce-account .woocommerce-orders-table__cell-order-actions .button,
.woocommerce-account .woocommerce-orders-table td.woocommerce-orders-table__cell-order-actions a {
    border-radius: 999px;
    font-weight: 700;
    padding: 8px 14px;
}

.woocommerce-account .woocommerce-orders-table td.woocommerce-orders-table__cell-order-actions a[href*="order_again"] {
    background: #0a6a43;
    border-color: #0a6a43;
    color: #fff;
}

.woocommerce-account .woocommerce-orders-table td.woocommerce-orders-table__cell-order-actions a[href*="order_again"]:hover {
    background: #085537;
    border-color: #085537;
    color: #fff;
}
