/*
 * RAMS Bridge CSS
 * Maps semantic class names to Tailwind-equivalent styles for Elementor usage.
 * Usage: Add these classes to Elementor "CSS Classes" field.
 */

/* 1. Grid Systems */
.ram-grid-5 {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: clamp(10px, 1.2vw, 14px);
}

/* 2. Card Components */
.ram-card-product {
    position: relative;
    aspect-ratio: 228 / 402;
    background-color: #f9fafb;
    /* gray-50 */
    border-radius: 0.875rem;
    overflow: hidden;
    isolation: isolate;
}

.ram-card-splash {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 0.875rem;
    background-color: #d5d5d5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    /* p-6 */
    aspect-ratio: 228 / 402;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    /* shadow-sm */
    transition: box-shadow 0.3s ease;
}

.ram-card-splash:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    /* shadow-md */
}

/* 3. Typography */
.ram-text-h1 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: clamp(0.8125rem, 0.85vw, 0.9375rem);
    color: white;
    letter-spacing: normal;
    line-height: 1;
}

.ram-text-body {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    line-height: 1.25;
    letter-spacing: 0.025em;
    /* tracking-wide */
    color: #333333;
}

/* 4. Buttons */
.ram-btn-pill {
    background-color: #e0e0e0;
    color: black;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.025em;
    /* tracking-wide */
    padding: 0.5rem 1.5rem;
    /* py-2 px-6 */
    border-radius: 9999px;
    /* rounded-full */
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.1), -5px -5px 15px rgba(255, 255, 255, 0.8);
    transition: transform 0.3s ease;
    white-space: nowrap;
    display: inline-block;
}

.ram-btn-pill:hover {
    transform: scale(1.05);
}

/* 5. Object Fit Helpers */
.js-zoom-lens {
    position: absolute;
    inset: 0;
    z-index: 50;
    background-repeat: no-repeat;
    background-size: 100%;
    opacity: 0;
    will-change: background-position, background-size, opacity;
    pointer-events: none;
    transition: background-size 0.3s ease-out, opacity 0.3s ease-out;
}

.js-zoom-target:hover .js-zoom-lens {
    background-size: 250%;
    /* Zoom to target magnification */
    opacity: 1;
}

/* 6. Admin Bar Fix (Sub-pixel rounding mitigation) */
body.admin-bar .js-zoom-target img {
    /* Slightly expand image to cover 1px gaps caused by Admin Bar layout shift */
    width: calc(100% + 1px) !important;
    max-width: none !important;
}

/* 7. Theme Component Overrides (Woostify) */
#scroll-to-top {
    background-color: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(212, 175, 55, 0.3) !important;
    color: #D4AF37 !important;
    transition: all 0.3s ease-in-out !important;
    border-radius: 6px !important;
    backdrop-filter: blur(4px) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

#scroll-to-top:hover {
    background-color: rgba(0, 0, 0, 0.6) !important;
    border-color: #D4AF37 !important;
    color: #fff !important;
    transform: translateY(-2px) !important;
}

#scroll-to-top svg {
    fill: currentColor !important;
    color: currentColor !important;
    width: 20px !important;
    height: 20px !important;
}

/* Responsive Visibility: Hide on mobile and tablet, show only on desktop */
@media (max-width: 1023px) {
    #scroll-to-top {
        display: none !important;
    }
}