/**
 * My Custom Theme - Block Patterns Styles
 * CSS styles adapted from website-mockup
 * Bootstrap 5.3 compatible
 */

/* ============================================
   STICKY NAVBAR — works on both PHP and block-template pages
   On block-template pages the <nav class="sticky-top"> sits inside
   <header class="wp-block-template-part"> which is exactly the nav's
   height, so position:sticky on the nav alone can't work.
   Making the wrapper itself sticky fixes it.
   ============================================ */
header.wp-block-template-part {
    position: sticky;
    top: 0;
    z-index: 1030;
    transition: transform 0.25s ease;
    will-change: transform;
}
body.logged-in header.wp-block-template-part { top: 32px; }
@media screen and (max-width: 782px) {
    body.logged-in header.wp-block-template-part { top: 46px; }
}
/* Hide the wrapper when the nav inside is hidden by the scroll JS */
header.wp-block-template-part:has(.nav-hidden) {
    transform: translateY(-100%);
}

/* Sticky navbar transition (for both PHP-template & block-template pages) */
.navbar.sticky-top {
    transition: transform 0.25s ease;
    will-change: transform;
}
.navbar.sticky-top.nav-hidden {
    transform: translateY(-100%);
}

/* ============================================
   BOOTSTRAP + WORDPRESS BLOCK CONFLICT FIXES
   Force WordPress block colors to survive Bootstrap CSS reset
   ============================================ */

/* WordPress Cover Block - force background to show */
.wp-block-cover {
    position: relative !important;
    overflow: hidden !important;
}
.wp-block-cover__background {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    right: 0 !important;
    z-index: 0 !important;
}
.wp-block-cover__background.has-primary-background-color {
    background-color: var(--theme-primary, var(--wp--preset--color--primary, #2563eb)) !important;
}
.wp-block-cover__background.has-background-dim-100 {
    opacity: 1 !important;
}
.wp-block-cover__inner-container {
    position: relative !important;
    z-index: 1 !important;
    width: 100% !important;
}

/* WordPress color palette — Bootstrap resets these to transparent/inherit */
.has-primary-background-color      { background-color: var(--theme-primary, var(--wp--preset--color--primary, #2563eb)) !important; }
.has-primary-dark-background-color { background-color: var(--theme-primary-dark, var(--wp--preset--color--primary-dark, #1e40af)) !important; }
.has-footer-dark-background-color  { background-color: #1e293b !important; }
.has-white-background-color        { background-color: #ffffff !important; }
.has-tertiary-background-color     { background-color: #f8fafc !important; }

/* WordPress text colors */
.has-white-color        { color: #ffffff !important; }
.has-primary-color      { color: var(--theme-primary, var(--wp--preset--color--primary, #2563eb)) !important; }
.has-dark-text-color    { color: #1e293b !important; }
.has-gray-text-color    { color: #64748b !important; }

/* WordPress button block — Bootstrap sets its own .wp-element-button styles */
.wp-block-button__link.wp-element-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
}
.wp-block-button__link.has-white-background-color {
    background-color: #ffffff !important;
    color: var(--theme-primary) !important;
}
.wp-block-button.is-style-outline .wp-block-button__link {
    background-color: transparent !important;
    border: 2px solid #ffffff !important;
    color: #ffffff !important;
}

/* WordPress Columns block — Bootstrap flex can break these */
.wp-block-columns {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 1.5rem !important;
}
.wp-block-column {
    flex: 1 !important;
    min-width: 0 !important;
}

/* ============================================
   BOOTSTRAP + WORDPRESS GENERAL COMPATIBILITY
   ============================================ */
/* Ensure Bootstrap containers work in frontend */
body:not(.wp-admin) .container {
    width: 100%;
    max-width: 1200px;
}

/* Fix Bootstrap button styles for Gutenberg */
.wp-block-button .btn {
    display: inline-block;
}

/* ============================================
   BASE STYLES
   ============================================ */
:root {
    --color-primary: var(--theme-primary);
    --color-primary-dark: var(--theme-primary-dark);
    --color-primary-light: var(--theme-primary);
    --color-white: #ffffff;
    --color-gray-50: #f8fafc;
    --color-gray-100: #f1f5f9;
    --color-gray-200: #e2e8f0;
    --color-gray-400: #94a3b8;
    --color-gray-500: #64748b;
    --color-gray-700: #374151;
    --color-gray-800: #1e293b;
    --color-gray-900: #0f172a;
    
    /* Bootstrap variable overrides */
    --bs-primary: var(--theme-primary);
    --bs-primary-rgb: 48, 193, 188;
    --bs-link-color: var(--theme-primary);
    --bs-link-hover-color: var(--theme-primary-dark);
    --bs-font-sans-serif: 'Sarabun', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--color-gray-800);
}

/* ============================================
   BOOTSTRAP NAVBAR CUSTOMIZATION
   ============================================ */
.navbar {
    font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, sans-serif;
    padding: 0.75rem 0;
}

.navbar-brand img {
    max-height: 60px;
    width: auto;
}

.navbar .nav-link {
    font-weight: 500;
    color: #374151 !important;
    padding: 0.5rem 1rem !important;
    position: relative;
    transition: color 0.3s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
    color: var(--color-primary) !important;
}

.navbar .nav-link.active {
    color: var(--color-primary) !important;
}

.navbar .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background: var(--color-primary);
}

.navbar .dropdown-menu {
    border: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    border-radius: 8px;
    padding: 0.5rem 0;
}

.navbar .dropdown-item {
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    color: #374151;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus {
    background-color: #f0f5ff !important;
    color: var(--theme-primary) !important;
}

.navbar .dropdown-item.active,
.navbar .dropdown-item:active {
    background-color: #f0f5ff !important;
    color: var(--theme-primary) !important;
}

.navbar .dropdown-item.dropdown-view-all-link {
    color: var(--theme-primary) !important;
}

.navbar .dropdown-item.dropdown-view-all-link:hover,
.navbar .dropdown-item.dropdown-view-all-link:focus,
.navbar .dropdown-item.dropdown-view-all-link:active {
    background-color: var(--theme-primary) !important;
    color: #ffffff !important;
}

.navbar-text {
    font-weight: 500;
    color: var(--color-primary) !important;
}

.navbar-toggler {
    border: none;
    padding: 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* ============================================
   CONTACT BUILDER (Core Blocks) — Layout Fixes
   ============================================ */
.kv-contact-builder .kv-contact-item > .wp-block-columns > .wp-block-column[style*="flex-basis:54px"],
.kv-contact-builder .kv-contact-item > .wp-block-columns > .wp-block-column[style*="flex-basis: 54px"] {
    flex: 0 0 54px !important;
    max-width: 54px !important;
}

.kv-contact-builder .kv-contact-item > .wp-block-columns > .wp-block-column[style*="flex-basis:54px"] + .wp-block-column,
.kv-contact-builder .kv-contact-item > .wp-block-columns > .wp-block-column[style*="flex-basis: 54px"] + .wp-block-column {
    flex: 1 1 auto !important;
    max-width: none !important;
}

.kv-contact-builder .kv-contact-item > .wp-block-columns {
    gap: 16px !important;
    align-items: flex-start !important;
}

.kv-contact-builder .kv-contact-item h4.wp-block-heading {
    font-size: 22px;
    margin-bottom: 6px !important;
    line-height: 1.35;
}

.kv-contact-builder .kv-contact-item p {
    color: #334155;
    line-height: 1.7;
}

/* Social icon circles in Contact card */
.kv-contact-builder .wp-block-social-links.is-style-pill-shape .wp-block-social-link-anchor {
    border-radius: 999px !important;
    width: 44px;
    height: 44px;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Remove card look from contact info items (new + legacy content) */
.kv-contact-builder .kv-contact-item {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.kv-contact-builder .wp-block-group.has-white-background-color.has-background {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}


/* ============================================
   HEADER / NAVBAR (Legacy - Gutenberg version)
   ============================================ */
.header {
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header .header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    gap: 20px;
}

.header .logo {
    margin: 0;
}

.header .logo img {
    max-height: 80px;
    height: auto;
    width: auto;
    display: block;
}

.header .main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.header .main-nav .wp-block-navigation__container {
    gap: 30px;
}

.header .main-nav .wp-block-navigation-item__content {
    font-weight: 500;
    color: #374151;
    padding: 8px 0;
    position: relative;
    text-decoration: none;
}

.header .main-nav .wp-block-navigation-item__content:hover {
    color: var(--theme-primary);
}

.header .main-nav .wp-block-navigation-item.active > .wp-block-navigation-item__content {
    color: var(--theme-primary);
}

.header .main-nav .wp-block-navigation-item.active > .wp-block-navigation-item__content::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--theme-primary);
}

.header .main-nav .wp-block-navigation__submenu-container {
    background: #ffffff;
    min-width: 200px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 10px 0;
    border: 0;
}

.header .main-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
    display: block;
    padding: 10px 20px;
    color: #374151;
    font-weight: 400;
}

.header .main-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover {
    background: #f1f5f9;
    color: var(--theme-primary);
}

.header .header-contact {
    font-weight: 600;
    color: var(--theme-primary);
    margin: 0;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .header .header-content {
        flex-wrap: nowrap;
        gap: 12px;
    }

    .header .main-nav {
        width: auto;
        order: 2;
        margin-left: auto;
        justify-content: flex-end;
    }

    .header .main-nav .wp-block-navigation__responsive-container-open {
        padding: 6px;
        border: 1px solid #e2e8f0;
        border-radius: 6px;
        color: #374151;
    }

    .header .main-nav .wp-block-navigation__responsive-container {
        padding: 20px;
    }

    .header .main-nav .wp-block-navigation__responsive-container-content .wp-block-navigation__container {
        gap: 14px;
        align-items: flex-start;
    }

    .header .main-nav .wp-block-navigation-item__content {
        padding: 4px 0;
    }

    .header .logo img {
        max-height: 60px;
    }

    .header .header-contact {
        display: none;
    }
}

/* ============================================
   CONTAINER
   ============================================ */
.wp-block-group.alignfull > .wp-block-group__inner-container,
.wp-block-cover.alignfull > .wp-block-cover__inner-container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* Full-width breakout for custom blocks */
.kv-applications.alignfull,
.kv-applications.alignwide {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    box-sizing: border-box;
}

/* ============================================
   BUTTON STYLES
   ============================================ */
.wp-block-button__link {
    padding: 12px 28px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
}

.wp-block-button__link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Outline button style */
.wp-block-button.is-style-outline .wp-block-button__link {
    border-width: 2px;
    border-style: solid;
}

.wp-block-button.is-style-outline .wp-block-button__link:not(.has-background) {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* White outline button (inside cover/dark backgrounds) */
.wp-block-cover .wp-block-button.is-style-outline .wp-block-button__link,
.wp-block-button.is-style-outline .wp-block-button__link.has-white-color {
    border-color: #ffffff !important;
    color: #ffffff !important;
}

.wp-block-cover .wp-block-button.is-style-outline .wp-block-button__link:hover,
.wp-block-button.is-style-outline .wp-block-button__link.has-white-color:hover {
    background: #ffffff !important;
    color: var(--color-primary) !important;
}

/* ============================================
   COVER BLOCK (Hero/CTA Sections)
   ============================================ */
.wp-block-cover.has-primary-background-color .wp-block-cover__background {
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary-light) 100%);
}

/* ============================================
   PRODUCT CARDS
   ============================================ */
/* Equal height columns */
.wp-block-columns:has(.product-card) {
    align-items: stretch !important;
}
.wp-block-column:has(.product-card) {
    display: flex !important;
    flex-direction: column !important;
}

.product-card {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    /* Equal height */
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Inner content stretches to fill remaining space */
.product-card > .wp-block-group:last-child {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Push button to bottom */
.product-card .wp-block-buttons {
    margin-top: auto !important;
}

.product-card .wp-block-image {
    margin-bottom: 0;
    flex-shrink: 0;
}

.product-card .wp-block-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

/* ============================================
   SECTION TITLES
   ============================================ */
.section-title,
.wp-block-heading.has-text-align-center {
    color: var(--color-gray-800);
}

/* ============================================
   FEATURES GRID
   ============================================ */
.wp-block-columns .feature-icon,
.wp-block-column p[style*="font-size:48px"] {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   STATS SECTION
   ============================================ */
.wp-block-column .stat-number,
.wp-block-column p.has-primary-color[style*="font-weight:700"] {
    line-height: 1.2;
}

/* ============================================
   FOOTER STYLES
   ============================================ */
.wp-block-group[style*="background-color:#1e293b"] {
    color: var(--color-gray-400);
}

.wp-block-group[style*="background-color:#1e293b"] > .wp-block-group__inner-container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
}

.wp-block-group[style*="background-color:#1e293b"] a {
    color: var(--color-gray-400);
    text-decoration: none;
    transition: color 0.3s ease;
}

.wp-block-group[style*="background-color:#1e293b"] a:hover {
    color: var(--color-primary-light);
}

.wp-block-group[style*="background-color:#1e293b"] ul {
    list-style: none !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
}

.wp-block-group[style*="background-color:#1e293b"] ul li {
    list-style: none !important;
    margin-bottom: 10px;
}

.wp-block-group[style*="background-color:#1e293b"] li::marker {
    content: '';
}

.wp-block-group[style*="background-color:#1e293b"] .wp-block-list {
    list-style: none !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
}

.wp-block-group[style*="background-color:#1e293b"] .wp-block-list li {
    list-style: none !important;
}

/* ============================================
   FORM STYLES (Contact Form)
   ============================================ */
.contact-form {
    background: #f8fafc;
    padding: 40px;
    border-radius: 12px;
}

.contact-form h3 {
    font-size: 24px;
    margin-bottom: 25px;
    color: #1e293b;
    font-weight: 600;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
    font-size: 14px;
}

.contact-form textarea {
    min-height: 120px;
    resize: vertical;
}

.contact-form input,
.contact-form textarea,
.contact-form select,
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 textarea,
.wpcf7 select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--color-gray-200);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.3s ease;
    background-color: var(--color-white);
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus,
.wpcf7 input:focus,
.wpcf7 textarea:focus,
.wpcf7 select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.wpcf7 input[type="submit"],
.contact-form button[type="submit"] {
    background: var(--color-primary);
    color: var(--color-white);
    padding: 12px 28px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
}

.wpcf7 input[type="submit"]:hover,
.contact-form button[type="submit"]:hover {
    background: var(--color-primary-dark);
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */
@media (max-width: 992px) {
    .wp-block-columns:not(.is-not-stacked-on-mobile) {
        flex-wrap: wrap;
    }
    
    .wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column {
        flex-basis: calc(50% - 15px) !important;
    }
}

@media (max-width: 768px) {
    .wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column {
        flex-basis: 100% !important;
    }
    
    .wp-block-cover h1 {
        font-size: 32px !important;
    }
    
    .wp-block-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .wp-block-button {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 1024px) {
    .wp-block-group[style*="background-color:#1e293b"] > .wp-block-columns {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 30px;
        margin-bottom: 30px !important;
    }
}

@media (max-width: 640px) {
    .wp-block-group[style*="background-color:#1e293b"] {
        padding-top: 40px !important;
        padding-bottom: 24px !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    .wp-block-group[style*="background-color:#1e293b"] > .wp-block-group__inner-container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .wp-block-group[style*="background-color:#1e293b"] > .wp-block-columns {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .wp-block-group[style*="background-color:#1e293b"] h4 {
        margin-bottom: 14px !important;
    }

    .wp-block-group[style*="background-color:#1e293b"] .wp-block-separator {
        margin-top: 10px;
        margin-bottom: 0;
    }

    .wp-block-group[style*="background-color:#1e293b"] p[style*="margin-top:30px"] {
        margin-top: 20px !important;
        font-size: 14px;
    }
}

/* ============================================
   CONTACT FORM FIELDS (HTML Block)
   ============================================ */
.contact-form-fields input:focus,
.contact-form-fields textarea:focus,
.contact-form-fields select:focus {
    outline: none;
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.contact-form-fields button[type="submit"]:hover {
    background: var(--color-primary-dark) !important;
}

/* ============================================
   CONTACT INFO (HTML Block - Mockup Classes)
   ============================================ */
.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--theme-primary-light, #e8f0fe);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.contact-text h4 {
    font-size: 18px;
    margin-bottom: 5px;
    color: #1e293b;
    font-weight: 600;
}

.contact-text p {
    color: #64748b;
    line-height: 1.6;
}

/* Contact info icon circles */
.wp-block-group[style*="border-radius:50%"][style*="background-color:var(--theme-primary-light, #e8f0fe)"] {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ============================================
   PRODUCT CARD IMAGES (Full Page Pattern)
   ============================================ */
.product-card .wp-block-image {
    margin-bottom: 0;
    overflow: hidden;
    flex-shrink: 0;
}

.product-card .wp-block-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.product-card:hover .wp-block-image img {
    transform: scale(1.05);
}

/* ============================================
   MAP SECTION PLACEHOLDER
   ============================================ */
.wp-block-group[style*="background-color:#e2e8f0"][style*="min-height:400px"] iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* ============================================
   ANIMATION EFFECTS
   ============================================ */
.product-card,
.wp-block-column,
.wp-block-group {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   EDITOR SPECIFIC STYLES
   ============================================ */
.editor-styles-wrapper {
    font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, sans-serif;
}

.editor-styles-wrapper .wp-block-cover__inner-container {
    max-width: 1200px;
}

/* ============================================
   PRODUCT CATEGORY PAGES (Inductors, Transformers, Antennas)
   ============================================ */

/* Product Item Card */
.product-item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.product-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.product-item .product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-item .product-info h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: #1e293b;
    font-weight: 600;
}

.product-item .product-info > p {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 15px;
    flex: 1;
}

/* Specs Table */
.specs-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 13px;
    flex: 1;
}

.specs-table td {
    padding: 7px 8px;
    border-bottom: 1px solid #e2e8f0;
    color: #374151;
    vertical-align: top;
}

.specs-table td:first-child {
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    width: 45%;
}

/* Outline Button */
.btn-outline {
    display: inline-block;
    padding: 9px 22px;
    border: 2px solid var(--theme-accent, var(--theme-primary));
    border-radius: 8px;
    color: var(--theme-accent, var(--theme-primary));
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
    margin-top: auto;
}

.btn-outline:hover {
    background: var(--theme-accent, var(--theme-primary));
    color: #fff;
}

/* Subcategory pill */
.subcategory-pill:hover {
    background: var(--theme-primary) !important;
    color: #fff !important;
    border-color: var(--theme-primary) !important;
}

/* ============================================
   PRODUCT DETAIL PAGE
   ============================================ */
.pd-breadcrumb {
    background: #f8fafc;
    padding: 16px 0;
    border-bottom: 1px solid #e2e8f0;
}
.pd-breadcrumb p { margin: 0; color: #64748b; font-size: 14px; }
.pd-breadcrumb a { color: var(--theme-primary); text-decoration: none; }
.pd-breadcrumb a:hover { text-decoration: underline; }
.pd-breadcrumb span { color: #1e293b; }

.pd-section { padding: 60px 0; }

.pd-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

/* Gallery */
.pd-main-image {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    margin-bottom: 15px;
}
.pd-main-image img { width: 100%; height: auto; display: block; }

.pd-thumbnails { display: flex; gap: 10px; }
.pd-thumb {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    transition: border-color 0.2s;
}
.pd-thumb.active,
.pd-thumb:hover { border-color: var(--theme-primary); }

/* Info */
.pd-info h1 { font-size: 32px; color: #1e293b; margin-bottom: 12px; font-weight: 700; }
.pd-desc { color: #64748b; font-size: 16px; line-height: 1.7; margin-bottom: 28px; }

.pd-features-box {
    background: #f8fafc;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 28px;
}
.pd-features-box h3,
.pd-specs h3 { font-size: 18px; color: #1e293b; margin-bottom: 14px; font-weight: 600; }
.pd-features-box ul { list-style: none; padding: 0; margin: 0; }
.pd-features-box li { color: #475569; line-height: 2.1; }

.pd-specs { margin-bottom: 32px; }
.pd-specs-table { width: 100%; border-collapse: collapse; }
.pd-specs-table tr { border-bottom: 1px solid #e5e7eb; }
.pd-specs-table tr:last-child { border-bottom: none; }
.pd-specs-table td { padding: 12px 4px; font-size: 14px; }
.pd-specs-table td:first-child { color: #64748b; width: 50%; }
.pd-specs-table td:last-child { color: #1e293b; font-weight: 500; }

.pd-actions { display: flex; gap: 15px; flex-wrap: wrap; }
.btn-pd-primary {
    display: inline-block;
    padding: 14px 36px;
    background: var(--theme-primary);
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    transition: background 0.3s;
}
.btn-pd-primary:hover { background: var(--theme-primary-dark); color: #fff; }
.btn-pd-outline {
    display: inline-block;
    padding: 14px 36px;
    border: 2px solid var(--theme-primary);
    color: var(--theme-primary);
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.3s;
}
.btn-pd-outline:hover { background: var(--theme-primary); color: #fff; }

/* Related Products */
.pd-related { padding: 60px 0; background: #f8fafc; }
.pd-related h2 { text-align: center; font-size: 28px; color: #1e293b; margin-bottom: 40px; font-weight: 700; }
.pd-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.pd-related-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}
.pd-related-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,0.15); }
.pd-related-img { height: 200px; overflow: hidden; }
.pd-related-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pd-related-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.pd-related-body h3 { font-size: 18px; color: #1e293b; margin-bottom: 8px; font-weight: 600; }
.pd-related-body p { color: #64748b; font-size: 14px; margin-bottom: 18px; line-height: 1.5; }
.pd-related-body .btn-pd-outline {
    padding: 8px 20px;
    font-size: 14px;
    display: inline-flex;
    width: fit-content;
    margin-top: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .pd-grid { grid-template-columns: 1fr; gap: 30px; }
    .pd-related-grid { grid-template-columns: 1fr; }
    .pd-info h1 { font-size: 24px; }
    .pd-actions { flex-direction: column; }
    .btn-pd-primary, .btn-pd-outline { text-align: center; }
    .kv-applications > .container > div[style*="grid-template-columns"] {
        grid-template-columns: 1fr 1fr !important;
    }
}
@media (max-width: 480px) {
    .kv-applications > .container > div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
}

/* ============================================
   CONTACT PAGE — tighten info item spacing
   ============================================ */
.page-id-21 .wp-block-column .wp-block-spacer {
    height: 6px !important;
    min-height: 0 !important;
}
.page-id-21 .wp-block-column > .wp-block-group {
    margin-block-start: 0 !important;
    margin-block-end: 0 !important;
}
