/* Shared product presentation. Scope excludes checkout, account and administration. */
body#megastore-front .mega-product-card {
    position: relative; display: flex; flex-direction: column; width: 100%; height: 100%; min-width: 0;
    padding: 0; border: 1px solid #e2e9f1; border-radius: 16px; background: #fff; overflow: hidden;
    text-align: start; box-shadow: 0 3px 14px rgba(10, 38, 66, .035); transition: border-color .2s, box-shadow .2s;
}
body#megastore-front .mega-product-card:hover,
body#megastore-front .mega-product-card:focus-within { border-color: #afc9f5; box-shadow: 0 8px 24px rgba(10, 38, 66, .09); }
body#megastore-front .mega-product-card > .loading { position: absolute; inset: 0; z-index: 5; border-radius: inherit; }
body#megastore-front .mega-product-card svg,
body#megastore-front .mega-product-arrow svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
body#megastore-front .mega-product-card__visual { position: relative; height: 232px; flex-shrink: 0; background: #f3f7fc; }
body#megastore-front .mega-product-card__image { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; padding: 42px 24px 18px; }
body#megastore-front .mega-product-card__image img { display: block; width: 100%; height: 100%; max-width: 100%; object-fit: contain; border: 0; border-radius: 0; box-shadow: none; mix-blend-mode: multiply; }
body#megastore-front .mega-product-card__favorite { position: absolute; inset-block-start: 10px; inset-inline-end: 10px; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 1px solid #dfe7f1; border-radius: 50%; background: #fff; color: #47627d; z-index: 2; }
body#megastore-front .mega-product-card__favorite:hover { color: #0057ff; border-color: #0057ff; background: #edf4ff; }
body#megastore-front .mega-product-card__favorite.btn-primary { color: #fff; background: #0057ff; border-color: #0057ff; }
body#megastore-front .mega-product-card__favorite.btn-primary svg { fill: currentColor; }
body#megastore-front .mega-product-card__badges { position: absolute; inset-block-start: 12px; inset-inline-start: 12px; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 4px; max-width: calc(100% - 66px); pointer-events: none; }
body#megastore-front .mega-product-card__badge { max-width: 100%; padding: 4px 7px; border: 1px solid #e0eaf8; border-radius: 6px; background: #fff; color: #245180; font-size: 10px; line-height: 1.35; font-weight: 700; overflow-wrap: anywhere; }
body#megastore-front .mega-product-card__badge--discount { background: #fff2c2; border-color: #f7dfa0; color: #734b00; }
body#megastore-front .mega-product-card__badge--new { background: #e5f5ef; border-color: #c9e9dc; color: #176145; }
body#megastore-front .mega-product-card__badge--hot { background: #fff0e8; border-color: #f9dacb; color: #a64720; }
body#megastore-front .mega-product-card__badge--unavailable { background: #fff1f0; border-color: #f4d9d7; color: #a13630; }
body#megastore-front .mega-product-card__body { display: flex; flex-direction: column; flex: 1; min-width: 0; padding: 16px; }
body#megastore-front .mega-product-card__publisher { margin-bottom: 6px; color: #587088; font-size: 10px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body#megastore-front .mega-product-card__publisher a,
body#megastore-front .mega-product-card__authors a { color: inherit; }
body#megastore-front .mega-product-card__title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 44px; margin: 0 0 8px; padding: 0; font-size: 16px; font-weight: 700; line-height: 1.4; letter-spacing: -.15px; overflow-wrap: anywhere; }
body#megastore-front .mega-product-card__title a { color: #0a2642; }
body#megastore-front .mega-product-card__title a:hover { color: #0057ff; }
body#megastore-front .mega-product-card__authors { margin-bottom: 12px; color: #607388; font-size: 12px; line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body#megastore-front .mega-product-card__summary { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 16px; color: #607388; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
body#megastore-front .mega-product-card__summary > * { margin: 0; }
body#megastore-front .mega-product-card__summary img { max-width: 100%; height: auto; }
body#megastore-front .mega-product-card__bottom { margin-top: auto; padding-top: 10px; }
body#megastore-front .mega-product-card__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 10px; margin-bottom: 14px; color: #0057ff; font-size: 21px; line-height: 1.25; font-weight: 800; overflow-wrap: anywhere; }
body#megastore-front .mega-product-card__price ins { text-decoration: none; }
body#megastore-front .mega-product-card__price bdi { display: inline; }
body#megastore-front .mega-product-card__currency { font-size: 12px; font-weight: 700; }
body#megastore-front .mega-product-card__old-price { color: #65788b !important; font-size: 12px; font-weight: 400; }
body#megastore-front .mega-product-card__actions { display: flex; gap: 8px; align-items: stretch; }
body#megastore-front .mega-product-card__add,
body#megastore-front .mega-product-card__view { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; border: 1px solid #dce8fb; border-radius: 9px; padding: 9px 10px; font-size: 12px; line-height: 1.3; font-weight: 700; color: #0057ff; background: #edf4ff; transition: background .2s, color .2s; }
body#megastore-front .mega-product-card__add { flex: 1; min-width: 0; }
body#megastore-front .mega-product-card__add span { min-width: 0; }
body#megastore-front .mega-product-card__view { flex: 0 0 42px; background: #fff; }
body#megastore-front .mega-product-card__add:hover,
body#megastore-front .mega-product-card__view:hover { background: #0057ff; border-color: #0057ff; color: #fff; }
body#megastore-front .mega-product-card a:focus-visible,
body#megastore-front .mega-product-arrow:focus-visible { outline: 3px solid #0057ff; outline-offset: -3px; }

/* The catalogue owns its gutters; it does not inherit the old negative .products margins. */
body#megastore-front .mega-product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; padding: 0; margin-inline: 0; list-style: none; }
body#megastore-front .mega-product-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 0; margin-inline: 0; list-style: none; }
body#megastore-front .mega-product-grid__item,
body#megastore-front .mega-product-list__item { display: flex; min-width: 0; }
body#megastore-front .mega-product-card--list { flex-direction: row; }
body#megastore-front .mega-product-card--list .mega-product-card__visual { width: 240px; height: auto; min-height: 250px; }
body#megastore-front .mega-product-card--list .mega-product-card__image { min-height: 250px; }
body#megastore-front .mega-product-card--list .mega-product-card__image img { height: 200px; }
body#megastore-front .mega-product-card--list .mega-product-card__title { min-height: 0; font-size: 19px; }
body#megastore-front .mega-product-card--list .mega-product-card__body { padding: 22px; }
body#megastore-front .mega-product-card--list .mega-product-card__bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
body#megastore-front .mega-product-card--list .mega-product-card__price { margin: 0; }

/* Equal-height slides with reachable controls, outside the card content. */
body#megastore-front .mega-product-carousel { margin: 0; padding: 52px 0 0; list-style: none; min-width: 0; }
body#megastore-front .mega-product-carousel .slick-list { margin: 0 -8px; padding-block: 4px 12px; }
body#megastore-front .mega-product-carousel .slick-track { display: flex; }
body#megastore-front .mega-product-carousel .slick-track::before,
body#megastore-front .mega-product-carousel .slick-track::after { display: none; }
body#megastore-front .mega-product-carousel .slick-slide { height: auto; min-width: 0; float: none; }
body#megastore-front .mega-product-carousel .slick-slide > div { display: flex; height: 100%; width: 100%; }
body#megastore-front .mega-product-slide { display: flex !important; height: 100%; min-width: 0; padding-inline: 8px; }
body#megastore-front .mega-product-carousel:not(.slick-initialized) { display: flex; overflow-x: auto; }
body#megastore-front .mega-product-carousel:not(.slick-initialized) > .mega-product-slide { flex: 0 0 25%; }
body#megastore-front .mega-product-arrow { position: absolute; top: 0; display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0; border: 1px solid #d7e4f4; border-radius: 50%; background: #fff; color: #0057ff; cursor: pointer; z-index: 1; }
body#megastore-front .mega-product-arrow--prev { inset-inline-end: 48px; }
body#megastore-front .mega-product-arrow--next { inset-inline-end: 0; }
body#megastore-front .mega-product-arrow:hover { background: #edf4ff; }
body#megastore-front .mega-product-arrow.slick-disabled { opacity: .4; cursor: default; }
body#megastore-front .mega-product-arrow.slick-hidden { display: none; }

/* Compact pack rows keep their original link and price, without individual purchase actions. */
body#megastore-front .mega-pack-product { display: flex; gap: 12px; padding: 12px; border: 1px solid #e2e9f1; border-radius: 12px; background: #fff; }
body#megastore-front .mega-pack-product > a { flex: 0 0 74px; padding: 8px; border-radius: 8px; background: #f3f7fc; }
body#megastore-front .mega-pack-product img { width: 100%; height: 92px; object-fit: contain; }
body#megastore-front .mega-pack-product .media-body { min-width: 0; margin: 0 !important; padding: 0 !important; }
body#megastore-front .mega-pack-product h6 { font-size: 14px; line-height: 1.5; }
body#megastore-front .mega-pack-product .font-weight-medium { color: #0057ff; font-weight: 700; }
html[lang="ar"] body#megastore-front .mega-product-card { direction: rtl; }
html[lang="ar"] body#megastore-front .mega-product-card__publisher,
html[lang="ar"] body#megastore-front .mega-product-card__title { letter-spacing: 0; }
html[lang="ar"] body#megastore-front .mega-product-carousel .slick-list,
html[lang="ar"] body#megastore-front .mega-product-carousel .slick-track { direction: rtl; }
html[lang="ar"] body#megastore-front .mega-product-arrow svg { transform: scaleX(-1); }
@media (max-width: 1199.98px) {
    body#megastore-front .mega-product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
    body#megastore-front .mega-product-card__visual { height: 210px; }
}
@media (max-width: 767.98px) {
    body#megastore-front .mega-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    body#megastore-front .mega-product-card { border-radius: 12px; }
    body#megastore-front .mega-product-card__visual { height: 174px; }
    body#megastore-front .mega-product-card__image { padding: 46px 12px 12px; }
    body#megastore-front .mega-product-card__body { padding: 12px; }
    body#megastore-front .mega-product-card__title { font-size: 14px; min-height: 40px; }
    body#megastore-front .mega-product-card__publisher { font-size: 9px; }
    body#megastore-front .mega-product-card__authors { font-size: 11px; }
    body#megastore-front .mega-product-card__price { font-size: 19px; margin-bottom: 10px; }
    body#megastore-front .mega-product-card__currency { font-size: 11px; }
    body#megastore-front .mega-product-card__favorite { width: 36px; height: 36px; inset-block-start: 8px; inset-inline-end: 8px; }
    body#megastore-front .mega-product-card__badges { inset-block-start: 8px; inset-inline-start: 8px; max-width: calc(100% - 52px); }
    body#megastore-front .mega-product-card__badge { font-size: 9px; padding: 3px 5px; }
    body#megastore-front .mega-product-card__actions { gap: 6px; }
    body#megastore-front .mega-product-card__add { padding: 8px; }
    body#megastore-front .mega-product-card__add span { display: none; }
    body#megastore-front .mega-product-card__view { flex-basis: 38px; padding: 8px; }
    body#megastore-front .mega-product-card--list .mega-product-card__visual { width: 34%; min-height: 210px; }
    body#megastore-front .mega-product-card--list .mega-product-card__image { min-height: 210px; padding: 50px 10px 12px; }
    body#megastore-front .mega-product-card--list .mega-product-card__image img { height: 150px; }
    body#megastore-front .mega-product-card--list .mega-product-card__body { padding: 14px; }
    body#megastore-front .mega-product-card--list .mega-product-card__title { font-size: 15px; }
    body#megastore-front .mega-product-card--list .mega-product-card__summary { font-size: 12px; }
    body#megastore-front .mega-product-card--list .mega-product-card__bottom { display: block; }
    body#megastore-front .mega-product-card--list .mega-product-card__price { margin-bottom: 10px; }
    body#megastore-front .mega-product-carousel .slick-list { margin-inline: -6px; }
    body#megastore-front .mega-product-slide { padding-inline: 6px; }
    body#megastore-front .mega-product-carousel:not(.slick-initialized) > .mega-product-slide { flex-basis: 50%; }
}
@media (max-width: 359.98px) {
    body#megastore-front .mega-product-grid { gap: 8px; }
    body#megastore-front .mega-product-card__visual { height: 158px; }
    body#megastore-front .mega-product-card__body { padding: 9px; }
    body#megastore-front .mega-product-card__price { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
    body#megastore-front .mega-product-card,
    body#megastore-front .mega-product-card__add,
    body#megastore-front .mega-product-card__view { transition: none; }
}

/* Category selections: compact heading and a full-width product row. */
body#megastore-front .mega-category-showcase { padding-bottom: 56px; }
body#megastore-front .mega-category-showcase__header { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 20px; padding-bottom: 18px; border-bottom: 1px solid #e7edf5; }
body#megastore-front .mega-category-showcase__intro { display: flex; align-items: center; gap: 14px; min-width: 0; }
body#megastore-front .mega-category-showcase__image { flex: 0 0 52px; width: 52px; height: 52px; object-fit: contain; padding: 5px; background: #f3f7fc; border: 1px solid #e2e9f1; border-radius: 12px; }
body#megastore-front .mega-category-showcase__heading { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; min-width: 0; }
body#megastore-front .mega-category-showcase__heading h2 { position: static; padding: 0 !important; margin: 0; font-size: 27px !important; font-weight: 700 !important; line-height: 1.3; letter-spacing: -.5px; color: #0a2642; overflow-wrap: anywhere; }
body#megastore-front .mega-category-showcase__heading h2::before { content: none; }
body#megastore-front .mega-category-showcase__count { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 6px; background: #edf4ff; color: #42638b; font-size: 12px; line-height: 1.4; font-weight: 500; white-space: nowrap; }
body#megastore-front .mega-category-showcase__actions { display: flex; align-items: center; gap: 24px; flex-shrink: 0; }
body#megastore-front .mega-category-showcase__link { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; font-size: 13px; line-height: 1.4; font-weight: 700; color: #0057ff; white-space: nowrap; }
body#megastore-front .mega-category-showcase__link:hover { text-decoration: underline; text-underline-offset: 4px; }
body#megastore-front .mega-category-showcase__link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
body#megastore-front .mega-category-showcase__arrows { display: flex; align-items: center; gap: 8px; }
body#megastore-front .mega-category-showcase__arrows .mega-product-arrow { position: static; width: 40px; height: 40px; flex-shrink: 0; }
body#megastore-front .mega-category-showcase .mega-product-carousel { padding-top: 0; }
body#megastore-front .mega-category-showcase__link:focus-visible { outline: 3px solid #0057ff; outline-offset: 3px; border-radius: 3px; }
html[lang="ar"] body#megastore-front .mega-category-showcase__heading h2 { letter-spacing: 0; }
html[lang="ar"] body#megastore-front .mega-category-showcase__link svg { transform: scaleX(-1); }
@media (max-width: 1199.98px) and (min-width: 768px) {
    body#megastore-front .mega-category-showcase__heading h2 { font-size: 24px !important; }
    body#megastore-front .mega-category-showcase .mega-product-carousel:not(.slick-initialized) > .mega-product-slide { flex-basis: 33.3333%; }
}
@media (max-width: 767.98px) {
    body#megastore-front .mega-category-showcase { padding-bottom: 34px; }
    body#megastore-front .mega-category-showcase__header { flex-direction: column; align-items: stretch; gap: 10px; padding-bottom: 12px; margin-bottom: 14px; }
    body#megastore-front .mega-category-showcase__heading { gap: 7px 10px; }
    body#megastore-front .mega-category-showcase__heading h2 { font-size: 22px !important; letter-spacing: -.3px; }
    body#megastore-front .mega-category-showcase__count { font-size: 11px; }
    body#megastore-front .mega-category-showcase__actions { justify-content: space-between; gap: 16px; }
    body#megastore-front .mega-category-showcase__image { width: 44px; height: 44px; flex-basis: 44px; }
}
