/* ============================================================
   MON TEX GRASS — Single Product Page Styles
   استایل صفحه اختصاصی محصول
   ============================================================ */

/* -------------------- ۱) Breadcrumb -------------------- */
.breadcrumb-wrap {
    background: var(--white);
    border-bottom: 1px solid #e3ede6;
    padding: 14px 0;
}

/* -------------------- ۲) چیدمان جزئیات -------------------- */
.product-detail {
    padding: 32px 0 60px;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 36px;
    background: var(--white);
    border: 1px solid #e3ede6;
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 32px;
    min-width: 0;
}

/* -------------------- ۳) تصویر محصول -------------------- */
.detail-image {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    min-height: 380px;
    aspect-ratio: 4/3;
    background-color: #2e8b57;
    background-image:
        repeating-linear-gradient(78deg, rgba(255, 255, 255, .09) 0 2px, transparent 2px 7px),
        repeating-linear-gradient(-78deg, rgba(0, 0, 0, .10) 0 2px, transparent 2px 8px),
        linear-gradient(170deg, var(--c1, #4caf50), var(--c2, #1b5e20));
}

.detail-image.t-decor {
    --c1: #4caf50;
    --c2: #1b5e20;
}

.detail-image.t-sport {
    --c1: #43a047;
    --c2: #0f3d21;
}

.detail-image.t-pet {
    --c1: #66bb6a;
    --c2: #2e7d32;
}

.detail-image.t-roof {
    --c1: #26a69a;
    --c2: #00695c;
}

.detail-image.t-acc {
    --c1: #a1887f;
    --c2: #4e342e;
}

.detail-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.detail-image img.loaded {
    display: block;
}

.detail-image .placeholder-note {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, .75);
    font-size: 13px;
    text-align: center;
    padding: 20px;
}

.detail-image .code-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(0, 0, 0, .5);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-family: monospace;
    font-size: 12px;
    z-index: 2;
    direction: ltr;
}

/* -------------------- ۴) اطلاعات محصول -------------------- */
.detail-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.detail-cat {
    display: inline-flex;
    background: var(--green-light);
    color: var(--green-dark);
    font-size: 12.5px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 20px;
    align-self: flex-start;
}

.detail-title {
    font-size: clamp(18px, 2.5vw, 26px);
    font-weight: 800;
    color: var(--green-dark);
    line-height: 1.5;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.detail-sub {
    color: var(--muted);
    font-size: 14.5px;
    overflow-wrap: anywhere;
}

.detail-sub b {
    font-family: monospace;
    direction: ltr;
    display: inline-block;
}

/* -------------------- ۵) باکس قیمت -------------------- */
.detail-price-box {
    background: linear-gradient(135deg, var(--green-light), #f4fbf6);
    border: 1.5px dashed var(--green-border);
    border-radius: var(--radius);
    padding: 18px;
}

.detail-price-box .dp-title {
    font-weight: 700;
    color: var(--green-dark);
    margin-bottom: 8px;
    font-size: 15px;
}

.detail-price-box .dp-range {
    font-size: 17px;
    font-weight: 800;
    color: #b45309;
    margin-bottom: 6px;
    overflow-wrap: anywhere;
}

.detail-price-box .dp-range small {
    font-size: 13px;
    font-weight: 600;
}

.detail-price-box .dp-note {
    color: var(--warn);
    font-size: 13px;
}

/* -------------------- ۶) دکمه‌های اقدام -------------------- */
.detail-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.btn-primary-lg {
    flex: 1;
    min-width: 180px;
    text-align: center;
    background: var(--green);
    color: var(--white);
    padding: 14px 22px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    overflow-wrap: anywhere;
}

.btn-primary-lg:hover {
    background: var(--green-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 122, 60, .3);
}

.btn-whatsapp-lg {
    text-align: center;
    background: #25d366;
    color: var(--white);
    padding: 14px 22px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-whatsapp-lg:hover {
    background: #1da851;
    transform: translateY(-2px);
}

/* -------------------- ۷) ویژگی‌ها -------------------- */
.detail-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 8px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13.5px;
    color: #41544a;
}

.feature-item .check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--green-light);
    display: grid;
    place-items: center;
    color: var(--green);
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 700;
}

/* -------------------- ۸) کارت مشخصات -------------------- */
.specs-card {
    background: var(--white);
    border: 1px solid #e3ede6;
    border-radius: 16px;
    padding: 26px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 32px;
}

.section-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--green-dark);
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--green-light);
    display: flex;
    align-items: center;
    gap: 9px;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.specs-table tr {
    border-bottom: 1px dashed #eef4f0;
}

.specs-table tr:last-child {
    border-bottom: 0;
}

.specs-table td {
    padding: 12px 4px;
    font-size: 14px;
    overflow-wrap: anywhere;
}

.specs-table td:first-child {
    color: var(--muted);
    width: 38%;
    font-weight: 500;
}

.specs-table td:last-child {
    font-weight: 700;
    color: var(--green-dark);
}

/* -------------------- ۹) محصولات مرتبط -------------------- */
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
    gap: 16px;
}

.mini-card {
    background: var(--white);
    border: 1px solid #e3ede6;
    border-radius: 12px;
    overflow: hidden;
    transition: .25s;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.mini-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--green-border);
}

.mini-image {
    height: 130px;
    position: relative;
    overflow: hidden;
    background-color: #2e8b57;
    background-image:
        repeating-linear-gradient(78deg, rgba(255, 255, 255, .09) 0 2px, transparent 2px 7px),
        repeating-linear-gradient(-78deg, rgba(0, 0, 0, .10) 0 2px, transparent 2px 8px),
        linear-gradient(170deg, var(--c1, #4caf50), var(--c2, #1b5e20));
}

.mini-image.t-decor {
    --c1: #4caf50;
    --c2: #1b5e20;
}

.mini-image.t-sport {
    --c1: #43a047;
    --c2: #0f3d21;
}

.mini-image.t-pet {
    --c1: #66bb6a;
    --c2: #2e7d32;
}

.mini-image.t-roof {
    --c1: #26a69a;
    --c2: #00695c;
}

.mini-image.t-acc {
    --c1: #a1887f;
    --c2: #4e342e;
}

.mini-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.mini-image img.loaded {
    display: block;
}

.mini-body {
    padding: 12px 13px 14px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    flex: 1;
    min-width: 0;
}

.mini-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--green-dark);
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.mini-price {
    font-size: 12.5px;
    color: #b45309;
    font-weight: 700;
}

.mini-btn {
    margin-top: auto;
    text-align: center;
    background: var(--green-light);
    color: var(--green-dark);
    padding: 8px;
    border-radius: 9px;
    font-size: 12.5px;
    font-weight: 700;
}

.mini-btn:hover {
    background: var(--green);
    color: #fff;
}

/* ============================================================
   ریسپانسیو
   ============================================================ */
@media (max-width: 980px) {
    .detail-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
        padding: 20px;
    }

    .detail-image {
        min-height: 260px;
    }
}

@media (max-width: 768px) {
    .product-detail {
        padding: 20px 0 50px;
    }

    .detail-grid {
        padding: 16px;
        gap: 16px;
    }

    .detail-image {
        min-height: 220px;
    }

    .detail-title {
        font-size: 18px;
    }

    .detail-price-box {
        padding: 14px;
    }

    .detail-price-box .dp-range {
        font-size: 15px;
    }

    .detail-actions {
        flex-direction: column;
    }

    .btn-primary-lg,
    .btn-whatsapp-lg {
        width: 100%;
        min-width: auto;
        padding: 13px;
        font-size: 14px;
    }

    .detail-features {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .feature-item {
        font-size: 12.5px;
    }

    .specs-card {
        padding: 16px;
        margin-bottom: 22px;
    }

    .section-title {
        font-size: 16px;
        margin-bottom: 14px;
    }

    .specs-table td {
        padding: 10px 4px;
        font-size: 13px;
    }

    .specs-table td:first-child {
        width: 44%;
    }

    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .mini-image {
        height: 110px;
    }

    .mini-title {
        font-size: 12.5px;
    }
}

@media (max-width: 420px) {
    .detail-image {
        min-height: 180px;
    }

    .detail-price-box .dp-range {
        font-size: 14px;
    }

    .detail-features {
        grid-template-columns: 1fr;
    }
}