/**
 * Main CSS - Core Layout and Structure
 *
 * @package K4_Rugged
 */

/* ==========================================================================
   TOP BAR
   ========================================================================== */

.top-bar {
    background: linear-gradient(135deg, var(--k4-charcoal) 0%, var(--k4-steel) 100%);
    padding: 8px 0;
    border-bottom: 3px solid var(--k4-primary-red);
}

.top-bar-inner {
    max-width: var(--k4-container-max);
    margin: 0 auto;
    padding: 0 var(--k4-gutter);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-info {
    display: flex;
    gap: 30px;
    align-items: center;
}

.contact-info a {
    color: var(--k4-white);
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--k4-transition);
}

.contact-info a:hover {
    color: var(--k4-primary-red);
}

.contact-info i {
    color: var(--k4-primary-red);
}

.social-icons {
    display: flex;
    gap: 10px;
}

.social-icons a {
    width: 32px;
    height: 32px;
    background: var(--k4-primary-red);
    color: var(--k4-white);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: var(--k4-transition);
}

.social-icons a:hover {
    background: var(--k4-dark-red);
    transform: translateY(-2px);
}

/* ==========================================================================
   HEADER
   ========================================================================== */

.site-header {
    background: linear-gradient(180deg, var(--k4-steel) 0%, var(--k4-charcoal) 100%);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.header-inner {
    max-width: var(--k4-container-max);
    margin: 0 auto;
    padding: 0 var(--k4-gutter);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo img,
.custom-logo {
    height: 70px;
    width: auto;
}

.site-title {
    font-family: var(--k4-font-heading);
    font-size: 28px;
    font-weight: 700;
    color: var(--k4-white);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.site-title:hover {
    color: var(--k4-primary-red);
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */

.main-navigation {
    display: flex;
    gap: 5px;
}

.main-navigation ul {
    display: flex;
    gap: 5px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    color: var(--k4-white);
    text-decoration: none;
    padding: 12px 20px;
    font-family: var(--k4-font-heading);
    font-size: 15px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 3px solid transparent;
    transition: var(--k4-transition);
    display: block;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a {
    color: var(--k4-primary-red);
    border-bottom-color: var(--k4-primary-red);
    background: rgba(196, 30, 47, 0.1);
}

/* Navigation CTA Button */
.nav-cta > a,
.main-navigation .nav-cta > a {
    background: var(--k4-primary-red) !important;
    color: var(--k4-white) !important;
    clip-path: polygon(0 0, 100% 0, 92% 100%, 8% 100%);
    border-radius: 0;
    margin-left: 10px;
    padding: 12px 24px !important;
    border-bottom: none !important;
}

.nav-cta > a:hover,
.main-navigation .nav-cta > a:hover {
    background: var(--k4-dark-red) !important;
}

/* Dropdown Menus */
.main-navigation .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--k4-steel);
    box-shadow: var(--k4-shadow-medium);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--k4-transition);
    z-index: 100;
    flex-direction: column;
    border-top: 3px solid var(--k4-primary-red);
}

.main-navigation li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-navigation .sub-menu a {
    padding: 12px 20px;
    border-bottom: 1px solid var(--k4-concrete);
    font-size: 14px;
}

.main-navigation .sub-menu li:last-child a {
    border-bottom: none;
}

/* Multi-column dropdown for menus with many children */
.main-navigation .sub-menu.k4-mega,
.main-navigation li.k4-mega-menu > .sub-menu {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-width: 440px;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
}

.main-navigation li.k4-mega-menu:hover > .sub-menu {
    transform: translateX(-50%) translateY(0);
}

.main-navigation li.k4-mega-menu > .sub-menu a {
    white-space: nowrap;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--k4-white);
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */

/* ===== Hero Slideshow ===== */
.hero {
    position: relative;
    height: 600px;
    background: linear-gradient(135deg, var(--k4-charcoal) 0%, var(--k4-steel) 50%, var(--k4-charcoal) 100%);
    overflow: hidden;
}

.hero-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, visibility 0s linear 0.8s;
    z-index: 1;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.8s ease-in-out, visibility 0s linear 0s;
    z-index: 2;
}

/* Slide text entrance animation */
.hero-slide.active .hero-text {
    animation: heroTextIn 600ms ease-out 200ms both;
}

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

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.3;
    /* Subtle Ken Burns zoom on active slide */
    transition: transform 8s ease-out;
}

.hero-slide.active .hero-bg {
    transform: scale(1.05);
}

.hero-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(26, 26, 26, 0.95) 0%, rgba(26, 26, 26, 0.7) 50%, rgba(26, 26, 26, 0.4) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: var(--k4-container-max);
    margin: 0 auto;
    padding: 80px var(--k4-gutter);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.hero-text {
    max-width: 600px;
}

.hero-badge {
    display: inline-block;
    background: var(--k4-primary-red);
    color: var(--k4-white);
    padding: 8px 16px;
    font-family: var(--k4-font-heading);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    clip-path: polygon(0 0, 100% 0, 95% 100%, 0 100%);
}

.hero h1 {
    font-size: 56px;
    line-height: 1.1;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero h1 span {
    color: var(--k4-primary-red);
}

.hero-subtitle {
    font-size: 18px;
    color: #ccc;
    margin-bottom: 30px;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

/* ===== Hero Arrows ===== */
.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(0, 0, 0, 0.4);
    color: var(--k4-white);
    border: 2px solid rgba(255, 255, 255, 0.2);
    width: 48px;
    height: 48px;
    border-radius: 0;
    clip-path: polygon(8% 0%, 100% 0%, 92% 100%, 0% 100%);
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s, background 0.3s, border-color 0.3s;
    opacity: 0.6;
}

.hero:hover .hero-arrow {
    opacity: 1;
}

/* Ensure arrows are always tappable on touch devices */
@media (hover: none) {
    .hero-arrow {
        opacity: 0.7;
    }
}

.hero-arrow:hover {
    background: var(--k4-primary-red);
    border-color: var(--k4-primary-red);
}

.hero-arrow-prev {
    left: 20px;
}

.hero-arrow-next {
    right: 20px;
}

/* ===== Hero Dots ===== */
.hero-dots {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: transparent;
    cursor: pointer;
    clip-path: polygon(15% 0%, 100% 0%, 85% 100%, 0% 100%);
    transition: background 0.3s, border-color 0.3s;
    padding: 0;
}

.hero-dot:hover {
    border-color: var(--k4-white);
    background: rgba(255, 255, 255, 0.3);
}

.hero-dot.active {
    background: var(--k4-primary-red);
    border-color: var(--k4-primary-red);
}

/* Progress bar on active dot */
.hero-dot.active::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: var(--k4-white);
    position: relative;
    top: 14px;
    left: -2px;
    animation: dotProgress var(--k4-hero-autoplay, 6000ms) linear forwards;
}

@keyframes dotProgress {
    from { width: 0; }
    to { width: 16px; }
}

/* Deal Badge */
.deal-badge {
    position: absolute;
    right: 80px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    text-align: center;
}

.deal-badge a {
    display: block;
    transition: transform 0.3s;
}

.deal-badge a:hover {
    transform: scale(1.05);
}

.deal-badge img {
    width: 220px;
    height: auto;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.5));
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

.deal-cta {
    text-align: center;
    margin-top: 15px;
    background: var(--k4-primary-red);
    padding: 12px 24px;
    clip-path: polygon(0 0, 100% 0, 95% 100%, 5% 100%);
    font-family: var(--k4-font-heading);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--k4-white);
    text-decoration: none;
    display: block;
    transition: background 0.3s;
}

.deal-cta:hover {
    background: var(--k4-dark-red);
    color: var(--k4-white);
}

/* ==========================================================================
   PAGE HERO
   ========================================================================== */

.page-hero {
    position: relative;
    padding: 80px 0;
    background: linear-gradient(135deg, var(--k4-charcoal) 0%, var(--k4-steel) 100%);
    text-align: center;
}

.page-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.2;
}

.page-hero h1 {
    position: relative;
    z-index: 2;
    font-size: 48px;
    margin-bottom: 10px;
}

.page-subtitle {
    position: relative;
    z-index: 2;
    font-size: 18px;
    color: #ccc;
}

/* ==========================================================================
   SEARCH SECTION
   ========================================================================== */

.search-section {
    background: var(--k4-primary-red);
    padding: 40px 0;
    position: relative;
}

.search-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--k4-charcoal), var(--k4-steel), var(--k4-charcoal));
}

.search-inner {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 var(--k4-gutter);
    text-align: center;
}

.search-section h2 {
    font-size: 32px;
    margin-bottom: 20px;
}

.search-box {
    display: flex;
    gap: 0;
    background: var(--k4-white);
    clip-path: polygon(2% 0, 98% 0, 100% 100%, 0% 100%);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.search-box input {
    flex: 1;
    padding: 18px 25px;
    border: none;
    font-size: 16px;
    outline: none;
    color: var(--k4-charcoal);
}

.search-box button {
    background: var(--k4-charcoal);
    color: var(--k4-white);
    border: none;
    padding: 18px 40px;
    font-family: var(--k4-font-heading);
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.3s;
    clip-path: polygon(8% 0, 100% 0, 100% 100%, 0% 100%);
    margin-left: -10px;
}

.search-box button:hover {
    background: var(--k4-steel);
}

/* ==========================================================================
   FEATURED INVENTORY SECTION
   ========================================================================== */

.featured-section {
    background: var(--k4-charcoal);
    padding: var(--k4-section-padding) 0;
    position: relative;
    overflow: hidden;
}

/* Edge fade effect */
.featured-section::before,
.featured-section::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 150px;
    z-index: 5;
    pointer-events: none;
}

.featured-section::before {
    left: 0;
    background: linear-gradient(to right, var(--k4-charcoal) 0%, var(--k4-charcoal) 20%, transparent 100%);
}

.featured-section::after {
    right: 0;
    background: linear-gradient(to left, var(--k4-charcoal) 0%, var(--k4-charcoal) 20%, transparent 100%);
}

.slider-container {
    max-width: var(--k4-container-max);
    margin: 0 auto;
    padding: 0 60px;
    position: relative;
}

/* ==========================================================================
   CATEGORIES SECTION
   ========================================================================== */

.categories-section {
    background: linear-gradient(180deg, var(--k4-steel) 0%, var(--k4-charcoal) 100%);
    padding: var(--k4-section-padding) 0;
}

.categories-grid {
    max-width: var(--k4-container-max);
    margin: 0 auto;
    padding: 0 var(--k4-gutter);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.category-card {
    flex: 0 0 calc(25% - 15px);
    max-width: calc(25% - 15px);
    position: relative;
    height: 200px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    display: block;
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: all 0.4s;
}

.category-card:hover img {
    filter: grayscale(0%);
    transform: scale(1.1);
}

.category-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--k4-dark-red);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 20px;
    transition: all 0.4s;
    clip-path: polygon(0 20%, 100% 0, 100% 100%, 0% 100%);
}

.category-card:hover .category-overlay {
    background: var(--k4-primary-red);
    padding: 20px;
}

.category-overlay h3 {
    font-size: 16px;
    color: var(--k4-white);
    text-align: center;
    margin: 0;
}

/* ==========================================================================
   BRANDS SECTION
   ========================================================================== */

.brands-section {
    background: var(--k4-steel);
    padding: 60px 0;
    border-top: 5px solid var(--k4-primary-red);
    border-bottom: 5px solid var(--k4-primary-red);
}

.brands-inner {
    max-width: var(--k4-container-max);
    margin: 0 auto;
    padding: 0 var(--k4-gutter);
}

.brands-header {
    background: var(--k4-primary-red);
    padding: 15px 40px;
    display: inline-block;
    margin-bottom: 40px;
    clip-path: polygon(0 0, 100% 0, 97% 100%, 3% 100%);
}

.brands-header h2 {
    font-size: 28px;
    margin: 0;
}

.brands-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    align-items: center;
}

.brand-logo {
    background: var(--k4-white);
    padding: 20px 25px;
    clip-path: polygon(0 0, 100% 0, 97% 100%, 3% 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80px;
    transition: var(--k4-transition);
    cursor: pointer;
    border-left: 4px solid var(--k4-primary-red);
}

.brand-logo:hover {
    background: var(--k4-light-gray);
    border-left-color: var(--k4-dark-red);
    transform: translateX(5px);
}

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

/* ==========================================================================
   ABOUT SECTION
   ========================================================================== */

.about-section {
    background: var(--k4-steel);
    padding: var(--k4-section-padding) 0;
    position: relative;
}

.about-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 40px;
    text-align: center;
}

.about-section h2 {
    font-size: 36px;
    margin-bottom: 10px;
    text-align: center;
}

.about-section h2 span {
    color: var(--k4-primary-red);
}

.about-highlight {
    color: var(--k4-primary-red);
    font-family: var(--k4-font-heading);
    font-size: 20px;
    margin: 20px 0;
}

.about-text {
    color: #ccc;
    line-height: 1.8;
    margin-bottom: 30px;
}

.years-badge {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    background: var(--k4-charcoal);
    padding: 20px 40px;
    border-radius: 8px;
    border: 2px solid var(--k4-primary-red);
}

.years-badge .number {
    font-family: var(--k4-font-heading);
    font-size: 48px;
    font-weight: 700;
    color: var(--k4-primary-red);
}

.years-badge .text {
    font-family: var(--k4-font-heading);
    font-size: 16px;
    text-transform: uppercase;
    text-align: left;
    line-height: 1.3;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
    background: linear-gradient(180deg, var(--k4-charcoal) 0%, #0d0d0d 100%);
    padding: 60px 0 0;
}

.footer-inner {
    max-width: var(--k4-container-max);
    margin: 0 auto;
    padding: 0 var(--k4-gutter);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 50px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--k4-steel);
}

.footer-col h4,
.footer-col .widget-title {
    font-size: 18px;
    margin-bottom: 25px;
    color: var(--k4-primary-red);
}

.footer-logo img {
    height: 60px;
    width: auto;
}

.footer-address {
    margin-top: 20px;
    color: #888;
    line-height: 1.8;
}

.footer-address a {
    color: var(--k4-white);
    text-decoration: none;
}

.footer-address a:hover {
    color: var(--k4-primary-red);
}

.hours-table {
    width: 100%;
}

.hours-table tr td {
    padding: 8px 0;
    color: #ccc;
}

.hours-table tr td:last-child {
    text-align: right;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links a:hover {
    color: var(--k4-primary-red);
}

.footer-links a i {
    color: var(--k4-primary-red);
    width: 16px;
}

.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.footer-social a {
    width: 44px;
    height: 44px;
    background: var(--k4-steel);
    color: var(--k4-white);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 18px;
    transition: var(--k4-transition);
}

.footer-social a:hover {
    background: var(--k4-primary-red);
    transform: translateY(-3px);
}

.footer-bottom {
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #666;
    font-size: 14px;
}

.footer-bottom a {
    display: inline-block;
}

.footer-bottom img {
    height: 30px;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.footer-bottom img:hover {
    opacity: 1;
}

/* ==========================================================================
   SCROLL ANIMATIONS
   ========================================================================== */

/* Base state - elements start hidden/offset */
.scroll-animate {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Animated state - when element enters viewport */
.scroll-animate.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Slide from left */
.scroll-animate-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-animate-left.is-visible {
    opacity: 1;
    transform: translateX(0);
}

/* Slide from right */
.scroll-animate-right {
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-animate-right.is-visible {
    opacity: 1;
    transform: translateX(0);
}

/* Scale up */
.scroll-animate-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-animate-scale.is-visible {
    opacity: 1;
    transform: scale(1);
}

/* Staggered children animation delays */
.scroll-animate-stagger > *:nth-child(1) { transition-delay: 0s; }
.scroll-animate-stagger > *:nth-child(2) { transition-delay: 0.1s; }
.scroll-animate-stagger > *:nth-child(3) { transition-delay: 0.2s; }
.scroll-animate-stagger > *:nth-child(4) { transition-delay: 0.3s; }
.scroll-animate-stagger > *:nth-child(5) { transition-delay: 0.4s; }
.scroll-animate-stagger > *:nth-child(6) { transition-delay: 0.5s; }
.scroll-animate-stagger > *:nth-child(7) { transition-delay: 0.6s; }
.scroll-animate-stagger > *:nth-child(8) { transition-delay: 0.7s; }

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .scroll-animate,
    .scroll-animate-left,
    .scroll-animate-right,
    .scroll-animate-scale {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ==========================================================================
   INVENTORY PAGE
   ========================================================================== */

/* Inventory Intro — editable content zone above the feed */
.inventory-intro {
    background: var(--k4-charcoal);
    padding: 50px 0 10px;
    text-align: center;
}

.inventory-intro .wp-block-group__inner-container {
    max-width: var(--k4-container-max);
    margin: 0 auto;
    padding: 0 var(--k4-gutter);
}

.inventory-intro-heading {
    color: var(--k4-white);
    font-family: var(--k4-font-heading);
    font-size: 32px;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.inventory-intro-heading span {
    color: var(--k4-primary-red);
}

.inventory-intro-text {
    color: #bbb;
    font-size: 17px;
    line-height: 1.7;
    max-width: 860px;
    margin: 0 auto 10px;
}

/* Inventory Below — editable content zone below the feed */
.inventory-below {
    background: var(--k4-steel);
    padding: 60px 0;
    text-align: center;
    border-top: 3px solid var(--k4-primary-red);
}

.inventory-below .wp-block-group__inner-container {
    max-width: var(--k4-container-max);
    margin: 0 auto;
    padding: 0 var(--k4-gutter);
}

.inventory-below-heading {
    color: var(--k4-white);
    font-family: var(--k4-font-heading);
    font-size: 30px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.inventory-below-heading span {
    color: var(--k4-primary-red);
}

.inventory-below-text {
    color: #aaa;
    font-size: 16px;
    line-height: 1.75;
    max-width: 820px;
    margin: 0 auto 15px;
}

.inventory-section {
    background: var(--k4-charcoal);
    padding: 60px 0;
}

.inventory-container {
    max-width: var(--k4-container-max);
    margin: 0 auto;
    padding: 0 var(--k4-gutter);
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
}

/* Sidebar */
.inventory-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.filter-content {
    background: var(--k4-steel);
    padding: 0;
    border: 1px solid var(--k4-concrete);
    border-radius: 8px;
    overflow: hidden;
}

/* Sidebar Contact Box */
.sidebar-contact-box {
    background: var(--k4-steel);
    padding: 25px;
    margin-top: 30px;
    border: 1px solid var(--k4-concrete);
    text-align: center;
}

.sidebar-contact-box h4 {
    color: var(--k4-white);
    font-family: var(--k4-font-heading);
    font-size: 18px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.sidebar-contact-box p {
    color: #aaa;
    font-size: 14px;
    margin-bottom: 20px;
}

/* Main Inventory Area */
.inventory-main {
    min-width: 0;
}

/* Inventory Grid Wrapper */
.inventory-grid-wrapper {
    min-height: 400px;
}

/* DealSector pagination text */
.inventory-grid-wrapper .pagination_wrapper {
    color: #aaa;
    font-size: 14px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--k4-concrete);
}

/* CTA Section */
.inventory-cta {
    background: linear-gradient(135deg, var(--k4-steel) 0%, var(--k4-charcoal) 100%);
    padding: 80px 0;
    text-align: center;
    border-top: 4px solid var(--k4-primary-red);
}

.inventory-cta .cta-content {
    max-width: 700px;
    margin: 0 auto;
}

.inventory-cta h2 {
    color: var(--k4-white);
    font-family: var(--k4-font-heading);
    font-size: 36px;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.inventory-cta p {
    color: #aaa;
    font-size: 18px;
    margin-bottom: 30px;
}

.inventory-cta .cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Page Hero for Inventory */
.page-hero {
    position: relative;
    padding: 100px 0 80px;
    background: var(--k4-charcoal);
    text-align: center;
    overflow: hidden;
}

.page-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--k4-charcoal) 0%, var(--k4-steel) 50%, var(--k4-charcoal) 100%);
    opacity: 0.8;
}

.page-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--k4-primary-red);
}

.page-hero .container {
    position: relative;
    z-index: 2;
    max-width: var(--k4-container-max);
    margin: 0 auto;
    padding: 0 var(--k4-gutter);
}

.page-hero h1 {
    color: var(--k4-white);
    font-family: var(--k4-font-heading);
    font-size: 48px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
}

.page-hero .page-subtitle {
    color: #aaa;
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto;
}

/* Page Hero — Compact (View Detail pages) */
.page-hero--compact {
    padding: 40px 0 30px;
}
.page-hero--compact h1 {
    font-size: 28px;
    margin-bottom: 6px;
    letter-spacing: 1px;
}
.page-hero--compact .hero-stock {
    color: #aaa;
    font-size: 14px;
    margin-bottom: 10px;
}
.page-hero--compact .breadcrumbs {
    font-size: 13px;
    color: #888;
}
.page-hero--compact .breadcrumbs a {
    color: #aaa;
    text-decoration: none;
}
.page-hero--compact .breadcrumbs a:hover {
    color: var(--k4-primary-red);
}
.page-hero--compact .breadcrumbs .separator {
    margin: 0 6px;
    color: #666;
}
.page-hero--compact .breadcrumbs .current {
    color: var(--k4-white);
}
@media (min-width: 992px) {
    .page-hero--compact {
        padding: 50px 0 35px;
        text-align: left;
    }
    .page-hero--compact h1 {
        font-size: 36px;
    }
}

/* Page Hero with Featured Image */
.page-hero-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.9) 0%, rgba(45, 45, 45, 0.75) 50%, rgba(26, 26, 26, 0.85) 100%);
    z-index: 1;
}

.page-hero .page-hero-bg {
    opacity: 0.5;
}

/* ==========================================================================
   PAGE CONTENT / ENTRY CONTENT — WordPress Editor Styles
   ========================================================================== */

.page-content {
    background: var(--k4-charcoal);
}

.page-content .container {
    max-width: 1000px;
}

/* Entry Content — styles for content authored in the WP editor */
.entry-content {
    color: #ccc;
    font-size: 17px;
    line-height: 1.8;
}

.entry-content h2 {
    color: var(--k4-white);
    font-size: 36px;
    margin-top: 50px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--k4-primary-red);
}

.entry-content h3 {
    color: var(--k4-white);
    font-size: 26px;
    margin-top: 40px;
    margin-bottom: 15px;
}

.entry-content h4 {
    color: var(--k4-primary-red);
    font-size: 20px;
    margin-top: 30px;
    margin-bottom: 12px;
}

.entry-content h5,
.entry-content h6 {
    color: var(--k4-white);
    margin-top: 25px;
    margin-bottom: 10px;
}

.entry-content p {
    margin-bottom: 1.4em;
    color: #ccc;
}

.entry-content strong,
.entry-content b {
    color: var(--k4-white);
    font-weight: 700;
}

.entry-content a {
    color: var(--k4-primary-red);
    text-decoration: underline;
    text-decoration-color: rgba(196, 30, 47, 0.4);
    text-underline-offset: 3px;
    transition: var(--k4-transition);
}

.entry-content a:hover {
    color: var(--k4-white);
    text-decoration-color: var(--k4-white);
}

/* Images in content */
.entry-content img {
    border-radius: 8px;
    box-shadow: var(--k4-shadow-medium);
}

.entry-content .wp-block-image {
    margin: 30px 0;
}

.entry-content .wp-block-image figcaption {
    color: #888;
    font-size: 14px;
    text-align: center;
    margin-top: 10px;
    font-style: italic;
}

/* WordPress Columns Block */
.entry-content .wp-block-columns {
    gap: 40px;
    margin: 40px 0;
}

.entry-content .wp-block-column {
    min-width: 0;
}

/* Lists */
.entry-content ul,
.entry-content ol {
    padding-left: 0;
    margin-bottom: 1.5em;
    list-style: none;
}

.entry-content ul li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 10px;
    color: #ccc;
}

.entry-content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    background: var(--k4-primary-red);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.entry-content ol {
    counter-reset: k4-counter;
}

.entry-content ol li {
    counter-increment: k4-counter;
    position: relative;
    padding-left: 36px;
    margin-bottom: 12px;
    color: #ccc;
}

.entry-content ol li::before {
    content: counter(k4-counter);
    position: absolute;
    left: 0;
    top: 2px;
    width: 24px;
    height: 24px;
    background: var(--k4-primary-red);
    color: var(--k4-white);
    font-family: var(--k4-font-heading);
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
}

/* Blockquote / Quote Block */
.entry-content blockquote,
.entry-content .wp-block-quote {
    border-left: 4px solid var(--k4-primary-red);
    background: var(--k4-steel);
    padding: 25px 30px;
    margin: 30px 0;
    border-radius: 0 8px 8px 0;
}

.entry-content blockquote p {
    font-size: 19px;
    font-style: italic;
    color: var(--k4-white);
    margin-bottom: 0;
}

.entry-content blockquote cite,
.entry-content .wp-block-quote cite {
    display: block;
    margin-top: 12px;
    font-size: 14px;
    color: #888;
    font-style: normal;
}

/* Separator / Divider Block */
.entry-content hr,
.entry-content .wp-block-separator {
    border: none;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--k4-primary-red), transparent);
    margin: 40px 0;
}

/* Cover Block */
.entry-content .wp-block-cover {
    border-radius: 8px;
    overflow: hidden;
    margin: 30px 0;
    min-height: 300px;
}

/* Group Block with background */
.entry-content .wp-block-group.has-background {
    padding: 30px;
    border-radius: 8px;
    margin: 30px 0;
}

/* Table Block */
.entry-content table,
.entry-content .wp-block-table table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
}

.entry-content table th {
    background: var(--k4-primary-red);
    color: var(--k4-white);
    padding: 12px 16px;
    font-family: var(--k4-font-heading);
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
    text-align: left;
}

.entry-content table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--k4-concrete);
    color: #ccc;
}

.entry-content table tr:hover td {
    background: rgba(196, 30, 47, 0.05);
}

/* Button Block */
.entry-content .wp-block-button .wp-block-button__link {
    font-family: var(--k4-font-heading);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 15px 30px;
    transition: var(--k4-transition);
    clip-path: var(--k4-clip-subtle);
}

.entry-content .wp-block-button.is-style-fill .wp-block-button__link {
    background: var(--k4-primary-red);
    color: var(--k4-white);
}

.entry-content .wp-block-button.is-style-fill .wp-block-button__link:hover {
    background: var(--k4-dark-red);
}

.entry-content .wp-block-button.is-style-outline .wp-block-button__link {
    border: 2px solid var(--k4-primary-red);
    color: var(--k4-primary-red);
    background: transparent;
}

.entry-content .wp-block-button.is-style-outline .wp-block-button__link:hover {
    background: var(--k4-primary-red);
    color: var(--k4-white);
}

/* Media & Text Block */
.entry-content .wp-block-media-text {
    margin: 40px 0;
    gap: 40px;
}

.entry-content .wp-block-media-text .wp-block-media-text__media img {
    border-radius: 8px;
}

/* Gallery Block */
.entry-content .wp-block-gallery {
    margin: 30px 0;
    gap: 12px;
}

.entry-content .wp-block-gallery .wp-block-image img {
    border-radius: 6px;
}

/* Spacer — let it work as-is */

/* Video Block */
.entry-content .wp-block-video video,
.entry-content .wp-block-embed iframe {
    border-radius: 8px;
    box-shadow: var(--k4-shadow-medium);
}

/* First element in content — no extra top margin */
.entry-content > *:first-child {
    margin-top: 0;
}

/* Last element — no trailing bottom margin */
.entry-content > *:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   View Detail Page — outer containment for DealSector lightSlider.
   These target the page-template wrapper elements that sit OUTSIDE
   the DealSector template content. The gallery/grid overflow rules
   live in the inline <style> within dealsector-templates.php and
   travel with the DB page content after "Recreate Templates."
   ========================================================================== */
.inventory-detail .inventory-content { overflow: hidden; }
.inventory-detail .inventory-content .container { overflow: hidden; }
.k4-inventory-wrapper { overflow: hidden; min-width: 0; max-width: 100%; }

/* View Detail page: extra safety for wide content */
.dealsector-detail .site-main { overflow-x: hidden; }
.dealsector-detail img { max-width: 100%; height: auto; }
.dealsector-detail table { max-width: 100%; overflow-x: auto; display: block; }
