/*
 * WordPress / WooCommerce additions to the design CSS (styles.css). Only things the static site
 * never had: links where it had buttons, the admin bar, notices, pagination and loading states.
 */

/* The language switches are links (to the /ar/ or /en/ page) instead of buttons. */
.header-actions #language { display: flex; align-items: center; gap: 9px; }
@media (max-width: 600px) { .header-actions #language { font-size: 13px; } }
/* On English pages the switch reads "العربية": a system Arabic font draws that one word, so the
   page does not download the 163 KB Noto Sans Arabic file for it. */
#language, #footerLanguage { font-family: Inter, 'Geeza Pro', 'Segoe UI', Tahoma, Arial, sans-serif; }
[dir=rtl] #language, [dir=rtl] #footerLanguage { font-family: 'Noto Sans Arabic', Inter, Arial, sans-serif; }

/* Logged-in admin bar: keep the sticky header below it. */
.admin-bar header { top: 32px; }
@media (max-width: 782px) { .admin-bar header { top: 46px; } }
@media (max-width: 600px) { .admin-bar header { top: 0; } }

/* WordPress accessibility helper, same as the design's .sr-only. */
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Filtered-out product cards. */
.product-card-shell[hidden] { display: none; }

/* Product page: description paragraphs from the editor, and the out-of-stock note. */
.product-description-inline p + p { margin-top: 12px; }
.lx-stock-note { margin: 12px 0 0; font-size: 13px; color: var(--red); }
#add:disabled { background: #aaa; cursor: not-allowed; }

/* Cart while an update is in flight. */
#cartPageContent[aria-busy=true] { opacity: .55; pointer-events: none; transition: opacity .15s; }

/* Store notices (product page and other pages outside cart/checkout/account). */
.woocommerce-notices-wrapper:empty { display: none; }
.woocommerce-message, .woocommerce-info, .woocommerce-error {
	list-style: none; margin: 0 0 24px; padding: 16px 20px; background: #f4f4f2; border-inline-start: 3px solid var(--black);
	font-size: 14px; line-height: 1.6; display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center;
}
.woocommerce-error { border-color: var(--red); }
.woocommerce-error li { list-style: none; }
.woocommerce-message .button, .woocommerce-info .button { order: 2; margin-inline-start: auto; font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }

/* Archive pagination. */
.lx-pagination { display: flex; gap: 8px; justify-content: center; margin-top: 45px; }
.lx-pagination .page-numbers { min-width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.lx-pagination .page-numbers.current { background: var(--black); color: #fff; border-color: var(--black); }
.lx-pagination a.page-numbers:hover { border-color: var(--black); }

/* Coming-soon panel (WooCommerce store-only mode): WooCommerce wraps it in .wp-site-blocks. */
.wp-site-blocks:has(> .commerce-page) { display: contents; }

/* LiteSpeed Cache lazy-load (production): hide its grey 1px placeholder so the image shimmer from styles.css shows. */
img.lx-loading[data-lazyloaded] { object-position: -9999px -9999px; }

/* Shop filters are links (?category=) so they filter every page; same look as the design's buttons. */
.filters a { border: 1px solid var(--line); padding: 11px 20px; font-size: 14px; }
.filters a.active { background: var(--black); color: white; border-color: var(--black); }
@media (max-width: 600px) { .filters a { font-size: 12px; padding: 10px 12px; } }

/* How many of the product are in the cart, over the card's bag button (lx.js renderCardCartCounts). */
.card-add-cart .card-cart-count { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 4px; border: 2px solid white; border-radius: 9px; background: var(--red); color: white; font-size: 10px; font-weight: 700; line-height: 14px; text-align: center; pointer-events: none; }

/* Arabic pages use Noto Sans Arabic only (its files include Latin, so prices and "LX SPORTS" match).
   !important overrides the design's Inter/Barlow Condensed rules, the font shorthands, and plugin
   styles such as the cookie banner. */
[dir=rtl] *, [dir=rtl] *::before, [dir=rtl] *::after { font-family: 'Noto Sans Arabic', sans-serif !important; }

/* SVG icons (lx_icon): arrows point the LTR way and flip on Arabic pages, so "previous" points right
   and "next" left there. Play keeps pointing right in both, as media controls do. */
.lx-icon { display: block; flex: none; }
[dir=rtl] .lx-icon-dir { transform: scaleX(-1); }
.menu-group-choice .lx-icon, .menu-preview-arrow .lx-icon { display: inline-block; vertical-align: -0.15em; }
.lx-pagination .lx-icon { width: 16px; height: 16px; }
.ticker-toggle { display: grid; place-items: center; }
.ticker-toggle .lx-icon { width: 12px; height: 12px; }
[data-paused] > .lx-icon-pause, :not([data-paused]) > .lx-icon-play { display: none; }

/* The gallery's previous button sits on the reading-start side (right in Arabic). */
[dir=rtl] .gallery-prev { left: auto; right: 18px; }
[dir=rtl] .gallery-next { right: auto; left: 18px; }
@media (max-width: 700px) {
	[dir=rtl] .gallery-prev { right: 10px; }
	[dir=rtl] .gallery-next { left: 10px; }
}

/* Mega menu "view all" links: the ↗ arrow as an icon, flipped to ↖ in Arabic. */
.mega-heading > a:last-child:after, .submenu-all:after {
	content: ""; display: inline-block; width: 0.9em; height: 0.9em; vertical-align: -0.1em; background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M8 7h9v9'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M8 7h9v9'/%3E%3C/svg%3E") center / contain no-repeat;
}
[dir=rtl] .mega-heading > a:last-child:after, [dir=rtl] .submenu-all:after { transform: scaleX(-1); }

/* Arabic pages: LTR runs (prices, phone numbers) keep left-to-right character order but align
   right with the rest of the page. */
[dir=rtl] [dir=ltr] { text-align: right; }

/* Arabic pages: the slogan ticker scrolls the other way (left to right), following the reading
   direction. .ticker is direction: ltr, so the track is anchored left; it starts shifted left by
   half (the second, identical half) and slides back to 0. Each group reads right to left. */
@keyframes lx-marquee-rtl {
	from { transform: translateX(-50%); }
	to { transform: translateX(0); }
}
[dir=rtl] .ticker-track { animation-name: lx-marquee-rtl; }
[dir=rtl] .ticker-group { direction: rtl; }

/* Product cards: sale price, out-of-stock badge (LX-014). */
.product-card-price del, .product-regular-price { color: #666; font-weight: 400; margin-inline-end: 6px; }
.product-card-price ins { text-decoration: none; color: var(--red); font-weight: 600; }
.product-card-shell.is-out-of-stock .product-photo img { opacity: .55; }
.product-stock-tag { background: var(--black); color: white; }
.product-price-line .product-regular-price { font-size: 18px; }

/* Header search icon (LX-012). */
.header-search { display: flex; align-items: center; }
/* Shop toolbar: count and sort (LX-047). */
.shop-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: -12px 0 26px; font-size: 13px; color: #666; }
.shop-toolbar .shop-count { margin: 0; }
.shop-sort { display: flex; align-items: center; gap: 10px; }
.shop-sort select { min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--border-radius, 5px); background: white; color: var(--black); font-size: 13px; }
@media (max-width: 600px) { .shop-sort > span { display: none; } }

/* Arabic pages: mirror the design's physical left/right positions (LX-068). */
[dir=rtl] .product-tag { left: auto; right: 15px; }
[dir=rtl] .product-open { right: auto; left: 15px; }
[dir=rtl] .photo-word { left: auto; right: 40px; }
[dir=rtl] .close { right: auto; left: 14px; }
[dir=rtl] .size-chart-close { right: auto; left: 17px; }
[dir=rtl] #bag #count, [dir=rtl] .wishlist-count, [dir=rtl] .card-add-cart .card-cart-count { right: auto; left: -6px; }
[dir=rtl] .product-card-shell .card-wishlist, [dir=rtl] .product-card-shell .card-add-cart { right: auto; left: 14px; }
@media (max-width: 700px) {
	[dir=rtl] .product-card-shell .card-wishlist, [dir=rtl] .product-card-shell .card-add-cart { left: 10px; }
	[dir=rtl] .product-card-shell .card-wishlist { left: calc(10px + var(--card-action-size) + 7px); }
}
@media (max-width: 600px) {
	[dir=rtl] .product-tag { right: 10px; }
	[dir=rtl] .product-open { left: 10px; }
}

/* Product page specifications list (LX-015). */
.product-specs { margin: 0; display: grid; gap: 0; }
.product-specs > div { display: grid; grid-template-columns: minmax(120px, 30%) 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.product-specs dt { color: #666; }
.product-specs dd { margin: 0; }

/* Footer "Cookie settings" reopens the consent banner (cookie-consent plugin). */
.footer-cookie-settings { padding: 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* Shipment tracking on order pages (inc/shipment.php). */
.order-shipment { margin-bottom: 28px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--border-radius, 5px); }
.order-shipment p { margin: 8px 0 14px; line-height: 1.7; }

/* Cart coupon field (LX-044). */
.coupon-form { margin: 18px 0 4px; }
.coupon-form label { display: block; font-size: 13px; color: #666; margin-bottom: 8px; }
.coupon-form > div { display: flex; gap: 8px; }
.coupon-form input { flex: 1; min-width: 0; min-height: 44px; padding: 10px 12px; border: 1px solid #ccc; border-radius: var(--border-radius, 5px); font-size: 15px; text-transform: uppercase; }
.coupon-form .button { min-height: 44px; padding: 10px 18px; margin: 0; }
.coupon-remove { margin-inline-start: 6px; padding: 0 4px; color: #666; font-size: 16px; line-height: 1; }

/* Mobile menu utility row (search, account, language); the desktop header has these already. */
@media (min-width: 1280px) { header .menu-utility { display: none; } }

.product-card-rating { display: flex; align-items: center; gap: 6px; margin: -4px 0 10px; font-size: 12px; color: #666; }

/* Home "Find your discipline": as many columns as categories (up to 4), two on tablets. */
@media (min-width: 901px) { .discipline-grid { grid-template-columns: repeat(var(--cols, 3), 1fr); } }
@media (min-width: 601px) and (max-width: 900px) { .discipline-grid { grid-template-columns: repeat(2, 1fr); } .discipline-grid a:nth-child(2n) { border-inline-end: 0; } .discipline-grid a:nth-child(2n+1) { padding-inline-start: 0; } .discipline-grid a { border-bottom: 1px solid var(--line); } }

/* Contact page (page-contact.php). */
.contact-intro { max-width: 680px; margin: 0 0 30px; line-height: 1.7; }
.contact-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.contact-layout h2 { font-size: 22px; margin: 0 0 18px; }
.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.contact-form .full, .contact-form .button { grid-column: 1 / -1; }
.contact-form textarea { display: block; width: 100%; padding: 13px 12px; font: inherit; font-size: 16px; border: 1px solid #ccc; background: white; color: #111; resize: vertical; }
.contact-form .button { justify-self: start; }
.contact-honeypot { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.contact-status { margin: 0 0 18px; padding: 14px 16px; border-inline-start: 3px solid var(--black); background: #f4f4f2; }
.contact-status.is-error { border-color: var(--red); }
.contact-aside h2 + .contact-list { margin-bottom: 28px; }
.contact-list { margin: 0; display: grid; }
.contact-list > div { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.contact-list dt { color: #666; }
.contact-list dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 900px) { .contact-layout { grid-template-columns: 1fr; gap: 36px; } }
@media (max-width: 600px) { .contact-form { grid-template-columns: 1fr; } }

.contact-address { font-style: normal; line-height: 1.7; margin: 0 0 14px; }
.contact-map { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; max-width: 100%; border: 1px solid var(--line); border-radius: var(--border-radius, 5px); background: #efefed; overflow: hidden; }
.contact-map.is-loaded { display: block; }
.contact-map iframe { display: block; width: 100%; height: 100%; border: 0; }
.contact-map-link { display: inline-block; margin-top: 12px; }

.discipline-grid h3 { text-transform: uppercase; }

/* Discipline cards: the category's photo (--discipline-image, set on the card) fades in as the
   card's background on hover or keyboard focus, under a dark overlay. Devices with hover only;
   touch screens keep the plain card. */
.discipline-grid a { position: relative; isolation: isolate; }
@media (hover: hover) and (min-width: 601px) {
	.discipline-grid a.has-image::before, .discipline-grid a.has-image::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .35s ease; }
	.discipline-grid a.has-image::before { background: var(--discipline-image) center 28% / cover no-repeat; }
	.discipline-grid a.has-image::after { background: linear-gradient(180deg, #0005, #000c); }
	.discipline-grid a.has-image:hover::before, .discipline-grid a.has-image:focus-visible::before,
	.discipline-grid a.has-image:hover::after, .discipline-grid a.has-image:focus-visible::after { opacity: 1; }
	.discipline-grid a.has-image:hover :is(h3, p, span), .discipline-grid a.has-image:focus-visible :is(h3, p, span) { color: white; }
}
@media (prefers-reduced-motion: reduce) { .discipline-grid a::before, .discipline-grid a::after { transition: none; } }
