/**
 * Rosewood Industrial Platform — Header & Footer
 *
 * @package Rosewood
 * @version 2.0.0
 */

/* ═══════════════════════════════════════
   HEADER — DESKTOP
   ═══════════════════════════════════════ */

.rw-header {
    position: sticky;
    top: 0;
    z-index: 999;
    background: #fff;
    border-bottom: 1px solid #e8e6e3;
}

.rw-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
    gap: 24px;
}

/* Logo */
.rw-header-logo .rw-logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.rw-header-logo .rw-logo-img {
    height: 40px !important;
    width: auto !important;
    max-width: 200px !important;
    max-height: 40px !important;
}

.rw-header-logo .rw-logo-mark {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #E63329;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 16px;
    flex-shrink: 0;
}

.rw-header-logo .rw-logo-text-wrap {
    display: flex;
    flex-direction: column;
}

.rw-header-logo .rw-logo-name {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 800;
    color: #1C1C1E;
    letter-spacing: 0.02em;
    line-height: 1;
}

.rw-header-logo .rw-logo-tagline {
    font-family: 'Outfit', sans-serif;
    font-size: 9px;
    font-weight: 500;
    color: #999;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    line-height: 1;
    margin-top: 2px;
}

/* Nav */
.rw-header-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.rw-nav-list {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.rw-nav-list li {
    position: relative;
    list-style: none;
    margin: 0;
}

.rw-nav-list > li > a {
    display: inline-block;
    padding: 8px 16px;
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #555;
    text-decoration: none;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.rw-nav-list > li > a:hover,
.rw-nav-list > li.current-menu-item > a,
.rw-nav-list > li.current-menu-parent > a,
.rw-nav-list > li.current-menu-ancestor > a {
    color: #E63329;
}

/* Dropdown */
.rw-nav-list > li > .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: #fff;
    border: 1px solid #e8e6e3;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
    list-style: none;
    margin: 0;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.25s ease;
    z-index: 100;
}

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

.rw-nav-list .sub-menu li { margin: 0; }

.rw-nav-list .sub-menu a {
    display: block;
    padding: 10px 20px;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    text-decoration: none;
    transition: all 0.15s ease;
}

.rw-nav-list .sub-menu a:hover {
    background: #f8f7f5;
    color: #E63329;
    padding-left: 24px;
}

/* Actions */
.rw-header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.rw-header-search-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: #1C1C1E;
    padding: 4px;
    display: flex;
    transition: color 0.2s ease;
}
.rw-header-search-toggle:hover { color: #E63329; }

.rw-header-cart {
    position: relative;
    color: #1C1C1E;
    display: flex;
    text-decoration: none;
    transition: color 0.2s ease;
}
.rw-header-cart:hover { color: #E63329; }

.rw-cart-count {
    position: absolute;
    top: -6px;
    right: -8px;
    background: #E63329;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 9px;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rw-header-rfq-btn {
    display: inline-flex;
    padding: 9px 20px;
    background: #E63329;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background 0.2s ease;
    white-space: nowrap;
}
.rw-header-rfq-btn:hover { background: #cc2920; color: #fff; }

/* Mobile toggle — hidden on desktop */
.rw-mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.rw-hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 22px;
}
.rw-hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: #1C1C1E;
    transition: all 0.3s ease;
}

/* ═══════════════════════════════════════
   HEADER — MOBILE MENU (off-canvas)
   ═══════════════════════════════════════ */

.rw-mobile-menu {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    max-width: 85vw;
    height: 100vh;
    background: #fff;
    z-index: 10000;
    transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.1);
}
.rw-mobile-menu.open { right: 0; }

.rw-mobile-menu-inner {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.rw-mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e8e6e3;
}

.rw-mobile-menu-header .rw-logo-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}
.rw-mobile-menu-header .rw-logo-mark { width: 30px; height: 30px; font-size: 13px; }
.rw-mobile-menu-header .rw-logo-name { font-size: 14px; color: #1C1C1E; }
.rw-mobile-menu-header .rw-logo-img { height: 32px; }

.rw-mobile-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    padding: 4px;
}

.rw-mobile-nav {
    flex: 1;
    padding: 16px 0;
}

.rw-mobile-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.rw-mobile-nav-list li {
    list-style: none;
    margin: 0;
    border-bottom: 1px solid #f0efed;
}

.rw-mobile-nav-list > li > a {
    display: block;
    padding: 14px 24px;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #1C1C1E;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.rw-mobile-nav-list > li.current-menu-item > a { color: #E63329; }

.rw-mobile-nav-list .sub-menu {
    list-style: none;
    margin: 0;
    padding: 0 0 8px;
}

.rw-mobile-nav-list .sub-menu a {
    display: block;
    padding: 10px 24px 10px 40px;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #777;
    text-decoration: none;
}

.rw-mobile-menu-footer {
    padding: 20px 24px;
    border-top: 1px solid #e8e6e3;
    margin-top: auto;
}

.rw-mobile-phone {
    display: block;
    text-align: center;
    margin-top: 12px;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #1C1C1E;
    text-decoration: none;
}

.rw-mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.rw-mobile-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* ═══════════════════════════════════════
   SEARCH OVERLAY
   ═══════════════════════════════════════ */

.rw-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: #1C1C1E;
    z-index: 10001;
    display: flex;
    align-items: center;
    transform: translateY(-100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.rw-search-overlay.open {
    transform: translateY(0);
}

.rw-search-overlay-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 48px;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 16px;
}

.rw-search-form {
    flex: 1;
    display: flex;
    align-items: center;
}

.rw-search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 400;
    outline: none;
    padding: 12px 0;
}
.rw-search-input::placeholder { color: rgba(255,255,255,0.35); }

.rw-search-submit {
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s ease;
}
.rw-search-submit:hover { color: #E63329; }

.rw-search-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s ease;
}
.rw-search-close:hover { color: #fff; }

/* ═══════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════ */

.rw-footer {
    background: #1C1C1E;
    color: rgba(255, 255, 255, 0.5);
}

.rw-footer-main {
    padding: 64px 0 48px;
}

.rw-footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 1fr 1fr;
    gap: 48px;
}

/* Footer logo */
.rw-footer-logo { margin-bottom: 20px; }
.rw-footer-logo .rw-logo-link { text-decoration: none; display: flex; align-items: center; gap: 10px; }
.rw-footer-logo .rw-logo-name { color: #fff; }
.rw-footer-logo .rw-logo-tagline { color: rgba(255,255,255,0.4); }
.rw-footer-logo-img { height: 36px !important; width: auto !important; max-height: 36px !important; filter: brightness(0) invert(1); }

.rw-footer-about {
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.35);
    line-height: 1.8;
    margin: 0 0 20px;
    max-width: 280px;
}

/* Social */
.rw-footer-social {
    display: flex;
    gap: 12px;
}

.rw-social-link {
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    transition: color 0.2s ease;
}
.rw-social-link:hover { color: #E63329; }

/* Footer headings */
.rw-footer-heading {
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0 0 18px;
}

.rw-footer-heading--red { color: #E63329; }

/* Footer links */
.rw-footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}
.rw-footer-links li {
    list-style: none;
    margin: 0;
}
.rw-footer-links a {
    display: block;
    padding: 6px 0;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.45);
    text-decoration: none;
    transition: color 0.2s ease;
}
.rw-footer-links a:hover { color: #fff; }

/* Footer address */
.rw-footer-address {
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    font-style: normal;
    line-height: 1.9;
    margin: 0;
}

.rw-footer-hours {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.25);
    margin-top: 6px;
}

.rw-footer-contact {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rw-footer-phone,
.rw-footer-email {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    transition: color 0.2s ease;
}
.rw-footer-phone:hover,
.rw-footer-email:hover { color: #E63329; }

.rw-footer-email {
    font-size: 12px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.5);
}

/* Bottom bar */
.rw-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 20px 0;
}

.rw-footer-bottom-inner {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.rw-footer-copyright,
.rw-footer-disclaimer {
    font-family: 'Outfit', sans-serif;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.2);
    letter-spacing: 0.02em;
}

/* ═══════════════════════════════════════
   OVERRIDE PARENT THEME
   ═══════════════════════════════════════ */

/* Hide Theratio's page-header banner on all pages we control */
.woocommerce .page-header,
.post-type-archive-product .page-header,
.tax-product_cat .page-header,
.single-product .page-header,
.post-type-archive-ot_portfolio .page-header,
.tax-portfolio_cat .page-header,
.single-ot_portfolio .page-header,
.blog .page-header,
.single-post .page-header,
.archive .page-header,
.search .page-header,
.category .page-header,
.tag .page-header,
.page-template-homepage-industrial .page-header,
.page-template-about-us .page-header,
.page-template-services-hub .page-header,
.page-template-service-single .page-header,
.page-template-contact-rfq .page-header {
    display: none !important;
}

/* Hide Elementor header/footer builders if rendered */
.header-desktop:has(.elementor),
.header-mobile:has(.elementor) {
    display: none !important;
}

/* Kill Elementor-built footer — our footer.php is the only footer */
footer.site-footer:not(.rw-footer),
.elementor-location-footer,
footer#site-footer:not(.rw-footer) {
    display: none !important;
}
/* If two footers render, hide the one that's NOT ours */
footer.rw-footer ~ footer,
footer.rw-footer ~ .elementor-location-footer {
    display: none !important;
}

/* Hide parent's side panel trigger if we're not using it */
#side-panel { display: none !important; }

/* Override parent header classes that might conflict */
.octf-main-header { display: none !important; }
.header_mobile { display: none !important; }

/* Hide WooCommerce cart/mini-cart from header — RFQ-only model */
.site-header-cart,
.octf-header-module .mini-cart,
.header-desktop .cart-contents,
.woocommerce-mini-cart,
.widget_shopping_cart,
#site-header-cart { display: none !important; }

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */

@media (max-width: 1024px) {
    .rw-header-nav { display: none; }
    .rw-mobile-toggle { display: flex; }
    .rw-header-rfq-btn { display: none; }
    .rw-footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}

@media (max-width: 768px) {
    .rw-header-inner { height: 58px; }
    .rw-header-search-toggle { display: none; }
    .rw-footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .rw-footer-main { padding: 48px 0 36px; }
    .rw-search-overlay-inner { padding: 0 24px; }
}

@media (max-width: 480px) {
    .rw-logo-text-wrap { display: none; }
    .rw-mobile-menu-header .rw-logo-text-wrap { display: none; }
}

/* ═══════════════════════════════════════
   DEFAULT PAGE TEMPLATE (page.php)
   ═══════════════════════════════════════ */

.rw-default-breadcrumb-bar {
    background: #fff;
    border-bottom: 1px solid #e8e6e3;
    padding: 14px 0;
}

.rw-default-hero {
    background: #f4f3f1;
    padding: 40px 0;
    border-bottom: 1px solid #e8e6e3;
}

.rw-default-hero-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 700;
    color: #1C1C1E;
    margin: 0;
    line-height: 1.2;
}

.rw-default-main {
    padding: 48px 0 64px;
    background: #fff;
}

.rw-default-content {
    max-width: 860px;
}

.rw-default-content p,
.rw-default-content ul,
.rw-default-content ol {
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    color: #444;
    line-height: 1.85;
}

.rw-default-content h2,
.rw-default-content h3,
.rw-default-content h4 {
    font-family: 'Outfit', sans-serif;
    color: #1C1C1E;
    font-weight: 700;
}

.rw-default-content img {
    max-width: 100%;
    height: auto;
}

/* Elementor content inside default page */
.rw-default-content > .elementor .elementor-section .elementor-container {
    max-width: 100% !important;
}
