/**
 * HyperTechno storefront product cards.
 *
 * This shared component keeps category-grid and product-detail recommendation
 * cards visually aligned with the homepage while preserving native MGS forms,
 * wishlist actions, reviews, labels, and bilingual behavior.
 */

body.hypertechno-design-system {
    --ht-layer-card-badge: 6;
    --ht-layer-card-actions: 8;
}

/* Equal-height item containers in category grids and product-page carousels. */
.page-products.hypertechno-design-system
    .mgs-products.products-grid
    > .products.product-items
    > .product-item {
    align-items: stretch;
    display: inline-flex;
}

.catalog-product-view.hypertechno-product-page
    .block-releated
    .products-grid
    .product-item {
    align-items: stretch;
    display: flex;
    height: auto;
}

.catalog-product-view.hypertechno-product-page
    .block-releated
    .owl-stage-outer {
    margin: -6px -3px -12px;
    padding: 6px 3px 12px;
}

.catalog-product-view.hypertechno-product-page
    .block-releated
    .owl-stage {
    align-items: stretch;
    display: flex;
}

.catalog-product-view.hypertechno-product-page
    .block-releated
    .owl-item {
    display: flex;
    height: auto;
}

/*
 * Brand-related recommendations use a real grid instead of Owl Carousel.
 * Explicit tracks keep one or two products at the same width as a five-item
 * row; grid auto-placement follows the document direction for Arabic/LTR.
 */
.catalog-product-view.hypertechno-product-page
    .brand-related-products
    .mgs-products.products-grid {
    margin-inline: 0 !important;
}

.catalog-product-view.hypertechno-product-page
    .brand-related-products
    .ht-brand-related-grid {
    align-items: stretch;
    display: grid !important;
    gap: 16px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin: 0 !important;
    width: 100%;
}

.catalog-product-view.hypertechno-product-page
    .brand-related-products
    .ht-brand-related-grid
    > .product-item {
    display: flex !important;
    float: none !important;
    margin: 0 !important;
    max-width: none !important;
    padding: 0 !important;
    width: auto !important;
}

@media (max-width: 1279px) {
    .catalog-product-view.hypertechno-product-page
        .brand-related-products
        .ht-brand-related-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 1099px) {
    .catalog-product-view.hypertechno-product-page
        .brand-related-products
        .ht-brand-related-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 899px) {
    .catalog-product-view.hypertechno-product-page
        .brand-related-products
        .ht-brand-related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .catalog-product-view.hypertechno-product-page
        .brand-related-products
        .ht-brand-related-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Shared card shell. */
.hypertechno-design-system .ht-storefront-product-card {
    background: #fff;
    border: 1px solid var(--ht-color-line, #e5e7eb);
    border-radius: 16px;
    box-shadow: 0 4px 14px rgba(16, 24, 40, .05);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0;
    overflow: hidden;
    position: relative;
    transition:
        border-color 220ms ease,
        box-shadow 220ms ease,
        transform 220ms ease;
    width: 100%;
}

.hypertechno-design-system .ht-storefront-product-card:hover,
.hypertechno-design-system .ht-storefront-product-card:focus-within {
    border-color: #f2abab;
    box-shadow: 0 14px 30px rgba(16, 24, 40, .11);
    transform: translateY(-4px);
}

/* Media surface and predictable product-image sizing. */
.hypertechno-design-system .ht-storefront-product-card > .product-top {
    background: var(--ht-color-soft, #f6f7f9);
    border-block-end: 1px solid #edf0f3;
    flex: 0 0 auto;
    margin: 0;
    overflow: hidden;
    padding: 12px !important;
    position: relative;
}

.hypertechno-design-system
    .ht-storefront-product-card
    .product-top
    .product-item-photo {
    background: #fff;
    border-radius: 12px;
    display: block;
    overflow: hidden;
    position: relative !important;
    z-index: 1;
}

.hypertechno-design-system
    .ht-storefront-product-card
    .product-top
    img.product-image-photo,
.hypertechno-design-system
    .ht-storefront-product-card
    .product-top
    img.img-hover-show {
    bottom: 12px !important;
    height: calc(100% - 24px) !important;
    left: 12px !important;
    max-width: calc(100% - 24px) !important;
    min-width: 0 !important;
    object-fit: contain;
    padding: 0 !important;
    right: 12px !important;
    top: 12px !important;
    width: calc(100% - 24px) !important;
}

.hypertechno-design-system
    .ht-storefront-product-card
    .product-top
    .product-item-photo::after {
    background: transparent !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* Compact brand-red discount label used across both languages. */
.hypertechno-design-system .ht-storefront-product-card .product-label {
    background: var(--ht-color-primary, #d71920) !important;
    border-radius: 999px;
    box-shadow: 0 5px 12px rgba(215, 25, 32, .2);
    color: #fff;
    direction: ltr;
    display: block !important;
    font-size: 11px;
    font-weight: 800;
    height: 24px;
    inset: 12px auto auto 12px !important;
    line-height: 24px;
    min-width: 52px;
    padding-inline: 8px;
    position: absolute !important;
    text-align: center;
    unicode-bidi: isolate;
    width: auto;
    z-index: var(--ht-layer-card-badge);
}

.hypertechno-design-system
    .ht-storefront-product-card
    .product-label.multiple-label {
    margin-top: 32px;
}

/* Quick actions retain their native behavior but share one accessible shape. */
.hypertechno-design-system
    .ht-storefront-product-card
    .product-top
    .actions-link {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px;
    inset: 12px 12px auto auto !important;
    list-style: none;
    margin: 0;
    padding: 0;
    position: absolute;
    z-index: var(--ht-layer-card-actions);
}

.hypertechno-design-system
    .ht-storefront-product-card
    .product-top
    .actions-link
    > li {
    margin: 0 !important;
}

.hypertechno-design-system
    .ht-storefront-product-card
    .product-top
    .actions-link
    button.action,
.hypertechno-design-system
    .ht-storefront-product-card
    .product-top
    .actions-link
    a.action {
    align-items: center;
    background: rgba(255, 255, 255, .96) !important;
    border: 1px solid var(--ht-color-line, #e5e7eb) !important;
    border-radius: 50% !important;
    box-shadow: 0 5px 14px rgba(16, 24, 40, .1) !important;
    box-sizing: border-box;
    color: var(--ht-color-ink, #111313) !important;
    display: inline-flex !important;
    flex: 0 0 44px;
    height: 44px !important;
    justify-content: center;
    line-height: 1;
    margin: 0;
    max-height: 44px;
    max-width: 44px;
    min-height: 44px;
    min-width: 44px;
    padding: 0 !important;
    transition:
        background-color 180ms ease,
        border-color 180ms ease,
        box-shadow 180ms ease,
        color 180ms ease,
        opacity 180ms ease,
        transform 180ms ease !important;
    width: 44px !important;
}

.hypertechno-design-system
    .ht-storefront-product-card
    .product-top
    .actions-link
    button.action
    i,
.hypertechno-design-system
    .ht-storefront-product-card
    .product-top
    .actions-link
    button.action
    i::before,
.hypertechno-design-system
    .ht-storefront-product-card
    .product-top
    .actions-link
    a.action
    i,
.hypertechno-design-system
    .ht-storefront-product-card
    .product-top
    .actions-link
    a.action
    i::before {
    color: inherit !important;
    font-size: 20px;
    line-height: 1;
    margin: 0;
}

.hypertechno-design-system
    .ht-storefront-product-card
    .product-top
    .actions-link
    button.action:hover,
.hypertechno-design-system
    .ht-storefront-product-card
    .product-top
    .actions-link
    button.action:focus,
.hypertechno-design-system
    .ht-storefront-product-card
    .product-top
    .actions-link
    a.action:hover,
.hypertechno-design-system
    .ht-storefront-product-card
    .product-top
    .actions-link
    a.action:focus {
    background: var(--ht-color-primary, #d71920) !important;
    border-color: var(--ht-color-primary, #d71920) !important;
    color: #fff !important;
    outline: none;
}

.hypertechno-design-system
    .ht-storefront-product-card
    .product-top
    .actions-link
    button.action:focus-visible,
.hypertechno-design-system
    .ht-storefront-product-card
    .product-top
    .actions-link
    a.action:focus-visible {
    box-shadow: 0 0 0 3px rgba(215, 25, 32, .24) !important;
}

@media (hover: hover) and (min-width: 768px) {
    .hypertechno-design-system
        .ht-storefront-product-card
        .product-top
        .actions-link
        button.action,
    .hypertechno-design-system
        .ht-storefront-product-card
        .product-top
        .actions-link
        a.action {
        opacity: 0 !important;
        transform: translateY(-5px) scale(.94) !important;
        visibility: hidden !important;
    }

    .hypertechno-design-system
        .ht-storefront-product-card:hover
        .actions-link
        button.action,
    .hypertechno-design-system
        .ht-storefront-product-card:hover
        .actions-link
        a.action,
    .hypertechno-design-system
        .ht-storefront-product-card:focus-within
        .actions-link
        button.action,
    .hypertechno-design-system
        .ht-storefront-product-card:focus-within
        .actions-link
        a.action {
        opacity: 1 !important;
        transform: translateY(0) scale(1) !important;
        visibility: visible !important;
    }
}

.hypertechno-design-system
    .ht-storefront-product-card
    .product-top
    .actions-link
    button.action:active,
.hypertechno-design-system
    .ht-storefront-product-card
    .product-top
    .actions-link
    a.action:active {
    background: var(--ht-color-primary-dark, #aa1419) !important;
    border-color: var(--ht-color-primary-dark, #aa1419) !important;
    box-shadow: none !important;
    color: #fff !important;
    transform: scale(.96) !important;
}

.hypertechno-design-system
    .ht-storefront-product-card
    .product-top
    .actions-link
    button.action:disabled,
.hypertechno-design-system
    .ht-storefront-product-card
    .product-top
    .actions-link
    button.action.disabled,
.hypertechno-design-system
    .ht-storefront-product-card
    .product-top
    .actions-link
    a.action.disabled {
    box-shadow: none !important;
    cursor: not-allowed;
    opacity: .55 !important;
    transform: none !important;
}

/* Add-to-cart action matches the homepage reveal on pointer devices. */
.hypertechno-design-system
    .ht-storefront-product-card
    .product-top
    .action-mobile {
    align-items: flex-end;
    background: linear-gradient(
        180deg,
        rgba(247, 248, 250, 0),
        rgba(247, 248, 250, .98) 42%
    );
    bottom: 0 !important;
    display: flex !important;
    inset-inline: 0 !important;
    left: 0 !important;
    opacity: 0;
    padding: 28px 12px 12px !important;
    pointer-events: none;
    position: absolute !important;
    right: 0 !important;
    top: auto !important;
    transform: translateY(8px);
    transition:
        opacity 200ms ease,
        transform 200ms ease,
        visibility 200ms ease;
    visibility: hidden;
    z-index: 7 !important;
}

.hypertechno-design-system
    .ht-storefront-product-card:hover
    .action-mobile,
.hypertechno-design-system
    .ht-storefront-product-card:focus-within
    .action-mobile {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    visibility: visible;
}

.hypertechno-design-system
    .ht-storefront-product-card
    .product-top
    .action-mobile
    > form {
    justify-content: stretch !important;
    padding: 0 !important;
    width: 100% !important;
}

/*
 * Keep the product-page cart action exactly button-sized. The original MGS
 * tray and the media fade both span a much taller area, which reads as a white
 * rounded frame around the red button when the card is hovered.
 */
@media (min-width: 768px) {
    .catalog-product-view
        .ht-storefront-product-card
        .product-top
        .action-mobile {
        align-items: center !important;
        backdrop-filter: none !important;
        background: none !important;
        background-color: transparent !important;
        background-image: none !important;
        border: 0 !important;
        border-radius: 0 !important;
        bottom: 12px !important;
        box-shadow: none !important;
        filter: none !important;
        height: 44px !important;
        inset-inline: 12px !important;
        isolation: auto !important;
        left: 12px !important;
        max-height: 44px !important;
        min-height: 44px !important;
        overflow: visible !important;
        padding: 0 !important;
        right: 12px !important;
        top: auto !important;
        width: auto !important;
    }

    .catalog-product-view
        .ht-storefront-product-card
        .product-top
        .action-mobile
        > form {
        align-items: center !important;
        backdrop-filter: none !important;
        background: none !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        display: flex !important;
        height: 44px !important;
        margin: 0 !important;
        max-height: 44px !important;
        min-height: 44px !important;
        padding: 0 !important;
        transform: none !important;
        width: 100% !important;
    }

    .catalog-product-view
        .ht-storefront-product-card
        .product-top
        .action-mobile
        .tocart.btn-cart {
        box-shadow: none !important;
        margin: 0 !important;
    }

    .catalog-product-view
        .ht-storefront-product-card
        .product-top
        .action-mobile::before,
    .catalog-product-view
        .ht-storefront-product-card
        .product-top
        .action-mobile::after,
    .catalog-product-view
        .ht-storefront-product-card
        .product-top
        .action-mobile
        > form::before,
    .catalog-product-view
        .ht-storefront-product-card
        .product-top
        .action-mobile
        > form::after,
    .catalog-product-view
        .ht-storefront-product-card
        .product-top
        .action-mobile
        .tocart.btn-cart::before,
    .catalog-product-view
        .ht-storefront-product-card
        .product-top
        .action-mobile
        .tocart.btn-cart::after {
        content: none !important;
        display: none !important;
    }
}

.hypertechno-design-system
    .ht-storefront-product-card
    .product-top
    .tocart.btn-cart {
    align-items: center;
    background: var(--ht-color-primary, #d71920) !important;
    border: 1px solid var(--ht-color-primary, #d71920) !important;
    border-radius: 10px !important;
    bottom: auto !important;
    box-shadow: 0 7px 14px rgba(215, 25, 32, .18) !important;
    color: #fff !important;
    display: inline-flex !important;
    font-size: 13px;
    font-weight: 800;
    gap: 7px;
    height: 44px !important;
    justify-content: center;
    left: auto !important;
    line-height: 1;
    opacity: 1 !important;
    padding: 0 14px !important;
    position: relative !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;
    visibility: visible !important;
    width: 100% !important;
    z-index: 8 !important;
}

.hypertechno-design-system
    .ht-storefront-product-card
    .product-top
    .tocart.btn-cart:hover,
.hypertechno-design-system
    .ht-storefront-product-card
    .product-top
    .tocart.btn-cart:focus {
    background: var(--ht-color-primary-dark, #aa1419) !important;
    border-color: var(--ht-color-primary-dark, #aa1419) !important;
    outline: none;
}

.hypertechno-design-system
    .ht-storefront-product-card
    .product-top
    .tocart.btn-cart:focus-visible {
    box-shadow: 0 0 0 3px rgba(215, 25, 32, .24) !important;
}

.hypertechno-design-system
    .ht-storefront-product-card
    .product-top
    .tocart.btn-cart:active {
    background: var(--ht-color-primary-dark, #aa1419) !important;
    border-color: var(--ht-color-primary-dark, #aa1419) !important;
    box-shadow: none !important;
    transform: scale(.99) !important;
}

.hypertechno-design-system
    .ht-storefront-product-card
    .product-top
    .tocart.btn-cart:disabled,
.hypertechno-design-system
    .ht-storefront-product-card
    .product-top
    .tocart.btn-cart.disabled {
    box-shadow: none !important;
    cursor: not-allowed;
    opacity: .55 !important;
}

.hypertechno-design-system
    .ht-storefront-product-card
    .product-top
    .tocart.btn-cart
    .icon,
.hypertechno-design-system
    .ht-storefront-product-card
    .product-top
    .tocart.btn-cart
    .text {
    color: inherit !important;
    display: inline-block !important;
}

/*
 * Related-product cards already expose a full text label on the product page.
 * Remove the decorative bag glyph in both locales without changing the native
 * add-to-cart action, form submission or accessible button title.
 */
.catalog-product-view.hypertechno-design-system
    .ht-storefront-product-card
    .product-top
    .tocart.btn-cart
    .icon {
    display: none !important;
}

/* Product text and pricing share the homepage hierarchy. */
.hypertechno-design-system
    .ht-storefront-product-card
    > .product-item-details {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 142px;
    min-width: 0;
    padding: 14px 14px 16px !important;
    text-align: start !important;
}

.hypertechno-design-system
    .ht-storefront-product-card
    .product-item-name {
    display: block;
    margin: 0 0 9px !important;
    min-height: 46px;
    overflow: hidden;
}

.hypertechno-design-system
    .ht-storefront-product-card
    .product-item-name
    .product-item-link {
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: var(--ht-color-ink, #111313) !important;
    display: -webkit-box;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.6 !important;
    overflow: hidden;
    text-decoration: none;
}

.hypertechno-design-system
    .ht-storefront-product-card
    .product-item-name
    .product-item-link:hover,
.hypertechno-design-system
    .ht-storefront-product-card
    .product-item-name
    .product-item-link:focus {
    color: var(--ht-color-primary, #d71920) !important;
}

.hypertechno-design-system
    .ht-storefront-product-card
    .product-reviews-summary {
    margin: 0 0 8px !important;
    min-height: 18px;
}

.hypertechno-design-system
    .ht-storefront-product-card
    .price-box {
    align-items: baseline;
    color: var(--ht-color-primary, #d71920);
    display: flex;
    flex-wrap: wrap;
    gap: 5px 8px;
    margin: auto 0 0 !important;
    min-height: 26px;
    text-align: start !important;
}

.hypertechno-design-system
    .ht-storefront-product-card
    .price-box
    .price {
    color: var(--ht-color-primary, #d71920) !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    line-height: 1.35;
}

.hypertechno-design-system
    .ht-storefront-product-card
    .price-box
    .special-price,
.hypertechno-design-system
    .ht-storefront-product-card
    .price-box
    .regular-price,
.hypertechno-design-system
    .ht-storefront-product-card
    .price-box
    .minimal-price,
.hypertechno-design-system
    .ht-storefront-product-card
    .price-box
    .old-price {
    display: inline-flex;
    float: none !important;
    margin: 0 !important;
}

.hypertechno-design-system
    .ht-storefront-product-card
    .price-box
    .old-price
    .price {
    color: var(--ht-color-muted, #676b73) !important;
    font-size: 12px !important;
    font-weight: 500 !important;
}

/* Category pagination: numeric pages and directional controls are distinct. */
html[lang^="en"]
    body.catalog-category-view.page-products
    .toolbar
    .limiter {
    display: none !important;
}

html[lang^="en"]
    body.catalog-category-view.page-products
    .bottom-pagination
    .pages {
    float: none !important;
    margin-inline: auto !important;
    width: 100% !important;
}

.page-products.hypertechno-design-system .bottom-pagination .pages {
    border-top-color: var(--ht-color-line, #e5e7eb);
    padding-top: 20px;
}

.page-products.hypertechno-design-system
    .bottom-pagination
    .pages
    .pagination {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 0 auto;
}

.page-products.hypertechno-design-system
    .bottom-pagination
    .pages
    .pagination
    > .item {
    float: none;
    margin: 0;
}

.page-products.hypertechno-design-system
    .bottom-pagination
    .pages
    .pagination
    > .item
    > a.page,
.page-products.hypertechno-design-system
    .bottom-pagination
    .pages
    .pagination
    > .item
    > strong.page,
.page-products.hypertechno-design-system
    .bottom-pagination
    .pages
    .pagination
    > .pages-item-previous
    > a.previous,
.page-products.hypertechno-design-system
    .bottom-pagination
    .pages
    .pagination
    > .pages-item-next
    > a.next {
    align-items: center;
    background: #fff;
    border: 1px solid var(--ht-color-line, #e5e7eb);
    border-radius: 50%;
    box-shadow: none;
    box-sizing: border-box;
    color: var(--ht-color-ink, #111313) !important;
    display: inline-flex;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    height: 44px;
    justify-content: center;
    line-height: 1;
    min-width: 44px;
    padding: 0;
    text-decoration: none;
    transition:
        background-color 180ms ease,
        border-color 180ms ease,
        box-shadow 180ms ease,
        color 180ms ease;
    width: 44px;
}

.page-products.hypertechno-design-system
    .bottom-pagination
    .pages
    .pagination
    > .item
    > a.page,
.page-products.hypertechno-design-system
    .bottom-pagination
    .pages
    .pagination
    > .item
    > strong.page {
    font-size: 15px;
}

.page-products.hypertechno-design-system
    .bottom-pagination
    .pages
    .pagination
    > .pages-item-previous
    > a.previous,
.page-products.hypertechno-design-system
    .bottom-pagination
    .pages
    .pagination
    > .pages-item-next
    > a.next {
    font-size: 0 !important;
    overflow: hidden;
}

.page-products.hypertechno-design-system
    .bottom-pagination
    .pages
    .pagination
    > .pages-item-previous
    > a.previous
    > span,
.page-products.hypertechno-design-system
    .bottom-pagination
    .pages
    .pagination
    > .pages-item-next
    > a.next
    > span {
    clip: auto !important;
    color: inherit !important;
    font-size: 0 !important;
    height: auto !important;
    margin: 0 !important;
    overflow: visible !important;
    position: static !important;
    width: auto !important;
}

.page-products.hypertechno-design-system
    .bottom-pagination
    .pages
    .pagination
    > .pages-item-previous
    > a.previous
    > span::before,
.page-products.hypertechno-design-system
    .bottom-pagination
    .pages
    .pagination
    > .pages-item-next
    > a.next
    > span::before {
    border-color: currentColor;
    border-style: solid;
    border-width: 0 2px 2px 0;
    content: "";
    display: block;
    height: 9px;
    width: 9px;
}

html:not([dir="rtl"])
    .page-products.hypertechno-design-system
    .pages-item-previous
    > a.previous
    > span::before,
html[dir="rtl"]
    .page-products.hypertechno-design-system
    .pages-item-next
    > a.next
    > span::before {
    transform: rotate(135deg);
}

html:not([dir="rtl"])
    .page-products.hypertechno-design-system
    .pages-item-next
    > a.next
    > span::before,
html[dir="rtl"]
    .page-products.hypertechno-design-system
    .pages-item-previous
    > a.previous
    > span::before {
    transform: rotate(-45deg);
}

.page-products.hypertechno-design-system
    .bottom-pagination
    .pages
    .pagination
    > .item
    > a.page
    > span,
.page-products.hypertechno-design-system
    .bottom-pagination
    .pages
    .pagination
    > .item
    > strong.page
    > span {
    color: inherit !important;
}

.page-products.hypertechno-design-system
    .bottom-pagination
    .pages
    .pagination
    > .item.current
    > .page
    > .label {
    clip: rect(0, 0, 0, 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}

.page-products.hypertechno-design-system
    .bottom-pagination
    .pages
    .pagination
    > .item:not(.current)
    > a:hover,
.page-products.hypertechno-design-system
    .bottom-pagination
    .pages
    .pagination
    > .item:not(.current)
    > a:focus,
.page-products.hypertechno-design-system
    .bottom-pagination
    .pages
    .pagination
    > .item:not(.current)
    > a:focus-visible {
    background: #fff3f3;
    border-color: var(--ht-color-primary, #d71920);
    color: var(--ht-color-primary-dark, #aa1419) !important;
    outline: none;
}

.page-products.hypertechno-design-system
    .bottom-pagination
    .pages
    .pagination
    > .item:not(.current)
    > a:focus-visible {
    box-shadow: 0 0 0 3px rgba(215, 25, 32, .2);
}

.page-products.hypertechno-design-system
    .bottom-pagination
    .pages
    .pagination
    > .item.current
    > .page {
    background: var(--ht-color-primary, #d71920) !important;
    border-color: var(--ht-color-primary, #d71920);
    box-shadow: 0 4px 10px rgba(170, 20, 25, .2);
    color: #fff !important;
    cursor: default;
}

/* Touch layouts keep all actions discoverable without requiring hover. */
@media (max-width: 767px), (hover: none) {
    .hypertechno-design-system .ht-storefront-product-card {
        border-radius: 14px;
    }

    .hypertechno-design-system
        .ht-storefront-product-card
        > .product-top {
        padding: 10px !important;
    }

    .hypertechno-design-system
        .ht-storefront-product-card
        .product-top
        img.product-image-photo,
    .hypertechno-design-system
        .ht-storefront-product-card
        .product-top
        img.img-hover-show {
        bottom: 10px !important;
        height: calc(100% - 20px) !important;
        left: 10px !important;
        max-width: calc(100% - 20px) !important;
        right: 10px !important;
        top: 10px !important;
        width: calc(100% - 20px) !important;
    }

    .hypertechno-design-system
        .ht-storefront-product-card
        .product-top
        .actions-link {
        inset: 8px 8px auto auto !important;
    }

    .hypertechno-design-system
        .ht-storefront-product-card
        .product-label {
        inset: 8px auto auto 8px !important;
    }

    .hypertechno-design-system
        .ht-storefront-product-card
        .product-top
        .action-mobile {
        background: transparent;
        inset: auto !important;
        opacity: 1;
        padding: 10px 0 0 !important;
        pointer-events: auto;
        position: static !important;
        transform: none;
        visibility: visible;
    }

    .hypertechno-design-system
        .ht-storefront-product-card
        > .product-item-details {
        min-height: 132px;
        padding: 12px !important;
    }
}

/*
 * Mobile cards use one continuous media/action surface on every storefront
 * product rail. This removes the rounded white ledge created by nesting the
 * photo radius, the legacy MGS action tray and the full-width cart button.
 */
@media (max-width: 767px), (hover: none) and (max-width: 1023px) {
    body.hypertechno-design-system
        .ht-storefront-product-card:hover,
    body.hypertechno-design-system
        .ht-storefront-product-card:focus-within,
    body.hypertechno-design-system
        .ht-home
        .ht-home__products
        .product-item-info:hover,
    body.hypertechno-design-system
        .ht-home
        .ht-home__products
        .product-item-info:focus-within {
        border-color: var(--ht-color-line, #e5e7eb) !important;
        box-shadow: 0 3px 8px rgba(16, 24, 40, .07) !important;
        transform: none !important;
    }

    body.hypertechno-design-system
        .ht-storefront-product-card
        > .product-top,
    body.hypertechno-design-system
        .ht-home
        .ht-home__products
        .product-item-info
        .product-top {
        background: var(--ht-color-soft, #f6f7f9) !important;
        padding: 8px 8px 0 !important;
    }

    body.hypertechno-design-system
        .ht-storefront-product-card
        .product-top
        .product-item-photo,
    body.hypertechno-design-system
        .ht-home
        .ht-home__products
        .product-top
        .product-item-photo {
        border-radius: 10px 10px 0 0 !important;
    }

    body.hypertechno-design-system
        .ht-storefront-product-card
        .product-top
        .action-mobile,
    body.hypertechno-design-system
        .ht-home
        .ht-home__products
        .product-top
        .action-mobile {
        align-items: stretch !important;
        background: #fff !important;
        background-image: none !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        box-sizing: border-box !important;
        display: block !important;
        filter: none !important;
        height: auto !important;
        inset: auto !important;
        margin: 0 !important;
        max-height: none !important;
        min-height: 0 !important;
        opacity: 1 !important;
        overflow: visible !important;
        padding: 8px !important;
        pointer-events: auto !important;
        position: static !important;
        transform: none !important;
        visibility: visible !important;
        width: 100% !important;
    }

    body.hypertechno-design-system
        .ht-storefront-product-card
        .product-top
        .action-mobile
        > form,
    body.hypertechno-design-system
        .ht-home
        .ht-home__products
        .product-top
        .action-mobile
        > form {
        align-items: stretch !important;
        background: transparent !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        display: block !important;
        height: auto !important;
        margin: 0 !important;
        max-height: none !important;
        min-height: 0 !important;
        padding: 0 !important;
        transform: none !important;
        width: 100% !important;
    }

    body.hypertechno-design-system
        .ht-storefront-product-card
        .product-top
        .tocart.btn-cart,
    body.hypertechno-design-system
        .ht-home
        .ht-home__products
        .product-top
        .tocart.btn-cart {
        align-items: center !important;
        border-radius: 8px !important;
        box-shadow: none !important;
        box-sizing: border-box !important;
        display: flex !important;
        font-size: 12.5px !important;
        gap: 0 !important;
        height: 44px !important;
        justify-content: center !important;
        line-height: 1.2 !important;
        margin: 0 !important;
        max-height: 44px !important;
        min-height: 44px !important;
        padding: 0 8px !important;
        touch-action: manipulation;
        width: 100% !important;
    }

    body.hypertechno-design-system
        .ht-storefront-product-card
        .product-top
        .tocart.btn-cart
        .text,
    body.hypertechno-design-system
        .ht-home
        .ht-home__products
        .product-top
        .tocart.btn-cart
        .text {
        color: inherit !important;
        display: inline-block !important;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body.hypertechno-design-system
        .ht-storefront-product-card
        .product-top
        .tocart.btn-cart
        .icon,
    body.hypertechno-design-system
        .ht-home
        .ht-home__products
        .product-top
        .tocart.btn-cart
        .icon {
        display: none !important;
    }

    body.hypertechno-design-system
        .ht-storefront-product-card
        .product-top
        .action-mobile::before,
    body.hypertechno-design-system
        .ht-storefront-product-card
        .product-top
        .action-mobile::after,
    body.hypertechno-design-system
        .ht-home
        .ht-home__products
        .product-top
        .action-mobile::before,
    body.hypertechno-design-system
        .ht-home
        .ht-home__products
        .product-top
        .action-mobile::after {
        content: none !important;
        display: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hypertechno-design-system .ht-storefront-product-card,
    .hypertechno-design-system
        .ht-storefront-product-card
        .product-top
        .actions-link
        button.action,
    .hypertechno-design-system
        .ht-storefront-product-card
        .product-top
        .actions-link
        a.action,
    .hypertechno-design-system
        .ht-storefront-product-card
        .product-top
        .action-mobile,
    .page-products.hypertechno-design-system
        .bottom-pagination
        .pages
        .pagination
        > .item
        > a {
        transition: none !important;
    }
}
