/* ========================================
   Single Eriba Caravan Styles
======================================== */

/* Gallery */
.main-image {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
}

.main-image img {
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

.main-image:hover img {
    transform: scale(1.02);
}

/* Thumbnail Gallery - Centralized Layout */
.thumbnail-gallery {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 1rem;
}

.thumbnail-track {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    max-width: 600px;
    margin: 0 auto;
}

.thumbnail-item {
    padding: 0;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    aspect-ratio: 1 / 1;
}

.thumbnail-item:hover > img,
.thumbnail-item.active > img {
    border-color: var(--lf-orange);
    transform: scale(1.05);
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 8px;
    border: 2px solid var(--lf-border-color);
    transition: all 0.3s ease;
}

/* Navigation Buttons */
.thumbnail-nav-btn {
    background: var(--lf-orange);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.thumbnail-nav-btn:hover:not(:disabled) {
    background: var(--lf-navy);
    transform: translateY(-2px);
}

.thumbnail-nav-btn:disabled {
    background: var(--lf-text-secondary);
    cursor: not-allowed;
    opacity: 0.5;
}

.thumbnail-nav-btn i {
    font-size: 1rem;
}

.thumbnail-nav {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Wrapper for gallery with navigation */
.gallery-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 1rem;
}

.thumbnail-container {
    flex: 0 1 600px;
    overflow: hidden;
}

/* ============================================
   LIGHTBOX STYLES
   ============================================ */

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 999999 !important;
    opacity: 0;
    transition: opacity 0.3s ease;
    isolation: isolate;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000000;
}

/* Lightbox Header */
.lightbox-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.8) 0%,
        rgba(0, 0, 0, 0) 100%
    );
    z-index: 10;
}

.lightbox-counter {
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.lightbox-counter span {
    color: var(--lf-orange);
}

.lightbox-close {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.lightbox-close:hover {
    background: var(--lf-orange);
    border-color: var(--lf-orange);
    transform: rotate(90deg);
}

.lightbox-close i {
    font-size: 1.5rem;
}

/* Lightbox Image Container */
.lightbox-image-container {
    max-width: 90%;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 100px;
}

.lightbox-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.lightbox-image-container img.zoomed {
    transform: scale(1.5);
    cursor: grab;
}

.lightbox-image-container img.zoomed:active {
    cursor: grabbing;
}

/* Lightbox Navigation */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 10;
}

.lightbox-nav:hover {
    background: var(--lf-orange);
    border-color: var(--lf-orange);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

.lightbox-nav i {
    font-size: 1.75rem;
}

/* Lightbox Footer */
.lightbox-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 20px 30px;
    background: linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.8) 0%,
        rgba(0, 0, 0, 0) 100%
    );
    z-index: 10;
}

.lightbox-control {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.lightbox-control:hover {
    background: var(--lf-orange);
    border-color: var(--lf-orange);
    transform: translateY(-3px);
}

.lightbox-control i {
    font-size: 1.25rem;
}

/* ============================================
   END LIGHTBOX STYLES
   ============================================ */

/* Details */
.caravan-details {
    position: relative;
}

.campervan-specs th,
.campervan-specs td {
    font-size: 0.95rem;
}

.campervan-specs p {
    color: var(--lf-text-primary);
}

.campervan-specs strong {
    color: var(--lf-text-primary);
}

[data-bs-theme="dark"] .campervan-specs th,
[data-bs-theme="dark"] .campervan-specs td {
    color: var(--lf-text-tertiary);
}

.badge-status {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.875rem;
    color: #fff;
    margin-bottom: 1rem;
}

.badge-new {
    background: var(--lf-navy);
}

.badge-sold {
    background: #e30000;
}

.badge-specials {
    background: var(--lf-orange);
}

.caravan-details h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--lf-text-primary);
    margin-bottom: 1rem;
}

.caravan-details .price {
    margin-bottom: 0;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--lf-orange);
}

/* Price Container */
.price-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.price-original {
    font-size: 1.75rem !important;
    color: var(--lf-text-secondary) !important;
    text-decoration: line-through;
    margin-bottom: 0 !important;
}

.price-sale {
    font-size: 2.5rem !important;
    font-weight: 700;
    color: var(--lf-orange) !important;
    margin-bottom: 0 !important;
}

/* Sticky Banner Price Variations */
.sticky-cta-bar__price {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.sticky-price-original {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--lf-text-secondary);
    text-decoration: line-through;
    line-height: 1;
}

.sticky-price-sale {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--lf-orange);
    line-height: 1;
}

.specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    background: var(--lf-bg-secondary);
    padding: 1.5rem;
    border-radius: 8px;
}

.spec-item {
    font-size: 0.95rem;
}

.spec-item strong {
    color: var(--lf-text-primary);
    display: block;
    margin-bottom: 0.25rem;
}

/* Feature List */
.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--lf-border-color);
    font-size: 1rem;
    color: var(--lf-text-primary);
}

.feature-list li:last-child {
    border-bottom: none;
}

.feature-list li i {
    color: var(--lf-orange);
    font-size: 1.1rem;
}

/* Key Feature Text */
.key-feature-text {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--lf-text-primary);
    margin: 0;
    padding: 1rem;
    background: var(--lf-bg-secondary);
    border-left: 4px solid var(--lf-orange);
    border-radius: 4px;
}

.key-feature-text i {
    color: var(--lf-orange);
    font-size: 1.2rem;
}

/* Accordion */
.accordion-item {
    border-top: 1px solid var(--lf-border-color);
    border-bottom: 1px solid var(--lf-border-color);
    border-left: none;
    border-right: none;
    background-color: transparent;
    border-radius: 0 !important;
    overflow: hidden;
}

.accordion-button {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--lf-text-primary);
    background-color: transparent;
    border: none;
    padding: 1.25rem 0.5em;
}

.accordion-button:not(.collapsed) {
    background-color: transparent;
    color: var(--lf-orange);
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: var(--lf-border-color);
}

.accordion-button::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23FF8300' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
}

.accordion-body {
    padding: 1.5em 0.5em;
    line-height: 1.7;
    background-color: transparent;
}

.accordion-body p {
    margin-bottom: 0.5rem;
}

.accordion-body input[type="text"],
.accordion-body input[type="url"],
.accordion-body input[type="email"],
.accordion-body input[type="tel"],
.accordion-body input[type="password"],
.accordion-body textarea,
.accordion-body select {
    background-color: var(--lf-bg-light) !important;
}

/* Buttons */
.btn-block {
    width: 100% !important;
    display: block !important;
}

/* Specifications Table Styling */
.specs-table {
    background: var(--lf-bg-light);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.specs-table table {
    margin-bottom: 0;
}

.specs-table th {
    background: var(--lf-bg-secondary);
    color: var(--lf-text-primary);
    font-weight: 600;
    padding: 1rem;
    border-color: var(--lf-border-color);
    width: 40%;
}

.specs-table td {
    padding: 1rem;
    color: var(--lf-text-primary);
    border-color: var(--lf-border-color);
}

/* Share Section - Inline Layout */
.share-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--lf-bg-light);
    border-radius: 8px;
}

.share-section p {
    margin: 0;
    font-weight: 600;
    color: var(--lf-text-primary);
}

.social-icons {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    color: #fff;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    color: #fff;
    transform: translateY(-2px);
}

.social-icons svg {
    font-size: 1.25rem;
    color: var(--lf-navy);
}

[data-bs-theme="dark"] .social-icons svg {
    color: var(--lf-orange);
}

/* Page Views Counter */
.page-views {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 4px;
}

.page-views svg {
    color: var(--lf-orange);
    font-size: 1.25rem;
}

.page-views span {
    color: var(--lf-text-primary);
    font-weight: 500;
    font-size: 0.8rem;
}

.page-views strong {
    color: var(--lf-orange);
    font-weight: 700;
}

.feature-number {
    width: 60px;
    height: 60px;
    background-color: var(--lf-orange);
    color: white;
    font-weight: bold;
    font-size: 1.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.feature-title {
    color: var(--lf-text-primary);
}

.col-12:not(:last-child) .feature-number::after {
    content: "";
    position: absolute;
    top: 130%;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 40px;
    background-color: var(--lf-border-color);
}

/* ============================================
   STICKY BOTTOM BANNER
   ============================================ */

.detail-sticky-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--lf-bg-light);
    z-index: 90;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    border-top: 1px solid var(--lf-border-color);
}

.detail-sticky-banner.visible {
    transform: translateY(0);
}

.sticky-cta-bar {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 0;
}

.sticky-cta-bar__image {
    flex-shrink: 0;
    width: 120px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
}

.sticky-cta-bar__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.sticky-cta-bar__content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.sticky-cta-bar__title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--lf-text-primary);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sticky-cta-bar__price {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--lf-orange);
    line-height: 1;
}

.sticky-cta-bar__buttons {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.sticky-cta-bar__buttons .btn {
    padding: 0.85rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.3s ease;
    white-space: nowrap;
    border: none;
    cursor: pointer;
}

.sticky-cta-bar__buttons .btn-enquire {
    background: var(--lf-orange);
    color: #fff;
}

.sticky-cta-bar__buttons .btn-enquire:hover {
    background: var(--lf-navy);
    transform: translateY(-2px);
}

.sticky-cta-bar__buttons .btn-reserve {
    background: var(--lf-orange);
    color: #fff;
}

.sticky-cta-bar__buttons .btn-reserve:hover {
    background: var(--lf-navy);
    transform: translateY(-2px);
}

/* Ensure sticky banner doesn't overlap back-to-top and contact buttons */
.detail-sticky-banner .container {
    max-width: calc(100% - 200px);
    margin: 0 auto;
}

/* Responsive */
@media (max-width: 991px) {
    .caravan-details h1 {
        font-size: 1.75rem;
    }

    .caravan-details .price {
        font-size: 2rem;
    }

    .specs-grid {
        grid-template-columns: 1fr;
    }

    .lightbox-image-container {
        padding: 80px 60px;
    }

    .lightbox-nav {
        width: 50px;
        height: 50px;
    }

    .lightbox-prev {
        left: 20px;
    }

    .lightbox-next {
        right: 20px;
    }

    /* Sticky Banner Tablet */
    .detail-sticky-banner .container {
        max-width: calc(100% - 160px);
    }

    .sticky-cta-bar {
        gap: 1rem;
    }

    .sticky-cta-bar__image {
        width: 100px;
        height: 70px;
    }

    .sticky-cta-bar__title {
        font-size: 1rem;
    }

    .sticky-cta-bar__price {
        font-size: 1.5rem;
    }

    .sticky-cta-bar__buttons .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 767px) {
    .thumbnail-track {
        grid-template-columns: repeat(3, 1fr);
        max-width: 400px;
    }

    .thumbnail-container {
        flex: 0 1 400px;
    }

    .lightbox-header {
        padding: 15px 20px;
    }

    .lightbox-counter {
        font-size: 1.25rem;
    }

    .lightbox-close {
        width: 44px;
        height: 44px;
    }

    .lightbox-close i {
        font-size: 1.25rem;
    }

    .lightbox-image-container {
        padding: 70px 50px;
        max-height: 80vh;
    }

    .lightbox-nav {
        width: 44px;
        height: 44px;
    }

    .lightbox-nav i {
        font-size: 1.5rem;
    }

    .lightbox-prev {
        left: 15px;
    }

    .lightbox-next {
        right: 15px;
    }

    .lightbox-footer {
        padding: 15px 20px;
        gap: 10px;
    }

    .lightbox-control {
        width: 44px;
        height: 44px;
    }

    .lightbox-control i {
        font-size: 1.1rem;
    }

    /* Sticky Banner Mobile - Buttons Only */
    .detail-sticky-banner .container {
        max-width: 100%;
        padding: 0 1rem;
    }

    .sticky-cta-bar {
        justify-content: center;
        gap: 0.75rem;
        padding: 0.75rem 0;
    }

    /* Hide image and content on mobile */
    .sticky-cta-bar__image,
    .sticky-cta-bar__content {
        display: none;
    }

    .sticky-cta-bar__buttons {
        width: 100%;
        gap: 0.45rem;
    }

    .sticky-cta-bar__buttons .btn {
        flex: 1;
        padding: 0.85rem 1rem;
        font-size: 0.95rem;
    }

    /* Position above mobile CTA buttons */
    .detail-sticky-banner {
        bottom: 60px;
    }

    .sticky-cta-bar__price {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .sticky-price-original {
        font-size: 1rem;
    }

    .sticky-price-sale {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .share-section {
        flex-direction: column;
        align-items: flex-start;
    }

    .social-icons {
        flex-wrap: wrap;
    }

    .specs-table th,
    .specs-table td {
        padding: 0.75rem;
        font-size: 0.9rem;
    }

    .thumbnail-track {
        grid-template-columns: repeat(3, 1fr);
        max-width: 300px;
    }

    .thumbnail-container {
        flex: 0 1 300px;
    }

    .thumbnail-nav button {
        padding: 8px 12px;
        min-width: 40px;
        height: 40px;
    }

    .gallery-wrapper {
        gap: 8px;
    }

    .lightbox-header {
        padding: 10px 15px;
    }

    .lightbox-counter {
        font-size: 1rem;
    }

    .lightbox-close {
        width: 40px;
        height: 40px;
    }

    .lightbox-close i {
        font-size: 1rem;
    }

    .lightbox-image-container {
        padding: 60px 15px;
        max-height: 75vh;
    }

    .lightbox-nav {
        width: 40px;
        height: 40px;
    }

    .lightbox-nav i {
        font-size: 1.25rem;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-footer {
        padding: 10px 15px;
        gap: 8px;
    }

    .lightbox-control {
        width: 40px;
        height: 40px;
    }

    .lightbox-control i {
        font-size: 1rem;
    }

    /* Sticky Banner Small Mobile - Buttons Only */
    .detail-sticky-banner .container {
        padding: 0 0.75rem;
    }

    .sticky-cta-bar {
        gap: 0.5rem;
        padding: 0.65rem 0;
    }

    /* Keep image and content hidden on small mobile */
    .sticky-cta-bar__image,
    .sticky-cta-bar__content {
        display: none;
    }

    .sticky-cta-bar__buttons .btn {
        padding: 0.75rem 0.85rem;
        font-size: 0.9rem;
    }

    /* Position above mobile CTA buttons with more space */
    .detail-sticky-banner {
        bottom: 62px;
    }

    .sticky-cta-bar__price {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .sticky-price-original {
        font-size: 1rem;
    }

    .sticky-price-sale {
        font-size: 1.5rem;
    }
}
