/* ==========================================================================
   Components — Buttons, Cards, Badges, Inputs
   ========================================================================== */

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    font-family: var(--font-label);
    font-size: var(--fs-body);
    font-weight: var(--fw-semibold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 14px 32px;
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    transition: all var(--transition-base);
    cursor: pointer;
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
}

.btn--primary {
    background: var(--color-cyan);
    color: var(--ink-on-cyan);
    border-color: var(--color-cyan);
}

.btn--primary:hover {
    background: transparent;
    color: var(--color-cyan);
    box-shadow: var(--shadow-cyan);
}

.btn--secondary {
    background: transparent;
    color: var(--color-white);
    border-color: var(--border-light);
}

.btn--secondary:hover {
    border-color: var(--color-cyan);
    color: var(--color-cyan);
}

.btn--orange {
    background: var(--color-orange);
    color: var(--ink-on-orange);
    border-color: var(--color-orange);
}

.btn--orange:hover {
    background: transparent;
    color: var(--color-orange);
    box-shadow: var(--shadow-orange);
}

.btn--whatsapp {
    background: var(--brand-whatsapp);
    color: var(--ink-light);
    border-color: var(--brand-whatsapp);
}

.btn--whatsapp:hover {
    background: var(--brand-whatsapp-dark);
    border-color: var(--brand-whatsapp-dark);
}

.btn--sm {
    padding: 10px 20px;
    font-size: var(--fs-body-sm);
}

.btn--lg {
    padding: 18px 40px;
    font-size: var(--fs-body-lg);
}

.btn--full {
    width: 100%;
}

.btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ---------- Cards ---------- */

.card {
    background: var(--gradient-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    transition: all var(--transition-base);
}

.card:hover {
    border-color: var(--border-cyan);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card--accent-cyan {
    border-top: 3px solid var(--color-cyan);
}

.card--accent-orange {
    border-top: 3px solid var(--color-orange);
}

.card--no-hover:hover {
    transform: none;
    box-shadow: none;
}

.card__icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-md);
    color: var(--color-cyan);
}

.card__icon svg {
    width: 100%;
    height: 100%;
}

.card__title {
    font-family: var(--font-body);
    font-size: var(--fs-h5);
    font-weight: var(--fw-semibold);
    margin-bottom: var(--space-sm);
    color: var(--color-white);
}

.card__text {
    font-size: var(--fs-body-sm);
    color: var(--color-gray-light);
    line-height: var(--lh-relaxed);
}

/* Sport Card */
/* Pure white in BOTH themes so the card is continuous with the white studio
   background of the product photos. That makes it a fixed light surface, so
   everything inside it uses the --on-light-* ink set rather than themed
   tokens. The resting --shadow-sm is what separates the card from the page in
   light mode, where card and background are both white. */
.sport-card {
    background: var(--on-light-bg);
    border: 1px solid var(--on-light-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.sport-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, var(--on-light-tint) 0%, transparent 70%);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.sport-card:hover {
    border-color: var(--on-light-border-hover);
    transform: translateY(-6px);
    box-shadow: var(--on-light-shadow);
}

.sport-card:hover::before {
    opacity: 1;
}

.sport-card__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-md);
    color: var(--on-light-accent);
    position: relative;
}

/* Product photo variant. The card is already pure white, so the tile is
   seamless with it and needs no rounding — the garment reads as floating on
   the card. background is kept as a guard so a slow-loading or failed image
   never exposes a different colour behind it. overflow:hidden clips the hover
   zoom so it cannot ride up over the title.
   position:relative lifts it above .sport-card::before (the hover glow). */
.sport-card__photo {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    margin: 0 auto var(--space-sm);
    background: var(--on-light-bg);
    overflow: hidden;
}

.sport-card__photo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform var(--transition-base);
}

.sport-card:hover .sport-card__photo img {
    transform: scale(1.06);
}

/* Tight padding so the garment fills as much of the card as possible. The
   photos are square cut-outs on white, so the card edge and the image edge are
   the same colour and a wide gutter just reads as wasted space. */
.sport-card--has-photo {
    padding: var(--space-sm) var(--space-sm) var(--space-lg);
}

@media (prefers-reduced-motion: reduce) {
    .sport-card:hover .sport-card__photo img {
        transform: none;
    }
}

.sport-card__icon svg {
    width: 100%;
    height: 100%;
}

/* Explicit colour is REQUIRED here. Without it the h2/h3 inherits
   `color: var(--color-white)` from typography.css, which is near-white in the
   dark theme and vanishes on the white card. */
.sport-card__name {
    font-family: var(--font-headline);
    font-size: var(--fs-h4);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: var(--space-sm);
    position: relative;
    color: var(--on-light-text);
}

.sport-card__products {
    font-size: var(--fs-body-sm);
    color: var(--on-light-muted);
    position: relative;
}

/* Product Card */
.product-card {
    background: var(--color-dark2);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    transition: all var(--transition-base);
}

.product-card:hover {
    border-color: var(--border-cyan);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.product-card__image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--color-dark3);
}

.product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.product-card:hover .product-card__image img {
    transform: scale(1.05);
}

.product-card__overlay {
    position: absolute;
    inset: 0;
    background: var(--media-scrim);
    pointer-events: none;
}

.product-card__body {
    padding: var(--space-lg);
}

.product-card__category {
    font-family: var(--font-label);
    font-size: var(--fs-caption);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-cyan);
    margin-bottom: var(--space-xs);
}

.product-card__name {
    font-size: var(--fs-h5);
    font-weight: var(--fw-semibold);
}

/* ---------- Badges ---------- */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-label);
    font-size: var(--fs-caption);
    font-weight: var(--fw-semibold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    line-height: 1;
}

.badge--cyan {
    background: var(--tint-cyan-soft);
    color: var(--color-cyan);
    border: 1px solid var(--border-cyan);
}

.badge--orange {
    background: var(--tint-orange-soft);
    color: var(--color-orange);
    border: 1px solid var(--tint-orange-border);
}

/* ---------- Stars ---------- */

.stars {
    display: flex;
    gap: 2px;
    color: var(--color-star);
}

.stars svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* ---------- Dividers ---------- */

.divider {
    height: 1px;
    background: var(--border-subtle);
    border: none;
    margin: var(--space-2xl) 0;
}

.divider--gradient {
    background: var(--gradient-cyan-orange);
    height: 2px;
}

/* ---------- Stat Counter ---------- */

.stat {
    text-align: center;
}

.stat__number {
    font-family: var(--font-headline);
    font-size: var(--fs-h2);
    color: var(--color-cyan);
    line-height: 1;
    margin-bottom: var(--space-xs);
}

.stat__label {
    font-family: var(--font-label);
    font-size: var(--fs-label);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-gray);
}

/* ---------- Tooltip ---------- */

[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: var(--color-dark3);
    color: var(--color-white);
    font-size: var(--fs-caption);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition-fast);
    z-index: var(--z-tooltip, 50);
}

[data-tooltip]:hover::after {
    opacity: 1;
}
