/* Product detail page */
.pd {
    max-width: 1300px;
    margin: 24px auto 0;
    padding: 0 15px 40px;
}
.pd-grid {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 28px;
    align-items: start;
}
.pd-gallery {
    background: #fff;
    border: 1px solid #eef0f3;
    border-radius: 20px;
    padding: 12px;
    position: sticky;
    top: 12px;
}
.pd-gallery__main {
    position: relative;
    background: #f8fafc;
    border-radius: 14px;
    aspect-ratio: 4 / 3;
    max-height: 420px;
    overflow: hidden;
    cursor: zoom-in;
}
.pd-gallery__main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
    display: block;
}
.pd-gallery__zoom {
    position: absolute;
    left: 12px;
    bottom: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(17,24,39,.78);
    color: #fff;
    font-size: 12px;
    font-weight: 750;
    padding: 7px 12px;
    cursor: pointer;
}
.pd-gallery__zoom:hover { background: #e31e24; }
.pd-gallery__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.95);
    box-shadow: 0 6px 16px rgba(15,23,42,.12);
    cursor: pointer;
    color: #111827;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2;
}
.pd-gallery.has-many .pd-gallery__nav { display: inline-flex; }
.pd-gallery__nav--prev { left: 10px; }
.pd-gallery__nav--next { right: 10px; }
.pd-gallery__count {
    position: absolute;
    right: 12px;
    bottom: 12px;
    background: rgba(17,24,39,.72);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 999px;
    z-index: 2;
}
/* Mobil geri — şəkil üzərində, layout ölçüsünü dəyişmir */
.pd-back {
    display: none;
}
.pd-gallery__thumbs {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}
.pd-gallery__thumbs::-webkit-scrollbar { height: 6px; }
.pd-gallery__thumbs::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 999px;
}
.pd-gallery__thumbs button {
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 0;
    background: #f8fafc;
    cursor: pointer;
    overflow: hidden;
    scroll-snap-align: start;
}
.pd-gallery__thumbs button.is-active {
    border-color: #e31e24;
}
.pd-gallery__thumbs img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Lightbox — böyük baxış */
.pd-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10050;
    background: rgba(15, 23, 42, .88);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.pd-lightbox.is-open { display: flex; }
.pd-lightbox img {
    max-width: min(1100px, 100%);
    max-height: 88vh;
    border-radius: 12px;
    object-fit: contain;
    background: #0f172a;
}
.pd-lightbox__close,
.pd-lightbox__nav {
    position: absolute;
    border: 0;
    border-radius: 999px;
    background: rgba(255,255,255,.95);
    color: #111827;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0,0,0,.2);
}
.pd-lightbox__close { top: 18px; right: 18px; }
.pd-lightbox__nav--prev { left: 18px; top: 50%; transform: translateY(-50%); }
.pd-lightbox__nav--next { right: 18px; top: 50%; transform: translateY(-50%); }
.pd-lightbox__count {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 13px;
    font-weight: 750;
    background: rgba(17,24,39,.7);
    padding: 6px 12px;
    border-radius: 999px;
}

.pd-info { padding-top: 4px; }
.pd-crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin: 0 0 14px;
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
}
.pd-crumbs a {
    color: #6b7280;
    text-decoration: none;
}
.pd-crumbs a:hover,
.pd-crumbs a.is-current {
    color: #e31e24;
}
.pd-title {
    margin: 0 0 6px;
    font-size: 26px;
    font-weight: 800;
    color: #111827;
    line-height: 1.25;
}
.pd-brand {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #e31e24;
    margin-bottom: 10px;
}
.pd-rating-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-weight: 700;
    flex-wrap: wrap;
}
.pd-rating-line .stars { color: #f59e0b; }
.pd-rating-line a {
    color: #6b7280;
    text-decoration: none;
}
.pd-rating-line a:hover { color: #e31e24; }
.pd-stats {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.pd-stats span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f8fafc;
    border: 1px solid #eef0f3;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
    color: #4b5563;
}
.pd-price-box {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.pd-old {
    color: #9ca3af;
    text-decoration: line-through;
    font-weight: 600;
    font-size: 14px;
}
.pd-price {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -.5px;
    color: #111827;
    line-height: 1;
}
.pd-off {
    background: #fff1f2;
    color: #e31e24;
    font-size: 12px;
    font-weight: 800;
    padding: 5px 10px;
    border-radius: 999px;
}
.pd-desc {
    color: #4b5563;
    line-height: 1.6;
    font-size: 14px;
    margin: 0 0 18px;
    white-space: pre-wrap;
}
.pd-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.pd-cart {
    flex: 1;
    min-width: 180px;
    background: #111827;
    color: #fff !important;
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.pd-cart:hover { background: #e31e24; }
.pd-icon-btn {
    width: 48px;
    height: 48px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    color: #111827;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.pd-icon-btn:hover,
.pd-icon-btn.is-active {
    background: #e31e24;
    border-color: #e31e24;
    color: #fff;
}
.pd-related {
    margin-top: 40px;
    padding-bottom: 24px;
}
.pd-related h2 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 14px;
    color: #1a1a1a;
}
.pd-related .mv-products-grid {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 12px 10px;
}
@media (max-width: 1100px) {
    .pd-related .mv-products-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }
}
@media (max-width: 900px) {
    .pd-related .mv-products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}
@media (max-width: 640px) {
    .pd-related .mv-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px 8px;
    }
}

.pd-video {
    margin-top: 28px;
    background: #fff;
    border: 1px solid #eef0f3;
    border-radius: 20px;
    padding: 16px;
}
.pd-video__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.pd-video__head h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.pd-video__head h2 i { color: #e31e24; }
.pd-video__head span {
    font-size: 12px;
    font-weight: 700;
    color: #6b7280;
}
.pd-video__frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    overflow: hidden;
    background: #0f172a;
}
.pd-video__frame video,
.pd-video__frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: #000;
}

@media (max-width: 900px) {
    .pd-grid { grid-template-columns: 1fr; gap: 18px; }
    .pd-title { font-size: 22px; }
    .pd-price { font-size: 26px; }
    .pd-merchant__btn { flex: 1; justify-content: center; }
    .pd-gallery { position: static; }
    .pd-gallery__main {
        max-height: 300px;
        aspect-ratio: 16 / 11;
    }
    .pd-back {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 10px;
        left: 10px;
        z-index: 5;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: rgba(255, 255, 255, .95);
        color: #111827;
        text-decoration: none;
        box-shadow: 0 4px 14px rgba(15, 23, 42, .16);
        font-size: 14px;
        line-height: 1;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    .pd-back:active {
        background: #fff;
        color: #e31e24;
        transform: scale(.96);
    }
}

/* Merchant block — right column, above product title */
.pd-merchant {
    background: #fff;
    border: 1px solid #eef0f3;
    border-radius: 16px;
    padding: 12px 14px;
    margin: 0 0 16px;
    box-shadow: 0 6px 18px rgba(15,23,42,.04);
}
.pd-merchant__main {
    display: flex;
    align-items: center;
    gap: 12px;
}
.pd-merchant__logo-link { flex-shrink: 0; }
.pd-merchant__logo {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    background: #f3f4f6;
    border: 2px solid #eef0f3;
    display: block;
}
.pd-merchant__meta { flex: 1; min-width: 0; }
.pd-merchant__name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.pd-merchant__name {
    font-size: 16px;
    font-weight: 800;
    color: #111827;
    text-decoration: none;
    line-height: 1.2;
}
.pd-merchant__name:hover { color: #e31e24; }
.pd-merchant__share {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #4b5563;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: 2px;
}
.pd-merchant__share:hover {
    color: #e31e24;
    border-color: #fecaca;
    background: #fff7f7;
}
.pd-merchant__verified {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #0f766e;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
}
.pd-merchant__handle {
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
    margin-top: 2px;
}
.pd-merchant__rating {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px 8px;
    margin-top: 5px;
    font-size: 12px;
    font-weight: 700;
    color: #4b5563;
}
.pd-merchant__stars { color: #f59e0b; letter-spacing: 1px; }
.pd-merchant__stars .far { color: #d1d5db; }
.pd-merchant__rev-count { color: #9ca3af; font-weight: 600; }
.pd-merchant__rate-btn {
    border: 0;
    background: transparent;
    color: #e31e24;
    font-weight: 800;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.pd-merchant__rate-btn:hover { text-decoration: underline; }
.pd-merchant__like {
    border: 1px solid #fecaca;
    background: #fff7f7;
    color: #e31e24;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.pd-merchant__like.is-liked {
    background: #e31e24;
    border-color: #e31e24;
    color: #fff;
}
.pd-merchant__like.is-liked i { color: #fff; }
.pd-merchant__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}
.pd-merchant__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    border: 1.5px solid transparent;
    white-space: nowrap;
    transition: .15s ease;
}
.pd-merchant__btn--ghost {
    background: #fff;
    color: #6d28d9;
    border-color: #6d28d9;
}
.pd-merchant__btn--ghost:hover { background: #f5f3ff; }
.pd-merchant__btn--solid {
    background: #6d28d9;
    color: #fff;
    border-color: #6d28d9;
}
.pd-merchant__btn--solid:hover { background: #5b21b6; }
.pd-merchant__btn--solid.is-following {
    background: #111827;
    border-color: #111827;
}

@media (max-width: 700px) {
    .pd-merchant {
        padding: 8px 10px;
        margin: 0 0 10px;
        border-radius: 12px;
        box-shadow: none;
    }
    .pd-merchant__main {
        gap: 8px;
        align-items: center;
    }
    .pd-merchant__logo {
        width: 36px;
        height: 36px;
        border-width: 1.5px;
    }
    .pd-merchant__name-row {
        gap: 5px;
        flex-wrap: nowrap;
    }
    .pd-merchant__name {
        font-size: 13px;
        font-weight: 850;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 42vw;
    }
    .pd-merchant__verified {
        width: 15px;
        height: 15px;
        font-size: 7px;
        flex-shrink: 0;
    }
    .pd-merchant__share {
        width: 26px;
        height: 26px;
        border-radius: 8px;
        margin-left: auto;
        flex-shrink: 0;
        font-size: 11px;
    }
    .pd-merchant__handle {
        display: none;
    }
    .pd-merchant__rating {
        margin-top: 2px;
        gap: 4px 6px;
        font-size: 11px;
        flex-wrap: nowrap;
    }
    .pd-merchant__stars {
        display: none;
    }
    .pd-merchant__like {
        padding: 2px 6px;
        font-size: 10px;
        gap: 3px;
    }
    .pd-merchant__rate-btn {
        font-size: 11px;
        gap: 3px;
        margin-left: auto;
    }
    .pd-merchant__rate-btn .pd-merchant__rate-full {
        display: none;
    }
    .pd-merchant__rate-btn .pd-merchant__rate-short {
        display: inline;
    }
    .pd-merchant__actions {
        margin-top: 8px;
        gap: 6px;
    }
    .pd-merchant__btn {
        flex: 1;
        justify-content: center;
        padding: 7px 8px;
        font-size: 11px;
        gap: 4px;
        border-radius: 10px;
    }
    .pd-merchant__btn--ghost .pd-merchant__btn-full {
        display: none;
    }
    .pd-merchant__btn--ghost .pd-merchant__btn-short {
        display: inline;
    }
}

.pd-merchant__rate-short,
.pd-merchant__btn-short {
    display: none;
}

.pd-store-rate {
    background: #fff;
    border: 1px solid #eef0f3;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
}
.pd-store-rate__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.pd-store-rate__head h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
}
.pd-store-rate__close {
    border: 0;
    background: #f3f4f6;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
}
.pd-store-rate__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}
.pd-store-rate label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 12px;
    font-weight: 700;
    color: #6b7280;
    margin-bottom: 10px;
}
.pd-store-rate input,
.pd-store-rate textarea {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 9px 11px;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}
.pd-store-rate__stars > span {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #6b7280;
    margin-bottom: 6px;
}
.pd-store-rate__stars > div {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 4px;
}
.pd-store-rate__stars input { display: none; }
.pd-store-rate__stars label {
    margin: 0;
    cursor: pointer;
    color: #d1d5db;
    font-size: 20px;
}
.pd-store-rate__stars input:checked ~ label,
.pd-store-rate__stars label:hover,
.pd-store-rate__stars label:hover ~ label {
    color: #f59e0b;
}
@media (max-width: 700px) {
    .pd-store-rate__grid { grid-template-columns: 1fr; }
}
