/* ============================================================
   PRODUCT_DETAIL.CSS
   ============================================================ */

.detail-section {
    padding-block: 40px 90px;
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 30px;
    font-size: 12px;
    color: var(--gold);
}

.breadcrumb span {
    color: var(--muted);
    opacity: .5;
}

.breadcrumb a:hover {
    color: var(--cream);
}

/* ============================================================
   DETAIL TOP — گالری (راست) + اطلاعات (چپ)
   ============================================================ */
.detail-top {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    align-items: start;
    margin-bottom: 60px;
}

/* ============================================================
   GALLERY (Swiper)
   ============================================================ */
.detail-gallery {
    width: 100%;
    min-width: 0;
}

.detail-swiper {
    width: 100%;
    border: 1px solid var(--line);
    background: var(--surface);
    overflow: hidden;
    position: relative;
}

.detail-swiper .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-slide {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.detail-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* دکمه‌های ناوبری */
.detail-swiper .swiper-button-prev,
.detail-swiper .swiper-button-next {
    width: 36px;
    height: 36px;
    background: #061b16cc;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--gold);
    transition: background var(--transition-fast), color var(--transition-fast);
}

.detail-swiper .swiper-button-prev::after,
.detail-swiper .swiper-button-next::after {
    font-size: 12px;
    font-weight: bold;
}

.detail-swiper .swiper-button-prev:hover,
.detail-swiper .swiper-button-next:hover {
    background: var(--gold);
    color: var(--bg);
}

/* pagination */
.detail-swiper .swiper-pagination {
    bottom: 10px;
}

.detail-swiper .swiper-pagination-bullet {
    width: 6px;
    height: 6px;
    aspect-ratio: 1 / 1;
    background: var(--cream);
    opacity: .5;
    border-radius: 50%;
}

.detail-swiper .swiper-pagination-bullet-active {
    background: var(--gold);
    opacity: 1;
}

/* Placeholder */
.detail-image-placeholder {
    aspect-ratio: 1 / 1;
    background: var(--surface);
    border: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--muted);
}

.detail-image-placeholder span {
    font-size: 48px;
    color: var(--gold);
    opacity: .4;
}

.detail-image-placeholder p {
    font-size: 13px;
    margin: 0;
    opacity: .6;
}

/* ===== THUMBS ===== */
.detail-thumbs-swiper {
    margin-top: 10px;
    width: 100%;
}

.detail-thumb-slide {
    width: 64px !important;
    height: 80px;
    border: 1px solid var(--line);
    overflow: hidden;
    cursor: pointer;
    opacity: .6;
    transition: opacity var(--transition-fast), border-color var(--transition-fast);
}

.detail-thumb-slide:hover {
    opacity: 1;
}

.detail-thumb-slide.swiper-slide-thumb-active {
    opacity: 1;
    border-color: var(--gold);
}

.detail-thumb-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ============================================================
   INFO (ستون چپ)
   ============================================================ */
.detail-info {
    min-width: 0;
}

.detail-info h1 {
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    margin-bottom: 8px;
}

.detail-info .eyebrow {
    margin-bottom: 10px;
}

.detail-code {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 12px;
    font-family: Georgia, serif;
    letter-spacing: .5px;
}

/* قیمت */
.detail-price {
    font-family: Georgia, serif;
    font-size: 22px;
    color: var(--gold);
    font-weight: 500;
    margin: 0 0 22px;
    line-height: 1.3;
}

.detail-price small {
    font-family: Vazirmatn, Tahoma, sans-serif;
    font-size: 13px;
    color: var(--muted);
    font-weight: 400;
    margin-right: 4px;
}

/* ===== SPECS ===== */
.detail-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    margin: 0 0 26px;
    border: 1px solid var(--line);
    background: var(--surface);
}

.detail-spec {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    border-left: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.detail-spec:nth-child(odd) {
    border-left: 0;
}

.detail-spec:nth-last-child(-n+2) {
    border-bottom: 0;
}

.detail-spec dt {
    font-size: 11px;
    color: var(--muted);
    letter-spacing: .3px;
}

.detail-spec dd {
    font-size: 13px;
    color: var(--cream);
    font-weight: 500;
    margin: 0;
}

/* ===== ADD TO CART ===== */
.detail-add-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    margin-bottom: 18px;
}

/* ردیف تعداد */
.quantity-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.quantity-label {
    font-size: 13px;
    color: var(--cream);
    font-weight: 500;
    white-space: nowrap;
}

/* selector */
.quantity-selector {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--bg);
    overflow: hidden;
}

.qty-btn {
    width: 38px;
    height: 38px;
    background: none;
    border: 0;
    color: var(--gold);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast);
    flex-shrink: 0;
}

.qty-btn:hover {
    background: #c3a36a14;
}

.qty-input {
    width: 50px;
    height: 38px;
    background: transparent;
    border: 0;
    border-inline: 1px solid var(--line);
    color: var(--cream);
    font-family: inherit;
    font-size: 14px;
    text-align: center;
    font-weight: 500;
    outline: none;
}

.qty-input::-webkit-inner-spin-button,
.qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.qty-input {
    -moz-appearance: textfield;
    appearance: textfield;
}

.detail-add-btn {
    width: 100%;
    justify-content: center;
}

/* ===== SECONDARY CTA ===== */
.detail-secondary-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 20px;
}

.detail-secondary-cta .text-link {
    font-size: 12px;
    border-bottom: 0;
    color: var(--muted);
    padding: 0;
}

.detail-secondary-cta .text-link:hover {
    color: var(--gold);
}

/* ===== TAGS ===== */
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.detail-tag {
    display: inline-block;
    font-size: 11px;
    color: var(--muted);
    background: #c3a36a0e;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--line);
    transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.detail-tag:hover {
    background: #c3a36a22;
    color: var(--gold);
    border-color: #c3a36a55;
}

/* ============================================================
   DESCRIPTION
   ============================================================ */
.detail-description-section {
    padding-top: 40px;
    padding-bottom: 60px;
    border-top: 1px solid var(--line);
    margin-bottom: 40px;
}

.detail-description {
    max-width: 850px;
    font-size: 14px;
    color: var(--muted);
    line-height: 2;
}

.detail-description h2,
.detail-description h3 {
    color: var(--cream);
    margin-top: 24px;
    margin-bottom: 10px;
}

.detail-description p {
    margin-bottom: 12px;
}

.detail-description ul,
.detail-description ol {
    padding-right: 24px;
    margin-bottom: 14px;
}

.detail-description li {
    margin-bottom: 6px;
}

/* ============================================================
   RELATED
   ============================================================ */
.detail-related {
    padding-top: 60px;
    border-top: 1px solid var(--line);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (min-width: 600px) {
    .detail-specs {
        grid-template-columns: repeat(4, 1fr);
    }

    .detail-spec:nth-child(odd) {
        border-left: 1px solid var(--line);
    }

    .detail-spec:first-child {
        border-left: 0;
    }

    .detail-spec:nth-last-child(-n+4) {
        border-bottom: 0;
    }

    .detail-add-form {
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
        gap: 16px;
    }

    .quantity-row {
        flex-shrink: 0;
    }

    .detail-add-btn {
        flex: 1;
        min-width: 200px;
    }

    .detail-thumb-slide {
        width: 76px !important;
        height: 95px;
    }
}

@media (min-width: 960px) {
    .detail-section {
        padding-block: 60px 110px;
    }

    /* در RTL: گالری راست، اطلاعات چپ */
    .detail-top {
        grid-template-columns: 1fr 1fr;
        gap: 55px;
        align-items: start;
    }

    .detail-gallery {
        position: sticky;
        top: 100px;
    }

    .detail-swiper .swiper-slide {
        min-height: 480px;
    }

    .detail-thumb-slide {
        width: 84px !important;
        height: 105px;
    }

    .detail-info h1 {
        font-size: 2.1rem;
    }

    .detail-price {
        font-size: 26px;
    }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    .detail-thumb-slide {
        transition: none;
    }
}