/* The Oxygen code blocks these shortcodes replaced had width:100% in the
   page-specific Oxygen CSS. Shortcode wrappers do not get that rule, which
   made them shrink-to-fit inside the flex section and reduced the album grid
   from three columns to two. Restore full width for the migrated wrappers. */
#shortcode-2-14759,
#shortcode-3-14768 {
    width: 100%;
}

.ct-shortcode:has(.car-single-category),
.ct-shortcode:has(.car-single-album) {
    width: 100%;
}

/* Shared hero styling */
.car-single-category,
.car-single-album {
    width: 100%;
    box-sizing: border-box;
}

.car-single-hero {
    position: relative;
    width: 100%;
    min-height: 400px;
    background-size: cover;
    background-position: center;
    background-color: #171717;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 32px;
    box-sizing: border-box;
}

.car-single-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.82) 0%,
        rgba(0,0,0,0.25) 60%,
        rgba(0,0,0,0.04) 100%
    );
    pointer-events: none;
}

.car-single-hero-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2;
    padding: 30px 36px;
    color: #fff;
    box-sizing: border-box;
}

.car-single-title {
    margin: 0 0 14px;
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.1;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.7);
}

.car-single-desc {
    margin: 0;
    max-width: 850px;
    font-size: 1.1rem;
    line-height: 1.5;
    font-weight: 400;
    color: rgba(255,255,255,0.96);
    text-shadow: 0 1px 5px rgba(0,0,0,0.7);
}

.car-hero-badges {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.car-hero-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 15px;
    border-radius: 999px;
    background: rgba(15,23,42,0.88);
    border: 1px solid rgba(255,255,255,0.4);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

.car-hero-badge-count {
    background: #fff;
    color: #0f172a;
}

.car-hero-badge-blog {
    background: #2563eb;
    border-color: rgba(255, 255, 255, 0.6);
    color: #fff;
}

.car-hero-badge-blog:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    color: #fff;
}

.car-hero-badge-youtube {
    background: rgba(255, 0, 0, 0.88);
    border-color: rgba(255, 255, 255, 0.6);
    color: #fff;
}

.car-hero-badge-youtube:hover {
    background: #ff0000;
    transform: translateY(-2px);
}

.car-hero-badge-youtube svg {
    display: block;
    width: 18px;
    height: 18px;
    fill: #ffffff;
}

a.car-hero-badge:hover {
    background: #334155;
    color: #fff;
}



/* Album hero navigation badges (bottom-right) */
.car-hero-nav {
    position: absolute;
    right: 24px;
    bottom: 22px;
    z-index: 3;
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.car-hero-nav .car-hero-badge {
    color: #fff;
}

.car-hero-nav .car-hero-badge-count {
    color: #0f172a;
}

/* Vertical column wrapper to place Blog directly on top of Go Back */
.car-hero-nav-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

/* Sub-categories */
.car-subcats {
    margin-bottom: 40px;
}

.car-subcat-thumb {
    position: relative;
}

.car-card-badges {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 2;
}

.car-card-badge {
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(15,23,42,0.88);
    border: 1px solid rgba(255,255,255,0.4);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.2;
}

.car-card-badge-blog {
    background: #2563eb;
    border-color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.car-card-badge-blog:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    color: #fff;
}

/* Category album cards */
.car-albums-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

.car-albums-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.car-albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.car-album-card {
    display: block;
    overflow: hidden;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.car-album-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 22px rgba(0,0,0,0.14);
}

.car-album-thumb {
    position: relative;
    width: 100%;
    height: 190px;
    background-size: cover;
    background-position: center;
    background-color: #e2e8f0;
}

.car-album-body {
    padding: 16px;
}

.car-album-title {
    margin: 0 0 5px;
    font-size: 1.1rem;
    line-height: 1.3;
    font-weight: 700;
    color: #0f172a;
}

.car-album-desc {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.45;
    color: #64748b;
}

.car-albums-empty,
.car-gallery-message {
    padding: 24px;
    border-radius: 10px;
    background: #f8fafc;
    color: #64748b;
}

/* Multi-part album tabs */
.car-album-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 22px;
    scroll-margin-top: 20px;
}

.car-album-tab {
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #f1f5f9;
    color: #0f172a;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.car-album-tab:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.car-album-tab.is-active {
    background: #d91f26;
    border-color: #d91f26;
    color: #fff;
}

/* Gallery Photo Limit Selector Toolbar */
.car-gallery-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.car-gallery-toolbar-label {
    font-size: 0.88rem;
    font-weight: 700;
    color: #64748b;
    margin-right: 4px;
}

.car-limit-btn {
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.car-limit-btn:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.car-limit-btn.is-active {
    background: #0f172a;
    border-color: #0f172a;
    color: #ffffff;
}

/* Google Photos masonry gallery */
.car-google-gallery {
    width: 100%;
    box-sizing: border-box;
    margin-top: 12px;
}

.car-gphotos-grid {
    width: 100%;
    columns: 3;
    column-gap: 20px;
}

.car-gphotos-item {
    display: inline-block;
    width: 100%;
    margin: 0 0 20px;
    break-inside: avoid;
    vertical-align: top;
    box-sizing: border-box;
}

.car-gphotos-item-hidden {
    display: none !important;
}

.car-gphotos-trigger {
    display: block;
    position: relative;
    overflow: hidden;
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
    border: 1px solid rgba(255,255,255,0.28);
    padding: 0;
    border-radius: 12px;
    background: #1a202c;
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.car-gphotos-trigger:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(0,0,0,0.25);
}

.car-gphotos-trigger img {
    width: 100%;
    height: auto;
    display: block;
    border: 0;
    border-radius: inherit;
}

.car-gphotos-play {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 58px;
    height: 58px;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    background: rgba(0,0,0,0.65);
    border: 1px solid rgba(255,255,255,0.5);
    pointer-events: none;
}

.car-gphotos-video-label {
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 4px 8px;
    border-radius: 5px;
    color: #fff;
    background: rgba(0,0,0,0.75);
    font-size: 0.7rem;
    font-weight: 700;
    pointer-events: none;
}

.car-gallery-load-more {
    text-align: center;
    margin: 25px 0 35px;
}

.car-gallery-load-more button {
    appearance: none;
    padding: 12px 26px;
    border: 0;
    border-radius: 30px;
    background: #2b6cb0;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
}

.car-gallery-load-more button:hover {
    background: #2c5282;
}

.car-gallery-count {
    margin-top: 10px;
    color: #64748b;
    font-size: 0.9rem;
}

/* YouTube Video Previews Section */
.car-youtube-section {
    margin-top: 50px;
    padding-top: 35px;
    border-top: 2px solid #e2e8f0;
    scroll-margin-top: 30px;
}

.car-youtube-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.car-youtube-header h2 {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 800;
    color: #0f172a;
}

.car-youtube-header svg {
    width: 32px;
    height: 32px;
    fill: #ff0000;
}

.car-youtube-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
}

.car-youtube-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.car-youtube-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.15);
}

.car-youtube-player-wrap {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: #000;
}

.car-youtube-player-wrap iframe,
.car-youtube-player-wrap img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 0;
}

.car-youtube-play-btn {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3);
    cursor: pointer;
    border: none;
    padding: 0;
    transition: background 0.2s ease;
}

.car-youtube-card:hover .car-youtube-play-btn {
    background: rgba(0,0,0,0.15);
}

.car-youtube-play-icon {
    width: 68px;
    height: 48px;
    background: rgba(33, 33, 33, 0.8);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.car-youtube-play-btn:hover .car-youtube-play-icon {
    background: #ff0000;
}

.car-youtube-play-icon::after {
    content: "";
    display: block;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 0 10px 18px;
    border-color: transparent transparent transparent #ffffff;
    margin-left: 3px;
}

.car-youtube-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.car-youtube-desc {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #334155;
}

/* Floating "Back to Top" Button */
.car-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #d91f26; /* Set to red universally */
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 14px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.2s ease, background 0.2s ease;
}

.car-back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
}

.car-back-to-top:hover {
    background: #b91c1c; /* Slightly darker red on hover */
    transform: translateY(-3px);
}

/* Google Photos lightbox */
.car-slideshow-start {
    margin-left: auto;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid #b91c1c;
    background: #d91f26;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: filter .2s ease, transform .2s ease;
}
.car-slideshow-start:hover { filter: brightness(1.08); transform: translateY(-1px); }
.car-slideshow-start:disabled { opacity: .45; cursor: not-allowed; }

.car-gphotos-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    padding: 50px 20px 20px;
    box-sizing: border-box;
    background: rgba(10,15,26,0.94);
    backdrop-filter: blur(8px);
}

.car-gphotos-modal.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
}

.car-gphotos-modal-inner {
    position: relative;
    width: 92%;
    height: 88%;
    overflow: hidden;
}

.car-gphotos-modal img,
.car-gphotos-modal video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
    opacity: 1;
    transition: opacity 2s ease;
}
.car-gphotos-modal .car-lb-media-fade { opacity: 0; }

.car-lb-top-controls {
    position: absolute;
    top: 20px;
    right: 25px;
    display: flex;
    align-items: center;
    gap: 14px;
    z-index: 10;
}
.car-lb-control-btn {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s ease;
}
.car-lb-control-btn:hover { background: rgba(255,255,255,0.3); }
.car-lb-control-btn.is-playing { background: #16a34a; border-color: rgba(255,255,255,0.6); }

.car-lb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    font-size: 34px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background .2s ease, transform .2s ease;
}
.car-lb-nav:hover { background: rgba(255,255,255,0.3); transform: translateY(-50%) scale(1.08); }
.car-lb-prev { left: 20px; }
.car-lb-next { right: 20px; }

.car-lb-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.65);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 0.88rem;
    font-weight: 600;
    z-index: 10;
}

@media (max-width: 600px) {
    .car-slideshow-start { margin-left: 0; width: 100%; }
    .car-lb-prev { left: 8px; }
    .car-lb-next { right: 8px; }
    .car-lb-nav { width: 44px; height: 44px; font-size: 28px; }
    .car-lb-top-controls { right: 12px; top: 12px; gap: 8px; }
    .car-lb-control-btn { padding: 7px 12px; font-size: .82rem; }
}

@media (max-width: 992px) {
    .car-gphotos-grid {
        columns: 2;
    }
}

@media (max-width: 600px) {
    .car-single-hero {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        min-height: auto;
        border-radius: 8px;
        padding-bottom: 20px;
    }

    .car-single-hero-content {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        padding: 23px 20px 16px;
    }

    .car-hero-nav {
        position: relative;
        right: auto;
        bottom: auto;
        padding: 0 20px;
        justify-content: flex-start;
    }

    .car-single-title {
        font-size: 2rem;
    }

    .car-single-desc {
        font-size: 0.95rem;
    }

    .car-albums-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .car-gphotos-grid {
        columns: 1;
    }

    .car-youtube-grid {
        grid-template-columns: 1fr;
    }

    .car-gphotos-modal {
        padding: 50px 8px 12px;
    }

    .car-back-to-top {
        right: 50%;
        transform: translateX(50%);
        bottom: 20px;
    }

    .car-back-to-top:hover {
        transform: translateX(50%) translateY(-3px);
    }

    .car-gallery-toolbar {
        justify-content: center;
    }
}
