/* Product Detail Overlay — Product details & related items */

/* ================== RIGHT INFO AREA ================== */
.item-info-right {
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
    max-width: 350px;
    width: 100%;
    box-sizing: border-box;
}

.item-name-container,
.item-price-container,
.item-description-container {
    width: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    padding: 1.25rem;
    box-sizing: border-box;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.item-name-container h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
}

.item-price-container .price {
    margin: 0;
    font-size: 1.5rem;
    font-weight: bold;
    color: #ff6b35;
}

.item-description-container ul {
    list-style: disc;
    margin: 0;
    padding-left: 1.5rem;
}

.item-description-container li {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

/* ================== RELATED ITEMS SECTION ================== */
.related-items-section {
    max-width: 1320px;
    margin: 3rem auto 0;
    padding: 1rem 0;
    font-family: inherit;
}

.related-items-section h2 {
    margin: 0 0 1.25rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    text-align: center;
    letter-spacing: -0.02em;
}

.related-items-container {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    padding-bottom: 1rem;
    scroll-behavior: smooth;
}

.related-item-card {
    min-width: 200px;
    max-width: 200px;
    flex: 0 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.35);
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.related-item-card:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.related-item-card img {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
    margin: 0 auto;
}

.related-item-card h3 {
    font-size: 1rem;
    margin: 0.5rem 0;
    color: #ffffff;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

.related-item-card:hover h3 {
    text-decoration: underline;
    text-decoration-color: #ff6b35;
}

.related-item-card .price {
    font-weight: bold;
    color: #ff6b35;
    margin: 0.5rem 0 0;
}

/* ================== RESPONSIVE (details) ================== */
@media (max-width: 1024px) {
    .item-info-right {
        position: static;
        order: 3;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .item-name-container {
        order: 0;
    }

    .item-price-container,
    .item-description-container {
        order: 3;
        max-width: 100%;
    }

    .related-item-card {
        min-width: 150px;
        max-width: 150px;
        padding: 0.75rem;
    }

    .related-item-card img {
        width: 120px;
        height: 120px;
    }
}

@media (max-width: 600px) {
    .related-item-card {
        min-width: 120px;
        max-width: 120px;
        padding: 0.5rem;
    }

    .related-item-card img {
        width: 100px;
        height: 100px;
    }

    .item-name-container h1 {
        font-size: 1.25rem;
    }

    .item-price-container .price {
        font-size: 1.25rem;
    }
}

/* ================== ACCESSIBILITY (details) ================== */
.related-item-card:focus {
    outline: 2px solid #ff6b35;
    outline-offset: 2px;
}

/* ================== SCROLLBAR (related items) ================== */
.related-items-container::-webkit-scrollbar {
    height: 8px;
}

.related-items-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.related-items-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.related-items-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}
