/**
 * Roadrunner Equipment - Product Detail Page Styles
 * Pixel-perfect match to Figma design node 2125:2065
 */

/* ============================================
   Remove Unwanted Red Highlights
   ============================================ */
.product-main *,
.product-main *::before,
.product-main *::after {
    -webkit-tap-highlight-color: transparent !important;
}

.product-main a,
.product-main button,
.product-main input,
.product-main img {
    -webkit-tap-highlight-color: transparent !important;
    outline: none !important;
}

.product-main *:focus,
.product-main *:active {
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

/* Remove ALL hover color changes - except specific buttons */
.product-main a:hover,
.product-main a:focus,
.product-main a:active,
.product-main button:hover,
.product-main button:focus,
.product-main button:active {
    text-decoration: none !important;
}

/* Financing button - explicit white background on hover */
.product-main .financing-btn,
.product-main .financing-btn:hover,
.product-main .financing-btn:focus,
.product-main .financing-btn:active {
    background-color: #ffffff !important;
    border: 1px solid #e3e3e3 !important;
}

.product-main .financing-btn:hover {
    background-color: #f5f5f5 !important;
    border-color: #d0d0d0 !important;
}

.product-main .financing-btn span,
.product-main .financing-btn:hover span,
.product-main .financing-btn:focus span {
    color: #1a1a1a !important;
}

/* Font Imports */
@font-face {
    font-family: 'Riforma LL';
    src: url('/assets/fonts/RiformaLLWeb-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Riforma LL';
    src: url('/assets/fonts/RiformaLLWeb-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Riforma LL';
    src: url('/assets/fonts/RiformaLLWeb-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Riforma LL';
    src: url('/assets/fonts/RiformaLLWeb-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'SF Pro';
    src: url('/assets/fonts/SF-Pro-Display-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'SF Pro';
    src: url('/assets/fonts/SF-Pro-Display-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'SF Pro';
    src: url('/assets/fonts/SF-Pro-Display-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'SF Pro';
    src: url('/assets/fonts/SF-Pro-Text-Semibold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

/* ============================================
   Typography Classes - Figma Design System
   ============================================ */

/* Desktop - H1 Title */
.text-h1-title {
    font-family: 'Riforma LL', sans-serif;
    font-weight: 500;
    font-size: 32px;
    line-height: 96%;
    letter-spacing: -0.03em;
}

/* Desktop - H2 Subtitle */
.text-h2-subtitle {
    font-family: 'Riforma LL', sans-serif;
    font-weight: 400;
    font-size: 24px;
    line-height: 28px;
    letter-spacing: -0.516px;
}

/* Desktop - P2 Body Title */
.text-p2-body-title {
    font-family: 'SF Pro', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 1;
    letter-spacing: -0.85px;
}

/* Desktop - P3 Caption */
.text-p3-caption {
    font-family: 'SF Pro', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 600;
    font-size: 12px;
    line-height: 1;
    letter-spacing: -0.35px;
}

/* Desktop - P4 Eyebrow */
.text-p4-eyebrow {
    font-family: 'SF Pro', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 800;
    font-size: 10px;
    line-height: 1;
    letter-spacing: 0;
    text-transform: uppercase;
}

/* Desktop - B1 Button Large */
.text-b1-button {
    font-family: 'SF Pro', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 1;
    letter-spacing: -0.5px;
}

/* Price display - Riforma Medium */
.text-price {
    font-family: 'Riforma LL', sans-serif;
    font-weight: 500;
    letter-spacing: -0.96px;
}

/* Riforma Regular */
.font-riforma {
    font-family: 'Riforma LL', sans-serif;
}

/* Riforma Medium */
.font-riforma-medium {
    font-family: 'Riforma LL', sans-serif;
    font-weight: 500;
}

/* ============================================
   Spec Box Icons - SF Symbols (Figma exact)
   ============================================ */

/* Spec icon - SVG icon container */
.spec-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
}

.spec-icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

/* Spec label text */
.spec-label {
    font-family: 'SF Pro', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    font-weight: 600;
    font-size: 12px;
    line-height: normal;
    letter-spacing: -0.35px;
    color: #FFFFFF;
    opacity: 0.8;
    white-space: nowrap;
}

/* Spec value - orange text */
.spec-value {
    font-family: 'Riforma LL', sans-serif;
    font-weight: 500;
    font-size: 22px;
    line-height: 28px;
    letter-spacing: -0.473px;
    color: #ff6442;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Base Styles */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'SF Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Remove tap highlight */
* {
    -webkit-tap-highlight-color: transparent;
}

/* Thumbnail hover effect */
.thumbnail {
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    border: 2px solid transparent;
}

.thumbnail:hover {
    border: 2px solid #ff6442;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(255, 100, 66, 0.3);
}

/* Button hover effects */
button:hover,
a:hover {
    opacity: 0.9;
}

/* Similar products scroll */
#similar-products {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#similar-products::-webkit-scrollbar {
    display: none;
}

/* Modal animation */
#modal {
    transition: opacity 0.2s ease;
}

#modal > div {
    animation: slideUp 0.3s ease;
}

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

/* Tab button active state */
.tab-btn svg {
    transition: stroke 0.2s ease;
}

/* Responsive adjustments */
@media (max-width: 1280px) {
    .product-main .max-w-\[1440px\] {
        padding-left: 24px;
        padding-right: 24px;
    }
}

@media (max-width: 1024px) {
    /* Stack layout on tablet */
    .product-main .flex.gap-\[24px\] {
        flex-direction: column;
    }

    .product-main .w-\[868px\] {
        width: 100%;
    }

    .product-main .max-w-\[452px\] {
        max-width: 100%;
    }

    /* Adjust image gallery */
    .product-main .h-\[601px\] {
        height: 450px;
    }
}

/* Footer styles from inventory page */
.footer-container {
    background: #000;
    color: #fff;
}

/* ============================================
   Mobile Product Page Styles - Figma 2114:7724
   ============================================ */
@media (max-width: 767px) {
    /* Main content container */
    .product-main #content {
        padding: 0 !important;
        gap: 16px !important;
    }

    /* Hide breadcrumb on mobile */
    .product-main #content > .max-w-\[1440px\]:first-child {
        display: none !important;
    }

    /* Main container padding - remove for full bleed image */
    .product-main .max-w-\[1440px\] {
        padding-left: 0 !important;
        padding-right: 0 !important;
        max-width: 100% !important;
    }

    .product-main .max-w-\[1440px\].mx-auto.px-\[40px\].pt-\[24px\] {
        padding: 0 !important;
    }

    /* Stack the main layout - Figma: gap-[16px] */
    .product-main .flex.gap-\[24px\] {
        flex-direction: column !important;
        gap: 16px !important;
        padding: 0 !important;
    }

    /* Image gallery container - full width with side padding for thumbnails */
    .product-main .w-\[868px\] {
        width: 100% !important;
        gap: 16px !important;
        padding: 0 !important;
    }

    /* Thumbnails row wrapper - needs padding */
    .product-main .w-\[868px\] > .content-stretch.flex.items-end.justify-between {
        padding: 0 24px !important;
    }

    /* Main image frame - Figma: h-[433px], full bleed */
    .product-main .h-\[601px\] {
        height: 433px !important;
        border-radius: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        padding: 16px !important;
    }

    .product-main .h-\[601px\] > img {
        border-radius: 0 !important;
    }

    /* Next/Zoom button in image - Figma: 44x44 */
    .product-main [data-name="Zoom"],
    .product-main .h-\[601px\] > .size-\[44px\] {
        width: 44px !important;
        height: 44px !important;
    }

    /* Thumbnails wrapper - hide nav arrows, full width */
    .product-main .content-stretch.flex.items-end.justify-between {
        justify-content: flex-start !important;
    }

    /* Hide navigation arrows on mobile - use swipe instead */
    .product-main .content-stretch.flex.items-end.justify-between > .flex.gap-\[8px\]:last-child {
        display: none !important;
    }

    /* Thumbnails container - Figma: px-[24px], gap-[8px], h-[48px] */
    .product-main #thumbnails,
    .product-main [data-name="Thumbnails"] {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        padding: 0 !important;
        gap: 8px !important;
        height: 48px !important;
        width: 100% !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        flex-wrap: nowrap !important;
        flex: none !important;
        align-self: stretch !important;
        flex-grow: 0 !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .product-main #thumbnails::-webkit-scrollbar,
    .product-main [data-name="Thumbnails"]::-webkit-scrollbar {
        display: none;
    }

    /* Thumbnails - Figma: 48x48 */
    .product-main .thumbnail,
    .product-main #thumbnails > div,
    .product-main [data-name="Thumbnails"] > div {
        width: 48px !important;
        height: 48px !important;
        min-width: 48px !important;
        flex-shrink: 0 !important;
        flex: none !important;
    }

    /* Product info container - Figma: px-[24px] */
    .product-main .max-w-\[452px\] {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 24px !important;
        gap: 16px !important;
    }

    /* Product info card - Figma: p-[24px], rounded-[20px], gap-[16px] */
    .product-main [data-name="Product info"].bg-black {
        padding: 24px !important;
        border-radius: 20px !important;
        gap: 16px !important;
    }

    /* Category badge - Figma: 10px font */
    .product-main [data-name="Badge"] span {
        font-size: 10px !important;
        letter-spacing: -0.35px !important;
    }

    /* Title - Figma: 24px Riforma */
    .product-main [data-name="Product info"] p.text-\[24px\] {
        font-size: 24px !important;
        line-height: 28px !important;
    }

    /* Price - Figma: 32px */
    .product-main [data-name="Product info"] .text-\[32px\] {
        font-size: 32px !important;
    }

    /* Spec boxes - Figma mobile Frame 1565007633 */
    #spec-boxes {
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start !important;
        padding: 0px !important;
        gap: 8px !important;
        height: 134px !important;
    }

    /* Individual spec box - Figma mobile CTA */
    .spec-box {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        padding: 16px !important;
        gap: 16px !important;
        height: 134px !important;
        background: rgba(255, 255, 255, 0.12) !important;
        border-radius: 16px !important;
        flex: 1 0 0 !important;
        align-self: stretch !important;
    }

    /* Inner frame - Figma mobile Frame 1565007638 */
    .spec-box-inner {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        padding: 0px !important;
        gap: 8px !important;
    }

    /* Spec icon - Figma mobile: 36x36, opacity 0.8 */
    .spec-icon {
        width: 36px !important;
        height: 36px !important;
        opacity: 0.8 !important;
    }

    /* Spec label - Figma mobile: SF Pro 590 12px */
    .spec-label {
        font-family: 'SF Pro', -apple-system, BlinkMacSystemFont, system-ui, sans-serif !important;
        font-weight: 590 !important;
        font-size: 12px !important;
        line-height: 14px !important;
        letter-spacing: -0.35px !important;
        color: #FFFFFF !important;
        opacity: 0.8 !important;
    }

    /* Spec value - Figma mobile: Riforma LL 500 16px */
    .spec-value {
        font-family: 'Riforma LL', sans-serif !important;
        font-weight: 500 !important;
        font-size: 16px !important;
        line-height: 28px !important;
        letter-spacing: -0.0215em !important;
        color: #FF6442 !important;
    }

    /* CTA Buttons - Figma: h-[42px], rounded-[12px] */
    .product-main [data-name="CTA"].h-\[44px\],
    .product-main .h-\[44px\],
    .product-main a.h-\[44px\],
    .product-main #financing-btn {
        height: 42px !important;
    }

    .product-main [data-name="CTA"] span {
        font-size: 16px !important;
    }

    /* Phone & Rental links - Figma: 12px font, gap-[24px] */
    .product-main [data-name="CTA"].gap-\[24px\] {
        font-size: 12px !important;
        gap: 24px !important;
        padding: 16px 0 0 0 !important;
    }

    .product-main [data-name="CTA"].gap-\[24px\] a {
        font-size: 12px !important;
    }

    .product-main [data-name="CTA"].gap-\[24px\] img {
        width: 12px !important;
        height: 12px !important;
    }

    /* View Condition Report / View Detailed Specs buttons - Figma: gap-[8px], h-[42px] */
    .product-main [data-name="Product info"]:not(.bg-black) {
        gap: 8px !important;
    }

    .product-main [data-name="Product info"]:not(.bg-black) button {
        height: 42px !important;
    }

    /* Similar Products section - hide on mobile per Figma design */
    .product-main [data-name="Title"],
    .product-main #similar-products {
        display: none !important;
    }

    /* Legacy/About Banner - Figma: h-[379px], p-[32px] */
    .product-main .mt-\[48px\].mb-\[48px\] {
        margin: 16px 0 !important;
        padding: 0 24px !important;
    }

    .product-main .mt-\[48px\].mb-\[48px\] > div {
        height: 379px !important;
        padding: 32px !important;
        width: 100% !important;
    }

    /* Legacy banner content layout - stack vertically */
    .product-main .mt-\[48px\].mb-\[48px\] .h-\[158\.632px\] {
        height: auto !important;
    }

    /* Legacy banner logo */
    .product-main .mt-\[48px\].mb-\[48px\] img[alt="Roadrunner Equipment"] {
        height: 37.5px !important;
    }

    /* Legacy banner text - Figma: 16px on mobile */
    .product-main .mt-\[48px\].mb-\[48px\] p.text-\[24px\] {
        font-size: 16px !important;
        line-height: 24px !important;
    }

    /* Legacy banner bottom section - stack vertically */
    .product-main .mt-\[48px\].mb-\[48px\] .leading-\[28px\] {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 16px !important;
    }

    /* Legacy banner arrow button - Figma: 42x42 */
    .product-main .mt-\[48px\].mb-\[48px\] a.size-\[71px\] {
        width: 42px !important;
        height: 42px !important;
        border-radius: 12px !important;
    }

    .product-main .mt-\[48px\].mb-\[48px\] a.size-\[71px\] svg {
        width: 20px !important;
        height: 20px !important;
    }

    /* Lightbox mobile adjustments */
    #lightbox .relative {
        max-width: 95vw !important;
    }

    #lightbox button.absolute.left-\[-60px\] {
        left: 10px !important;
    }

    #lightbox button.absolute.right-\[-60px\] {
        right: 10px !important;
    }

    #lightbox button.absolute.top-\[-50px\] {
        top: 10px !important;
        right: 10px !important;
    }

    #lightbox .absolute.bottom-\[-40px\] {
        bottom: 10px !important;
    }

    /* Modal mobile - full screen */
    #modal > div {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100vh !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
    }

    #modal [data-name="Header"] {
        padding: 24px !important;
    }

    #modal .p-\[40px\] {
        padding: 24px !important;
    }
}

/* Even smaller screens (iPhone SE, etc) */
@media (max-width: 375px) {
    .product-main .h-\[601px\] {
        height: 350px !important;
    }

    .product-main [data-name="CTA"].gap-\[24px\] {
        flex-direction: column !important;
        gap: 12px !important;
    }
}
