/* public/css/main.css — requiere boltek-tokens.css antes */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Evitar que SVG inline herede expansión tipo imagen en flex */
.product-card__cta svg,
.product-card__cta-icon {
    max-width: none;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary-hover);
}

ul {
    list-style: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Utilities */
.btn {
    display: inline-block;
    background-color: var(--color-primary);
    color: var(--color-bg-light);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    text-align: center;
    border: 2px solid var(--color-primary);
    transition: background-color var(--transition-fast), color var(--transition-fast);
    cursor: pointer;
}

.btn:hover {
    background-color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    color: var(--color-bg-light);
}

.btn--outline {
    background-color: transparent;
    color: var(--color-primary);
}

.btn--outline:hover {
    background-color: var(--color-primary);
    color: var(--color-bg-light);
}

.section {
    padding: 4rem 0;
}

.section__title {
    font-size: 2rem;
    font-family: var(--font-heading);
    color: var(--color-primary);
    margin-bottom: 2rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section__title--small {
    font-size: 1.5rem;
    text-align: left;
    margin-bottom: 1rem;
    margin-top: 2rem;
}

/* Header Component — fondo claro industrial */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-height);
    background: var(--header-bg);
    border-bottom: 1px solid var(--header-border);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
    transition:
        background var(--transition-smooth),
        box-shadow var(--transition-smooth),
        border-color var(--transition-smooth);
}

.header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(227, 24, 55, 0.28) 20%,
        rgba(0, 70, 127, 0.4) 50%,
        rgba(227, 24, 55, 0.28) 80%,
        transparent 100%
    );
    opacity: 0.9;
    pointer-events: none;
}

.header--scrolled {
    background: var(--header-bg-scrolled);
    border-bottom-color: var(--header-border);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.main-content {
    padding-top: var(--header-height);
}

.header__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Logo header: sin caja/cápsula; imagen sobre el fondo claro */
.header__logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    transition: opacity var(--transition-fast);
}

.header__logo-link:hover {
    transform: none;
    box-shadow: none;
    opacity: 0.88;
}

.header__logo-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.header__logo-wrap img,
.header__logo-link img {
    height: 2.15rem;
    width: auto;
    max-width: 10rem;
    object-fit: contain;
    filter: none;
    display: block;
    background: transparent;
}

/* Recuadro blanco solo en tarjetas de marca del home (no header/footer) */
.boltek-logo-plate {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.75rem;
    background: #ffffff;
    border: none;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.boltek-logo-plate img {
    height: 2rem;
    width: auto;
    max-width: 9.5rem;
    object-fit: contain;
    filter: none;
    display: block;
}

.header__nav {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.header__menu {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.header__link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 500;
    font-size: 0.875rem;
    letter-spacing: 0.01em;
    text-transform: none;
    color: var(--header-link);
    padding: 0.5rem 0.85rem;
    border-radius: 8px;
    transition:
        color var(--transition-fast),
        background var(--transition-fast),
        box-shadow var(--transition-fast);
}

.header__link:hover {
    color: var(--color-primary);
    background: var(--header-accent);
}

.header__link.active {
    color: var(--color-primary);
    background: var(--header-accent);
    box-shadow: inset 0 0 0 1px rgba(0, 70, 127, 0.12);
    font-weight: 600;
}

.header__link--has-caret::after {
    content: "";
    width: 0;
    height: 0;
    margin-top: 2px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    opacity: 0.7;
    transition: transform var(--transition-fast);
}

.header__item--dropdown:hover .header__link--has-caret::after {
    transform: rotate(180deg);
}

.header__item--dropdown {
    position: relative;
}

.header__submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 260px;
    max-height: 70vh;
    overflow-y: auto;
    margin: 0;
    padding: 0.65rem 0.5rem 0.5rem;
    background: #ffffff;
    border: 1px solid var(--header-border);
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
    z-index: 101;
}

/* Puente hover: cubre el espacio entre el botón y el panel */
.header__submenu::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -14px;
    height: 14px;
}

.header__item--dropdown:hover .header__submenu,
.header__item--dropdown:focus-within .header__submenu,
.header__item--dropdown.is-open .header__submenu {
    display: block;
}

.header__sublink {
    display: block;
    padding: 0.55rem 0.85rem;
    color: var(--header-link);
    font-size: 0.85rem;
    border-radius: 8px;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.header__sublink:hover {
    background: var(--header-accent);
    color: var(--color-primary);
}

.header__menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    background: transparent;
    border: 1px solid var(--header-border);
    border-radius: 10px;
    cursor: pointer;
    padding: 0;
    transition: background var(--transition-fast), border-color var(--transition-fast);
}

.header__menu-toggle:hover {
    background: var(--header-accent);
    border-color: rgba(0, 70, 127, 0.22);
}

.header__menu-icon {
    display: block;
    width: 1.25rem;
    height: 2px;
    background: var(--header-link);
    border-radius: 1px;
    position: relative;
    transition: background var(--transition-fast);
}

.header__menu-icon::before,
.header__menu-icon::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--header-link);
    border-radius: 1px;
    transition: transform var(--transition-smooth), top var(--transition-smooth);
}

.header__menu-icon::before { top: -7px; }
.header__menu-icon::after { top: 7px; }

.header__menu-toggle[aria-expanded="true"] .header__menu-icon {
    background: transparent;
}

.header__menu-toggle[aria-expanded="true"] .header__menu-icon::before {
    top: 0;
    transform: rotate(45deg);
}

.header__menu-toggle[aria-expanded="true"] .header__menu-icon::after {
    top: 0;
    transform: rotate(-45deg);
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('/public/img/hero-bg-placeholder.png') center/cover;
    height: 60vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--color-bg-light);
}

.hero__title {
    font-size: 3rem;
    font-family: var(--font-heading);
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.hero__subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Brands Grid */
.brands__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

@media (max-width: 900px) {
    .brands__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .brands__grid {
        grid-template-columns: 1fr;
    }
}

.brand-card {
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.brand-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    border-color: var(--color-primary);
    color: inherit;
}

.brand-card__logo-area {
    width: 100%;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.25rem;
}

.brand-card__logo-img {
    max-height: 90px;
    max-width: 100%;
    object-fit: contain;
}

.brand-logo-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--color-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-bg-light);
    line-height: 1.2;
    text-align: center;
}

.brand-card__img {
    height: 100px;
    width: 100%;
    object-fit: contain;
    margin: 0 auto 1rem;
    padding: 0.5rem;
}

.brand-card__title {
    font-size: 1.25rem;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

/* Categories Grid */
.categories__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.category-card {
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    padding: 1.5rem;
    text-align: center;
    border-radius: var(--border-radius);
    border-bottom: 3px solid var(--color-primary);
}

.category-card:hover {
    background: var(--color-primary);
    color: var(--color-bg-light);
}

.category-card:hover .category-card__title {
    color: var(--color-bg-light);
}

.category-card__title {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--color-text);
}

/* Page Layout */
.page-content {
    padding: 2rem 1.5rem;
    min-height: 60vh;
}

.page-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 1rem;
}

.page-title {
    font-size: 2.5rem;
    color: var(--color-primary);
}

.breadcrumb {
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.breadcrumb li:not(:last-child)::after {
    content: '/';
    margin-left: 0.5rem;
    color: var(--color-text-light);
}

/* Product cards / grid → boltek-ui.css */

/* Product Detail */
.product-detail {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 2rem;
}

@media (min-width: 768px) {
    .product-detail {
        grid-template-columns: 1fr 1fr;
    }
}

.product-detail__img {
    width: 100%;
    height: auto;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
}

.product-detail__brand {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-secondary);
    font-weight: 700;
}

.product-detail__title {
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.product-detail__desc {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--color-text-light);
}

/* Tables */
.table-specs {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}

.table-specs th, .table-specs td {
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
}

.table-specs th {
    background-color: var(--color-bg);
    width: 40%;
    text-align: left;
    color: var(--color-text);
}

/* Downloads */
.download-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.download-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    color: var(--color-text);
    font-weight: 500;
}

.download-link:hover {
    background: var(--color-primary);
    color: var(--color-bg-light);
    border-color: var(--color-primary);
}

/* Footer corporativo — franja oscura + zona clara (logo original) + copyright */
.footer {
    background-color: var(--footer-bg, #f7f8fa);
    color: var(--footer-text, #3f3f46);
    padding: 0;
    border-top: none;
    box-shadow: none;
    margin-top: 0;
}

.footer__band {
    background: var(--footer-band-bg, #161616);
    color: rgba(255, 255, 255, 0.78);
    padding: 1.65rem 0;
}

.footer__band-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem 2.5rem;
    flex-wrap: wrap;
}

.footer__band-copy {
    flex: 1 1 18rem;
    min-width: 0;
}

.footer__band-title {
    margin: 0 0 0.35rem;
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.35;
}

.footer__band-text {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.68);
    max-width: 36rem;
}

.footer__band-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.65rem 1.45rem;
    background: var(--boltek-orange, #F26122);
    border: 1px solid var(--boltek-orange, #F26122);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    text-decoration: none;
    border-radius: 4px;
    flex: 0 0 auto;
    transition: background-color 0.22s ease, border-color 0.22s ease, color 0.22s ease;
}

.footer__band-btn:hover,
.footer a.footer__band-btn:hover {
    background: #ffffff;
    border-color: #ffffff;
    color: #161616;
}

.footer__main {
    background: var(--footer-bg, #f7f8fa);
}

.footer__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3.75rem 1.5rem 3.25rem;
    display: grid;
    grid-template-columns: 1.3fr 0.8fr 1fr;
    gap: 3rem 4.5rem;
    align-items: start;
}

.footer__column {
    min-width: 0;
}

.footer__title {
    position: relative;
    color: var(--footer-title, #111111);
    font-size: 0.75rem;
    font-weight: 700;
    margin: 0 0 1.35rem;
    padding: 0 0 0.85rem;
    border-bottom: none;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    line-height: 1.4;
}

.footer__title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 32px;
    height: 2px;
    background: var(--boltek-orange, #F26122);
}

.footer__logo {
    max-width: 172px;
    width: auto;
    height: auto;
    margin: 0 0 1.5rem;
    display: block;
    background: transparent;
    padding: 0;
    box-shadow: none;
    border: none;
    filter: none;
    object-fit: contain;
}

.footer__list {
    margin: 0;
    padding: 0;
}

.footer__list li {
    margin: 0;
}

.footer__list a {
    display: inline-flex;
    align-items: center;
    min-height: 2.5rem;
    color: var(--footer-link, #27272a);
    transition: color 0.2s ease;
}

.footer__list a:hover {
    color: var(--boltek-orange, #F26122);
}

.footer__column--brand > p {
    max-width: 34rem;
}

.footer__column p,
.footer__email {
    margin: 0 0 1.1rem;
    line-height: 1.7;
    color: var(--footer-text, #3f3f46);
    font-size: 0.9375rem;
}

.footer__column p:last-of-type {
    margin-bottom: 0;
}

.footer__email {
    margin-bottom: 0;
}

.footer a {
    color: var(--footer-link, #27272a);
}

.footer a:hover {
    color: var(--boltek-orange, #F26122);
}

.footer__cta.btn,
.footer a.footer__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 1.35rem;
    min-height: 44px;
    background-color: var(--boltek-orange, #F26122);
    border: 1px solid var(--boltek-orange, #F26122);
    color: #ffffff;
    font-weight: 600;
    letter-spacing: 0.01em;
    padding: 0.7rem 1.4rem;
    box-shadow: none;
    border-radius: 4px;
    transition: background-color 0.22s ease, border-color 0.22s ease, color 0.22s ease;
}

.footer__cta.btn:hover,
.footer a.footer__cta:hover {
    background-color: #111111;
    border-color: #111111;
    color: #ffffff;
}

.footer__bottom {
    background-color: var(--footer-bottom-bg, #161616);
    text-align: center;
    padding: 1rem 1.5rem;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--footer-bottom-text, rgba(255, 255, 255, 0.70));
    border-top: none;
}

.footer__bottom a {
    color: rgba(255, 255, 255, 0.70);
}

.footer__bottom a:hover {
    color: var(--boltek-orange, #F26122);
}

/* Responsive */
@media (max-width: 768px) {
    :root {
        --header-height: 4.25rem;
    }

    .header__container {
        padding: 0 1rem;
    }

    .boltek-logo-plate {
        padding: 0.3rem 0.55rem;
    }

    .boltek-logo-plate img {
        height: 1.65rem;
        max-width: 7.5rem;
    }

    .header__logo-wrap img,
    .header__logo-link img {
        height: 1.75rem;
        max-width: 8rem;
    }

    .header__nav {
        position: static;
    }

    .header {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .header__menu {
        display: none;
        position: fixed;
        top: calc(var(--header-height) + var(--safe-top, 0px));
        left: 0;
        right: 0;
        bottom: auto;
        height: calc(100dvh - var(--header-height) - var(--safe-top, 0px));
        max-height: calc(100dvh - var(--header-height) - var(--safe-top, 0px));
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
        padding: 1rem 1rem calc(1.25rem + var(--safe-bottom, 0px));
        background: #f7f8fa;
        border-top: 1px solid var(--header-border);
        box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        z-index: 1001;
    }

    @supports not (height: 100dvh) {
        .header__menu {
            height: calc(100vh - var(--header-height) - var(--safe-top, 0px));
            max-height: calc(100vh - var(--header-height) - var(--safe-top, 0px));
        }
    }

    .header__menu.is-open {
        display: flex;
    }

    .header__menu-toggle {
        display: inline-flex;
    }

    .header__link {
        width: 100%;
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }

    .header__item--dropdown:hover .header__submenu,
    .header__item--dropdown:focus-within .header__submenu,
    .header__item--dropdown.is-open .header__submenu {
        display: none;
    }

    .header__submenu {
        position: static;
        display: none;
        min-width: 0;
        max-height: none;
        margin: 0.25rem 0 0.5rem;
        padding: 0.35rem;
        box-shadow: none;
        border: 1px solid var(--header-border);
        background: #ffffff;
    }

    .header__submenu::before {
        display: none;
    }

    .header__menu.is-open .header__item--dropdown.is-submenu-open .header__submenu {
        display: block;
        max-height: min(45dvh, 280px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
}

body.nav-open {
    overflow: hidden;
}
