/* ==========================================================
   HamflowPumps – Frontend Styles  v2.0
   Aesthetic: Industrial Premium — dark steel, precision cuts,
   sharp typography, confident blue accents.
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;600;700&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,700;1,9..40,300&display=swap');

/* ── TOKENS ─────────────────────────────────────────────── */
:root {
    --hfp-primary:    #0D2137;
    --hfp-secondary:  #1A4A72;
    --hfp-accent:     #1E8BC3;
    --hfp-accent2:    #0FA3B1;
    --hfp-bg-grid:    #EEF3F8;
    --hfp-steel:      #8FA3B4;
    --hfp-border:     #C8D8E8;
    --hfp-white:      #FFFFFF;
    --hfp-card-bg:    #F7FAFE;
    --hfp-text:       #1A2535;
    --hfp-text-muted: #5A6E80;
    --hfp-shadow:     0 4px 24px rgba(13,33,55,.12);
    --hfp-shadow-lg:  0 12px 48px rgba(13,33,55,.18);
    --hfp-radius:     3px;
    --hfp-font-head:  'Rajdhani', 'Oswald', sans-serif;
    --hfp-font-body:  'DM Sans', 'Segoe UI', sans-serif;
}

/* ── RESET ──────────────────────────────────────────────── */
.hfp-grid-wrap *,
.hfp-catalog * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.hfp-grid-wrap,
.hfp-catalog {
    font-family: var(--hfp-font-body);
    color: var(--hfp-text);
    -webkit-font-smoothing: antialiased;
}

/* ════════════════════════════════════════════════════════
   A.  GRID SHORTCODE  [hfp_grid]
   ════════════════════════════════════════════════════════ */

.hfp-grid-wrap {
    background: var(--hfp-bg-grid);
    padding: 56px 24px 64px;
    position: relative;
    overflow: hidden;
}

/* Subtle blueprint grid lines */
.hfp-grid-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(30,139,195,.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(30,139,195,.06) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

.hfp-grid-title {
    position: relative;
    text-align: center;
    font-family: var(--hfp-font-head);
    font-size: clamp(1.6rem, 4vw, 2.6rem);
    font-weight: 700;
    letter-spacing: .08em;
    color: var(--hfp-primary);
    text-transform: uppercase;
    margin-bottom: 8px;
    line-height: 1;
}

/* Accent underline bar */
.hfp-grid-title::after {
    content: '';
    display: block;
    width: 64px;
    height: 3px;
    background: linear-gradient(90deg, var(--hfp-accent), var(--hfp-accent2));
    margin: 12px auto 36px;
}

/* 2 × 2 grid */
.hfp-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    max-width: 760px;
    margin: 0 auto;
    position: relative;
}
@media (max-width: 520px) {
    .hfp-grid { grid-template-columns: 1fr; }
}

.hfp-card {
    display: flex;
    flex-direction: column;
    background: var(--hfp-white);
    border: 1px solid var(--hfp-border);
    text-decoration: none;
    overflow: hidden;
    border-radius: var(--hfp-radius);
    transition: box-shadow .28s ease, transform .28s ease, border-color .2s;
    position: relative;
}

/* Top accent stripe */
.hfp-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--hfp-accent), var(--hfp-accent2));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .3s ease;
}

.hfp-card:hover {
    box-shadow: var(--hfp-shadow-lg);
    transform: translateY(-5px);
    border-color: var(--hfp-accent);
}
.hfp-card:hover::before { transform: scaleX(1); }

.hfp-card__img {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 22px;
    min-height: 190px;
    background: #F0F5FA;
    overflow: hidden;
    position: relative;
}

.hfp-card__img img {
    max-width: 100%;
    max-height: 148px;
    object-fit: contain;
    transition: transform .4s ease;
}
.hfp-card:hover .hfp-card__img img { transform: scale(1.05); }

.hfp-card__img-placeholder {
    color: #B8CCE0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 120px;
}

.hfp-card__label {
    background: var(--hfp-primary);
    color: rgba(255,255,255,.92);
    font-family: var(--hfp-font-head);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .18em;
    text-align: center;
    padding: 12px 10px;
    text-transform: uppercase;
    transition: background .2s;
}
.hfp-card:hover .hfp-card__label {
    background: var(--hfp-secondary);
}

/* CTA */
.hfp-grid-cta { text-align: center; margin-top: 40px; position: relative; }

.hfp-btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 2px solid var(--hfp-primary);
    color: var(--hfp-primary);
    font-family: var(--hfp-font-head);
    font-size: .9rem;
    font-weight: 600;
    letter-spacing: .12em;
    padding: 13px 42px;
    text-decoration: none;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    transition: color .25s, border-color .25s;
}
.hfp-btn-outline::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--hfp-primary);
    transform: translateY(100%);
    transition: transform .25s ease;
    z-index: 0;
}
.hfp-btn-outline span { position: relative; z-index: 1; }
.hfp-btn-outline:hover { color: #fff; }
.hfp-btn-outline:hover::before { transform: translateY(0); }

/* ════════════════════════════════════════════════════════
   B.  CATALOG PAGE  [hfp_catalogo]
   ════════════════════════════════════════════════════════ */

/* ── HERO ──────────────────────────────────────────────── */
.hfp-hero {
    position: relative;
    height: 180px;
    background-color: var(--hfp-primary);
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.hfp-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(5,12,24,.92) 0%,
        rgba(16,50,90,.75) 60%,
        rgba(30,139,195,.3) 100%
    );
}

/* Blueprint lines on hero */
.hfp-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
}

.hfp-hero__inner {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    text-align: center;
}

.hfp-hero__title {
    font-family: var(--hfp-font-head);
    font-size: clamp(1.3rem, 3.5vw, 2.1rem);
    font-weight: 700;
    letter-spacing: .12em;
    color: #fff;
    text-transform: uppercase;
    line-height: 1;
}

.hfp-hero__sub {
    font-size: .78rem;
    color: rgba(255,255,255,.6);
    letter-spacing: .28em;
    margin-top: 8px;
    text-transform: uppercase;
    font-weight: 300;
}

/* Diagonal accent cut at bottom */
.hfp-hero-cut {
    height: 28px;
    background: var(--hfp-bg-grid);
    clip-path: polygon(0 100%, 100% 0, 100% 100%);
    margin-top: -1px;
}

/* ── LAYOUT ────────────────────────────────────────────── */
.hfp-layout {
    display: flex;
    align-items: flex-start;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 60px;
    background: var(--hfp-bg-grid);
}
@media (max-width: 768px) {
    .hfp-layout { flex-direction: column; }
}

/* ── SIDEBAR ───────────────────────────────────────────── */
.hfp-sidebar {
    flex: 0 0 230px;
    min-width: 230px;
    background: var(--hfp-white);
    border-right: 1px solid var(--hfp-border);
    padding-bottom: 20px;
    position: sticky;
    top: 32px;
}
@media (max-width: 768px) {
    .hfp-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--hfp-border);
        position: static;
    }
}

.hfp-sb-item { border-bottom: 1px solid #EEF3F8; }

.hfp-sb-btn {
    width: 100%;
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 13px 16px 13px 18px;
    font-family: var(--hfp-font-body);
    font-size: .82rem;
    font-weight: 500;
    color: var(--hfp-text-muted);
    text-align: left;
    cursor: pointer;
    transition: background .15s, color .15s, padding-left .15s;
    position: relative;
}

.hfp-sb-btn::before {
    content: '';
    position: absolute;
    left: 0; top: 20%; bottom: 20%;
    width: 3px;
    background: var(--hfp-accent);
    transform: scaleY(0);
    transition: transform .2s;
    border-radius: 0 2px 2px 0;
}

.hfp-sb-btn:hover {
    background: #F0F7FF;
    color: var(--hfp-secondary);
    padding-left: 22px;
}
.hfp-sb-btn:hover::before { transform: scaleY(1); }

.hfp-sb-item.is-active > .hfp-sb-btn {
    background: #EBF4FF;
    color: var(--hfp-secondary);
    font-weight: 700;
    padding-left: 22px;
}
.hfp-sb-item.is-active > .hfp-sb-btn::before { transform: scaleY(1); }

.hfp-sb-btn span { flex: 1; line-height: 1.3; }

.hfp-sb-arrow {
    flex-shrink: 0;
    color: var(--hfp-steel);
    transition: transform .25s ease;
}
.hfp-sb-item.is-active .hfp-sb-arrow { transform: rotate(180deg); }

.hfp-sb-sub          { display: none; background: #F7FAFE; }
.hfp-sb-sub.is-open  { display: block; }

.hfp-sb-sub__link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px 8px 28px;
    font-family: var(--hfp-font-body);
    font-size: .78rem;
    color: var(--hfp-text-muted);
    text-decoration: none;
    transition: background .15s, color .15s;
    border-left: 2px solid transparent;
}
.hfp-sb-sub__link::before {
    content: '—';
    font-size: .65rem;
    opacity: .4;
}
.hfp-sb-sub__link:hover,
.hfp-sb-sub__link.is-active {
    background: #E0EEF8;
    color: var(--hfp-secondary);
    border-left-color: var(--hfp-accent);
    font-weight: 600;
}

/* Download buttons */
.hfp-sb-dl {
    padding: 16px 14px 4px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hfp-sb-dl__btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--hfp-primary);
    color: rgba(255,255,255,.88);
    font-family: var(--hfp-font-head);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .1em;
    padding: 10px 14px;
    text-decoration: none;
    text-transform: uppercase;
    border-radius: var(--hfp-radius);
    transition: background .2s, transform .15s;
    border-left: 3px solid var(--hfp-accent);
}
.hfp-sb-dl__btn:hover {
    background: var(--hfp-secondary);
    color: #fff;
    transform: translateX(2px);
}

.hfp-sb-dl__icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    background: rgba(255,255,255,.12);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
}

/* ── CONTENT AREA ──────────────────────────────────────── */
.hfp-content {
    flex: 1;
    min-width: 0;
    padding: 36px 40px 24px;
    background: var(--hfp-bg-grid);
    min-height: 500px;
}
@media (max-width: 768px) {
    .hfp-content { padding: 24px 16px; }
}

/* Spinner */
.hfp-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    min-height: 200px;
    color: var(--hfp-steel);
    font-size: .82rem;
    letter-spacing: .08em;
    font-family: var(--hfp-font-head);
    text-transform: uppercase;
}
.hfp-loading::before {
    content: '';
    width: 36px; height: 36px;
    border: 3px solid var(--hfp-border);
    border-top-color: var(--hfp-accent);
    border-radius: 50%;
    animation: hfpSpin .65s linear infinite;
}
@keyframes hfpSpin { to { transform: rotate(360deg); } }

/* Fade-in */
@keyframes hfpFade {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}
.hfp-content > * { animation: hfpFade .32s ease both; }

/* ════════════════════════════════════════════════════════
   C.  CATEGORY VIEW
   ════════════════════════════════════════════════════════ */

.hfp-view-cat__header {
    margin-bottom: 28px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--hfp-border);
    position: relative;
}

.hfp-view-cat__header::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 0;
    width: 56px; height: 2px;
    background: linear-gradient(90deg, var(--hfp-accent), var(--hfp-accent2));
}

.hfp-view-cat__title {
    font-family: var(--hfp-font-head);
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 700;
    letter-spacing: .08em;
    color: var(--hfp-primary);
    text-transform: uppercase;
    line-height: 1.1;
    margin-bottom: 10px;
}

.hfp-view-cat__desc {
    font-size: .87rem;
    color: var(--hfp-text-muted);
    line-height: 1.7;
    max-width: 620px;
}

/* Products grid */
.hfp-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.hfp-prod-card {
    background: var(--hfp-white);
    border: 1px solid var(--hfp-border);
    overflow: hidden;
    border-radius: var(--hfp-radius);
    display: flex;
    flex-direction: column;
    transition: box-shadow .26s, transform .26s, border-color .2s;
    position: relative;
}

.hfp-prod-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--hfp-accent), var(--hfp-accent2));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .3s ease;
}

.hfp-prod-card:hover {
    box-shadow: var(--hfp-shadow-lg);
    transform: translateY(-4px);
    border-color: rgba(30,139,195,.35);
}
.hfp-prod-card:hover::after { transform: scaleX(1); }

.hfp-prod-card__img {
    background: #F0F5FA;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    min-height: 170px;
    overflow: hidden;
}
.hfp-prod-card__img img {
    max-width: 100%;
    max-height: 130px;
    object-fit: contain;
    transition: transform .4s ease;
}
.hfp-prod-card:hover .hfp-prod-card__img img { transform: scale(1.06); }

.hfp-prod-card__placeholder {
    color: #B8CCE0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 110px;
}

.hfp-prod-card__body {
    background: var(--hfp-primary);
    color: #fff;
    padding: 14px 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    position: relative;
    overflow: hidden;
}

/* Subtle diagonal texture on card body */
.hfp-prod-card__body::before {
    content: '';
    position: absolute;
    top: -20px; right: -20px;
    width: 80px; height: 80px;
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 50%;
    pointer-events: none;
}

.hfp-prod-card__name {
    font-family: var(--hfp-font-head);
    font-size: .98rem;
    font-weight: 600;
    letter-spacing: .05em;
    line-height: 1.2;
}
.hfp-prod-card__sub {
    font-size: .75rem;
    color: rgba(255,255,255,.68);
    line-height: 1.45;
}
.hfp-prod-card__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    font-family: var(--hfp-font-head);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .14em;
    color: var(--hfp-accent2);
    text-decoration: none;
    text-transform: uppercase;
    align-self: flex-start;
    transition: gap .15s, color .15s;
}
.hfp-prod-card__link::after { content: '→'; }
.hfp-prod-card:hover .hfp-prod-card__link { gap: 10px; color: #fff; }

/* ════════════════════════════════════════════════════════
   D.  PRODUCT DETAIL VIEW
   ════════════════════════════════════════════════════════ */

.hfp-view-prod__header {
    margin-bottom: 28px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--hfp-border);
    position: relative;
}
.hfp-view-prod__header::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 0;
    width: 56px; height: 2px;
    background: linear-gradient(90deg, var(--hfp-accent), var(--hfp-accent2));
}

.hfp-view-prod__title {
    font-family: var(--hfp-font-head);
    font-size: clamp(1.5rem, 3.5vw, 2.2rem);
    font-weight: 700;
    letter-spacing: .08em;
    color: var(--hfp-primary);
    text-transform: uppercase;
    line-height: 1;
}

.hfp-view-prod__layout {
    display: flex;
    gap: 44px;
    align-items: flex-start;
}
@media (max-width: 860px) {
    .hfp-view-prod__layout { flex-direction: column-reverse; gap: 24px; }
}

.hfp-view-prod__text  { flex: 1; min-width: 0; }

.hfp-view-prod__image {
    flex: 0 0 310px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: var(--hfp-white);
    border: 1px solid var(--hfp-border);
    border-radius: var(--hfp-radius);
    padding: 28px;
    position: relative;
    overflow: hidden;
}

/* Corner accents */
.hfp-view-prod__image::before,
.hfp-view-prod__image::after {
    content: '';
    position: absolute;
    width: 20px; height: 20px;
    border-color: var(--hfp-accent);
    border-style: solid;
}
.hfp-view-prod__image::before {
    top: 8px; left: 8px;
    border-width: 2px 0 0 2px;
}
.hfp-view-prod__image::after {
    bottom: 8px; right: 8px;
    border-width: 0 2px 2px 0;
}

.hfp-view-prod__image img {
    max-width: 100%;
    max-height: 280px;
    object-fit: contain;
    position: relative;
    z-index: 1;
}
.hfp-view-prod__placeholder {
    color: #B8CCE0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 200px;
}
@media (max-width: 860px) {
    .hfp-view-prod__image { flex: none; width: 100%; }
}

/* Sections */
.hfp-section { margin-bottom: 22px; }

.hfp-section__heading {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--hfp-font-head);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .18em;
    color: var(--hfp-secondary);
    text-transform: uppercase;
    margin-bottom: 10px;
}
.hfp-section__heading::before {
    content: '';
    display: inline-block;
    width: 18px; height: 2px;
    background: linear-gradient(90deg, var(--hfp-accent), var(--hfp-accent2));
    flex-shrink: 0;
}

.hfp-section__sub {
    font-family: var(--hfp-font-head);
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .1em;
    color: var(--hfp-primary);
    text-transform: uppercase;
    margin-bottom: 5px;
}

.hfp-section p {
    font-size: .87rem;
    color: var(--hfp-text-muted);
    line-height: 1.7;
    margin-bottom: 10px;
}

/* Specs grid */
.hfp-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
}

.hfp-spec {
    background: var(--hfp-white);
    border: 1px solid var(--hfp-border);
    border-left: 3px solid var(--hfp-accent);
    padding: 9px 16px;
    border-radius: 0 var(--hfp-radius) var(--hfp-radius) 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 110px;
}
.hfp-spec__label {
    font-family: var(--hfp-font-head);
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--hfp-accent);
}
.hfp-spec__value {
    font-size: .86rem;
    color: var(--hfp-text);
    font-weight: 600;
}

/* CTA button */
.hfp-section__cta { margin-top: 28px; }

.hfp-btn-solid {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--hfp-primary);
    color: #fff;
    font-family: var(--hfp-font-head);
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    padding: 13px 32px;
    text-decoration: none;
    border-radius: var(--hfp-radius);
    position: relative;
    overflow: hidden;
    transition: color .25s;
}
.hfp-btn-solid::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--hfp-accent), var(--hfp-accent2));
    transform: translateX(-100%);
    transition: transform .3s ease;
    z-index: 0;
}
.hfp-btn-solid span,
.hfp-btn-solid:not(.no-wrap) { position: relative; z-index: 1; }
.hfp-btn-solid:hover::before { transform: translateX(0); }
.hfp-btn-solid:hover { color: #fff; }

/* ── ACCESSIBILITY ─────────────────────────────────────── */
.hfp-sb-btn:focus-visible,
.hfp-sb-sub__link:focus-visible,
.hfp-card:focus-visible,
.hfp-prod-card__link:focus-visible,
.hfp-btn-outline:focus-visible,
.hfp-btn-solid:focus-visible,
.hfp-sb-dl__btn:focus-visible {
    outline: 3px solid var(--hfp-accent);
    outline-offset: 2px;
}
