/* Custom styles for St. Louis Cabinet Warehouse - Industrial Luxury Design */
:root {
    --transition-speed: 0.4s;
    --navy-900: #102a43;
    --navy-800: #243b53;
    --navy-700: #334e68;
    --gold-600: #ca8a04;
    --gold-500: #eab308;
    --warm-50: #fafaf9;
    --warm-700: #44403c;
}

/* Better typography - industrial luxury feel */
body {
    font-feature-settings: "kern" 1, "liga" 1;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 {
    letter-spacing: -0.02em;
}

:where(h1) {
  font-size: 2rem;
  margin-block: 0.67em;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Hero section - Industrial Luxury Cabinet Aesthetic */
#home {
    background: linear-gradient(135deg,
        #102a43 0%,    /* Navy 900 - Deep, stable base */
        #243b53 35%,   /* Navy 800 */
        #334e68 70%,   /* Navy 700 */
        #486581 100%   /* Navy 600 - Lighter at edges */
    );
    position: relative;
    overflow: hidden;
    color: white;
}

/* Subtle cabinet-inspired pattern overlay */
#home::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        /* Gold accent glows */
        radial-gradient(circle at 20% 50%, rgba(234, 179, 8, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(234, 179, 8, 0.05) 0%, transparent 50%),
        /* Subtle wood grain texture */
        repeating-linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.02) 0px,
            rgba(255, 255, 255, 0.02) 1px,
            transparent 1px,
            transparent 4px
        );
    pointer-events: none;
    z-index: 0;
}

/* Vignette effect for depth */
#home::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse at center,
        transparent 0%,
        rgba(15, 23, 42, 0.3) 100%
    );
    pointer-events: none;
    z-index: 1;
}

/* Ensure content stays above overlays */
#home .hero-content {
    position: relative;
    z-index: 2;
}

#home .hero-content h1,
#home .hero-content p {
    color: white;
    text-shadow: 0 2px 12px rgba(15, 23, 42, 0.4);
}

:where(h1) {
  font-size: 2rem;        /* pick a base size that fits your design */
  margin-block: 0.67em;   /* roughly the default top/bottom spacing */
}

/* Enhanced card styling - Industrial Luxury */
.card {
    transition: all var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(120, 113, 108, 0.15);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow:
        0 20px 40px -10px rgba(15, 23, 42, 0.15),
        0 10px 20px -5px rgba(15, 23, 42, 0.1);
    border-color: rgba(202, 138, 4, 0.4);
}

/* Subtle borders for section definition */
section {
    border-bottom: 1px solid rgba(120, 113, 108, 0.08);
}

section:last-of-type {
    border-bottom: none;
}

/* Industrial Luxury Button Styles - Gold Accent CTAs */
.btn-primary {
    background: linear-gradient(135deg, #ca8a04 0%, #eab308 100%);
    border: 2px solid #a16207;
    color: white;
    font-weight: 600;
    letter-spacing: 0.025em;
    box-shadow: 0 4px 12px rgba(202, 138, 4, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #a16207 0%, #ca8a04 100%);
    border-color: #854d0e;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(202, 138, 4, 0.35);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(202, 138, 4, 0.3);
}

/* Secondary button - Navy outline */
.btn-secondary {
    background: white;
    border: 2px solid #102a43;
    color: #102a43;
    font-weight: 600;
}

.btn-secondary:hover {
    background: #102a43;
    border-color: #102a43;
    color: white;
    transform: translateY(-2px);
}

/* Smooth transitions for all buttons */
.btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Property card image container with placeholder */
.property-image {
    height: 220px;
    background-size: cover;
    background-position: center;
    border-radius: 0.5rem 0.5rem 0 0;
    background-color: #f3f4f6;
    position: relative;
}

/* Default placeholder for property images */
.property-image:not([style*="background-image"])::before {
    content: '🏠';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    opacity: 0.3;
}

/* Better placeholder pattern */
.property-image[style*="placeholder.jpg"]::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(45deg, #e5e7eb 25%, transparent 25%),
        linear-gradient(-45deg, #e5e7eb 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #e5e7eb 75%),
        linear-gradient(-45deg, transparent 75%, #e5e7eb 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    opacity: 0.3;
}

.property-image[style*="placeholder.jpg"]::after {
    content: '🏘️';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    opacity: 0.5;
}

/* ======================================================
   Performance-friendly reveal animations (opt-in only)
   ====================================================== */
.content-reveal {
    animation: content-reveal-fade-up 700ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
    will-change: opacity, transform;
}

.content-reveal--hero {
    animation-duration: 820ms;
}

.content-reveal--card {
    animation-duration: 620ms;
}

.content-reveal--card:nth-child(1) {
    animation-delay: 80ms;
}

.content-reveal--card:nth-child(2) {
    animation-delay: 140ms;
}

.content-reveal--card:nth-child(3) {
    animation-delay: 200ms;
}

@keyframes content-reveal-fade-up {
    from {
        opacity: 0.01;
        transform: translate3d(0, 16px, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* Enhanced contact form focus states - Industrial Luxury */
.form-control input:focus,
.form-control textarea:focus,
.input:focus,
.textarea:focus {
    border-color: #ca8a04;
    box-shadow: 0 0 0 4px rgba(234, 179, 8, 0.15);
    outline: none;
    transform: translateY(-2px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: #fffef5;
}

.form-control input,
.form-control textarea,
.input,
.textarea {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(120, 113, 108, 0.2);
}

.form-control input:hover,
.form-control textarea:hover,
.input:hover,
.textarea:hover {
    border-color: rgba(120, 113, 108, 0.35);
}

/* Label animation on focus - Gold accent */
.form-control:focus-within .label-text {
    color: #ca8a04;
    font-weight: 700;
    transition: all 0.3s ease;
}

/* ============================================
   Contact form - inline validation feedback
   Modern, responsive, unobtrusive cues that
   complement DaisyUI input-success / input-error.
   ============================================ */

/* Helper text under each field */
.form-hint {
    display: block;
    margin-top: 0.375rem;
    font-size: 0.8125rem;
    line-height: 1.35;
    color: rgba(68, 64, 60, 0.7); /* warm-700 @ 70% */
    transition: color 0.2s ease;
}

.form-control:focus-within .form-hint {
    color: rgba(68, 64, 60, 0.9);
}

/* Status icon affordance via CSS gradient (no extra DOM) */
#contact-form .form-control .input,
#contact-form .form-control .textarea {
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    background-size: 1.1rem 1.1rem;
    padding-right: 2.5rem;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease,
        transform 0.2s ease;
}

/* DaisyUI provides input-success / input-error border + ring; layer the
   icon and a soft tinted background so the cue is calm, not alarming. */
#contact-form .input.input-success,
#contact-form .textarea.textarea-success {
    background-color: #f4fbf6;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2316a34a' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'><path d='M4 11l4 4 8-9'/></svg>");
}

#contact-form .input.input-error,
#contact-form .textarea.textarea-error {
    background-color: #fdf6f6;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23dc2626' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'><circle cx='10' cy='10' r='7'/><path d='M10 6v5'/><circle cx='10' cy='14' r='0.5' fill='%23dc2626'/></svg>");
}

/* Textarea: pin the icon to the top-right so it doesn't ride the scroll. */
#contact-form .textarea.textarea-success,
#contact-form .textarea.textarea-error {
    background-position: right 0.85rem top 0.85rem;
}

/* Subtle nudge for invalid fields — quick, easy to dismiss visually. */
@keyframes stl-field-nudge {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}

#contact-form .input.input-error:not(:focus),
#contact-form .textarea.textarea-error:not(:focus) {
    animation: stl-field-nudge 0.18s ease-out;
}

/* Honor reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
    #contact-form .form-control input,
    #contact-form .form-control textarea,
    #contact-form .input,
    #contact-form .textarea {
        transition: none !important;
    }
    #contact-form .input.input-error:not(:focus),
    #contact-form .textarea.textarea-error:not(:focus) {
        animation: none !important;
    }
    #contact-form .form-control input:focus,
    #contact-form .form-control textarea:focus {
        transform: none !important;
    }
}

/* Address autocomplete dropdown polish */
#address-suggestions {
    max-height: 16rem;
    overflow-y: auto;
    padding: 0.25rem;
}

#address-suggestions [role="option"] {
    border-radius: 0.5rem;
}

#address-suggestions [role="option"]:hover,
#address-suggestions [role="option"][aria-selected="true"] {
    background-color: rgba(234, 179, 8, 0.08);
}

/* Submit button - subtle press feedback */
#contact-form button[type="submit"]:active {
    transform: translateY(1px);
}
#contact-form button[type="submit"][disabled] {
    opacity: 0.85;
    cursor: progress;
}

/* Mobile tightening: a touch more vertical breathing room. */
@media (max-width: 480px) {
    #contact-form .form-control { margin-top: 0.85rem; }
    #contact-form .input,
    #contact-form .textarea {
        font-size: 16px; /* prevent iOS zoom-on-focus */
    }
}

/* Loading state */
.loading {
    color: hsl(var(--p));
}

/* Enhanced badge styling */
.badge {
    font-weight: 600;
    letter-spacing: 0.025em;
}

/* Better property card price styling */
.property-image {
    position: relative;
    overflow: hidden;
}

.property-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.3), transparent);
    pointer-events: none;
}

/* Improve navbar with subtle shadow */
.navbar {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

/* Add decorative element to section headings - Gold accent */
h2.text-4xl::after {
    content: '';
    display: block;
    width: 80px;
    height: 5px;
    background: linear-gradient(to right,
        transparent 0%,
        #eab308 25%,
        #ca8a04 50%,
        #eab308 75%,
        transparent 100%
    );
    margin: 1.5rem auto 0;
    border-radius: 3px;
    box-shadow: 0 2px 8px rgba(234, 179, 8, 0.3);
}

/* Hover effect for scroll to top button - Gold glow */
#scrollToTop {
    background: linear-gradient(135deg, #ca8a04 0%, #eab308 100%);
    border: 2px solid #a16207;
}

#scrollToTop:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(234, 179, 8, 0.4);
    background: linear-gradient(135deg, #a16207 0%, #ca8a04 100%);
}

/* Smooth mobile menu improvements */
@media (max-width: 1024px) {
    .dropdown-content {
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    }
}

/* --- Hamburger Icon Styling --- */
.hamburger {
  position: relative;
  width: 24px;
  height: 18px;
  cursor: pointer;
  transition: transform 0.3s ease-in-out;
}

.hamburger span {
  position: absolute;
  display: block;
  height: 2px;
  width: 100%;
  background-color: currentColor; /* matches btn text color */
  border-radius: 2px;
  opacity: 1;
  left: 0;
  transform-origin: center;
  transition: all 0.3s ease-in-out;
}

/* Position lines */
.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 8px; }
.hamburger span:nth-child(3) { top: 16px; }

/* --- Open State Animation --- */
.hamburger.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Enhanced accessible button styles - maintain WCAG compliance */
.btn-primary,
.btn-primary:focus-visible {
    background: linear-gradient(135deg, #ca8a04 0%, #eab308 100%);
    border: 2px solid #a16207;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(202, 138, 4, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #a16207 0%, #ca8a04 100%);
    border-color: #854d0e;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(202, 138, 4, 0.35);
}

.btn-primary:focus-visible {
    outline: 3px solid rgba(234, 179, 8, 0.5);
    outline-offset: 2px;
}

/* Enhanced text contrast utilities - Navy color scheme */
.text-base-content\/60,
.text-base-content\/70 {
    /* Warm muted text with better readability */
    color: rgba(68, 64, 60, 0.85);  /* warm-700 at 85% */
}

/* Footer text with enhanced contrast */
footer .text-base-content\/60 {
    color: rgba(51, 78, 104, 0.9);  /* navy-700 at 90% */
}

.footer-logo {
  display: block;
  height: clamp(84px, 6vw, 120px); /* responsive scaling */
  width: auto;
  object-fit: contain;
}

/* Optional: tighten on very small screens */
@media (max-width: 480px) {
  .footer-logo {
    height: 56px;
  }
}

/* Ensure proper contrast on navy backgrounds */
.bg-primary .text-base-content,
.bg-navy-900 .text-base-content {
    color: #ffffff;
}

/* Hidden form field for honeypot */
.hp-field {
    position: absolute !important;
    left: -9999px !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
  }

/* ============================================
   Partners Page - KCD Brand Styles
   Scoped with .partners-page prefix to avoid
   conflicts with other pages.
   KCD Brand Colors:
     Primary:   #17557d
     Secondary: #2781bc
     Accent:    #ab9055
     Soft:      #b3dfd4
     Dark:      #2b313f
     Teal:      #468499
   ============================================ */

/* --- KCD Hero Section --- */
.partners-page-hero {
    background: linear-gradient(135deg,
        #17557d 0%,
        #1a6291 40%,
        #2781bc 100%
    );
    position: relative;
    overflow: hidden;
    color: #ffffff;
}

.partners-page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 15% 50%, rgba(171, 144, 85, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 85% 80%, rgba(179, 223, 212, 0.06) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.partners-page-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse at center,
        transparent 0%,
        rgba(23, 85, 125, 0.25) 100%
    );
    pointer-events: none;
    z-index: 1;
}

.partners-page-hero-content {
    position: relative;
    z-index: 2;
}

.partners-page-hero h1,
.partners-page-hero p {
    color: #ffffff;
}

/* Prevent the global h2::after gold underline on partners page dark sections */
.partners-page-dark-panel h2.text-4xl::after,
.partners-page-dark-panel h2.text-3xl::after,
.partners-page-hero h2::after {
    display: none;
}

/* --- KCD Buttons --- */
.partners-page-btn-primary {
    background-color: #17557d;
    border: 2px solid #124868;
    color: #ffffff;
    font-weight: 600;
    letter-spacing: 0.025em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.partners-page-btn-primary:hover {
    background-color: #124868;
    border-color: #0e3a54;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(23, 85, 125, 0.3);
}

.partners-page-btn-primary:focus-visible {
    outline: 3px solid rgba(23, 85, 125, 0.5);
    outline-offset: 2px;
}

.partners-page-btn-primary:active {
    transform: translateY(0);
}

.partners-page-btn-outline {
    background-color: transparent;
    border: 2px solid #17557d;
    color: #17557d;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.partners-page-btn-outline:hover {
    background-color: #17557d;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(23, 85, 125, 0.25);
}

.partners-page-btn-outline:focus-visible {
    outline: 3px solid rgba(23, 85, 125, 0.5);
    outline-offset: 2px;
}

/* White variant for dark backgrounds */
.partners-page-btn-white {
    background-color: #ffffff;
    border: 2px solid #ffffff;
    color: #2b313f;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.partners-page-btn-white:hover {
    background-color: #f0f4f8;
    border-color: #f0f4f8;
    color: #17557d;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.2);
}

.partners-page-btn-white:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.partners-page-btn-outline-white {
    background-color: transparent;
    border: 2px solid #ffffff;
    color: #ffffff;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.partners-page-btn-outline-white:hover {
    background-color: #ffffff;
    color: #2b313f;
    transform: translateY(-2px);
}

.partners-page-btn-outline-white:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid rgba(16, 42, 67, 0.45);
    outline-offset: 3px;
}

/* ======================================================
   Scroll-triggered reveal animations (IntersectionObserver)
   Add .scroll-reveal to any element. The JS observer adds
   .is-visible when ≥15 % of the element enters the viewport.
   ====================================================== */
.scroll-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity 0.72s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.72s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.scroll-reveal.is-visible {
    opacity: 1;
    transform: translate(0, 0) scale(1);
}

/* Direction variants */
.scroll-reveal--fade-left {
    transform: translateX(-32px);
}

.scroll-reveal--fade-right {
    transform: translateX(32px);
}

.scroll-reveal--scale {
    opacity: 0;
    transform: scale(0.94);
}

/* Stagger children inside a grid / flex container.
   Apply .scroll-reveal-stagger on the parent; each
   direct child with .scroll-reveal gets a progressive delay. */
.scroll-reveal-stagger > .scroll-reveal:nth-child(1) { transition-delay: 0ms; }
.scroll-reveal-stagger > .scroll-reveal:nth-child(2) { transition-delay: 120ms; }
.scroll-reveal-stagger > .scroll-reveal:nth-child(3) { transition-delay: 240ms; }
.scroll-reveal-stagger > .scroll-reveal:nth-child(4) { transition-delay: 360ms; }

/* Slightly longer reveal for hero-level content */
.scroll-reveal--slow {
    transition-duration: 0.92s;
}

/* ======================================================
   Hero image subtle float (gentle breathing motion)
   ====================================================== */
.hero-float {
    animation: hero-float 6s ease-in-out infinite;
}

@keyframes hero-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}

/* ======================================================
   Section heading underline grow-in
   The gold bar under h2.text-4xl grows from center
   when the heading scrolls into view.
   ====================================================== */
.scroll-reveal h2.text-4xl::after,
h2.text-4xl.scroll-reveal::after {
    transform: scaleX(0);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.25s;
}

.scroll-reveal.is-visible h2.text-4xl::after,
h2.text-4xl.scroll-reveal.is-visible::after {
    transform: scaleX(1);
}

/* ======================================================
   Icon container subtle hover pulse
   ====================================================== */
.partners-page-icon,
.card-body .w-16,
.card-body .w-14 {
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card:hover .partners-page-icon,
.card:hover .card-body .w-16,
.card:hover .card-body .w-14 {
    transform: scale(1.08);
}

/* ======================================================
   Benefit list items slide-in from left
   ====================================================== */
.partners-page-benefit-item.scroll-reveal {
    transform: translateX(-20px);
}

.partners-page-benefit-item.scroll-reveal.is-visible {
    transform: translateX(0);
}

/* ======================================================
   CTA button subtle attention pulse (plays once on reveal)
   ====================================================== */
.scroll-reveal.is-visible .btn-primary,
.scroll-reveal.is-visible .about-hero-cta-btn,
.scroll-reveal.is-visible .partners-page-btn-white {
    animation: cta-pulse 2s ease-in-out 0.8s 1;
}

@keyframes cta-pulse {
    0%, 100% { box-shadow: 0 4px 12px rgba(202, 138, 4, 0.25); }
    50%      { box-shadow: 0 8px 28px rgba(202, 138, 4, 0.4); }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .content-reveal {
        animation: none !important;
        transform: none !important;
        opacity: 1 !important;
    }

    .scroll-reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .hero-float {
        animation: none !important;
    }
}

/* --- KCD Color Utilities --- */
.partners-page-text-kcd {
    color: #17557d;
}

.partners-page-border-kcd {
    border-color: #17557d;
}

/* --- KCD Dark Panel --- */
.partners-page-dark-panel {
    background-color: #2b313f;
    color: #ffffff;
}

/* --- KCD Soft Background --- */
.partners-page-soft-bg {
    background-color: #e8f4f0;
}

/* ============================================
   Manage Products Page Responsive Enhancements
   Scoped with .manage-products-page to avoid
   global conflicts.
   ============================================ */

.manage-products-page .tabs[role="tablist"] {
    scrollbar-width: thin;
}

.manage-products-page .tabs[role="tablist"]::-webkit-scrollbar {
    height: 6px;
}

.manage-products-page .tabs[role="tablist"]::-webkit-scrollbar-thumb {
    background-color: rgba(120, 113, 108, 0.35);
    border-radius: 9999px;
}

.manage-products-page .manage-products-tablist {
    align-items: center;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.78));
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 0.9rem;
    box-shadow:
        0 8px 18px -16px rgba(15, 23, 42, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.72);
    padding: 0.375rem;
}

.manage-products-page .manage-products-tab-btn {
    border-radius: 0.7rem;
    font-weight: 600;
    transition:
        color 180ms ease,
        background-color 180ms ease,
        transform 180ms ease,
        box-shadow 180ms ease;
}

.manage-products-page .manage-products-tab-btn:not(.tab-active):hover {
    background-color: rgba(59, 130, 246, 0.08);
    color: rgb(30, 64, 175);
}

.manage-products-page .manage-products-tab-btn.tab-active {
    box-shadow:
        0 10px 18px -14px rgba(37, 99, 235, 0.75),
        inset 0 0 0 1px rgba(37, 99, 235, 0.18);
    transform: translateY(-1px);
}

.manage-products-page .manage-products-tab-btn:focus-visible {
    outline: 3px solid rgba(59, 130, 246, 0.3);
    outline-offset: 1px;
}

.manage-products-page .manage-products-tab-panel {
    animation: manage-products-tab-fade-in 220ms ease;
}

@keyframes manage-products-tab-fade-in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.manage-products-main {
    width: min(100%, 1440px);
}

.manage-products-section-card {
    min-width: 0;
}

.manage-products-filters-bar .form-control,
.manage-products-filters-bar .select,
.manage-products-filters-bar .input {
    min-width: 0;
    width: 100%;
}

.manage-products-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.manage-products-table {
    min-width: 760px;
}

.manage-products-table th,
.manage-products-table td {
    white-space: nowrap;
    vertical-align: middle;
}

.manage-products-table td.manage-products-line-description-cell {
    max-width: 50ch;
    white-space: normal;
    overflow-wrap: anywhere;
}

.manage-products-row-actions {
    justify-content: flex-start;
}

@media (max-width: 1024px) {
    .manage-products-page .card-title.text-2xl {
        font-size: 1.25rem;
        line-height: 1.75rem;
    }
}

@media (max-width: 768px) {
    .manage-products-main {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .manage-products-page .tabs[role="tablist"] {
        padding-bottom: 0.25rem;
    }

    .manage-products-page #products-count-summary,
    .manage-products-page #costs-count-summary,
    .manage-products-page #providers-count-summary {
        line-height: 1.4;
    }

    .manage-products-page #providers-accordion-container [data-provider-group] button[aria-expanded] {
        align-items: flex-start;
    }
}

/* --- KCD Feature Cards --- */
.partners-page-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(23, 85, 125, 0.1);
}

.partners-page-card:hover {
    transform: translateY(-6px);
    box-shadow:
        0 16px 32px -8px rgba(23, 85, 125, 0.12),
        0 8px 16px -4px rgba(23, 85, 125, 0.08);
    border-color: rgba(23, 85, 125, 0.25);
}

/* --- KCD Card Icon Container --- */
.partners-page-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(23, 85, 125, 0.08);
    color: #17557d;
    flex-shrink: 0;
}

/* --- KCD Logo Placeholder --- */
.partners-page-logo-slot {
    min-height: 5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #17557d;
    border-radius: 0.75rem;
    padding: 1.5rem 1rem;
    text-align: center;
    color: #17557d;
    font-weight: 600;
    background-color: rgba(23, 85, 125, 0.03);
}

/* --- KCD Trust Mark Placeholder --- */
.partners-page-trust-slot {
    border: 2px dashed #17557d;
    border-radius: 0.75rem;
    padding: 2rem 1.5rem;
    text-align: center;
    background-color: #ffffff;
}

/* --- KCD Benefits List Items --- */
.partners-page-benefit-item {
    background-color: #ffffff;
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    border: 1px solid rgba(23, 85, 125, 0.1);
    transition: all 0.3s ease;
}

.partners-page-benefit-item:hover {
    border-color: rgba(23, 85, 125, 0.2);
    box-shadow: 0 4px 12px rgba(23, 85, 125, 0.06);
}

/* --- KCD Image Container --- */
.partners-page-image-container {
    overflow: hidden;
    border-radius: 0.75rem;
    box-shadow: 0 10px 40px -10px rgba(15, 23, 42, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.partners-page-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Prevent the global h2 gold underline on partners page headings */
.partners-page-section h2.text-4xl::after,
.partners-page-section h2.text-3xl::after {
    background: linear-gradient(to right,
        transparent 0%,
        #17557d 25%,
        #2781bc 50%,
        #17557d 75%,
        transparent 100%
    );
    box-shadow: 0 2px 8px rgba(23, 85, 125, 0.2);
}


.about-hero-cta-btn {
    background: linear-gradient(135deg, #d39a16 0%, #b77a08 100%);
    border: 1px solid #9a6506;
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: 0 14px 32px -14px rgba(183, 122, 8, 0.55);
    transition: all 0.25s ease;
}

.about-hero-cta-btn:hover {
    background: linear-gradient(135deg, #e2aa2a 0%, #c78609 100%);
    border-color: #a96d07;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 18px 36px -14px rgba(183, 122, 8, 0.65);
}

.about-hero-cta-btn:focus-visible {
    outline: 3px solid rgba(211, 154, 22, 0.35);
    outline-offset: 3px;
}

.mission-btn {
    border-color: #1e3a5f;
    color: #1e3a5f;
    font-weight: 600;
    transition: all 0.25s ease;
}

.mission-btn:hover {
    background-color: #1e3a5f;
    border-color: #1e3a5f;
    color: #ffffff;
}

.partners-page-partner-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.6rem 0.9rem;
    border-radius: 9999px;
    background-color: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1;
    backdrop-filter: blur(8px);
}

.partners-page-logo-carousel {
    width: 100%;
}

.partners-page-logo-stage {
    position: relative;
    width: 100%;
    min-height: clamp(180px, 28vw, 280px);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 14px 40px -18px rgba(15, 23, 42, 0.28);
    overflow: hidden;
    isolation: isolate;
}

.partners-page-logo-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(39, 129, 188, 0.08), transparent 35%),
        radial-gradient(circle at 80% 80%, rgba(171, 144, 85, 0.08), transparent 35%);
    pointer-events: none;
}

.partners-page-logo-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    transform: translateX(16px) scale(0.985);
    transition:
        opacity 280ms ease,
        transform 280ms ease;
    pointer-events: none;
}

.partners-page-logo-slide.is-active {
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: auto;
}

.partners-page-logo-image {
    display: block;
    width: 100%;
    max-width: min(100%, 420px);
    max-height: clamp(90px, 16vw, 150px);
    object-fit: contain;
    margin-inline: auto;
}

.partners-page-logo-carousel-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    margin-top: 1rem;
}

.partners-page-logo-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transition: background-color 180ms ease, transform 180ms ease;
}

.partners-page-logo-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.partners-page-logo-nav:focus-visible,
.partners-page-logo-dot:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.38);
    outline-offset: 2px;
}

.partners-page-logo-dots {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.partners-page-logo-dot {
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 9999px;
    border: 0;
    background: rgba(255, 255, 255, 0.35);
    transition: transform 180ms ease, background-color 180ms ease;
}

.partners-page-logo-dot.is-active {
    background: #ffffff;
    transform: scale(1.15);
}

.partners-page-dark-panel--logo {
    position: relative;
    overflow: hidden;
}

/* DEFAULT: watermark (mobile + md) */
.partners-page-dark-panel--logo::after {
    content: "";
    position: absolute;

    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    width: clamp(220px, 45vw, 420px);
    height: clamp(220px, 45vw, 420px);

    background: url("/static/assets/img/logo/STL Cabinet Warehouse Logo.webp") no-repeat center;
    background-size: contain;

    opacity: 0.045;

    pointer-events: none;
    z-index: 0;
}

/* Keep content above */
.partners-page-dark-panel--logo > * {
    position: relative;
    z-index: 1;
}

@media (max-width: 640px) {
    .partners-page-dark-panel--logo::after {
        top: 25%; /* 50% → 25% shifts it upward */
        left: 50%;
        transform: translate(-50%, -50%);
    }
}

@media (min-width: 1024px) {
    .partners-page-dark-panel--logo::after {
        top: 50%;
        left: auto;
        right: -8%;

        transform: translateY(-50%);

        width: clamp(300px, 30vw, 500px);
        height: clamp(300px, 30vw, 500px);

        opacity: 0.05;
    }
}

@media (max-width: 1023px) {
    .partners-page-hero-copy {
        text-align: center;
        max-width: 100%;
    }

    .partners-page-partner-pill {
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .partners-page-logo-slide,
    .partners-page-logo-nav,
    .partners-page-logo-dot {
        transition: none;
    }
}

/* ============================================
   Index Page – Enhanced Content Sections
   All classes prefixed with idx- to avoid
   conflicts in the global namespace.
   ============================================ */

/* --- Product Category Cards --- */
.idx-category-card {
    background-color: #ffffff;
    border: 2px solid rgba(120, 113, 108, 0.12);
    border-radius: 1rem;
    overflow: hidden;
    align-items: flex-start;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.idx-category-card:hover {
    transform: translateY(-8px);
    border-color: rgba(202, 138, 4, 0.35);
    box-shadow:
        0 20px 40px -10px rgba(15, 23, 42, 0.12),
        0 8px 16px -4px rgba(15, 23, 42, 0.06);
}

.idx-category-card-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    flex-shrink: 0;
}

.idx-category-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.idx-category-card:hover .idx-category-card-image img {
    transform: scale(1.06);
}

.idx-category-card-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg,
            rgba(16, 42, 67, 0.08) 0%,
            rgba(16, 42, 67, 0.18) 100%
        ),
        linear-gradient(135deg,
            rgba(202, 138, 4, 0.06) 0%,
            transparent 60%
        );
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.idx-category-card:hover .idx-category-card-overlay {
    background:
        linear-gradient(180deg,
            rgba(16, 42, 67, 0.04) 0%,
            rgba(16, 42, 67, 0.12) 100%
        ),
        linear-gradient(135deg,
            rgba(202, 138, 4, 0.08) 0%,
            transparent 60%
        );
}

.idx-category-card-content {
    padding: 2rem 1.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.idx-category-features {
    list-style: none;
    padding: 1rem;
    padding-bottom: 2rem;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: left;
}

.idx-category-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: rgba(68, 64, 60, 0.8);
}

.idx-category-features li::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ca8a04, #eab308);
    flex-shrink: 0;
}

.idx-category-card-content .btn {
    width: 100%;
    max-width: 220px;      /* controls overall size */
    white-space: nowrap;   /* prevents wrapping */
    justify-content: center;
    align-self: center;
}

.idx-btn {
    width: 100%;
    max-width: 320px;
    white-space: nowrap;
    justify-content: center;
    font-weight: 600;
    border-width: 1.5px;
    transition: all 0.25s ease;
    margin-bottom: 1rem;
}

.idx-btn--kitchen {
    color: #92400e;
    border-color: rgba(202, 138, 4, 0.5);
    background: rgba(202, 138, 4, 0.08);
}

.idx-btn--kitchen:hover {
    background: #ca8a04;
    color: white;
}

.idx-btn--bath {
    color: #334155;
    border-color: rgba(51, 65, 85, 0.4);
    background: rgba(51, 65, 85, 0.06);
}

.idx-btn--bath:hover {
    background: #334155;
    color: white;
}

.idx-btn--custom {
    color: #1e3a8a;
    border-color: rgba(30, 58, 138, 0.4);
    background: rgba(30, 58, 138, 0.06);
}

.idx-btn--custom:hover {
    background: #1e3a8a;
    color: white;
}

.idx-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.08);
}

/* --- Trust Stats Bar --- */
.idx-stats-section {
    background: linear-gradient(135deg,
        #102a43 0%,
        #243b53 50%,
        #334e68 100%
    );
    position: relative;
    overflow: hidden;
}

.idx-stats-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 10% 50%, rgba(234, 179, 8, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 90% 50%, rgba(234, 179, 8, 0.04) 0%, transparent 50%);
    pointer-events: none;
}

.idx-stat-item {
    position: relative;
    z-index: 1;
    padding: 0.5rem 0;
}

.idx-stat-number {
    display: block;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #eab308, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
    margin-bottom: 0.35rem;
}

.idx-stat-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75);
    letter-spacing: 0.01em;
}

/* --- Partner Cards --- */
.idx-partner-card {
    background-color: #ffffff;
    border: 2px solid rgba(120, 113, 108, 0.1);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.idx-partner-card:hover {
    transform: translateY(-6px);
    border-color: rgba(202, 138, 4, 0.3);
    box-shadow:
        0 20px 40px -10px rgba(15, 23, 42, 0.12),
        0 8px 16px -4px rgba(15, 23, 42, 0.06);
}

.idx-partner-logo-area {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid rgba(120, 113, 108, 0.08);
    min-height: 120px;
}

.idx-partner-logo {
    max-height: 64px;
    max-width: 260px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* --- Service Area Chips --- */
.idx-area-chip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    background-color: #ffffff;
    border: 2px solid rgba(120, 113, 108, 0.12);
    border-radius: 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #334e68;
    transition: all 0.3s ease;
}

.idx-area-chip:hover {
    border-color: rgba(202, 138, 4, 0.3);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
    transform: translateY(-2px);
}

.idx-area-chip span {
  flex: 1;
  text-align: left;
}

/* --- CTA Banner --- */
.idx-cta-section {
    background: linear-gradient(135deg,
        #102a43 0%,
        #1a3a54 40%,
        #243b53 100%
    );
    position: relative;
    overflow: hidden;
}

.idx-cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 30% 30%, rgba(234, 179, 8, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(234, 179, 8, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.idx-cta-section > * {
    position: relative;
    z-index: 1;
}

/* Prevent the global h2 gold underline inside navy CTA/stats sections */
#idx-cta-banner h2.text-3xl::after,
#idx-cta-banner h2.text-4xl::after,
#idx-trust-stats h2::after {
    display: none;
}

/* --- Project Gallery (Masonry + Lightbox) --- */
.gallery-masonry {
    position: relative;
}

.gallery-sizer,
.gallery-item {
    width: calc(50% - 8px);
}

@media (min-width: 768px) {
    .gallery-sizer,
    .gallery-item {
        width: calc(33.333% - 11px);
    }
}

.gallery-item {
    margin-bottom: 16px;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.gallery-item--hidden {
    opacity: 0;
    transform: scale(0.92);
}

.gallery-item-inner {
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
    border: 2px solid rgba(120, 113, 108, 0.12);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item-inner:hover {
    border-color: rgba(202, 138, 4, 0.35);
    box-shadow:
        0 16px 32px -8px rgba(15, 23, 42, 0.14),
        0 6px 12px -3px rgba(15, 23, 42, 0.06);
    transform: translateY(-4px);
}

.gallery-item-inner img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item-inner:hover img {
    transform: scale(1.05);
}

.gallery-item-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.25rem;
    background:
        linear-gradient(180deg,
            transparent 40%,
            rgba(16, 42, 67, 0.55) 100%
        ),
        linear-gradient(135deg,
            rgba(202, 138, 4, 0.04) 0%,
            transparent 60%
        );
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.gallery-item-inner:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-label {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    line-height: 1.3;
}

.gallery-item-category {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 0.25rem;
}

.gallery-filter-btn {
    transition: all 0.25s ease;
}

.gallery-filter-btn.is-active {
    pointer-events: none;
}

/* GLightbox skin overrides to match site theme */
.goverlay {
    background: rgba(16, 42, 67, 0.92) !important;
}

.gclose,
.gnext,
.gprev {
    background: rgba(255, 255, 255, 0.12) !important;
    border-radius: 0.5rem !important;
}

.gclose:hover,
.gnext:hover,
.gprev:hover {
    background: rgba(202, 138, 4, 0.35) !important;
}

.gslide-title {
    font-family: 'Inter', sans-serif !important;
    font-weight: 700 !important;
}

.gslide-desc {
    font-family: 'Inter', sans-serif !important;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .idx-category-card-image {
        height: 160px;
    }

    .idx-category-card-content {
        padding: 1.5rem 1.25rem;
    }

    .idx-partner-logo-area {
        min-height: 100px;
        padding: 1.5rem 1rem;
    }

    .idx-partner-logo {
        max-height: 48px;
        max-width: 200px;
    }

    .idx-area-chip {
        font-size: 0.8rem;
        padding: 0.75rem 0.75rem;
    }

    .idx-area-chip svg {
        width: 1rem;
        height: 1rem;
    }
}

@media (max-width: 480px) {
    .idx-stat-number {
        font-size: 1.75rem;
    }

    .idx-stat-label {
        font-size: 0.8rem;
    }

    .gallery-sizer,
    .gallery-item {
        width: 100%;
    }
}

/* ============================================================
   Cabinet Showcase Gallery
   Pairs with: components/page_sections/showcase_gallery.html
   Layout:    Masonry.js (JS-positioned absolute children)
   Lightbox:  GLightbox (selectors scoped with `.showcase-gallery__link`)
   Namespaced under `.showcase-gallery` to avoid colliding with the
   partner gallery component (`.gallery-*`).
   ============================================================ */

.showcase-gallery {
    position: relative;
    transition: opacity 0.3s ease;
}

/* JS adds this class while Masonry is computing positions so users don't
   see a flash of unpositioned content. If JS is disabled, `.is-loading` is
   never applied — the gallery flows in document order via CSS columns. */
.showcase-gallery.is-loading {
    opacity: 0;
}

.showcase-gallery.showcase-gallery--ready {
    opacity: 1;
}

/* Graceful fallback used when JS is disabled or the CDN libraries fail to
   load: CSS-only multi-column masonry so the gallery remains usable. */
.showcase-gallery.showcase-gallery--fallback,
.no-js .showcase-gallery {
    column-count: 1;
    column-gap: 16px;
}

@media (min-width: 640px) {
    .showcase-gallery.showcase-gallery--fallback,
    .no-js .showcase-gallery {
        column-count: 2;
    }
}

@media (min-width: 1024px) {
    .showcase-gallery.showcase-gallery--fallback,
    .no-js .showcase-gallery {
        column-count: 3;
    }
}

.showcase-gallery.showcase-gallery--fallback .showcase-gallery__item,
.no-js .showcase-gallery .showcase-gallery__item {
    width: 100%;
    break-inside: avoid;
    display: inline-block;
    margin-bottom: 16px;
}

.showcase-gallery.showcase-gallery--fallback .showcase-gallery__sizer,
.no-js .showcase-gallery .showcase-gallery__sizer {
    display: none;
}

/* Grid column sizing (mobile-first) */
.showcase-gallery__sizer,
.showcase-gallery__item {
    width: 100%;
}

@media (min-width: 640px) {
    .showcase-gallery__sizer,
    .showcase-gallery__item {
        width: calc(50% - 8px);
    }
}

@media (min-width: 1024px) {
    .showcase-gallery__sizer,
    .showcase-gallery__item {
        width: calc(33.333% - 11px);
    }
}

@media (min-width: 1536px) {
    .showcase-gallery__sizer,
    .showcase-gallery__item {
        width: calc(25% - 12px);
    }
}

/* Wide variant: ultra-panoramic images span two columns on larger screens */
@media (min-width: 1024px) {
    .showcase-gallery__item--wide {
        width: calc(66.666% - 5px);
    }
}

@media (min-width: 1536px) {
    .showcase-gallery__item--wide {
        width: calc(50% - 8px);
    }
}

.showcase-gallery__item {
    margin: 0 0 16px 0;
    /* Masonry positions absolutely; keep intrinsic layout for accessibility */
    break-inside: avoid;
}

.showcase-gallery__link {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 0.75rem;
    border: 2px solid rgba(120, 113, 108, 0.12);
    background: var(--fallback-b1, #ffffff);
    box-shadow: 0 4px 14px -8px rgba(15, 23, 42, 0.12);
    cursor: zoom-in;
    transition:
        transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    /* Remove default link outline; custom focus ring below */
    outline: none;
}

.showcase-gallery__link:hover,
.showcase-gallery__link:focus-visible {
    border-color: rgba(202, 138, 4, 0.45);
    box-shadow:
        0 18px 36px -10px rgba(15, 23, 42, 0.18),
        0 6px 14px -4px rgba(202, 138, 4, 0.12);
    transform: translateY(-4px);
}

.showcase-gallery__link:focus-visible {
    outline: 3px solid rgba(202, 138, 4, 0.6);
    outline-offset: 3px;
}

.showcase-gallery__link img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.showcase-gallery__link:hover img,
.showcase-gallery__link:focus-visible img {
    transform: scale(1.05);
}

.showcase-gallery__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.25rem;
    background:
        linear-gradient(180deg,
            transparent 45%,
            rgba(16, 42, 67, 0.82) 100%),
        linear-gradient(135deg,
            rgba(202, 138, 4, 0.05) 0%,
            transparent 55%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.showcase-gallery__link:hover .showcase-gallery__overlay,
.showcase-gallery__link:focus-visible .showcase-gallery__overlay {
    opacity: 1;
}

.showcase-gallery__category {
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.25rem;
}

.showcase-gallery__label {
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

/* Reduced-motion users: skip scale & translate, keep opacity-only cues */
@media (prefers-reduced-motion: reduce) {
    .showcase-gallery,
    .showcase-gallery__link,
    .showcase-gallery__link img,
    .showcase-gallery__overlay {
        transition-duration: 0s;
    }

    .showcase-gallery__link:hover,
    .showcase-gallery__link:focus-visible,
    .showcase-gallery__link:hover img,
    .showcase-gallery__link:focus-visible img {
        transform: none;
    }
}

/* Extra-small devices: tighten margins */
@media (max-width: 480px) {
    .showcase-gallery__item {
        margin-bottom: 12px;
    }

    .showcase-gallery__overlay {
        padding: 1rem;
    }

    .showcase-gallery__label {
        font-size: 0.95rem;
    }
}

/* ==================== PRODUCT CATALOG ==================== */
/* Responsive ramp lives in CSS (not Tailwind variants) so the layout is
   independent of which utilities are present in tailwind.generated.css.
   Colour values target WCAG AA contrast (4.5:1 for normal text, 3:1 for
   large text) on both light and dark daisyUI themes by using the
   `--bc` (base-content) token directly and avoiding low-opacity tints. */

/* ---- Hero & filter typography ---- */
.catalog-hero-subtitle,
.catalog-result-count {
    color: hsl(var(--bc) / 0.85); /* ~5.7:1 against base-200 in light theme */
}

/* ---- Category section header ---- */
.catalog-category-section {
    --catalog-navy: #0f172a;
    --catalog-gold: #d4a017;
    --catalog-gold-soft: rgba(212, 160, 23, 0.16);
}

.catalog-category-header {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 100%;
    margin: 0 0 1.5rem;
    padding: 0.4rem 0.75rem 0.4rem 0.25rem;
    border-radius: 0.65rem;
    cursor: pointer;
    user-select: none;
    touch-action: manipulation;
    color: var(--catalog-navy);
    outline: none;
    isolation: isolate;
    transition: background-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.catalog-category-header::before,
.catalog-category-header::after {
    content: "";
    position: absolute;
    pointer-events: none;
    z-index: -1;
}

.catalog-category-header::before {
    inset: 0;
    border-radius: inherit;
    background:
        linear-gradient(90deg, var(--catalog-gold-soft), transparent 64%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.05), transparent);
    opacity: 0;
    transform: scaleX(0.92);
    transform-origin: left center;
    transition: opacity 180ms ease, transform 220ms ease;
}

.catalog-category-header::after {
    left: 2.25rem;
    right: 0.75rem;
    bottom: 0.15rem;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--catalog-gold), rgba(212, 160, 23, 0));
    transform: scaleX(0);
    transform-origin: left center;
    opacity: 0;
    transition: opacity 180ms ease, transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.catalog-category-header:hover,
.catalog-category-header:focus-visible,
.catalog-category-header.is-activated {
    background-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.catalog-category-header.is-activated::before {
    animation: catalog-header-glow 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.catalog-category-header.is-activated::after {
    animation: catalog-header-sweep 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.catalog-category-header:hover::before,
.catalog-category-header:focus-visible::before,
.catalog-category-header.is-activated::before {
    opacity: 1;
    transform: scaleX(1);
}

.catalog-category-header:hover::after,
.catalog-category-header:focus-visible::after,
.catalog-category-header.is-activated::after {
    opacity: 1;
    transform: scaleX(1);
}

.catalog-category-header:active {
    transform: translateY(1px);
}

.catalog-category-title {
    color: var(--catalog-navy);
    font-size: clamp(1.35rem, 3vw, 1.875rem);
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: 0;
    margin: 0;
}

.catalog-chevron {
    width: 1.25rem;
    height: 1.25rem;
    flex: 0 0 auto;
    color: var(--catalog-navy);
    opacity: 0.7;
    transform: rotate(0deg);
    transition: transform 240ms ease, opacity 180ms ease;
}

.catalog-category-header:hover .catalog-chevron,
.catalog-category-header:focus-visible .catalog-chevron {
    opacity: 1;
}

.catalog-chevron.is-open {
    transform: rotate(90deg);
}

.catalog-category-count {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 1.5rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    color: var(--catalog-navy);
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.catalog-category-content {
    overflow: hidden;
    max-height: none;
    opacity: 1;
    transform-origin: top;
    transition:
        max-height 320ms cubic-bezier(0.22, 1, 0.36, 1),
        opacity 220ms ease;
}

.catalog-category-content.is-collapsed {
    max-height: 0 !important;
    opacity: 0;
    pointer-events: none;
}

@keyframes catalog-header-glow {
    0% {
        opacity: 0;
        transform: scaleX(0.9);
    }
    45% {
        opacity: 1;
        transform: scaleX(1);
    }
    100% {
        opacity: 0;
        transform: scaleX(1.02);
    }
}

@keyframes catalog-header-sweep {
    0% {
        opacity: 0;
        transform: scaleX(0);
    }
    45% {
        opacity: 1;
        transform: scaleX(1);
    }
    100% {
        opacity: 0;
        transform: scaleX(1);
    }
}

@media (max-width: 479px) {
    .catalog-category-header {
        display: flex;
        width: 100%;
        gap: 0.55rem;
        padding-right: 0.5rem;
    }

    .catalog-category-title {
        min-width: 0;
        overflow-wrap: anywhere;
    }
}

/* ---- Responsive product grid ---- */
.catalog-product-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1rem;
}

/* sm: 2 cols */
@media (min-width: 480px) {
    .catalog-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* md: 3 cols */
@media (min-width: 768px) {
    .catalog-product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1.25rem;
    }
}
/* lg: 4 cols */
@media (min-width: 1024px) {
    .catalog-product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* xl: 5 cols */
@media (min-width: 1280px) {
    .catalog-product-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 1.5rem;
    }
}
/* 2xl: 6 cols */
@media (min-width: 1536px) {
    .catalog-product-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

/* ---- Product card ---- */
.catalog-product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background-color: hsl(var(--b1));
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgb(0 0 0 / 0.08), 0 1px 2px rgb(0 0 0 / 0.04);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    outline: none;
}
.catalog-product-card:hover,
.catalog-product-card:focus-within {
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.12), 0 8px 10px -6px rgb(0 0 0 / 0.08);
}
.catalog-product-card:focus-visible {
    box-shadow: 0 0 0 3px var(--gold-500, #eab308);
}

.catalog-product-figure {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background-color: hsl(var(--b2));
    flex: 0 0 auto;
}
.catalog-product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, opacity 0.4s ease;
    opacity: 0;
}
.catalog-product-image.catalog-img-loaded {
    opacity: 1;
}
.catalog-product-card:hover .catalog-product-image,
.catalog-product-card:focus-within .catalog-product-image {
    transform: scale(1.05);
}

/* ---- Image placeholder: shimmer overlay shown until the image loads ----
   Uniquely namespaced under `catalog-img-skeleton-*` to avoid collisions
   with any other shimmer/skeleton utilities in the application. */
.catalog-img-skeleton {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    background-color: hsl(var(--b2));
    background-image: linear-gradient(
        135deg,
        hsl(var(--b2)) 0%,
        hsl(var(--b3)) 50%,
        hsl(var(--b2)) 100%
    );
    opacity: 1;
    transition: opacity 0.5s ease;
    pointer-events: none;
}
.catalog-img-skeleton::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.55) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: translateX(-100%);
    animation: catalog-img-skeleton-shimmer 1.6s ease-in-out infinite;
}
.catalog-img-skeleton::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 38%;
    max-width: 4rem;
    aspect-ratio: 1 / 1;
    transform: translate(-50%, -50%);
    background-color: hsl(var(--bc) / 0.18);
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='3' width='18' height='18' rx='2' ry='2'/><circle cx='8.5' cy='8.5' r='1.5'/><polyline points='21 15 16 10 5 21'/></svg>") center / contain no-repeat;
    mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='3' width='18' height='18' rx='2' ry='2'/><circle cx='8.5' cy='8.5' r='1.5'/><polyline points='21 15 16 10 5 21'/></svg>") center / contain no-repeat;
}
.catalog-img-skeleton.catalog-img-skeleton-hidden {
    opacity: 0;
}
@keyframes catalog-img-skeleton-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}
@media (max-width: 480px) {
    .catalog-img-skeleton::after { width: 44%; max-width: 3rem; }
}

.catalog-product-badges {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.375rem;
    z-index: 2;
}

/* ---- Overlay: hover/tap-revealed enrichment (visual only; aria-hidden) ---- */
.catalog-product-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1rem;
    /* Dark navy gradient provides high contrast for overlay text.
       White text on rgba(16,42,67,0.96) yields ~14:1 contrast. */
    background: linear-gradient(
        to top,
        rgba(16, 42, 67, 0.96) 0%,
        rgba(16, 42, 67, 0.85) 35%,
        rgba(16, 42, 67, 0.45) 70%,
        rgba(16, 42, 67, 0) 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.catalog-overlay-content {
    transform: translateY(0.5rem);
    transition: transform 0.3s ease;
    color: #ffffff;
}
.catalog-overlay-title {
    color: #ffffff;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.25;
    margin: 0 0 0.25rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.catalog-overlay-line {
    color: #ffffff;
    font-weight: 600;
    font-size: 0.875rem;
    line-height: 1.3;
    margin: 0 0 0.15rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.catalog-overlay-provider {
    color: rgba(255, 255, 255, 0.92); /* >12:1 on dark navy */
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 0.25rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.catalog-overlay-dims {
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.75rem;
    margin: 0.25rem 0 0 0;
}

@media (min-width: 768px) {
    .catalog-overlay-title { font-size: 1.125rem; }
}

@media (hover: hover) {
    .catalog-product-card:hover .catalog-product-overlay,
    .catalog-product-card:focus-within .catalog-product-overlay {
        opacity: 1;
        pointer-events: auto;
    }
    .catalog-product-card:hover .catalog-overlay-content,
    .catalog-product-card:focus-within .catalog-overlay-content {
        transform: translateY(0);
    }
}
.catalog-product-card.is-touch-open .catalog-product-overlay {
    opacity: 1;
    pointer-events: auto;
}
.catalog-product-card.is-touch-open .catalog-overlay-content {
    transform: translateY(0);
}

/* ---- Always-visible card footer (primary accessible content) ----
   `flex: 1 1 auto` makes the footer absorb any extra height when the
   grid stretches sibling cards to a shared row height, so the navy
   surface always reaches the bottom edge of the card. The preceding
   `.catalog-product-line` uses `margin-bottom: auto` to push the CTA to
   the bottom of the footer, keeping the Get Quote button aligned across
   cards regardless of how much text wraps above it. */
.catalog-product-footer {
    position: relative;
    padding: 0.875rem 0.875rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1 1 auto;
    min-height: 0;
    background-color: #0a1d31;
    background-image: linear-gradient(
        160deg,
        #0d2238 0%,
        #0a1d31 55%,
        #061522 100%
    );
    color: #ffffff;
}
.catalog-product-name {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.005em;
    line-height: 1.3;
    color: #ffffff;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.catalog-product-line {
    font-size: 0.8125rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.88); /* ~12:1 on navy-900 */
    margin: 0 0 auto 0;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: opacity 0.3s ease 0.04s, transform 0.3s ease 0.04s;
}
/* Provider is kept in the DOM for screen-reader context but removed from
   the initial visible card. It re-appears inside the hover/touch overlay. */
.catalog-product-provider {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.catalog-product-cta {
    margin-top: 0.75rem;
    width: 100%;
    position: relative;
    z-index: 1;
}

/* On hover/focus/tap, fade the initial product text out so the Get Quote
   button stands alone in the footer while the figure overlay reveals the
   richer detail above. Opacity (not display:none) preserves screen-reader
   access and respects prefers-reduced-motion overrides below. */
@media (hover: hover) {
    .catalog-product-card:hover .catalog-product-name,
    .catalog-product-card:focus-within .catalog-product-name,
    .catalog-product-card:hover .catalog-product-line,
    .catalog-product-card:focus-within .catalog-product-line {
        opacity: 0;
        transform: translateY(-0.35rem);
    }
}
.catalog-product-card.is-touch-open .catalog-product-name,
.catalog-product-card.is-touch-open .catalog-product-line {
    opacity: 0;
    transform: translateY(-0.35rem);
}

/* ---- Reduced motion: drop transitions and zoom effects ---- */
@media (prefers-reduced-motion: reduce) {
    .catalog-product-overlay,
    .catalog-overlay-content,
    .catalog-product-image,
    .catalog-product-card,
    .catalog-product-name,
    .catalog-product-line,
    .catalog-category-header,
    .catalog-category-header::before,
    .catalog-category-header::after,
    .catalog-chevron,
    .catalog-category-content,
    .catalog-img-skeleton,
    .catalog-img-skeleton::before {
        transition: none !important;
        animation: none !important;
    }
    .catalog-product-card:hover .catalog-product-image,
    .catalog-product-card:focus-within .catalog-product-image {
        transform: none;
    }
    .catalog-product-card:hover .catalog-product-name,
    .catalog-product-card:focus-within .catalog-product-name,
    .catalog-product-card:hover .catalog-product-line,
    .catalog-product-card:focus-within .catalog-product-line,
    .catalog-product-card.is-touch-open .catalog-product-name,
    .catalog-product-card.is-touch-open .catalog-product-line {
        transform: none;
    }
}

/* ---- Screen-reader-only helper (used in card footer for context) ---- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================================================
   Product Quote Modal — animated open/close & submission states.

   Uses the modern `transition-behavior: allow-discrete` + `@starting-style`
   pattern so the native <dialog> can fade/scale in on `showModal()` and
   out on `close()` without any JS coordination. In browsers that lack
   these features the modal still works — it just swaps instantly.

   prefers-reduced-motion users see no animation regardless.
   ========================================================================== */
#product-quote-modal {
    opacity: 0;
    transition:
        opacity 220ms cubic-bezier(0.16, 1, 0.3, 1),
        overlay 220ms ease-out allow-discrete,
        display 220ms ease-out allow-discrete;
}
#product-quote-modal[open] {
    opacity: 1;
}
@starting-style {
    #product-quote-modal[open] {
        opacity: 0;
    }
}

#product-quote-modal .modal-box {
    transform: translateY(10px) scale(0.97);
    opacity: 0;
    transition:
        transform 260ms cubic-bezier(0.16, 1, 0.3, 1),
        opacity 220ms cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 260ms ease-out;
    will-change: transform, opacity;
}
#product-quote-modal[open] .modal-box {
    transform: translateY(0) scale(1);
    opacity: 1;
}
@starting-style {
    #product-quote-modal[open] .modal-box {
        transform: translateY(10px) scale(0.97);
        opacity: 0;
    }
}

#product-quote-modal::backdrop {
    background-color: rgba(10, 18, 31, 0);
    backdrop-filter: blur(0);
    -webkit-backdrop-filter: blur(0);
    transition:
        background-color 220ms ease-out,
        backdrop-filter 220ms ease-out,
        -webkit-backdrop-filter 220ms ease-out,
        overlay 220ms ease-out allow-discrete,
        display 220ms ease-out allow-discrete;
}
#product-quote-modal[open]::backdrop {
    background-color: rgba(10, 18, 31, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
@starting-style {
    #product-quote-modal[open]::backdrop {
        background-color: rgba(10, 18, 31, 0);
        backdrop-filter: blur(0);
        -webkit-backdrop-filter: blur(0);
    }
}

/* While the form is sending, paint a soft shimmer across the disabled
   submit button so the wait feels intentional rather than frozen. The
   FormSubmitter sets `disabled` and swaps the label to "Sending..." for
   us, so this rule keys off the disabled state alone. */
#product-quote-form button[type="submit"] {
    position: relative;
    overflow: hidden;
    transition:
        background-color 220ms ease-out,
        color 220ms ease-out,
        transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
}
#product-quote-form button[type="submit"]:disabled::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.22) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: translateX(-100%);
    animation: pqm-button-shimmer 1.2s linear infinite;
    pointer-events: none;
}
@keyframes pqm-button-shimmer {
    to {
        transform: translateX(100%);
    }
}

/* Subtle entrance for each form-control while the modal opens — staggered
   via `transition-delay` so the contents settle just after the box has
   scaled in. The delay never blocks input: the fields are interactive
   the whole time, only their visual translate eases to rest. */
#product-quote-form .form-control {
    opacity: 0;
    transform: translateY(6px);
    transition:
        opacity 260ms cubic-bezier(0.16, 1, 0.3, 1),
        transform 260ms cubic-bezier(0.16, 1, 0.3, 1);
}
#product-quote-modal[open] #product-quote-form .form-control {
    opacity: 1;
    transform: translateY(0);
}
/* Skip the honeypot (.hp-field is the 1st .form-control). The visible
   stagger starts at the Name field. */
#product-quote-modal[open] #product-quote-form .form-control:nth-of-type(2) { transition-delay: 80ms; }
#product-quote-modal[open] #product-quote-form .form-control:nth-of-type(3) { transition-delay: 110ms; }
#product-quote-modal[open] #product-quote-form .form-control:nth-of-type(4) { transition-delay: 140ms; }
#product-quote-modal[open] #product-quote-form .form-control:nth-of-type(5) { transition-delay: 170ms; }
#product-quote-modal[open] #product-quote-form .form-control:nth-of-type(6) { transition-delay: 200ms; }
@starting-style {
    #product-quote-modal[open] #product-quote-form .form-control {
        opacity: 0;
        transform: translateY(6px);
    }
}

/* "Get Quote" → "Quote Coming Soon" transition. The button color/transform
   is animated so the post-submission state feels intentional, not jarring. */
.catalog-product-cta {
    transition:
        background-color 280ms ease-out,
        color 280ms ease-out,
        transform 280ms cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 280ms ease-out,
        opacity 280ms ease-out;
}
.catalog-product-cta.is-quoted {
    cursor: not-allowed;
    transform: none;
    opacity: 0.92;
}

@media (prefers-reduced-motion: reduce) {
    #product-quote-modal,
    #product-quote-modal .modal-box,
    #product-quote-modal::backdrop,
    #product-quote-form .form-control,
    #product-quote-form button[type="submit"]:disabled::after,
    .catalog-product-cta {
        transition-duration: 0ms !important;
        animation: none !important;
    }
    #product-quote-form .form-control {
        opacity: 1;
        transform: none;
    }
}

/* ============================================
   Admin Landing - Assigned Quotes widget
   Anchors the recent-quotes list to the top of
   its container, directly below the label, so
   records never drift when the card stretches
   to match sibling widget heights.
   ============================================ */
.stl-assigned-quotes-label {
    margin-block: 0;
}

.stl-assigned-quotes-list {
    align-self: flex-start;
    align-content: flex-start;
    justify-content: flex-start;
    width: 100%;
    min-height: 180px;
}

.stl-assigned-quotes-list > * {
    align-self: flex-start;
    flex: 0 0 auto;
}

.stl-assigned-quotes-list .stl-assigned-quotes-loading {
    align-self: stretch;
}
