/* ==========================================================================
   LD Store - our own theme styles
   Owner: Codie @ Liberty Dreams LTD

   The brand tokens live in theme.json (block editor).
   This file holds the components the editor does not generate: top bar
   hero, category cards and the assurance strip.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Brand tokens (single source: theme.json plus this block)
   They are declared here because ld-store.css loads last, so our own
   components never depend on the load order.
   -------------------------------------------------------------------------- */
:root {
	--ld-blue: #003399;
	--ld-blue-hover: #002277;
	--ld-blue-light: #e6f0fa;
	--ld-red: #ca2030;
	--ld-green: #16a34a;
	--ld-green-hover: #15803d;
	--ld-amber: #b45309;
	--ld-ink: #0f172a;
	--ld-body: #334155;
	--ld-muted: #64748b;
	--ld-border: #cbd5e1;
	--ld-surface: #f1f5f9;
	--ld-canvas: #f8fafc;
	--ld-white: #fff;

	--ld-radius-sm: 6px;
	--ld-radius: 8px;
	--ld-radius-lg: 12px;

	--ld-shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.08), 0 1px 2px -1px rgb(0 0 0 / 0.05);
	--ld-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.05);

	--ld-transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
	--ld-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* --------------------------------------------------------------------------
   Barra superior de servicios (B2B trade)
   -------------------------------------------------------------------------- */
.ld-trade-bar {
	background: var(--ld-ink);
	color: #e2e8f0;
	font-size: 0.8125rem;
}

.ld-trade-bar__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem 1.5rem;
	max-width: 1320px;
	margin-inline: auto;
	padding: 0.5rem 1.5rem;
}

.ld-trade-bar__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
	list-style: none;
}

.ld-trade-bar__list li {
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

.ld-trade-bar__list svg {
	width: 14px;
	height: 14px;
	flex: none;
	fill: currentColor;
	color: var(--ld-green);
}

.ld-trade-bar__list a {
	color: #cbd5e1;
	text-decoration: none;
}

.ld-trade-bar__list a:hover {
	color: #fff;
	text-decoration: underline;
}

.ld-trade-bar__account {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	color: #fff;
	font-weight: 600;
	text-decoration: none;
}

.ld-trade-bar__account:hover {
	text-decoration: underline;
}

@media (max-width: 599px) {
	.ld-trade-bar__inner {
		justify-content: center;
		text-align: center;
	}

	.ld-trade-bar__list {
		justify-content: center;
	}
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.ld-hero {
	background: linear-gradient(135deg, #003399 0%, #002277 100%);
	color: #fff;
	padding: 3.5rem 0;
}

.ld-hero__inner {
	max-width: 1320px;
	margin-inline: auto;
	padding-inline: 1.5rem;
	display: grid;
	gap: 2rem;
	align-items: center;
}

@media (min-width: 900px) {
	.ld-hero__inner {
		grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr);
	}
}

/* The heading and paragraph colours come from theme.json (which sets a dark
   heading colour globally), so the hero overrides them explicitly.
   The selectors are scoped to the hero group and beat the block editor's
   element rules, which are emitted as .has-global-color or
   .wp-block-heading.has-text-color. */
.ld-hero .wp-block-heading,
.ld-hero h1,
.ld-hero h2,
.ld-hero h3,
.ld-hero p,
.ld-hero p.has-text-color,
.ld-hero .wp-block-paragraph {
	color: #fff !important;
}

/* The headline is a single long compound word, so it must not break inside
   the word: hyphens are disabled and the browser balances the lines. */
.ld-hero__title {
	hyphens: none;
	word-break: keep-all;
	overflow-wrap: normal;
	text-wrap: balance;
	max-width: 18ch;
}

.ld-hero p {
	font-size: 1.0625rem;
	line-height: 1.6;
	margin: 0 0 1.5rem;
	max-width: 56ch;
}

.ld-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.ld-hero__actions .wp-block-button__link {
	background: var(--ld-green);
	color: #fff;
	padding: 0.875rem 1.75rem;
	border-radius: var(--ld-radius);
	font-weight: 600;
}

.ld-hero__actions .wp-block-button__link:hover {
	background: var(--ld-green-hover);
}

.ld-hero__actions .is-style-outline .wp-block-button__link {
	background: transparent;
	color: #fff;
	border: 2px solid rgb(255 255 255 / 0.7);
}

.ld-hero__actions .is-style-outline .wp-block-button__link:hover {
	background: rgb(255 255 255 / 0.12);
	border-color: #fff;
}

/* The white panel inside the hero keeps the dark text of the theme. */
.ld-hero .ld-hero__panel,
.ld-hero .has-white-background-color {
	color: var(--ld-body);
}

.ld-hero .ld-hero__panel .wp-block-heading,
.ld-hero .ld-hero__panel h2,
.ld-hero .ld-hero__panel h3 {
	color: var(--ld-ink) !important;
}

.ld-hero .ld-hero__panel p,
.ld-hero .ld-hero__panel li {
	color: var(--ld-body) !important;
}

/* --------------------------------------------------------------------------
   Rejilla de categorias
   -------------------------------------------------------------------------- */
.ld-categories {
	max-width: 1320px;
	margin: 0 auto;
	padding: 3rem 1.5rem;
}

.ld-categories__title {
	text-align: center;
	margin-bottom: 2rem;
}

.ld-categories__grid {
	display: grid;
	gap: 1.5rem;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 782px) {
	.ld-categories__grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.ld-category-card {
	display: block;
	background: #fff;
	border: 1px solid var(--ld-border);
	border-radius: var(--ld-radius-lg);
	padding: 1.5rem 1.25rem;
	text-decoration: none;
	color: var(--ld-ink);
	transition: box-shadow var(--ld-transition), border-color var(--ld-transition), transform var(--ld-transition);
}

.ld-category-card:hover {
	box-shadow: var(--ld-shadow-md);
	border-color: var(--ld-blue);
	transform: translateY(-2px);
}

.ld-category-card__icon {
	width: 44px;
	height: 44px;
	border-radius: var(--ld-radius);
	background: var(--ld-blue-light);
	color: var(--ld-blue);
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 0.875rem;
}

.ld-category-card__icon svg {
	width: 24px;
	height: 24px;
	fill: currentColor;
}

.ld-category-card__title {
	font-weight: 700;
	font-size: 1rem;
	margin: 0 0 0.25rem;
	line-height: 1.3;
}

.ld-category-card__count {
	font-size: 0.8125rem;
	color: var(--ld-muted);
}

/* --------------------------------------------------------------------------
   Franja de confianza
   -------------------------------------------------------------------------- */
.ld-trust {
	background: var(--ld-canvas);
	border-top: 1px solid var(--ld-border);
	border-bottom: 1px solid var(--ld-border);
	padding: 3rem 0;
}

.ld-trust__grid {
	max-width: 1320px;
	margin-inline: auto;
	padding-inline: 1.5rem;
	display: grid;
	gap: 1.75rem;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 900px) {
	.ld-trust__grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.ld-trust__item {
	text-align: center;
}

.ld-trust__icon {
	width: 44px;
	height: 44px;
	margin: 0 auto 0.75rem;
	border-radius: 999px;
	background: var(--ld-blue-light);
	color: var(--ld-blue);
	display: flex;
	align-items: center;
	justify-content: center;
}

.ld-trust__icon svg {
	width: 22px;
	height: 22px;
	fill: currentColor;
}

.ld-trust__title {
	font-weight: 700;
	color: var(--ld-ink);
	margin: 0 0 0.375rem;
	font-size: 1.0625rem;
	letter-spacing: -0.01em;
}

.ld-trust__text {
	font-size: 0.9375rem;
	color: var(--ld-muted);
	margin: 0;
	line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Seccion de producto destacado
   -------------------------------------------------------------------------- */
.ld-featured {
	max-width: 1320px;
	margin: 0 auto;
	padding: 3rem 1.5rem;
}

.ld-featured__title {
	text-align: center;
	margin-bottom: 2rem;
}

/* --------------------------------------------------------------------------
   Footer: the pending orders block (state C) must be visible
   -------------------------------------------------------------------------- */
.ld-order-enquiry {
	background: var(--ld-blue-light);
	border: 1px solid var(--ld-blue);
	border-left-width: 4px;
	border-radius: var(--ld-radius-lg);
	padding: 2rem;
	margin: 3rem auto;
	max-width: 820px;
	text-align: center;
}

.ld-order-enquiry h2 {
	color: var(--ld-ink);
}

.ld-order-enquiry p {
	color: var(--ld-body);
	margin-inline: auto;
	max-width: 62ch;
}

.ld-order-enquiry .wp-block-buttons {
	justify-content: center;
}

.ld-order-enquiry h2 {
	margin: 0 0 0.5rem;
	font-size: 1.125rem;
	color: var(--ld-ink);
}

.ld-order-enquiry p {
	margin: 0 0 1rem;
	color: var(--ld-body);
	font-size: 0.9375rem;
	line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.wp-site-footer,
.ld-store-footer {
	background: var(--ld-ink);
	color: #cbd5e1;
	padding-block: 3rem 1.5rem;
}

.wp-site-footer a,
.ld-store-footer a {
	color: #cbd5e1;
	text-decoration: none;
}

.wp-site-footer a:hover,
.ld-store-footer a:hover {
	color: #fff;
	text-decoration: underline;
}

.wp-site-footer h2,
.wp-site-footer h3,
.ld-store-footer h2,
.ld-store-footer h3 {
	color: #fff;
	font-size: 0.9375rem;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	margin-bottom: 0.75rem;
}

/* --------------------------------------------------------------------------
   Footer links
   -------------------------------------------------------------------------- */
.wp-site-footer a,
.ld-store-footer a,
.wp-site-footer p a {
	color: #cbd5e1;
	text-decoration: none;
}

.wp-site-footer a:hover,
.ld-store-footer a:hover {
	color: #fff;
	text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Accessibility fixes
   -------------------------------------------------------------------------- */

/* Footer links: WCAG 2.5.8 target size (24px minimum) and 1.4.3 contrast.
   The footer is a block group with the ld-ink background, so the selectors
   target the real classes it emits rather than .wp-site-footer. */
.has-ld-ink-background-color p a,
.has-ld-ink-background-color a {
	color: #e2e8f0;
}

.has-ld-ink-background-color p a {
	display: inline-block;
	min-height: 24px;
	padding: 3px 0;
	line-height: 1.8;
}

.has-ld-ink-background-color p a:hover,
.has-ld-ink-background-color a:hover {
	color: #fff;
}

/* The trade bar is a landmark: it is exposed as a banner region. */
.ld-trade-bar {
	position: relative;
}

.ld-trade-bar__list li span {
	color: #e2e8f0;
}
