/* ===== Reset Body ===== */
body {
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
}

/* ===== Detail Container ===== */
.detail-container {
    max-width: 1100px;
    margin: 40px auto 0; /* top margin only, remove bottom space */
    padding: 25px;
}

/* ===== Item Title ===== */
.item-title {
    font-size: 2rem;
    color: var(--accent-gold);
    text-align: center;
    margin-bottom: 20px; /* slightly smaller */
}

/* ===== Main Image ===== */
.item-gallery {
    text-align: center;
    margin-bottom: 25px;
}

.main-image img {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    border-radius: 15px;
    transition: opacity 0.5s ease;
}

/* ===== Thumbnails ===== */
.thumbnail-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 10px;
    margin-top: 15px;
}

.thumbnail {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, border 0.2s ease;
    background: rgba(255,255,255,0.8);
    flex-shrink: 0;
}

.thumbnail:hover {
    transform: scale(1.05);
}

.thumbnail.active {
    border: 3px solid var(--accent-gold);
}

/* ===== Item Description ===== */
.item-description {
    font-size: 1.1rem;
    line-height: 1.8;
    text-align: center;
    margin-bottom: 25px; /* space between description and button */
    color: var(--text-dark);
}
.item-price {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--accent-gold);
    text-align: center;
    margin-bottom: 30px;
}


/* ===== Back Button ===== */
.back-btn {
    text-align: center;
    margin-bottom: 0; /* remove extra spacing before footer */
}

.back-btn a {
    display: inline-block;
    padding: 12px 25px;
    background: var(--accent-gold);
    color: var(--bg-cream);
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.2s ease, transform 0.2s ease;
}

.back-btn a:hover {
    background: #b48e2c;
    transform: translateY(-2px);
}

/* ===== Footer Fix ===== */
footer {
    margin-top: 0; /* ensure footer is flush */
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .main-image img {
        max-height: 400px;
    }
    .thumbnail {
        width: 75px;
        height: 75px;
    }
}

@media (max-width: 768px) {
    .main-image img {
        max-height: 300px;
    }
    .thumbnail {
        width: 65px;
        height: 65px;
    }
}

@media (max-width: 480px) {
    .item-title {
        font-size: 1.6rem;
    }
    .main-image img {
        max-height: 200px;
    }
    .thumbnail {
        width: 50px;
        height: 50px;
    }
    .item-description {
        font-size: 1rem;
    }
    .back-btn a {
        padding: 10px 20px;
    }
}
