/* Rex Discount — design system + components. Colors mirror Elementor Site Settings. */
:root {
	--rex-red: #d7141a;
	--rex-red-d: #b30f14;
	--rex-navy: #0a1f44;
	--rex-navy-2: #12306a;
	--rex-blue: #1146c8;
	--rex-gold: #e3b54a;
	--rex-ink: #101828;
	--rex-muted: #5b6475;
	--rex-bg: #f5f7fb;
	--rex-line: #e4e8f0;
	--rex-radius: 16px;
	--rex-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 8px 24px rgba(16, 24, 40, .08);
	--rex-shadow-lg: 0 24px 60px rgba(10, 31, 68, .22);
	--rex-font-head: "Inter Tight", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---------- shared bits ---------- */
.rex-eyebrow, .rex-eyebrow .elementor-heading-title {
	font-size: 13px !important; font-weight: 700 !important; letter-spacing: .12em; text-transform: uppercase; color: var(--rex-red);
	margin: 0 0 12px;
}
.rex-eyebrow--light, .rex-on-dark .rex-eyebrow .elementor-heading-title { color: var(--rex-gold); }
.rex-on-dark, .rex-on-dark .elementor-heading-title, .rex-on-dark .elementor-widget-text-editor, .rex-on-dark .elementor-icon-box-title, .rex-on-dark .elementor-icon-box-description { color: #fff; }
.rex-on-dark .elementor-widget-text-editor, .rex-on-dark .elementor-icon-box-description { color: rgba(255, 255, 255, .78); }

.rex-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 48px; padding: 12px 22px; border-radius: 999px; border: 2px solid transparent;
	font-weight: 700; font-size: 15px; line-height: 1.1; text-decoration: none !important; cursor: pointer;
	transition: transform .15s ease, background-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.rex-btn:hover { transform: translateY(-1px); }
.rex-btn:focus-visible { outline: 3px solid var(--rex-gold); outline-offset: 2px; }
.rex-btn--red { background: var(--rex-red); color: #fff !important; box-shadow: 0 6px 18px rgba(215, 20, 26, .32); }
.rex-btn--red:hover { background: var(--rex-red-d); }
.rex-btn--white { background: #fff; color: var(--rex-navy) !important; }
.rex-btn--ghost { border-color: rgba(255, 255, 255, .45); color: #fff !important; background: transparent; }
.rex-btn--ghost:hover { background: rgba(255, 255, 255, .1); border-color: #fff; }
.rex-btn--outline { border-color: var(--rex-navy); color: var(--rex-navy) !important; background: #fff; }
.rex-btn--outline:hover { background: var(--rex-navy); color: #fff !important; }

/* Elementor cards used in sections (icon boxes, steps, values) */
.rex-card-box > .elementor-widget-container, .rex-card-box.e-con {
	background: #fff; border: 1px solid var(--rex-line); border-radius: var(--rex-radius); box-shadow: var(--rex-shadow);
	padding: 28px; height: 100%; transition: transform .2s ease, box-shadow .2s ease;
}
.rex-card-box:hover > .elementor-widget-container { transform: translateY(-3px); box-shadow: var(--rex-shadow-lg); }
.rex-card-box .elementor-icon { color: var(--rex-red); background: #fdecec; border-radius: 14px; padding: 14px; font-size: 26px !important; }
.rex-card-box .elementor-icon svg { width: 26px; height: 26px; fill: var(--rex-red); }
.rex-card-box .elementor-icon-box-title { margin-top: 4px; }

.rex-step { counter-increment: rexstep; position: relative; }
.rex-steps { counter-reset: rexstep; }
.rex-step > .elementor-widget-container::before {
	content: counter(rexstep, decimal-leading-zero); position: absolute; top: 22px; right: 24px;
	font-family: var(--rex-font-head); font-weight: 800; font-size: 34px; color: var(--rex-line);
}

.rex-stat .elementor-counter-number-wrapper { font-family: var(--rex-font-head); font-weight: 800; color: #fff; }
.rex-stat .elementor-counter-title { color: rgba(255, 255, 255, .75); }

.rex-rounded img { border-radius: var(--rex-radius); box-shadow: var(--rex-shadow-lg); }
.rex-check-list .elementor-icon-list-icon i, .rex-check-list .elementor-icon-list-icon svg { color: var(--rex-red); fill: var(--rex-red); }

/* ---------- hero ---------- */
.rex-hero {
	position: relative; overflow: hidden; color: #fff;
	background:
		radial-gradient(900px 500px at 85% 20%, rgba(17, 70, 200, .55), transparent 60%),
		radial-gradient(700px 500px at 0% 100%, rgba(215, 20, 26, .35), transparent 60%),
		linear-gradient(135deg, #071733 0%, var(--rex-navy) 55%, #0d2a5e 100%);
}
.rex-hero::after { /* subtle grid texture */
	content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .07;
	background-image: linear-gradient(#fff 1px, transparent 1px), linear-gradient(90deg, #fff 1px, transparent 1px);
	background-size: 48px 48px; mask-image: linear-gradient(180deg, #000, transparent 85%);
}
.rex-hero__inner {
	position: relative; z-index: 1; max-width: 1240px; margin: 0 auto; padding: 88px 24px 96px;
	display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 56px; align-items: center;
}
.rex-hero__title {
	font-family: var(--rex-font-head); font-weight: 800; color: #fff; margin: 0 0 18px;
	font-size: clamp(36px, 5.2vw, 64px); line-height: 1.04; letter-spacing: -.02em;
}
.rex-hero__title span { color: var(--rex-gold); }
.rex-hero__sub { font-size: clamp(16px, 1.4vw, 19px); line-height: 1.6; color: rgba(255, 255, 255, .82); max-width: 600px; margin: 0 0 32px; }
.rex-paths { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.rex-path {
	border-radius: 20px; padding: 24px; backdrop-filter: blur(8px);
	background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16);
	display: flex; flex-direction: column; transition: transform .2s ease, background-color .2s ease, border-color .2s ease;
}
.rex-path:hover { transform: translateY(-4px); background: rgba(255, 255, 255, .11); border-color: rgba(255, 255, 255, .3); }
.rex-path--wholesale { background: linear-gradient(160deg, rgba(215, 20, 26, .28), rgba(255, 255, 255, .06)); border-color: rgba(255, 120, 120, .35); }
.rex-path__label { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--rex-gold); }
.rex-path__title { font-family: var(--rex-font-head); color: #fff; font-size: 26px; font-weight: 800; margin: 6px 0 8px; line-height: 1.15; }
.rex-path__text { color: rgba(255, 255, 255, .78); font-size: 15px; line-height: 1.5; margin: 0 0 18px; flex: 1; }
.rex-path__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.rex-path__actions .rex-btn { min-height: 44px; padding: 10px 18px; font-size: 14px; }

.rex-hero__mosaic { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; transform: rotate(-4deg); }
.rex-hero__mosaic.is-hidden { visibility: hidden; }
.rex-mosaic__tile {
	aspect-ratio: 1; border-radius: 18px; background: #fff; box-shadow: 0 16px 40px rgba(0, 0, 0, .3);
	display: grid; place-items: center; overflow: hidden; padding: 14px;
	animation: rex-float 7s ease-in-out infinite;
}
.rex-mosaic__tile:nth-child(3n+2) { animation-delay: -2.3s; transform: translateY(24px); }
.rex-mosaic__tile:nth-child(3n) { animation-delay: -4.6s; }
.rex-mosaic__tile img { width: 100%; height: 100%; object-fit: contain; }
.rex-mosaic__tile.is-loading { background: rgba(255, 255, 255, .12); }
.rex-mosaic__tile.is-empty { background: rgba(255, 255, 255, .08); box-shadow: none; }
@keyframes rex-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }

/* ---------- product cards ---------- */
.rex-card {
	position: relative; display: flex; flex-direction: column; text-align: left; width: 100%;
	background: #fff; border: 1px solid var(--rex-line); border-radius: 14px; overflow: hidden; padding: 0;
	font: inherit; color: var(--rex-ink); cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.rex-card:hover { transform: translateY(-3px); box-shadow: var(--rex-shadow); border-color: #d3d9e5; }
.rex-card:focus-visible { outline: 3px solid var(--rex-blue); outline-offset: 2px; }
.rex-card__img { display: grid; place-items: center; aspect-ratio: 1; background: #fff; padding: 16px; border-bottom: 1px solid var(--rex-line); }
.rex-card__img img { width: 100%; height: 100%; object-fit: contain; }
.rex-card__body { display: flex; flex-direction: column; gap: 4px; padding: 14px 14px 16px; flex: 1; }
.rex-card__cat { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--rex-muted); }
.rex-card__name { font-weight: 600; font-size: 14px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.rex-card__meta { font-size: 12px; color: var(--rex-muted); }
.rex-card__price { margin-top: auto; padding-top: 6px; font-family: var(--rex-font-head); font-weight: 800; font-size: 18px; color: var(--rex-navy); }
.rex-card__price small { font-family: inherit; font-weight: 500; font-size: 12px; color: var(--rex-muted); }
.rex-card-link { position: absolute; inset: 0; z-index: 1; }
.rex-card.is-loading { pointer-events: none; }
.rex-card.is-loading .rex-card__img, .rex-card.is-loading .rex-card__body span {
	background: linear-gradient(90deg, #eef1f6 25%, #f7f9fc 50%, #eef1f6 75%); background-size: 200% 100%; animation: rex-shimmer 1.2s infinite;
}
.rex-card.is-loading .rex-card__body span { display: block; height: 12px; border-radius: 6px; }
.rex-card.is-loading .rex-card__body span + span { width: 60%; }
@keyframes rex-shimmer { to { background-position: -200% 0; } }

/* ---------- carousel strip ---------- */
.rex-strip { position: relative; }
.rex-strip.is-hidden { display: none; }
.rex-strip__track {
	display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); gap: 16px;
	overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px 2px 12px;
}
.rex-strip__track::-webkit-scrollbar { display: none; }
.rex-strip__track > .rex-card { scroll-snap-align: start; }
@media (min-width: 1025px) { .rex-strip__track { grid-auto-columns: calc((100% - 80px) / 6); } }
@media (min-width: 768px) and (max-width: 1024px) { .rex-strip__track { grid-auto-columns: calc((100% - 48px) / 4); } }
@media (max-width: 767px) { .rex-strip__track { grid-auto-columns: 62%; } }
.rex-strip__nav {
	position: absolute; top: 38%; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--rex-line);
	background: #fff; box-shadow: var(--rex-shadow); font-size: 26px; line-height: 1; color: var(--rex-navy); cursor: pointer; display: grid; place-items: center;
}
.rex-strip__nav--prev { left: -18px; }
.rex-strip__nav--next { right: -18px; }
@media (max-width: 767px) { .rex-strip__nav { display: none; } }

/* ---------- full catalog ---------- */
.rex-catalog__bar { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.rex-search {
	flex: 1 1 360px; display: flex; align-items: center; gap: 10px; background: #fff; border: 2px solid var(--rex-line);
	border-radius: 999px; padding: 0 18px; min-height: 56px; transition: border-color .15s ease, box-shadow .15s ease;
}
.rex-search:focus-within { border-color: var(--rex-blue); box-shadow: 0 0 0 4px rgba(17, 70, 200, .12); }
.rex-search svg { width: 22px; height: 22px; fill: var(--rex-muted); flex: none; }
.rex-search__input { flex: 1; border: 0 !important; outline: 0; background: transparent !important; font-size: 16px; padding: 12px 0 !important; box-shadow: none !important; min-width: 0; }
.rex-catalog__sub { flex: 0 1 280px; min-height: 56px; border: 2px solid var(--rex-line); border-radius: 999px; padding: 0 18px; font-size: 15px; background-color: #fff; }
.rex-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: thin; }
.rex-chip {
	flex: none; border: 1px solid var(--rex-line); background: #fff; color: var(--rex-ink); border-radius: 999px;
	padding: 10px 16px; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: all .15s ease;
}
.rex-chip:hover { border-color: var(--rex-navy); }
.rex-chip.is-active { background: var(--rex-navy); border-color: var(--rex-navy); color: #fff; }
.rex-catalog__status { color: var(--rex-muted); font-size: 14px; margin: 6px 0 14px; min-height: 1.4em; }
.rex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
@media (max-width: 480px) { .rex-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .rex-card__body { padding: 10px; } .rex-card__name { font-size: 13px; } }
.rex-catalog__more { text-align: center; margin-top: 28px; }
.rex-empty { grid-column: 1 / -1; text-align: center; padding: 48px 16px; border: 2px dashed var(--rex-line); border-radius: var(--rex-radius); color: var(--rex-muted); display: flex; flex-direction: column; gap: 6px; }
.rex-empty strong { color: var(--rex-ink); font-size: 18px; }

.rex-modal { border: 0; border-radius: 20px; padding: 0; width: min(860px, calc(100% - 32px)); max-height: calc(100% - 32px); box-shadow: var(--rex-shadow-lg); }
.rex-modal::backdrop { background: rgba(7, 23, 51, .6); backdrop-filter: blur(3px); }
.rex-modal__close { position: absolute; top: 10px; right: 12px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--rex-bg); font-size: 26px; line-height: 1; cursor: pointer; color: var(--rex-ink); }
.rex-quick { display: grid; grid-template-columns: 1fr 1fr; }
.rex-quick__img { background: #fff; display: grid; place-items: center; padding: 32px; border-right: 1px solid var(--rex-line); }
.rex-quick__img img { width: 100%; max-height: 360px; object-fit: contain; }
.rex-quick__info { padding: 36px 32px; }
.rex-quick__title { font-family: var(--rex-font-head); font-size: 24px; line-height: 1.2; margin: 0 0 16px; color: var(--rex-ink); }
.rex-quick__meta { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0 0 18px; font-size: 14px; }
.rex-quick__meta dt { color: var(--rex-muted); }
.rex-quick__meta dd { margin: 0; font-weight: 600; }
.rex-quick__price { font-family: var(--rex-font-head); font-size: 28px; font-weight: 800; color: var(--rex-navy); margin: 0 0 20px; }
.rex-quick__price small { font-size: 14px; font-weight: 500; color: var(--rex-muted); }
.rex-quick__actions { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 680px) { .rex-quick { grid-template-columns: 1fr; } .rex-quick__img { border-right: 0; border-bottom: 1px solid var(--rex-line); padding: 24px; } .rex-quick__img img { max-height: 220px; } .rex-quick__info { padding: 24px; } }

/* ---------- category tiles ---------- */
.rex-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.rex-cat {
	display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 18px 12px 16px; text-align: center;
	background: #fff; border: 1px solid var(--rex-line); border-radius: var(--rex-radius); text-decoration: none !important; color: var(--rex-ink);
	transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.rex-cat:hover { transform: translateY(-4px); box-shadow: var(--rex-shadow); border-color: transparent; }
.rex-cat__img { width: 96px; height: 96px; border-radius: 50%; overflow: hidden; background: var(--rex-bg); box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--rex-line); }
.rex-cat__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.rex-cat:hover .rex-cat__img img { transform: scale(1.08); }
.rex-cat__label { font-weight: 700; font-size: 15px; line-height: 1.25; }
@media (max-width: 480px) { .rex-cats { grid-template-columns: repeat(2, 1fr); gap: 10px; } .rex-cat__img { width: 72px; height: 72px; } }

/* ---------- header / footer helpers (Elementor templates) ---------- */
.rex-topbar, .rex-topbar a, .rex-topbar .elementor-icon-list-text { color: rgba(255, 255, 255, .85) !important; font-size: 13px; }
.rex-topbar a:hover .elementor-icon-list-text { color: #fff !important; }
.rex-header { transition: box-shadow .2s ease; }
.rex-header.elementor-sticky--effects, .rex-header.is-stuck { box-shadow: 0 6px 24px rgba(16, 24, 40, .1); }
.rex-footer a { color: rgba(255, 255, 255, .78); }
.rex-footer a:hover { color: #fff; }

/* ---------- Gravity Forms polish ---------- */
.rex-form .gform_wrapper input:not([type=checkbox]):not([type=radio]):not([type=submit]), .rex-form .gform_wrapper select, .rex-form .gform_wrapper textarea {
	border-radius: 12px !important; border: 1px solid #cfd6e3 !important; min-height: 48px; padding: 10px 14px !important; font-size: 16px !important;
}
.rex-form .gform_wrapper .gform_button, .rex-form .gform_wrapper input[type=submit] {
	background: var(--rex-red) !important; color: #fff !important; border: 0 !important; border-radius: 999px !important;
	min-height: 50px; padding: 12px 28px !important; font-weight: 700 !important; font-size: 16px !important; cursor: pointer;
}
.rex-form .gform_wrapper .gform_button:hover { background: var(--rex-red-d) !important; }
.rex-form.rex-on-dark .gform_wrapper label, .rex-form.rex-on-dark .gform_wrapper .gfield_label, .rex-form.rex-on-dark .gform_wrapper legend { color: #fff !important; }
.rex-form.rex-on-dark .gform_confirmation_message { color: #fff; }

/* ---------- Guard components against Elementor kit globals (h1–h6, button, a, img) ---------- */
.elementor-widget-button .elementor-button { white-space: nowrap; }
.rex-hero h1.rex-hero__title { color: #fff; }
.rex-hero h1.rex-hero__title span { color: var(--rex-gold); }
.rex-hero h2.rex-path__title { color: #fff; }
.rex-hero .rex-path a.rex-btn { text-decoration: none; }
.rex-catalog h3.rex-quick__title { color: var(--rex-ink); }
.rex-catalog .rex-empty strong { color: var(--rex-ink); }

.rex-catalog button.rex-card, .rex-strip .rex-card {
	background: #fff; color: var(--rex-ink); border: 1px solid var(--rex-line); border-radius: 14px; padding: 0;
	font: inherit; text-transform: none; letter-spacing: normal; box-shadow: none; text-align: left;
}
.rex-catalog button.rex-card:hover, .rex-catalog button.rex-card:focus { background: #fff; color: var(--rex-ink); border-color: #d3d9e5; box-shadow: var(--rex-shadow); }
.rex-catalog button.rex-chip {
	background: #fff; color: var(--rex-ink); border: 1px solid var(--rex-line); border-radius: 999px; padding: 10px 16px;
	font-size: 14px; font-weight: 600; line-height: 1.2; box-shadow: none;
}
.rex-catalog button.rex-chip:hover, .rex-catalog button.rex-chip:focus { background: #fff; color: var(--rex-ink); border-color: var(--rex-navy); }
.rex-catalog button.rex-chip.is-active, .rex-catalog button.rex-chip.is-active:hover { background: var(--rex-navy); color: #fff; border-color: var(--rex-navy); }
.rex-strip button.rex-strip__nav, .rex-strip button.rex-strip__nav:hover, .rex-strip button.rex-strip__nav:focus {
	background: #fff; color: var(--rex-navy); border: 1px solid var(--rex-line); border-radius: 50%; padding: 0; font-size: 26px; line-height: 1;
}
.rex-strip button.rex-strip__nav:hover { background: var(--rex-navy); color: #fff; border-color: var(--rex-navy); }
.rex-catalog button.rex-modal__close, .rex-catalog button.rex-modal__close:hover { background: var(--rex-bg); color: var(--rex-ink); border: 0; border-radius: 50%; padding: 0; font-size: 26px; }
.rex-catalog .rex-catalog__more button.rex-btn { border: 2px solid var(--rex-navy); background: #fff; color: var(--rex-navy); border-radius: 999px; padding: 12px 24px; }
.rex-catalog .rex-catalog__more button.rex-btn:hover { background: var(--rex-navy); color: #fff; }
.rex-catalog input.rex-search__input, .rex-catalog input.rex-search__input:focus { border: 0; box-shadow: none; background: transparent; padding: 12px 0; }

.rex-cats a.rex-cat, .rex-cats a.rex-cat:hover { color: var(--rex-ink); }
.rex-cats .rex-cat__img img, .rex-hero .rex-mosaic__tile img, .rex-card .rex-card__img img, .rex-quick .rex-quick__img img { max-width: 100%; }
.rex-cats .rex-cat__img img { width: 100%; height: 100%; object-fit: cover; }
.rex-hero .rex-mosaic__tile img, .rex-card .rex-card__img img { width: 100%; height: 100%; object-fit: contain; }
/* Header: button group sizes to its content instead of Elementor's default 100% width. */
.rex-header .e-con.e-child { --width: auto; width: auto; flex: 0 0 auto; }
.rex-header .elementor-widget-nav-menu { flex: 1 1 auto; min-width: 0; }

.rex-check-list .elementor-icon-list-text { color: var(--rex-ink); }
.rex-stat .elementor-counter { text-align: center; }
.rex-stat .elementor-counter-title { line-height: 1.3; text-align: center; }
.rex-stat .elementor-counter-number-wrapper { justify-content: center; }
@media (max-width: 767px) {
	.rex-stat .elementor-counter-title { font-size: 14px; }
	.rex-header .elementor-widget-button .elementor-button { padding: 10px 14px; font-size: 13px; }
}
@media (min-width: 1100px) { .rex-cats { grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 12px; } .rex-cat { padding: 16px 8px 14px; } .rex-cat__label { font-size: 14px; } }

@media (max-width: 1024px) {
	.rex-hero__inner { grid-template-columns: 1fr; padding: 64px 20px 72px; gap: 40px; }
	.rex-hero__mosaic { max-width: 520px; margin: 0 auto; width: 100%; transform: rotate(-3deg); }
}
@media (max-width: 640px) {
	.rex-paths { grid-template-columns: 1fr; }
	.rex-hero__mosaic { display: none; }
	.rex-hero__inner { padding: 48px 18px 56px; }
}
@media (prefers-reduced-motion: reduce) {
	.rex-mosaic__tile, .rex-card.is-loading * { animation: none !important; }
	.rex-btn, .rex-card, .rex-path, .rex-cat { transition: none !important; }
}
