/**
 * Products Page Styles
 * HB Power Tower - Kadence Child Theme
 */

/* ============================================================
   PAGE HEADER
   ============================================================ */
.hw-products-hero {
    background: var(--hw-navy);
    padding: var(--space-16) 0 var(--space-12);
    text-align: center;
}

.hw-products-hero h1 {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2rem, 4vw, var(--text-5xl));
    color: var(--hw-white);
    margin-bottom: var(--space-4);
}

.hw-products-hero p {
    font-size: var(--text-lg);
    color: var(--hw-gray-300);
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================================
   PRODUCTS PAGE
   HB Power Tower - Kadence Child Theme
   ============================================================ */

/* ============================================================
   TAILWIND PRODUCT GRID - Container fix
   ============================================================ */
/* The Tailwind sections use max-w-6xl (72rem = 1152px), ensure centering */
section .max-w-6xl {
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100%;
    max-width: 72rem;
}

/* Section backgrounds extend full-width, content is constrained */
section.bg-slate-50,
section.bg-slate-900,
section.bg-\[\#0F172A\],
section.bg-\[\#F5F7FA\] {
    width: 100%;
}
.hw-products-grid {
    padding: var(--space-16) 0;
    background: var(--hw-gray-50);
}

.hw-products-grid .kt-row-column-wrap {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 var(--space-6);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-8);
}

/* ============================================================
   TAILWIND PRODUCT CARDS - INJECT REAL IMAGES
   Override the gradient placeholders with optimized tower images
   ============================================================ */

/* Cathead Tower card */
a[href*="/cathead-tower/"] > div.h-52 {
    background: url('/wp-content/uploads/tower-images/cathead-01.jpg') center/cover no-repeat !important;
    aspect-ratio: 4 / 3 !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    width: 100% !important;
}

/* Wine Glass Tower card */
a[href*="/wine-glass-tower/"] > div.h-52 {
    background: url('/wp-content/uploads/tower-images/wineglass.jpg') center/cover no-repeat !important;
    aspect-ratio: 4 / 3 !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    width: 100% !important;
}

/* Monopole Tower card */
a[href*="/monopole-tower/"] > div.h-52 {
    background: url('/wp-content/uploads/tower-images/monopole-01.jpg') center/cover no-repeat !important;
    aspect-ratio: 4 / 3 !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    width: 100% !important;
}

/* Lattice Tower card */
a[href*="/lattice-tower/"] > div.h-52 {
    background: url('/wp-content/uploads/tower-images/lattice-01.jpg') center/cover no-repeat !important;
    aspect-ratio: 4 / 3 !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    width: 100% !important;
}

/* Hide the giant text placeholder character */
a[href*="/cathead-tower/"] > div.h-52 > div.text-7xl,
a[href*="/wine-glass-tower/"] > div.h-52 > div.text-7xl,
a[href*="/monopole-tower/"] > div.h-52 > div.text-7xl,
a[href*="/lattice-tower/"] > div.h-52 > div.text-7xl {
    display: none !important;
}

/* Card hover effect - subtle scale on image */
a[href*="/cathead-tower/"]:hover > div.h-52,
a[href*="/wine-glass-tower/"]:hover > div.h-52,
a[href*="/monopole-tower/"]:hover > div.h-52,
a[href*="/lattice-tower/"]:hover > div.h-52 {
    transform: scale(1.03);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Subtle gradient overlay for better text contrast */
a[href*="/cathead-tower/"] > div.h-52::after,
a[href*="/wine-glass-tower/"] > div.h-52::after,
a[href*="/monopole-tower/"] > div.h-52::after,
a[href*="/lattice-tower/"] > div.h-52::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15,23,42,0.7) 0%, rgba(15,23,42,0.2) 50%, transparent 100%);
    pointer-events: none;
}

/* Product card */
.hw-product-item {
    background: var(--hw-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--duration-base) var(--ease-out-quart);
}

.hw-product-item:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-6px);
}

.hw-product-item-image {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--hw-gray-100);
}

.hw-product-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--duration-slow) var(--ease-out-quart);
}

.hw-product-item:hover .hw-product-item-image img {
    transform: scale(1.06);
}

.hw-product-item-voltage {
    position: absolute;
    top: var(--space-4);
    left: var(--space-4);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--hw-white);
    background: var(--hw-navy);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
}

.hw-product-item-body {
    padding: var(--space-6);
}

.hw-product-item-icon {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-3);
    display: block;
}

.hw-product-item-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--text-xl);
    color: var(--hw-navy);
    margin-bottom: var(--space-3);
}

.hw-product-item-desc {
    font-size: var(--text-sm);
    color: var(--hw-gray-600);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-5);
}

.hw-product-item-specs {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-5);
}

.hw-product-item-spec {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--hw-gray-600);
    background: var(--hw-gray-50);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
}

.hw-product-item-cta {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: var(--text-sm);
    color: var(--hw-orange);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    transition: gap var(--duration-fast) var(--ease-out-quart);
}

.hw-product-item-cta:hover {
    gap: var(--space-3);
    color: var(--hw-orange-hover);
}

/* ============================================================
   COMPARISON MATRIX
   ============================================================ */
.hw-compare-section {
    padding: var(--space-16) 0;
    background: var(--hw-white);
}

.hw-compare-section .hw-compare-wrap {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.hw-compare-section h2 {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(1.5rem, 3vw, var(--text-3xl));
    color: var(--hw-navy);
    margin-bottom: var(--space-3);
}

.hw-compare-section .hw-compare-sub {
    font-size: var(--text-base);
    color: var(--hw-gray-500);
    margin-bottom: var(--space-8);
    max-width: 600px;
}

/* Override table styles for products page */
.hw-compare-section .hw-compare-matrix {
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid var(--hw-gray-200);
}

.hw-compare-section .hw-compare-matrix thead {
    background: var(--hw-navy);
}

.hw-compare-section .hw-compare-matrix thead th {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--text-sm);
    color: var(--hw-white);
    padding: var(--space-4) var(--space-5);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    border-right: 1px solid oklch(1 0 0 / 0.1);
}

.hw-compare-section .hw-compare-matrix thead th:last-child {
    border-right: none;
}

.hw-compare-section .hw-compare-matrix tbody td {
    font-size: var(--text-sm);
    color: var(--hw-gray-700);
    padding: var(--space-3) var(--space-5);
    border-bottom: 1px solid var(--hw-gray-100);
}

.hw-compare-section .hw-compare-matrix tbody tr:last-child td {
    border-bottom: none;
}

.hw-compare-section .hw-compare-matrix tbody td:first-child {
    font-weight: 600;
    color: var(--hw-navy);
    background: var(--hw-gray-50);
}

.hw-compare-section .hw-compare-matrix tbody tr:hover td {
    background: oklch(0.65 0.15 50 / 0.06);
}

/* ============================================================
   FORM CONTAINER - MAX-WIDTH
   Prevent form stretching on wide screens
   ============================================================ */
#inquiry .max-w-3xl {
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
}

#inquiry .max-w-xl {
    max-width: 36rem;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================================
   INQUIRY SECTION - LIGHT BACKGROUND
   Override Tailwind dark bg-slate-900 to clean light theme
   ============================================================ */
/* Switch section to light background */
#inquiry.bg-slate-900 {
    background: var(--hw-gray-50) !important;
    color: var(--hw-gray-800) !important;
    border-top-color: var(--hw-gray-200) !important;
}

/* Heading from text-orange-400 to navy */
#inquiry h2.text-orange-400 {
    color: var(--hw-navy) !important;
}

/* Subtitle from text-slate-400 to readable gray */
#inquiry .text-slate-400 {
    color: var(--hw-gray-500) !important;
}

/* Form card from bg-slate-950 to white */
#inquiry .bg-slate-950 {
    background: var(--hw-white) !important;
    border-color: var(--hw-gray-200) !important;
}

/* FluentForm on light background - clean defaults */
#inquiry .fluentform_wrapper label,
#inquiry .fluentform_wrapper .ff-el-input--label label,
#inquiry .fluentform_wrapper .ff-el-input--label,
#inquiry .fluentform_wrapper .ff-el-is-required {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    color: var(--hw-gray-800) !important;
}

/* Inputs - clean white with visible borders */
#inquiry .fluentform_wrapper .ff-el-form-control,
#inquiry .fluentform_wrapper input[type="text"],
#inquiry .fluentform_wrapper input[type="email"],
#inquiry .fluentform_wrapper input[type="tel"],
#inquiry .fluentform_wrapper input[type="number"],
#inquiry .fluentform_wrapper input[type="url"],
#inquiry .fluentform_wrapper select,
#inquiry .fluentform_wrapper textarea {
    border: 1.5px solid var(--hw-gray-300) !important;
    border-radius: 0.5rem !important;
    padding: 0.75rem 1rem !important;
    font-size: 1rem !important;
    background: var(--hw-white) !important;
    transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Focus state - orange ring */
#inquiry .fluentform_wrapper .ff-el-form-control:focus,
#inquiry .fluentform_wrapper input:focus,
#inquiry .fluentform_wrapper select:focus,
#inquiry .fluentform_wrapper textarea:focus {
    border-color: var(--hw-orange) !important;
    box-shadow: 0 0 0 3px oklch(0.65 0.15 50 / 0.15) !important;
    outline: none !important;
}

/* Submit button */
#inquiry .fluentform_wrapper .ff-btn-submit,
#inquiry .fluentform_wrapper button.ff-btn-submit,
#inquiry .fluentform_wrapper input[type="submit"] {
    background: var(--hw-orange) !important;
    color: var(--hw-white) !important;
    font-family: var(--font-display);
    font-weight: 700 !important;
    font-size: 0.9rem !important;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.875rem 2rem !important;
    border: none !important;
    border-radius: 0.5rem !important;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.25, 1, 0.5, 1);
    width: 100%;
}

#inquiry .fluentform_wrapper .ff-btn-submit:hover,
#inquiry .fluentform_wrapper button.ff-btn-submit:hover,
#inquiry .fluentform_wrapper input[type="submit"]:hover {
    background: var(--hw-orange-hover) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px oklch(0.65 0.15 50 / 0.3);
}

/* Required asterisk */
#inquiry .fluentform_wrapper .ff-el-is-required.asterisk-right:after {
    color: var(--hw-error);
}

/* Success/error messages */
#inquiry .fluentform_wrapper .ff-message-success,
#inquiry .fluentform_wrapper .ff-message-error {
    border-radius: 0.5rem;
    padding: 1rem;
}

/* ============================================================
   TAILWIND GRID - RESPONSIVE COLUMN OVERRIDES
   Override md:grid-cols-2 to show more columns on larger screens
   ============================================================ */
/* Large screens: 3 columns */
@media (min-width: 1024px) {
    section.bg-slate-50 .grid.grid-cols-1.md\:grid-cols-2 {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}
/* Extra large screens: 4 columns - all products in one row */
@media (min-width: 1280px) {
    section.bg-slate-50 .grid.grid-cols-1.md\:grid-cols-2 {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }
}

/* ============================================================
   CARD ENHANCEMENTS
   Stronger hover effects, better visual hierarchy
   ============================================================ */
/* Voltage badge enhancement */
section.bg-slate-50 .grid a[href*="-tower"] .absolute.bottom-4.left-4 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    font-size: 0.65rem;
    padding: 0.25rem 0.65rem;
    background: var(--hw-orange) !important;
}

/* Card title - larger, more prominent */
section.bg-slate-50 .grid a[href*="-tower"] h3 {
    font-family: var(--font-display);
    font-size: 1.15rem !important;
    letter-spacing: var(--tracking-wide);
    margin-bottom: 0.375rem;
}

/* Card description - tighter, cleaner */
section.bg-slate-50 .grid a[href*="-tower"] p.text-sm.text-slate-600 {
    line-height: 1.5;
    margin-bottom: 0;
}

/* CTA button - stronger, with arrow */
section.bg-slate-50 .grid a[href*="-tower"] .inline-flex.items-center {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Hover lift for entire card */
section.bg-slate-50 .grid a[href*="-tower"] {
    will-change: transform;
}

section.bg-slate-50 .grid a[href*="-tower"]:hover {
    transform: translateY(-4px);
    border-color: var(--hw-orange) !important;
    box-shadow: 0 12px 24px oklch(0 0 0 / 0.1), 0 4px 8px oklch(0 0 0 / 0.06);
}

/* ============================================================
   RESPONSIVE - PRODUCTS
   ============================================================ */
@media (max-width: 768px) {
    .hw-products-hero {
        padding: var(--space-12) 0 var(--space-8);
    }

    .hw-products-grid .kt-row-column-wrap {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    #inquiry .bg-slate-950 {
        padding: var(--space-5) !important;
    }

    #inquiry .fluentform_wrapper .ff-btn-submit {
        padding: 0.75rem 1.5rem !important;
        font-size: 0.85rem !important;
    }

    .hw-compare-section .hw-compare-matrix {
        font-size: 0.8rem;
    }

    .hw-compare-section .hw-compare-matrix thead th,
    .hw-compare-section .hw-compare-matrix tbody td {
        padding: var(--space-2) var(--space-3);
    }
}
