html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
    color: #1f2937;
}

/* ============================================================ */
/*  Top header (dark, brand on left, actions on right)          */
/* ============================================================ */

.site-header {
    background-color: #1d3557;
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
    border-bottom: 3px solid #b91c1c;
}

.site-header .navbar-brand {
    color: #fff;
    padding: 0;
}

.site-header .navbar-brand:hover,
.site-header .navbar-brand:focus {
    color: #fff;
}

.site-header-logo {
    background: #fff;
    border-radius: 4px;
    padding: 2px 4px;
}

.site-header .brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.site-header .brand-name {
    font-weight: 600;
    font-size: 1.05rem;
    color: #fff;
    letter-spacing: 0.01em;
}

.site-header .brand-tag {
    font-size: 0.7rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin-top: 2px;
}

.site-header .nav-link {
    color: #e5e7eb;
    font-weight: 500;
    padding-left: 1rem;
    padding-right: 1rem;
}

.site-header .nav-link:hover,
.site-header .nav-link:focus,
.site-header .nav-link.show {
    color: #fff;
}

.site-header .dropdown-menu {
    background-color: #fff;
    border-color: #d1d5db;
}

.site-header .dropdown-item {
    color: #1f2937;
}

.site-header .dropdown-item:hover,
.site-header .dropdown-item:focus {
    background-color: #f3f4f6;
    color: #b91c1c;
}

.site-header .navbar-toggler {
    border-color: #4b5563;
    color: #fff;
}

.site-header .navbar-toggler-icon {
    filter: invert(1) opacity(0.85);
}

/* CTA button (Get a Quote) */
.btn-cta {
    background-color: #b91c1c;
    color: #fff;
    font-weight: 600;
    padding: 0.45rem 1.1rem;
    border: none;
    border-radius: 4px;
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.btn-cta:hover,
.btn-cta:focus {
    background-color: #991b1b;
    color: #fff;
    transform: translateY(-1px);
}

/* ============================================================ */
/*  Sub-nav (white bar with product categories)                 */
/* ============================================================ */

.site-subnav {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.site-subnav .nav-link {
    color: #1f2937;
    font-weight: 500;
}

.site-subnav .nav-item:hover > .nav-link,
.site-subnav .nav-link:focus {
    background-color: #f8f9fa;
    color: #b91c1c;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.site-subnav .dropdown-submenu {
    position: relative;
}

.site-subnav .dropdown-submenu > .dropdown-submenu-toggle {
    padding-right: 1.75rem;
}

/* Right-pointing chevron on submenu parent items */
.site-subnav .dropdown-submenu > .dropdown-submenu-toggle::after {
    content: "";
    position: absolute;
    right: 0.6rem;
    top: 50%;
    width: 0;
    height: 0;
    border: 4px solid transparent;
    border-left-color: #6b7280;
    transform: translateY(-50%);
}

.site-subnav .dropdown-submenu > .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -0.25rem;
    margin-left: 0.1rem;
    position: absolute;
    display: none;
}

.site-subnav .dropdown-submenu:hover > .dropdown-menu,
.site-subnav .dropdown-submenu.show > .dropdown-menu {
    display: block;
}

/* On narrow screens the navbar collapses; flyouts become inline indented */
@media (max-width: 991.98px) {
    .site-subnav .dropdown-submenu > .dropdown-menu {
        position: static;
        margin-left: 1rem;
        border: none;
        box-shadow: none;
        padding-left: 0;
    }
    .site-subnav .dropdown-submenu > .dropdown-submenu-toggle::after {
        display: none;
    }
}

/* ============================================================ */
/*  Home page hero                                              */
/* ============================================================ */

.home-hero {
    position: relative;
    background-color: #0f172a;
    color: #fff;
    overflow: hidden;
    min-height: 460px;
}

.home-hero .carousel,
.home-hero .carousel-inner,
.home-hero .carousel-item {
    height: 460px;
}

.home-hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.home-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right,
        rgba(15, 23, 42, 0.85) 0%,
        rgba(15, 23, 42, 0.55) 55%,
        rgba(15, 23, 42, 0.20) 100%);
    display: flex;
    align-items: center;
    pointer-events: none;
}

.home-hero-overlay .container {
    pointer-events: auto;
}

.home-hero-content {
    max-width: 560px;
    padding: 2.5rem 0;
}

.home-hero-content h1 {
    font-size: 2.6rem;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 0.85rem;
    color: #fff;
}

.home-hero-content p {
    font-size: 1.1rem;
    color: #d1d5db;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .home-hero,
    .home-hero .carousel,
    .home-hero .carousel-inner,
    .home-hero .carousel-item {
        height: 360px;
        min-height: 360px;
    }
    .home-hero-content h1 {
        font-size: 1.9rem;
    }
}

/* ============================================================ */
/*  Category tiles                                              */
/* ============================================================ */

.section-heading {
    text-align: center;
    margin-bottom: 2rem;
}

.section-heading h2 {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.section-heading .accent-bar {
    display: inline-block;
    width: 56px;
    height: 3px;
    background: #b91c1c;
    border-radius: 2px;
}

.category-tile {
    display: block;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    color: inherit;
    text-decoration: none;
    height: 100%;
}

.category-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.10);
    border-color: #b91c1c;
    color: inherit;
    text-decoration: none;
}

.category-tile-image {
    width: 100%;
    height: 160px;
    object-fit: contain;
    padding: 0.75rem;
    background: #fff;
    display: block;
}

.category-tile-image-placeholder {
    width: 100%;
    height: 160px;
    background: linear-gradient(135deg, #e5e7eb 0%, #f3f4f6 100%);
}

.category-tile-body {
    padding: 1rem 1.1rem 1.1rem;
}

.category-tile-name {
    font-weight: 600;
    font-size: 1.15rem;
    color: #1f2937;
    margin-bottom: 0.15rem;
}

.category-tile-count {
    color: #6b7280;
    font-size: 0.85rem;
}

/* ============================================================ */
/*  Trust strip                                                 */
/* ============================================================ */

.trust-strip {
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    padding: 1.25rem 0;
    text-align: center;
    color: #4b5563;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}

.trust-strip .divider {
    display: inline-block;
    width: 4px;
    height: 4px;
    background: #9ca3af;
    border-radius: 50%;
    margin: 0 0.85rem;
    vertical-align: middle;
}

/* ============================================================ */
/*  Drawing PDF iframe on product detail page                   */
/* ============================================================ */
/* Match portrait US-Letter aspect (8.5 × 11) so the iframe height  */
/* is exactly what the PDF needs at the current iframe width — no  */
/* scrolling inside the embed. Landscape drawings will have some   */
/* whitespace at the bottom; acceptable since portrait is typical. */
.product-drawing-frame {
    width: 100%;
    aspect-ratio: 8.5 / 11;
    max-height: 1400px;       /* sanity bound for giant monitors */
    /* Never taller than the screen: cap the WIDTH (height follows from the
       aspect ratio) so the frame stays Letter-shaped and every PDF viewer's
       fit-to-width shows the whole page — Firefox/Safari ignore #view=Fit. */
    max-width: calc(85vh * 8.5 / 11);
    margin-inline: auto;
    border: 0;
    display: block;
    background: #fff;
}

/* ============================================================ */
/*  Footer                                                      */
/* ============================================================ */

.footer {
    color: #6b7280;
}

.footer a {
    color: #b91c1c;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* ============================================================ */
/*  Wider pages on big monitors                                 */
/* ============================================================ */
/* Bootstrap caps .container at 1320px, which leaves ~300px of blank space
   each side on a 1920px screen. Let the header, nav and every page use more
   of the width on large screens (one rule, so they all stay aligned). */
@media (min-width: 1600px) {
    .container {
        max-width: 1520px;
    }
}

@media (min-width: 1900px) {
    .container {
        max-width: 1720px;
    }
}

/* ============================================================ */
/*  Product families (Sql/008): several sizes on one Details    */
/*  page with an option picker, and one Browse card per family  */
/* ============================================================ */

/* Line above the Details heading: "Round Risers - 16 options" */
.family-eyebrow {
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Family Details page (_FamilyDetails.cshtml), Amazon-style: drawing on the
   left; name, options, specs on the right. Phones stack name + options first,
   then the drawing, then specs/description/downloads. */
.family-details {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "info" "media" "more";
    gap: 1.5rem;
}

.family-details-info  { grid-area: info; }
.family-details-media { grid-area: media; }
.family-details-more  { grid-area: more; }

@media (min-width: 992px) {
    .family-details {
        grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
        grid-template-rows: auto 1fr;
        grid-template-areas: "media info"
                             "media more";
        column-gap: 2.5rem;
        row-gap: 1rem;
    }
}

.family-details-photo {
    max-height: 640px;
}

/* Option picker in the right-hand column, ruled off above and below */
.variant-picker {
    color: #1f2937;
    border-top: 1px solid #dee2e6;
    border-bottom: 1px solid #dee2e6;
    padding: 1rem 0 0.5rem;
}

.variant-axis-label {
    margin-bottom: 0.4rem;
}

/* Option buttons: plain links, at least 44 x 44px for fingers */
.variant-chip {
    position: relative;             /* anchors the visually-hidden text */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0.375rem 0.85rem;
    border: 1px solid #6c757d;
    border-radius: 6px;
    background-color: #fff;
    color: #1f2937;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.variant-chip:hover {
    border-color: #1d3557;
    background-color: #f1f5f9;
    color: #1d3557;
    text-decoration: none;
}

/* The size being shown: thicker red border + bold, so it never relies on
   colour alone. Padding drops by the extra 1px of border: no layout shift. */
.variant-chip.is-selected,
.variant-chip.is-selected:hover {
    border: 2px solid #b91c1c;
    padding: calc(0.375rem - 1px) calc(0.85rem - 1px);
    background-color: #fff;
    color: #1f2937;
    font-weight: 700;
}

/* Not made in the current value of the other option (the link switches that
   option too): dashed and muted. #6c757d on white is 4.7:1. */
.variant-chip.is-other {
    border-style: dashed;
    color: #6c757d;
}

.variant-chip.is-other:hover {
    color: #1d3557;
}

.variant-chip:focus-visible {
    outline: 3px solid #1d3557;
    outline-offset: 2px;
}

/* Key facts for the size being shown (under the buttons) */
.variant-facts {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 1rem;
    row-gap: 0.35rem;
    margin: 0;
    padding: 0.75rem 1rem;
    background-color: #f8f9fa;
    border-radius: 6px;
    font-size: 0.9rem;
}

.variant-facts dt {
    font-weight: 600;
    color: #4b5563;
}

.variant-facts dd {
    margin: 0;
}

/* "Compare all N options" table (collapsed <details>) */
.variant-compare > summary {
    padding: 0.5rem 0;              /* a bigger target than the bare text line */
    color: #1d3557;
    font-weight: 600;
}

.variant-compare tr.is-current > * {
    font-weight: 700;
}

/* Browse card standing in for every size of a family */
.family-card {
    border-top: 3px solid #1d3557;
}

.family-card .badge {
    font-weight: 500;
}

.family-card-options {
    line-height: 1.5;
}

/* Admin: family sizes table + Reorder */
.drag-handle {
    cursor: grab;
}

.reorder-family-card {
    border: 2px solid #1d3557;
}
