/* Motorbike Detail Page */
/* ===== Bike description + inclusions (world-class, clean, adjustable) ===== */

/* Put these variables on :root for site-wide, or on a wrapper like .bike-details */
:root {
  /* Typography */
  --bike-desc-font-size: clamp(0.98rem, 0.25vw + 0.95rem, 1.08rem);
  --bike-desc-font-weight: 500;
  --bike-desc-line-height: 1.6;

  --bike-include-font-size: clamp(0.95rem, 0.22vw + 0.92rem, 1.02rem);
  --bike-include-font-weight: 800;
  --bike-include-line-height: 1.45;

  /* Colors (tweak to match your theme) */
  --bike-text: #0f172a;          /* slate-900 */
  --bike-muted: #475569;         /* slate-600 */
  --bike-check: #16a34a;         /* green-600 */

  /* Spacing */
  --bike-block-gap: 0.75rem;     /* space between description block and inclusions */
  --bike-include-gap: 0.5rem;    /* space between each include row */
  --bike-inline-gap: 0.5rem;     /* icon-to-text spacing if using pseudo-icon */

  /* Layout */
  --bike-max-width: 68ch;        /* optimal reading width */
}

.detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Back Button */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #475569;
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 2rem;
    transition: color 0.2s ease;
}

.back-btn:hover {
    color: #0f172a;
}

/* Main Hero Section */
.detail-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

/* Left Side: Image Section */
.detail-image-section {
    display: flex;
    flex-direction: column;
    gap: 1.0rem;
}

.main-image {
    width: 100%;
    height: 450px;
    border-radius: 16px;
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 1.2rem;
}

/* Right Side: Info Section */
.detail-info-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.bike-name {
    font-size: 2.5rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    line-height: 1.2;
}

.bike-price {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0d6efd;
    margin: 0;
}

.bike-description h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.75rem;
}

.bike-description p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #475569;
    margin: 0;
}

/* Contact Button */
.contact-btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%);
    color: white;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    margin-top: auto;
}

.contact-btn:hover {
    background: linear-gradient(135deg, #0b5ed7 0%, #0a58ca 100%);
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.45);
    transform: translateY(-2px);
    color: white;
}

.contact-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.3);
}

/* Shine effect */
.contact-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.contact-btn:hover::before {
    left: 100%;
}

/* Section Divider */
.section-divider {
    margin: 4rem 0 2rem 0;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(15, 23, 42, 0.1);
}

.section-divider h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

/* Other Bikes Section (Placeholder) */
.other-bikes-section {
    min-height: 200px;
    /* Reserved for future grid of other bikes */
}

/* Responsive Design */
@media (max-width: 992px) {
    .detail-hero {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .main-image {
        height: 350px;
    }

    .bike-name {
        font-size: 2rem;
    }

    .bike-price {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .detail-container {
        padding: 1.5rem 1rem;
    }

    .main-image {
        height: 280px;
    }

    .bike-name {
        font-size: 1.75rem;
    }

    .bike-price {
        font-size: 1.3rem;
    }

    .bike-description h3 {
        font-size: 1.1rem;
    }

    .bike-description p {
        font-size: 1rem;
    }

    .section-divider h2 {
        font-size: 1.5rem;
    }
}

/* =========================
   Gallery Carousel (NO user scroll, fits on mobile)
   ========================= */

.gallery-carousel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

/* Buttons */
.carousel-btn {
    background: rgba(15, 23, 42, 0.85);
    border: none;
    border-radius: 999px;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease, opacity 0.15s ease;
    flex: 0 0 auto;
    z-index: 10;
    -webkit-tap-highlight-color: transparent;
}

.carousel-btn span {
    color: white;
    font-size: 1.15rem;
    line-height: 1;
}

.carousel-btn:hover {
    background: rgba(15, 23, 42, 1);
    transform: scale(1.05);
}

.carousel-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none;
}

/* Container = HIDDEN overflow always (no mobile scrolling) */
.carousel-track-container {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}

/* Track slides via transform from JS */
.carousel-track {
    display: flex;
    gap: 10px;
    transition: transform 0.25s ease;
    will-change: transform;
}

/* Thumb base */
.thumb-item {
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid transparent;
    background: transparent;
    padding: 0;
    transition: border-color 0.2s ease, transform 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.thumb-item:hover {
    border-color: #0d6efd;
}

.thumb-item.is-active {
    border-color: #0d6efd;
}

/* Thumb images */
.thumb-item img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    aspect-ratio: 4 / 3;
}

/* Keyboard */
.thumb-item:focus-visible {
    outline: 3px solid #0d6efd;
    outline-offset: 3px;
}

/* MOBILE: 3 thumbs visible, fits page, no scrolling */
@media (max-width: 575.98px) {
    .gallery-carousel {
        gap: 0.4rem;
        margin-top: 0.4rem;
    }

    .carousel-btn {
        width: 36px;
        height: 36px;
    }

    .carousel-btn span {
        font-size: 1.0rem;
    }

    .carousel-track {
        gap: 8px;
    }

    .thumb-item {
        flex: 0 0 calc((100% - 16px) / 3); /* 2 gaps * 8px = 16px */
    }

    .thumb-item img {
        aspect-ratio: 16 / 10;
    }
}

/* Small devices (≥576px): 4 thumbs */
@media (min-width: 576px) and (max-width: 991.98px) {
    .thumb-item {
        flex: 0 0 calc((100% - 36px) / 4); /* 3 gaps * 12px = 36px (gap becomes ~10/12) */
    }
}

/* Large devices (≥992px): 5 thumbs */
@media (min-width: 992px) {
    .thumb-item {
        flex: 0 0 calc((100% - 48px) / 5); /* 4 gaps * 12px = 48px */
    }

    .thumb-item img {
        aspect-ratio: 16 / 9;
    }
}

/* Optional wrapper for better rhythm; apply class to a parent container if you can */
.bike-details {
  max-width: var(--bike-max-width);
}

/* Description */
.bike-desc {
  margin: 0;
  padding: 0;
  padding-top: 30px;
  padding-bottom: 30px;
  color: var(--bike-text);
  font-size: var(--bike-desc-font-size);
  font-weight: var(--bike-desc-font-weight);
  line-height: var(--bike-desc-line-height);
  letter-spacing: 0.01em;
  text-wrap: pretty;
  hyphens: auto;
}

/* Add breathing room between the description and the first include */
.bike-desc + .bike-include {
  margin-top: var(--bike-block-gap);
}

/* Inclusion rows */
.bike-include {
  margin: var(--bike-include-gap) 0 0;
  padding: 0;

  color: var(--bike-muted);
  font-size: var(--bike-include-font-size);
  font-weight: var(--bike-include-font-weight);
  line-height: var(--bike-include-line-height);

  display: flex;
  align-items: flex-start;
  gap: var(--bike-inline-gap);
}

.bike-include::first-letter {
  color: var(--bike-check);
}

@media (max-width: 480px) {
  :root {
    --bike-block-gap: 0.65rem;
    --bike-include-gap: 0.45rem;
  }
}
