/* Global frontend enhancements: accessibility, consistency, and performance-safe UI polish */
:root {
    --brand-primary: #0f5ae8;
    --brand-primary-dark: #0a45b5;
    --surface-card: #ffffff;
    --surface-muted: #f7f9fc;
    --text-strong: #132238;
    --text-muted: #5f6f85;
    --focus-ring: #1f6fff;
    --radius-md: 12px;
    --radius-sm: 8px;
    --shadow-card: 0 10px 24px rgba(17, 33, 57, 0.08);
    --shadow-card-hover: 0 16px 32px rgba(17, 33, 57, 0.14);
}

.skip-link {
    position: absolute;
    top: -48px;
    left: 12px;
    z-index: 99999;
    padding: 10px 14px;
    background: #111;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 10px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Products page: reference UI pattern */
.products-page .products-page__header {
    max-width: 720px;
}

.products-page .products-page__header h1 {
    color: var(--text-strong);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.products-page .products-page__header p {
    color: var(--text-muted);
}

.products-grid .product-card {
    border: 1px solid #e9eef6;
    border-radius: var(--radius-md);
    background: var(--surface-card);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.products-grid .product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
}

.products-grid .product-card__image-link {
    display: block;
    background: var(--surface-muted);
}

.products-grid .product-card__image {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.products-grid .product-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.products-grid .product-card__type {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: #eef3fb;
    color: #243b5a;
    font-size: 12px;
    font-weight: 600;
}

.products-grid .product-card__price {
    color: var(--text-strong);
    font-weight: 700;
    white-space: nowrap;
}

.products-grid .product-card__title {
    color: var(--text-strong);
    font-size: 1.2rem;
    line-height: 1.35;
    margin-bottom: 8px;
    min-height: 2.7em;
}

.products-grid .product-card__desc {
    color: var(--text-muted);
    line-height: 1.6;
    min-height: 4.8em;
}

.products-grid .product-card__cta {
    margin-top: auto;
    font-weight: 600;
}

html[dir="rtl"] .products-grid .product-card__meta {
    flex-direction: row-reverse;
}

html[dir="rtl"] .footer-links a:hover {
    transform: translateX(-5px);
}
