/* ==========================================================================
   SAFQA 1:1 AUTHENTIC AMAZON & PREVIEW PRODUCT CARDS
   Exact 1:1 Match to preview_safqa_fashion_category.html
   ========================================================================== */

/* ── 0. Strict Debug/Hidden Elements Neutralization ── */
.pc-inline-debug,
span.pc-inline-debug,
.product-card .pc-inline-debug,
[class*="pc-inline-debug"],
input[type="hidden"],
.product-card input[type="hidden"],
.product-card .hidden,
.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    pointer-events: none !important;
}

/* ── 1. Grid Container ── */
body .grid-list.ut2-gl,
body.theme-safqa .grid-list.ut2-gl,
body .cat-view-grid .grid-list {
    display: grid !important;
    grid-template-columns: repeat(var(--gl-cols, 4), minmax(0, 1fr)) !important;
    gap: 11px !important;
    margin: 14px 0 28px 0 !important;
    padding: 0 !important;
    direction: rtl !important;
}

body .grid-list.ut2-gl > .grid-list__load-more,
body .grid-list.ut2-gl > .ut2-gl__wrap {
    display: contents !important;
}

body .grid-list.ut2-gl .ty-column4,
body .grid-list.ut2-gl .ty-column3,
body .grid-list.ut2-gl .ty-column5,
body .grid-list.ut2-gl .ty-column2 {
    width: 100% !important;
    height: 100% !important;
    float: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* ── 2. Card Container (.product-card) ── */
body .product-card,
body .ut2-gl__item {
    min-width: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    border: 1px solid #e7e7e7 !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    box-shadow: none !important;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease !important;
    position: relative !important;
    padding: 0 !important;
    margin: 0 !important;
    height: 100% !important;
    box-sizing: border-box !important;
    direction: rtl !important;
}

body .product-card:hover,
body .ut2-gl__item:hover {
    border-color: #a6a6a6 !important;
    box-shadow: 0 3px 10px rgba(15, 17, 17, 0.09) !important;
    transform: translateY(-1px) !important;
}

body .product-card > form,
body .ut2-gl__item > form {
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
}

/* ── 3. Product Media (.product-media) ── */
body .product-card .product-media,
body .ut2-gl__item .ut2-gl__image {
    position: relative !important;
    width: 100% !important;
    aspect-ratio: 1 / 1.06 !important;
    height: 190px !important;
    min-height: 190px !important;
    max-height: 200px !important;
    overflow: hidden !important;
    background: #f7f8f8 !important;
    padding: 10px !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: none !important;
    box-sizing: border-box !important;
}

body .product-card .product-media a.product_icon_lnk,
body .product-card .product-media a,
body .ut2-gl__item .ut2-gl__image a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    text-decoration: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
}

body .product-card .product-media img,
body .ut2-gl__item .ut2-gl__image img,
body .ut2-gl__item .ut2-gl__image .ty-pict,
body .ut2-gl__item .ut2-gl__image .cm-image {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    mix-blend-mode: multiply !important;
    transition: transform 0.3s ease !important;
}

body .product-card:hover .product-media img,
body .ut2-gl__item:hover .ut2-gl__image img {
    transform: scale(1.03) !important;
}

/* ── 4. Badges (Top-Right in RTL) ── */
body .product-card .ab-stickers-container,
body .ut2-gl__item .ab-stickers-container,
body .ut2-gl__item .ty-product-labels {
    position: absolute !important;
    top: 9px !important;
    inset-inline-start: 9px !important;
    z-index: 3 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    pointer-events: none !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

body .product-card .ab-stickers-container *,
body .ut2-gl__item .ab-stickers-container * {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

body .product-card .ab__sticker,
body .product-card .ab-sticker,
body .ut2-gl__item .ab__sticker,
body .ut2-gl__item .ab-sticker,
body .product-card .badge {
    position: static !important;
    padding: 3px 7px !important;
    border-radius: 3px !important;
    background: #9a4738 !important;
    color: #ffffff !important;
    font-family: "Cairo", "Noto Sans Arabic", sans-serif !important;
    font-size: 9px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    display: inline-block !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1) !important;
    width: auto !important;
}

body .product-card .ab-sticker__name,
body .ut2-gl__item .ab-sticker__name {
    background: transparent !important;
    color: #ffffff !important;
    font-size: 9px !important;
    font-weight: 800 !important;
}

/* ── 5. Wishlist Circular Button (Top-Left in RTL) ── */
body .product-card .ut2-w-c-q__buttons,
body .ut2-gl__item .ut2-w-c-q__buttons {
    position: absolute !important;
    top: 8px !important;
    inset-inline-end: 8px !important;
    z-index: 3 !important;
    display: flex !important;
    flex-direction: column !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

body .product-card .ut2-w-c-q__buttons .ut2-add-to-compare,
body .ut2-gl__item .ut2-w-c-q__buttons .ut2-add-to-compare {
    display: none !important;
}

body .product-card .ut2-w-c-q__buttons .ut2-add-to-wish i,
body .product-card .ut2-w-c-q__buttons .ut2-add-to-wish span,
body .ut2-gl__item .ut2-w-c-q__buttons .ut2-add-to-wish i,
body .ut2-gl__item .ut2-w-c-q__buttons .ut2-add-to-wish span {
    display: none !important;
}

body .product-card .ut2-w-c-q__buttons .ut2-add-to-wish,
body .ut2-gl__item .ut2-w-c-q__buttons .ut2-add-to-wish,
body .product-card .wish {
    width: 31px !important;
    height: 31px !important;
    min-width: 31px !important;
    min-height: 31px !important;
    border: 1px solid rgba(213,217,217,0.9) !important;
    border-radius: 50% !important;
    background: rgba(255,255,255,0.92) !important;
    color: #333333 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.16s ease !important;
    text-decoration: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08) !important;
}

body .product-card .ut2-w-c-q__buttons .ut2-add-to-wish::before,
body .ut2-gl__item .ut2-w-c-q__buttons .ut2-add-to-wish::before {
    content: "\f004" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 400 !important;
    font-size: 13px !important;
    line-height: 1 !important;
    color: #333333 !important;
    display: block !important;
}

body .product-card .ut2-w-c-q__buttons .ut2-add-to-wish:hover,
body .ut2-gl__item .ut2-w-c-q__buttons .ut2-add-to-wish:hover {
    background: #ffffff !important;
    border-color: #b42336 !important;
}

body .product-card .ut2-w-c-q__buttons .ut2-add-to-wish:hover::before,
body .ut2-gl__item .ut2-w-c-q__buttons .ut2-add-to-wish:hover::before {
    color: #b42336 !important;
}

body .product-card .ut2-w-c-q__buttons .ut2-add-to-wish.active::before,
body .ut2-gl__item .ut2-w-c-q__buttons .ut2-add-to-wish.active::before {
    font-weight: 900 !important;
    color: #b42336 !important;
}

/* ── 6. Product Info (.product-info) ── */
body .product-card .product-info,
body .ut2-gl__item .product-info,
body .ut2-gl__item .ut2-gl__content {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 10px 11px 12px 11px !important;
    background: #ffffff !important;
    text-align: right !important;
    direction: rtl !important;
    gap: 0 !important;
    box-sizing: border-box !important;
}

/* Brand Name */
body .product-card .brand-name,
body .ut2-gl__item .brand-name {
    margin-bottom: 3px !important;
    color: #565959 !important;
    font-family: "Cairo", "Inter", sans-serif !important;
    font-size: 9px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    text-align: right !important;
    direction: rtl !important;
}

/* Product Title (2 lines clamp) */
body .product-card .product-name,
body .ut2-gl__item .product-name,
body .ut2-gl__item .ut2-gl__name {
    min-height: 36px !important;
    max-height: 36px !important;
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    color: #0f1111 !important;
    font-family: "Cairo", "Noto Sans Arabic", sans-serif !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    line-height: 1.5 !important;
    margin: 0 0 3px 0 !important;
    text-align: right !important;
    direction: rtl !important;
}

body .product-card .product-name a,
body .ut2-gl__item .product-name a,
body .ut2-gl__item .ut2-gl__name a {
    color: #0f1111 !important;
    text-decoration: none !important;
    transition: color 0.15s ease !important;
    text-align: right !important;
    direction: rtl !important;
    display: block !important;
}

body .product-card .product-name a:hover,
body .ut2-gl__item .product-name a:hover {
    color: #c7511f !important;
}

/* Star Rating */
body .product-card .rating,
body .ut2-gl__item .rating,
body .ut2-gl__item .ut2-rating-stars {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    direction: rtl !important;
    gap: 4px !important;
    margin: 2px 0 5px 0 !important;
    color: #de7921 !important;
    font-size: 9px !important;
    background: transparent !important;
}

body .product-card .rating a,
body .ut2-gl__item .rating a {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    color: #007185 !important;
    font-family: "Outfit", "Inter", sans-serif !important;
    font-size: 9px !important;
    text-decoration: none !important;
}

body .product-card .rating span,
body .ut2-gl__item .rating span {
    color: #007185 !important;
    font-family: "Outfit", sans-serif !important;
    font-size: 9px !important;
}

/* ── 7. Price Block (Single Horizontal Row) ── */
body .product-card .price,
body .ut2-gl__item .price,
body .ut2-gl__item .ut2-gl__price-wrap {
    display: flex !important;
    flex-direction: row !important;
    align-items: baseline !important;
    justify-content: flex-start !important;
    direction: rtl !important;
    text-align: right !important;
    gap: 5px !important;
    margin-top: auto !important;
    padding-top: 4px !important;
    border: none !important;
    background: transparent !important;
    width: 100% !important;
}

body .product-card .price .ut2-gl__price,
body .ut2-gl__item .price .ut2-gl__price {
    display: inline-flex !important;
    align-items: baseline !important;
    gap: 2px !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

body .product-card .price .ty-price-num,
body .ut2-gl__item .price .ty-price-num {
    font-family: "Outfit", "Inter", sans-serif !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #0f1111 !important;
    line-height: 1 !important;
}

body .product-card .price .ty-price-num sup,
body .ut2-gl__item .price .ty-price-num sup {
    font-size: 10px !important;
    top: -0.4em !important;
}

body .product-card .price .ty-price-symbol,
body .ut2-gl__item .price .ty-price-symbol {
    font-family: "Cairo", "Noto Sans Arabic", sans-serif !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #0f1111 !important;
    margin-inline-start: 2px !important;
}

/* Old Price Strikethrough */
body .product-card .price .old-price,
body .ut2-gl__item .price .old-price,
body .product-card .price .ty-list-price,
body .ut2-gl__item .price .ty-list-price {
    color: #7b7e80 !important;
    font-family: "Outfit", "Inter", sans-serif !important;
    font-size: 10px !important;
    text-decoration: line-through !important;
    margin-inline-start: 4px !important;
    background: transparent !important;
}

/* Discount Badge Pill */
body .product-card .price .discount-badge,
body .ut2-gl__item .price .discount-badge,
body .product-card .price .ty-save-price,
body .ut2-gl__item .price .ty-save-price {
    background: #fee2e2 !important;
    color: #b91c1c !important;
    border-radius: 3px !important;
    padding: 1px 4px !important;
    font-family: "Cairo", "Inter", sans-serif !important;
    font-size: 9.5px !important;
    font-weight: 800 !important;
    display: inline-block !important;
    margin-inline-start: 4px !important;
    line-height: 1.2 !important;
    border: none !important;
}

/* ── 8. Delivery Note ── */
body .product-card .delivery,
body .ut2-gl__item .delivery {
    margin-top: 2px !important;
    color: #565959 !important;
    font-family: "Cairo", "Noto Sans Arabic", sans-serif !important;
    font-size: 9.5px !important;
    text-align: right !important;
    direction: rtl !important;
    line-height: 1.3 !important;
}

body .product-card .delivery strong,
body .ut2-gl__item .delivery strong {
    color: #067d62 !important;
    font-weight: 700 !important;
}

/* ── 9. Add to Cart Gold Pill Button ── */
body .product-card .cart-btn,
body .product-card .ut2-gl__control button,
body .ut2-gl__item .cart-btn,
body .ut2-gl__item .ut2-gl__control button,
body .ut2-gl__item .ut2-gl__control .ty-btn {
    min-height: 33px !important;
    height: 33px !important;
    margin-top: 8px !important;
    border: 1px solid #fcd200 !important;
    border-radius: 999px !important;
    background: #ffd814 !important;
    color: #111111 !important;
    font-family: "Cairo", "Noto Sans Arabic", sans-serif !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: none !important;
    text-decoration: none !important;
    transition: background 0.16s ease !important;
}

body .product-card .cart-btn:hover,
body .ut2-gl__item .cart-btn:hover,
body .ut2-gl__item .ut2-gl__control button:hover {
    background: #f7ca00 !important;
    border-color: #f7ca00 !important;
    color: #111111 !important;
}

body .ut2-gl__item .ut2-gl__control i {
    display: none !important;
}

/* ── 10. Responsive Breakpoints ── */
@media (min-width: 1500px) {
    body .grid-list.ut2-gl {
        grid-template-columns: repeat(var(--gl-cols, 5), minmax(0, 1fr)) !important;
    }
}

@media (max-width: 1180px) {
    body .grid-list.ut2-gl {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 860px) {
    body .grid-list.ut2-gl {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 7px !important;
    }
    body .product-card .product-media,
    body .ut2-gl__item .ut2-gl__image {
        height: 160px !important;
        min-height: 160px !important;
        max-height: 175px !important;
    }
    body .product-card .product-info,
    body .ut2-gl__item .ut2-gl__content {
        padding: 8px !important;
    }
}
