/* Alaa Eldin — car mats product page. Scoped under .alaa-pp */
.alaa-pp {
    --ap-red: #D6031C;
    --ap-red-hov: #A90216;
    --ap-ink: #111111;
    --ap-text: #26262b;
    --ap-muted: #5f5f66;      /* 6.3:1 on white */
    --ap-line: #e4e4e8;
    --ap-soft: #f6f6f7;
    --ap-green: #0F7A35;      /* white text 5.6:1 */
    --ap-green-hov: #0b5f29;
    --ap-radius: 12px;
    --ap-focus: 0 0 0 3px #fff, 0 0 0 5px var(--ap-red);
    font-family: "Cairo", system-ui, sans-serif;
    color: var(--ap-text);
    padding-bottom: 32px;
}
.alaa-pp *:focus-visible { outline: none; box-shadow: var(--ap-focus); }

/* Breadcrumb */
.ap-crumbs { display: flex; flex-wrap: wrap; gap: 4px 8px; list-style: none; padding: 16px 0 12px; margin: 0; font-size: 13px; color: var(--ap-muted); }
.ap-crumbs li + li::before { content: "‹"; margin-inline-end: 8px; color: #9a9aa2; }
[dir="ltr"] .ap-crumbs li + li::before { content: "›"; }
.ap-crumbs a { color: var(--ap-muted); text-decoration: none; }
.ap-crumbs a:hover { color: var(--ap-red); text-decoration: underline; }
.ap-crumbs [aria-current] { color: var(--ap-ink); font-weight: 600; }

/* Gallery */
.ap-gallery { display: flex; gap: 12px; position: sticky; top: 16px; }
.ap-thumbs { display: flex; flex-direction: column; gap: 8px; width: 76px; flex: 0 0 76px; max-height: 560px; overflow-y: auto; scrollbar-width: thin; }
.ap-thumb { width: 72px; height: 72px; padding: 0; border: 2px solid var(--ap-line); border-radius: 10px; background: #fff; overflow: hidden; cursor: pointer; flex: 0 0 auto; transition: border-color .15s; }
.ap-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ap-thumb[aria-current="true"] { border-color: var(--ap-red); }
.ap-thumb:hover { border-color: #b8b8c0; }
.ap-stage { position: relative; flex: 1; min-width: 0; align-self: flex-start; }
.ap-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; border-radius: var(--ap-radius); border: 1px solid var(--ap-line); background: #fff; scrollbar-width: none; overscroll-behavior-x: contain; }
.ap-track::-webkit-scrollbar { display: none; }
.ap-slide { flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 1 / 1; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.ap-slide img { width: 100%; height: 100%; object-fit: contain; transition: transform .2s ease-out; }
.ap-slide.is-zoomed img { transform: scale(2); cursor: zoom-out; }
/* top-left so it never covers the year pill printed on the main image; thumbnails do the job on desktop */
.ap-counter { position: absolute; top: 10px; left: 10px; background: rgba(17,17,17,.72); color: #fff; font-size: 12px; padding: 2px 10px; border-radius: 999px; font-variant-numeric: tabular-nums; }
@media (min-width: 992px) { .ap-counter { display: none; } }
@media (hover: hover) and (pointer: fine) { .ap-slide img { cursor: zoom-in; } }

/* Buy box */
.ap-title { font-size: clamp(20px, 2.2vw, 26px); font-weight: 800; line-height: 1.5; color: var(--ap-ink); margin: 0 0 6px; }
.ap-fits { display: flex; align-items: center; gap: 6px; color: var(--ap-green); font-weight: 600; font-size: 15px; margin: 0 0 14px; }
.ap-price-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 12px 16px; background: var(--ap-soft); border-radius: var(--ap-radius); margin-bottom: 18px; }
.ap-price-for { font-size: 14px; color: var(--ap-muted); }
.ap-price { font-size: clamp(26px, 3vw, 32px); font-weight: 700; color: var(--ap-red); font-variant-numeric: tabular-nums; }

.ap-group { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.ap-label { display: block; font-size: 15px; font-weight: 700; color: var(--ap-ink); margin-bottom: 8px; padding: 0; }
.ap-label strong { font-weight: 600; color: var(--ap-text); }

.ap-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.ap-swatch { position: relative; margin: 0; cursor: pointer; }
.ap-swatch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ap-swatch img { display: block; width: 60px; height: 60px; object-fit: cover; border-radius: 10px; border: 2px solid var(--ap-line); background: #fff; transition: border-color .15s, transform .15s; }
.ap-swatch:hover img { border-color: #b8b8c0; }
.ap-swatch input:checked + img { border-color: var(--ap-red); box-shadow: 0 0 0 1px var(--ap-red); }
.ap-swatch input:focus-visible + img { box-shadow: var(--ap-focus); }
/* leather + stitching dot: the black colours only differ by stitching */
.ap-swatch-dot { position: absolute; bottom: -4px; inset-inline-start: -4px; width: 20px; height: 20px; border-radius: 50%; background: var(--bg); border: 4px solid var(--st); box-shadow: 0 0 0 2px #fff; }

.ap-seats { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.ap-seat { min-height: 44px; padding: 6px 18px; border: 2px solid var(--ap-line); border-radius: 999px; background: #fff; font: inherit; font-weight: 700; color: var(--ap-ink); cursor: pointer; transition: border-color .15s, background-color .15s; }
.ap-seat small { font-weight: 500; color: var(--ap-muted); margin-inline-start: 4px; }
.ap-seat[aria-pressed="true"] { border-color: var(--ap-red); background: #fff5f6; }

/* Option cards: short title, small subtitle, price on its own line → no awkward wraps, equal heights per row */
.ap-types { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ap-type { position: relative; display: flex; flex-direction: column; gap: 2px; min-height: 96px; padding: 10px 12px; margin: 0; border: 2px solid var(--ap-line); border-radius: var(--ap-radius); background: #fff; cursor: pointer; transition: border-color .15s, background-color .15s; }
.ap-type[hidden] { display: none; }
.ap-type input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ap-type-name { font-weight: 800; color: var(--ap-ink); font-size: 15px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-type-hint { font-size: 12.5px; color: var(--ap-muted); line-height: 1.45; }
.ap-type-price { margin-top: auto; padding-top: 4px; font-weight: 700; color: var(--ap-red); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ap-type:hover { border-color: #b8b8c0; }
.ap-type:has(input:checked) { border-color: var(--ap-red); background: #fff5f6; }
.ap-type.is-checked { border-color: var(--ap-red); background: #fff5f6; }
.ap-type:has(input:focus-visible) { box-shadow: var(--ap-focus); }
.ap-error { color: #B00217; font-weight: 700; font-size: 14px; margin: 8px 0 0; }
.ap-group.has-error .ap-type { border-color: #f0a3ad; }

.ap-qty-row { display: flex; align-items: center; gap: 16px; }
.ap-qty { display: inline-flex; border: 2px solid var(--ap-line); border-radius: 999px; overflow: hidden; }
.ap-qty-btn { width: 44px; height: 44px; border: 0; background: #fff; font-size: 20px; color: var(--ap-ink); cursor: pointer; }
.ap-qty-btn:hover { background: var(--ap-soft); }
.ap-qty input { width: 48px; border: 0; text-align: center; font: inherit; font-weight: 700; -moz-appearance: textfield; }
.ap-qty input::-webkit-outer-spin-button, .ap-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.ap-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 20px; }
.ap-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 10px 18px; border-radius: 999px; font: inherit; font-size: 16px; font-weight: 700; text-decoration: none; cursor: pointer; border: 2px solid transparent; transition: background-color .15s, border-color .15s, color .15s, transform .1s; }
.ap-btn:active { transform: scale(.98); }
.ap-btn-primary { background: var(--ap-red); color: #fff; }
.ap-btn-primary:hover { background: var(--ap-red-hov); color: #fff; }
.ap-btn-outline { background: #fff; color: var(--ap-ink); border-color: var(--ap-ink); }
.ap-btn-outline:hover { background: var(--ap-ink); color: #fff; }
.ap-btn-wa { grid-column: 1 / -1; background: var(--ap-green); color: #fff; }
.ap-btn-wa:hover { background: var(--ap-green-hov); color: #fff; text-decoration: none; }

.ap-delivery { border: 1px solid var(--ap-line); border-radius: var(--ap-radius); overflow: hidden; margin-bottom: 16px; }
.ap-delivery-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; }
.ap-delivery-row + .ap-delivery-row { border-top: 1px solid var(--ap-line); }
.ap-delivery-row svg { flex: 0 0 auto; color: var(--ap-red); margin-top: 3px; }
.ap-delivery-row strong { display: block; color: var(--ap-ink); font-size: 15px; }
.ap-delivery-row span { display: block; color: var(--ap-muted); font-size: 13px; line-height: 1.6; }

.ap-trust { display: flex; flex-wrap: wrap; gap: 8px 20px; list-style: none; padding: 0; margin: 0; }
.ap-trust li { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; color: var(--ap-ink); }
.ap-trust svg { color: var(--ap-red); }

/* Tabs */
.ap-tabs { margin-top: 40px; }
.ap-tablist { display: flex; gap: 4px; border-bottom: 2px solid var(--ap-line); overflow-x: auto; scrollbar-width: none; }
.ap-tablist::-webkit-scrollbar { display: none; }
.ap-tablist [role="tab"] { flex: 0 0 auto; min-height: 48px; padding: 8px 18px; border: 0; border-bottom: 3px solid transparent; margin-bottom: -2px; background: none; font: inherit; font-size: 16px; font-weight: 700; color: var(--ap-muted); cursor: pointer; }
.ap-tablist [role="tab"][aria-selected="true"] { color: var(--ap-ink); border-bottom-color: var(--ap-red); }
.ap-tablist [role="tab"]:hover { color: var(--ap-ink); }
.ap-panel { padding: 24px 0; }
.ap-specs { width: 100%; max-width: 760px; border-collapse: collapse; }
.ap-specs th, .ap-specs td { padding: 12px 14px; border-bottom: 1px solid var(--ap-line); text-align: start; vertical-align: top; }
.ap-specs th { width: 34%; background: var(--ap-soft); font-weight: 700; color: var(--ap-ink); }

.ap-related { margin-top: 24px; }
.ap-related h2 { font-size: 20px; font-weight: 800; color: var(--ap-ink); margin-bottom: 16px; }

/* Mobile sticky buy bar */
.ap-sticky { display: none; }

@media (max-width: 991.98px) {
    .ap-gallery { position: static; flex-direction: column-reverse; }
    .ap-thumbs { flex-direction: row; width: auto; flex: 0 0 auto; max-height: none; overflow-x: auto; overflow-y: hidden; padding-bottom: 2px; }
    .ap-thumb { width: 60px; height: 60px; }
    .ap-sticky {
        display: flex; align-items: center; justify-content: space-between; gap: 12px;
        position: fixed; inset-inline: 0; bottom: 0; z-index: 1030;
        padding: 10px 16px; background: #fff; border-top: 1px solid var(--ap-line);
        box-shadow: 0 -6px 20px rgba(0,0,0,.08);
        transform: translateY(120%); transition: transform .2s ease-out; visibility: hidden;
    }
    .ap-sticky.is-visible { transform: none; visibility: visible; }
    .ap-sticky-actions { display: flex; align-items: center; gap: 8px; }
    .ap-sticky .ap-btn { min-height: 46px; padding: 8px 28px; }
    .ap-sticky-wa { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--ap-green); color: #fff; }
    .ap-sticky-wa:hover { background: var(--ap-green-hov); color: #fff; }
    /* our bar has its own WhatsApp button; hide the floating chat bubble so it doesn't cover the bar */
    body.ap-sticky-on [id^="gb-widget"] { display: none !important; }
    .ap-sticky-price small { display: block; font-size: 12px; color: var(--ap-muted); line-height: 1.2; }
    .ap-sticky-price strong { font-size: 20px; font-weight: 700; color: var(--ap-red); font-variant-numeric: tabular-nums; }
}
@media (max-width: 575.98px) {
    .ap-types { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ap-type { min-height: 88px; }
    /* all 7 colours on one row */
    .ap-swatches { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
    .ap-swatch img { width: 100%; height: auto; aspect-ratio: 1 / 1; }
    .ap-swatch-dot { width: 16px; height: 16px; border-width: 3px; }
    .ap-tablist [role="tab"] { padding: 8px 12px; font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
    .alaa-pp *, .alaa-pp *::before, .alaa-pp *::after { transition: none !important; scroll-behavior: auto !important; }
    .ap-track { scroll-behavior: auto; }
}

/* ---------- Quote products (car cover / seat covers / dashboard cover) ---------- */
.ap-short { color: var(--ap-muted); font-size: 15px; line-height: 1.7; margin: 0 0 14px; }
.ap-deposit { margin: -8px 0 16px; font-size: 14px; font-weight: 700; color: var(--ap-ink); background: #fff8e6; border: 1px solid #f1d28a; border-radius: 10px; padding: 8px 12px; }
.ap-req { color: var(--ap-red); }
.ap-car-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ap-select { width: 100%; min-height: 48px; padding: 0 12px; border: 2px solid var(--ap-line); border-radius: var(--ap-radius); background: #fff; font: inherit; font-size: 15px; color: var(--ap-ink); }
.ap-select:disabled { background: var(--ap-soft); color: #8a8a92; }
.ap-car.has-error .ap-select { border-color: #f0a3ad; }
.ap-hint { margin: 8px 0 0; font-size: 13.5px; color: var(--ap-muted); }
.ap-hint a { color: var(--ap-green); font-weight: 700; text-decoration: underline; }
.ap-swatch-dot-only { display: inline-grid; place-items: center; width: 52px; height: 52px; border: 2px solid var(--ap-line); border-radius: 50%; background: #fff; }
.ap-swatch-dot-only:has(input:checked) { border-color: var(--ap-red); box-shadow: 0 0 0 1px var(--ap-red); }
.ap-swatch-dot-only:has(input:focus-visible) { box-shadow: var(--ap-focus); }
.ap-dot { width: 32px; height: 32px; border-radius: 50%; background: var(--bg); border: 5px solid var(--st); }
.ap-swatches-dots { gap: 10px; }
.ap-types-quote { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ap-types-quote .ap-type { min-height: 80px; }
#ap-quote-btn[aria-disabled="true"] { opacity: .7; }
.ap-btn-wa-secondary { background: #fff; color: var(--ap-green); border-color: var(--ap-green); }
.ap-btn-wa-secondary:hover { background: var(--ap-green); color: #fff; }
@media (max-width: 575.98px) {
    .ap-car-fields { grid-template-columns: 1fr; }
    .ap-types-quote { grid-template-columns: 1fr; }
    .ap-swatches-dots { display: flex; }
}

/* ---------- cross-sell: "ناس كتير بتشتري ده مع ده" / "كمّل طقمك" (frontend/alaa/cross_sell.blade.php) ---------- */
.axs { --xs-red: #D6031C; --xs-red-hov: #A90216; --xs-ink: #111; --xs-muted: #5f5f66; --xs-line: #e4e4e8; --xs-soft: #f6f6f7; --xs-green: #0F7A35;
    margin: 32px 0 8px; font-family: "Cairo", system-ui, sans-serif; }
.axs-title { font-size: clamp(20px, 2.2vw, 24px); font-weight: 800; color: var(--xs-ink); margin: 0 0 14px; }
.axs-layout.has-bundle { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(0, 2.4fr); gap: 16px; align-items: start; }
.axs-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.axs-item { display: flex; flex-direction: column; border: 1px solid var(--xs-line); border-radius: 14px; background: #fff; padding: 12px; gap: 8px; }
.axs-item[hidden] { display: none; }
.axs-img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain; background: #fff; border-radius: 10px; }
.axs-body { flex: 1; }
.axs-name { font-size: 15px; font-weight: 800; color: var(--xs-ink); margin: 0 0 2px; line-height: 1.5; }
.axs-name a { color: inherit; text-decoration: none; }
.axs-name a:hover { color: var(--xs-red); }
.axs-sub { font-size: 13px; color: var(--xs-muted); margin: 0 0 4px; }
.axs-price { font-size: 15px; font-weight: 800; color: var(--xs-ink); margin: 0; }
.axs-price.is-quote { color: var(--xs-red); }
.axs-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 14px; border-radius: 999px; font: inherit; font-size: 15px; font-weight: 700;
    background: var(--xs-red); color: #fff; border: 2px solid var(--xs-red); cursor: pointer; text-decoration: none; transition: background-color .15s, color .15s; touch-action: manipulation; }
.axs-btn:hover { background: var(--xs-red-hov); border-color: var(--xs-red-hov); color: #fff; text-decoration: none; }
.axs-btn:disabled { opacity: .5; cursor: default; }
.axs-btn-outline { background: #fff; color: var(--xs-ink); border-color: var(--xs-ink); }
.axs-btn-outline:hover { background: var(--xs-ink); border-color: var(--xs-ink); color: #fff; }
.axs-btn-wa { background: var(--xs-green); border-color: var(--xs-green); }
.axs-btn-wa:hover { background: #0b5f29; border-color: #0b5f29; }
.axs-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--xs-red); }
.axs-bundle { border: 2px solid var(--xs-ink); border-radius: 16px; padding: 16px; background: var(--xs-soft); }
.axs-bundle[hidden] { display: none; }
.axs-bundle-title { font-size: 18px; font-weight: 800; margin: 0 0 10px; color: var(--xs-ink); }
.axs-parts { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.axs-part { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 0; padding: 8px 12px; background: #fff; border: 1px solid var(--xs-line); border-radius: 10px; cursor: pointer; font-weight: 700; }
.axs-part input { width: 20px; height: 20px; accent-color: var(--xs-red); flex: 0 0 auto; }
.axs-part-name { flex: 1; }
.axs-part-price { color: var(--xs-muted); font-weight: 700; white-space: nowrap; }
.axs-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px dashed var(--xs-line); padding-top: 10px; margin-bottom: 4px; font-weight: 700; }
.axs-total-price { font-size: 22px; color: var(--xs-red); font-weight: 800; }
.axs-color-note { font-size: 13px; color: var(--xs-muted); margin: 0 0 12px; }
.axs-bundle-add { width: 100%; }
/* grid cards: one-line full-width button, quote price on one line */
.axs:not(.axs-compact) .axs-list .axs-item .axs-btn { width: 100%; font-size: 14px; padding: 8px 10px; white-space: nowrap; }
.axs-price.is-quote { font-size: 14px; white-space: nowrap; }
/* cart: compact rows */
.axs-compact { margin: 0 0 20px; }
.axs-compact .axs-title { font-size: 18px; }
.axs-compact .axs-list { grid-template-columns: 1fr; gap: 8px; }
.axs-compact .axs-item { flex-direction: row; align-items: center; padding: 8px 12px; }
.axs-compact .axs-img { width: 64px; flex: 0 0 64px; }
.axs-compact .axs-item .axs-btn { width: auto; min-width: 140px; flex: 0 0 auto; white-space: nowrap; }
@media (min-width: 1200px) { .axs-layout.has-bundle .axs-list { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 991.98px) { .axs-layout.has-bundle { grid-template-columns: 1fr; } }
@media (max-width: 575.98px) {
    .axs-list { grid-template-columns: 1fr; }
    .axs-item { flex-direction: row; align-items: center; }
    .axs-img { width: 76px; flex: 0 0 76px; }
    .axs .axs-list .axs-item .axs-btn, .axs:not(.axs-compact) .axs-list .axs-item .axs-btn { width: auto; min-width: 120px; flex: 0 0 auto; }
}
