/**
 * Single Product Page - Gallery Styles
 * Image gallery, thumbnails, navigation
 */

/* ============================================================================
   LEFT COLUMN - IMAGE GALLERY - Compact
   ============================================================================ */

.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Gallery container with minimum height to prevent collapse */
.product-gallery__main {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-height: 300px;
    border-radius: 12px;
}

.product-gallery__image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    padding: 16px;
}

.product-gallery__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    background-color: rgba(0, 0, 0, 0.4);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s, background-color 0.2s;
    z-index: 2;
}

.product-gallery__main:hover .product-gallery__nav {
    opacity: 1;
}

.product-gallery__nav:hover {
    background-color: rgba(0, 0, 0, 0.6);
}

.product-gallery__nav--prev {
    left: 6px;
}

.product-gallery__nav--next {
    right: 6px;
}

/* ============================================================================
   THUMBNAILS
   ============================================================================ */

/* Thumbnails styles moved to inline CSS in single-pg-product.php */
.product-gallery__thumbnails {
    display: flex;
}

.product-gallery__thumbnails::-webkit-scrollbar {
    height: 4px;
}

.product-gallery__thumbnails::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 2px;
}

.product-gallery__thumbnails::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}

.product-gallery__thumbnails::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.product-gallery__thumb {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color 0.2s;
    background: var(--bg-tertiary);
}

.product-gallery__thumb:hover {
    border-color: var(--accent);
}

.product-gallery__thumb.is-active {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.2);
}

.product-gallery__thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

/* ============================================================================
   COMPACT CAROUSEL STYLING (in-page carousels)
   ============================================================================ */

.related-section--compact {
    padding: clamp(1.5rem, 2vw, 1.75rem) 0;
    margin-bottom: 0;
    background-color: transparent;
    border: none;
    border-radius: 0;
    border-top: 1px solid var(--border);
    box-shadow: none;
}

.related-section--compact .section-header {
    margin-bottom: clamp(0.5rem, 1vw, 0.75rem);
    padding-bottom: clamp(0.5rem, 1vw, 0.75rem);
    border-bottom: 2px solid var(--accent);
}

.related-section--compact .section-header__title {
    font-size: clamp(0.8rem, 1.3vw, 0.9rem);
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.related-carousel--compact {
    display: flex;
    gap: clamp(0.5rem, 1vw, 0.75rem);
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
}

.related-carousel--compact::-webkit-scrollbar {
    height: 3px;
}

.related-carousel--compact::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 2px;
}

.related-carousel--compact::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}

.related-carousel--compact::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.related-card--compact {
    flex: 0 0 150px;
    min-width: 150px;
    background-color: var(--bg-primary);
    border: none;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

html.dark .related-card--compact {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.related-card--compact:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

html.dark .related-card--compact:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}

.related-card--compact .related-card__image {
    aspect-ratio: 1;
    height: 100px;
    padding: 6px;
    background-color: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.related-card--compact .related-card__image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.related-card--compact .related-card__content {
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.related-card--compact .related-card__brand {
    font-size: 0.625rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.related-card--compact .related-card__name {
    font-size: clamp(0.6875rem, 1vw, 0.75rem);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
    transition: color 0.15s;
    flex: 1;
}

.related-card--compact:hover .related-card__name {
    color: var(--accent);
}

.related-card--compact .related-card__price {
    font-size: clamp(0.75rem, 1.2vw, 0.8125rem);
    font-weight: 700;
    color: var(--accent);
    margin-top: 4px;
}

.related-section--compact .related-section__nav {
    display: flex;
    gap: 4px;
}

.related-section--compact .related-section__nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.related-section--compact .related-section__nav-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.related-section--compact .related-section__nav-btn svg {
    width: 12px;
    height: 12px;
}
