/**
 * Rent2Wheels Theme – theme.css
 * Responsive. CSS Custom Properties. BEM. Mobile-first.
 * @since 1.0.0
 */

/* ── Reset & base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--r2w-font, 'Inter', 'Segoe UI', system-ui, sans-serif); color: #222; background: #fff; }
img  { max-width: 100%; height: auto; }
a    { color: var(--r2w-accent); transition: color .2s ease; }
a:hover { color: var(--r2w-accent-dark); }

/* ── Skip link ────────────────────────────────────────────────── */
.r2w-skip-link { position: absolute; top: -40px; left: 0; background: var(--r2w-primary); color: #fff; padding: 8px 16px; border-radius: 0 0 4px 4px; z-index: 9999; transition: top .2s; font-size: 14px; }
.r2w-skip-link:focus { top: 0; color: #fff; }

/* ── Container ────────────────────────────────────────────────── */
.r2w-container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 5vw, 48px); }

/* ── Shared button ────────────────────────────────────────────── */
.r2w-btn {
    display:         inline-flex;
    align-items:     center;
    justify-content: center;
    gap:             8px;
    background:      var(--r2w-accent);
    color:           #fff;
    padding:         11px 26px;
    border-radius:   var(--r2w-radius, 6px);
    font-weight:     700;
    font-size:       15px;
    text-decoration: none;
    border:          none;
    cursor:          pointer;
    transition:      background .22s, transform .18s;
    white-space:     nowrap;
}
.r2w-btn:hover { background: var(--r2w-accent-dark); color: #fff; transform: translateY(-1px); }
.r2w-btn:focus-visible { outline: 3px solid var(--r2w-accent); outline-offset: 2px; }
.r2w-btn--block { width: 100%; }

/* ── Icon base ────────────────────────────────────────────────── */
.r2w-icon      { width: 22px; height: 22px; flex-shrink: 0; vertical-align: middle; }
.r2w-icon--sm  { width: 16px; height: 16px; }

/* ═══════════════════════════════════════════════════════════════
   HEADER
══════════════════════════════════════════════════════════════════ */

.r2w-header {
    position:   sticky;
    top:        0;
    z-index:    1000;
    background: var(--r2w-primary);
    box-shadow: 0 2px 12px rgba(0,0,0,.12);
    transition: height var(--r2w-transition), background var(--r2w-transition), box-shadow var(--r2w-transition);
    height:     var(--r2w-header-height, 70px);
}

/* Transparent header on homepage (opt-in via body class or Elementor) */
.home.r2w-header-transparent .r2w-header:not(.r2w-header--scrolled) {
    background: transparent;
    box-shadow: none;
}

/* Scrolled state (added via JS) */
.r2w-header--scrolled {
    height:     var(--r2w-header-height-scrolled, 58px);
    box-shadow: 0 2px 20px rgba(0,0,0,.18);
}

.r2w-header__inner {
    display:     flex;
    align-items: center;
    gap:         24px;
    height:      100%;
}

/* ── Logo ──────────────────────────────────────────────────────── */
.r2w-header__brand    { flex-shrink: 0; display: flex; flex-direction: column; justify-content: center; }
.r2w-header__logo-link{ text-decoration: none; display: inline-flex; align-items: center; }
.r2w-header__logo-img { height: 44px; width: auto; max-width: 220px; object-fit: contain; transition: height var(--r2w-transition); }
.r2w-header--scrolled .r2w-header__logo-img { height: 36px; }
.r2w-header__logo-text {
    font-size:   22px;
    font-weight: 800;
    color:       #fff;
    letter-spacing: -.5px;
    line-height: 1;
}
.r2w-header__logo-text span { color: var(--r2w-accent); }
.r2w-header__tagline { font-size: 10px; color: rgba(255,255,255,.6); margin: 3px 0 0; letter-spacing: .4px; text-transform: uppercase; }

/* ── Primary nav ───────────────────────────────────────────────── */
.r2w-header__nav { flex: 1; display: flex; justify-content: flex-end; }

.r2w-nav-menu {
    display:     flex;
    list-style:  none;
    margin:      0;
    padding:     0;
    gap:         4px;
    align-items: center;
}
.r2w-nav-menu > li > a {
    display:       block;
    padding:       8px 14px;
    color:         rgba(255,255,255,.88);
    font-size:     15px;
    font-weight:   600;
    text-decoration: none;
    border-radius: var(--r2w-radius);
    transition:    background .18s, color .18s;
    white-space:   nowrap;
}
.r2w-nav-menu > li > a:hover,
.r2w-nav-menu > li.current-menu-item > a {
    background: rgba(255,255,255,.12);
    color:      #fff;
}

/* Dropdown */
.r2w-nav-menu .sub-menu {
    display:       none;
    position:      absolute;
    top:           calc(100% + 8px);
    left:          0;
    min-width:     200px;
    background:    #fff;
    border-radius: var(--r2w-radius);
    box-shadow:    var(--r2w-shadow-lg);
    list-style:    none;
    padding:       6px 0;
    margin:        0;
    z-index:       100;
}
.r2w-nav-menu li { position: relative; }
.r2w-nav-menu li:hover > .sub-menu { display: block; }
.r2w-nav-menu .sub-menu a { display: block; padding: 9px 16px; color: #333; font-size: 14px; font-weight: 500; text-decoration: none; }
.r2w-nav-menu .sub-menu a:hover { background: var(--r2w-primary-light); color: var(--r2w-primary); }

/* ── Actions (right side) ──────────────────────────────────────── */
.r2w-header__actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.r2w-header__cta     { font-size: 14px; padding: 8px 18px; }
.r2w-header__cart {
    position:      relative;
    color:         #fff;
    text-decoration: none;
    display:       flex;
    align-items:   center;
    padding:       4px;
    opacity:       .85;
    transition:    opacity .18s;
}
.r2w-header__cart:hover { opacity: 1; color: #fff; }
.r2w-cart-count {
    position:      absolute;
    top:           -4px;
    right:         -6px;
    background:    var(--r2w-accent);
    color:         #fff;
    font-size:     10px;
    font-weight:   700;
    min-width:     16px;
    height:        16px;
    border-radius: 8px;
    display:       flex;
    align-items:   center;
    justify-content: center;
    padding:       0 3px;
}

/* ── Hamburger ─────────────────────────────────────────────────── */
.r2w-hamburger {
    display:         none;
    flex-direction:  column;
    justify-content: space-between;
    width:           28px;
    height:          20px;
    background:      transparent;
    border:          none;
    cursor:          pointer;
    padding:         0;
    flex-shrink:     0;
}
.r2w-hamburger__line {
    display:       block;
    width:         100%;
    height:        2px;
    background:    #fff;
    border-radius: 2px;
    transition:    transform .28s ease, opacity .22s ease;
    transform-origin: center;
}

/* Animate to X when open */
.r2w-hamburger[aria-expanded="true"] .r2w-hamburger__line:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.r2w-hamburger[aria-expanded="true"] .r2w-hamburger__line:nth-child(2) { opacity: 0; }
.r2w-hamburger[aria-expanded="true"] .r2w-hamburger__line:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ═══════════════════════════════════════════════════════════════
   MOBILE NAV DRAWER
══════════════════════════════════════════════════════════════════ */

.r2w-mobile-nav { position: fixed; inset: 0; z-index: 1100; pointer-events: none; }
.r2w-mobile-nav[aria-hidden="false"] { pointer-events: auto; }

/* Semi-transparent overlay */
.r2w-mobile-nav__overlay {
    position:   absolute;
    inset:      0;
    background: rgba(0,0,0,.5);
    opacity:    0;
    transition: opacity .28s ease;
    backdrop-filter: blur(2px);
}
.r2w-mobile-nav[aria-hidden="false"] .r2w-mobile-nav__overlay { opacity: 1; }

/* Side panel */
.r2w-mobile-nav__panel {
    position:         absolute;
    top:              0;
    right:            0;
    bottom:           0;
    width:            min(320px, 88vw);
    background:       #fff;
    box-shadow:       -4px 0 24px rgba(0,0,0,.18);
    transform:        translateX(100%);
    transition:       transform .3s cubic-bezier(.4,0,.2,1);
    overflow-y:       auto;
    display:          flex;
    flex-direction:   column;
    padding-bottom:   env(safe-area-inset-bottom);
}
.r2w-mobile-nav[aria-hidden="false"] .r2w-mobile-nav__panel { transform: translateX(0); }

.r2w-mobile-nav__header {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    padding:         16px 20px;
    background:      var(--r2w-primary);
    flex-shrink:     0;
}
.r2w-mobile-nav__close {
    background: transparent;
    border:     none;
    cursor:     pointer;
    color:      #fff;
    padding:    4px;
    display:    flex;
    align-items:center;
    opacity:    .8;
    transition: opacity .18s;
}
.r2w-mobile-nav__close:hover { opacity: 1; }
.r2w-mobile-nav__close svg   { width: 24px; height: 24px; }

/* Mobile menu items */
.r2w-mobile-menu { list-style: none; margin: 0; padding: 12px 0; flex: 1; }
.r2w-mobile-menu li { border-bottom: 1px solid #F0F0F0; }
.r2w-mobile-menu li:last-child { border-bottom: none; }
.r2w-mobile-menu a {
    display:     block;
    padding:     14px 24px;
    color:       #333;
    font-size:   16px;
    font-weight: 600;
    text-decoration: none;
    transition:  background .15s, color .15s;
}
.r2w-mobile-menu a:hover,
.r2w-mobile-menu .current-menu-item > a { background: var(--r2w-primary-light); color: var(--r2w-primary); }
.r2w-mobile-menu .sub-menu { list-style: none; padding: 0; background: #FAFAFA; }
.r2w-mobile-menu .sub-menu a { padding: 10px 24px 10px 36px; font-size: 14px; font-weight: 500; color: #555; }

.r2w-mobile-nav__cta { padding: 16px 20px; flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════════════
   PAGE WRAP (between header and footer)
══════════════════════════════════════════════════════════════════ */

.r2w-page-wrap { min-height: 60vh; }

/* Elementor: ensure sections can be full-width */
.elementor-section-boxed > .elementor-container { max-width: 1240px; }

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

.r2w-footer { background: var(--r2w-primary); color: rgba(255,255,255,.8); }

/* Main columns area */
.r2w-footer__main    { padding: clamp(40px, 8vw, 72px) 0; }
.r2w-footer__grid {
    display:               grid;
    grid-template-columns: 2fr 1.5fr 1.5fr;
    gap:                   clamp(24px, 4vw, 56px);
    align-items:           start;
}

/* Column headings */
.r2w-footer__heading {
    font-size:      12px;
    font-weight:    700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color:          rgba(255,255,255,.5);
    margin:         0 0 18px;
    padding-bottom: 10px;
    border-bottom:  1px solid rgba(255,255,255,.1);
}

/* Brand column */
.r2w-footer__logo-link  { text-decoration: none; display: inline-flex; align-items: center; }
.r2w-footer__logo       { height: 44px; width: auto; max-width: 200px; object-fit: contain; filter: brightness(0) invert(1); opacity: .9; }
.r2w-footer__logo-text  { font-size: 22px; font-weight: 800; color: #fff; }
.r2w-footer__logo-text span { color: var(--r2w-accent); }
.r2w-footer__tagline    { font-size: 14px; color: rgba(255,255,255,.55); margin: 12px 0 20px; line-height: 1.5; }

/* Social icons */
.r2w-footer__social { display: flex; gap: 10px; margin-top: 8px; }
.r2w-social-link {
    display:       flex;
    align-items:   center;
    justify-content: center;
    width:         38px;
    height:        38px;
    border-radius: 50%;
    background:    rgba(255,255,255,.1);
    color:         #fff;
    text-decoration: none;
    transition:    background .2s, transform .18s;
}
.r2w-social-link:hover { background: var(--r2w-accent); color: #fff; transform: translateY(-2px); }
.r2w-social-link svg   { width: 18px; height: 18px; }

/* Footer nav */
.r2w-footer__menu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.r2w-footer__menu a { color: rgba(255,255,255,.75); text-decoration: none; font-size: 14px; padding: 4px 0; transition: color .18s, padding-left .18s; display: inline-block; }
.r2w-footer__menu a:hover { color: #fff; padding-left: 4px; }
.r2w-footer__menu .current-menu-item a { color: #fff; font-weight: 600; }

/* Contact */
.r2w-footer__contact   { font-style: normal; display: flex; flex-direction: column; gap: 10px; }
.r2w-contact-row       { display: flex; align-items: flex-start; gap: 8px; margin: 0; font-size: 14px; line-height: 1.5; }
.r2w-contact-row a     { color: rgba(255,255,255,.8); text-decoration: none; }
.r2w-contact-row a:hover { color: #fff; }
.r2w-contact-row--name strong { color: #fff; font-size: 15px; }
.r2w-contact-row--fiscal { font-size: 12px; color: rgba(255,255,255,.45); gap: 4px; flex-wrap: wrap; }
.r2w-contact-row .r2w-icon--sm { color: rgba(255,255,255,.5); margin-top: 2px; flex-shrink: 0; }

/* Footer widgets (when active) */
.footer-widget       { margin-bottom: 16px; }
.footer-widget__title{ font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,.5); margin: 0 0 12px; }

/* Copyright bar */
.r2w-footer__bottom { background: rgba(0,0,0,.2); padding: 14px 0; }
.r2w-footer__bottom-inner {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    flex-wrap:       wrap;
    gap:             8px;
}
.r2w-footer__copyright { margin: 0; font-size: 13px; color: rgba(255,255,255,.5); }
.r2w-footer__copyright a { color: rgba(255,255,255,.7); text-decoration: none; }
.r2w-footer__copyright a:hover { color: #fff; }
.r2w-footer__bottom-links { display: flex; gap: 16px; flex-wrap: wrap; }
.r2w-footer__bottom-links a { font-size: 12px; color: rgba(255,255,255,.45); text-decoration: none; }
.r2w-footer__bottom-links a:hover { color: #fff; }

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

/* Tablet: 768px – 1024px */
@media (max-width: 1024px) {
    .r2w-footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
    .r2w-footer__col--contact { grid-column: 1 / -1; }
}

/* Mobile: < 768px */
@media (max-width: 768px) {
    /* Header */
    .r2w-header__nav { display: none; }   /* Hide desktop nav */
    .r2w-hamburger   { display: flex; }   /* Show hamburger */
    .r2w-header__cta { display: none; }   /* Hide CTA on mobile (shown in drawer) */

    /* Footer */
    .r2w-footer__grid  { grid-template-columns: 1fr; gap: 32px; }
    .r2w-footer__bottom-inner { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* Mobile: < 480px */
@media (max-width: 480px) {
    .r2w-footer__social .r2w-social-link { width: 34px; height: 34px; }
}

/* ═══════════════════════════════════════════════════════════════
   WP / WooCommerce helpers
══════════════════════════════════════════════════════════════════ */

/* Align content below sticky header */
.admin-bar .r2w-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .r2w-header { top: 46px; } }

/* WooCommerce: neutral buy button → brand */
.woocommerce .single_add_to_cart_button,
.woocommerce #respond input#submit { background-color: var(--r2w-accent) !important; border-color: var(--r2w-accent) !important; border-radius: var(--r2w-radius) !important; font-weight: 700 !important; }
.woocommerce .single_add_to_cart_button:hover { background-color: var(--r2w-accent-dark) !important; }

/* Elementor: page stretch compensation */
.elementor-section.elementor-section-full_width { margin-left: calc(-1 * ((100vw - 100%) / 2)); margin-right: calc(-1 * ((100vw - 100%) / 2)); }
