﻿:root {
    --blue: #1648d4;
    --blue2: #0c30a8;
    --cyan: #00d4ff;
    --gold: #f0a500;
    --green: #16a34a;
    --red: #e0244a;
    --ink: #07080f;
    --muted: #64748b;
    --gray: #f4f6fb;
    --r: 14px;
}

* {
    box-sizing: border-box;
}

.pd-page {
    font-family: 'Tajawal', sans-serif;
    direction: rtl;
    background: var(--gray);
    min-height: 100vh;
    padding-bottom: 100px;
}

/* ── Breadcrumb ── */
.pd-breadcrumb {
    background: #fff;
    border-bottom: 1px solid #e4e8f3;
    padding: 12px 20px;
}

.pd-bc-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--muted);
    flex-wrap: wrap;
}

    .pd-bc-inner a {
        color: var(--blue);
        text-decoration: none;
    }

        .pd-bc-inner a:hover {
            text-decoration: underline;
        }

    .pd-bc-inner i {
        font-size: 10px;
    }

.pd-bc-current {
    color: var(--ink);
    font-weight: 600;
}

/* ── Main grid ── */
.pd-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

@media (max-width: 768px) {
    .pd-wrap {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 14px 12px;
    }
}

/* ════════════════════════════
       IMAGE PANEL
    ════════════════════════════ */
.pd-img-panel {
    background: #fff;
    border-radius: var(--r);
    border: 1px solid #e4e8f3;
    overflow: hidden;
    position: sticky;
    top: 80px;
}

.pd-img-main {
    position: relative;
    aspect-ratio: 4/3;
    background: var(--gray);
    overflow: hidden;
}

    .pd-img-main img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform .4s ease;
    }

    .pd-img-main:hover img {
        transform: scale(1.04);
    }

/* discount badge on image */
.pd-img-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: var(--red);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 20px;
    box-shadow: 0 4px 14px rgba(224,36,74,.35);
    animation: badgePop .4s cubic-bezier(.34,1.56,.64,1);
}

@keyframes badgePop {
    from {
        transform: scale(0)
    }

    to {
        transform: scale(1)
    }
}

/* share + wishlist */
.pd-img-actions {
    position: absolute;
    top: 14px;
    left: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pd-img-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,.9);
    border: none;
    cursor: pointer;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    box-shadow: 0 2px 10px rgba(0,0,0,.12);
    transition: color .2s, transform .2s;
}

    .pd-img-action-btn:hover {
        color: var(--blue);
        transform: scale(1.1);
    }

/* thumbnails */
.pd-thumbs {
    display: flex;
    gap: 8px;
    padding: 12px;
    overflow-x: auto;
    scrollbar-width: none;
}

    .pd-thumbs::-webkit-scrollbar {
        display: none;
    }

.pd-thumb {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color .2s;
}

    .pd-thumb.active, .pd-thumb:hover {
        border-color: var(--blue);
    }

/* compare btn */
.pd-compare-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 0 12px 12px;
    height: 40px;
    border-radius: 10px;
    background: rgba(22,72,212,.07);
    border: 1px solid rgba(22,72,212,.2);
    color: var(--blue);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Tajawal', sans-serif;
    transition: background .2s;
}

    .pd-compare-btn:hover {
        background: rgba(22,72,212,.12);
    }

/* ════════════════════════════
       INFO PANEL
    ════════════════════════════ */
.pd-info {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* tag + title */
.pd-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .8px;
    text-transform: uppercase;
    color: var(--blue);
    background: rgba(22,72,212,.07);
    padding: 4px 12px;
    border-radius: 20px;
}

.pd-title {
    font-size: clamp(1.3rem, 3vw, 1.9rem);
    font-weight: 900;
    color: var(--ink);
    line-height: 1.25;
    margin-top: 6px;
}

/* rating row */
.pd-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.pd-stars {
    color: var(--gold);
    letter-spacing: 2px;
    font-size: 15px;
}

.pd-rating-count {
    color: var(--muted);
}

/* price card */
.pd-price-card {
    background: #fff;
    border: 1px solid #e4e8f3;
    border-radius: var(--r);
    padding: 18px;
}

.pd-price-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.pd-price-new {
    font-size: 2rem;
    font-weight: 900;
    color: var(--blue);
    line-height: 1;
}

    .pd-price-new .cur {
        font-size: 1rem;
        font-weight: 600;
        color: var(--muted);
        margin-right: 2px;
    }

.pd-price-old {
    font-size: 1.1rem;
    color: var(--muted);
    text-decoration: line-through;
}

.pd-price-save {
    font-size: 12px;
    font-weight: 800;
    background: #fff0f0;
    color: var(--red);
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid #ffd6dc;
}

.pd-vat {
    font-size: 11px;
    color: var(--muted);
    margin-top: 6px;
}

/* description */
.pd-desc-card {
    background: #fff;
    border: 1px solid #e4e8f3;
    border-radius: var(--r);
    padding: 18px;
}

.pd-desc-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--ink);
    margin-bottom: 8px;
}

.pd-desc-text {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.8;
}

/* features */
.pd-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.pd-feature {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: var(--muted);
    font-weight: 600;
}

    .pd-feature i {
        color: var(--green);
        font-size: 14px;
    }

/* qty */
.pd-qty-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pd-qty-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--ink);
}

.pd-qty-ctrl {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1.5px solid #e4e8f3;
    border-radius: 10px;
    overflow: hidden;
}

.pd-qty-btn {
    width: 38px;
    height: 38px;
    border: none;
    background: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
}

    .pd-qty-btn:hover {
        background: var(--gray);
    }

.pd-qty-val {
    width: 44px;
    text-align: center;
    font-size: 15px;
    font-weight: 800;
    color: var(--ink);
    border: none;
    outline: none;
    font-family: 'Tajawal', sans-serif;
}

/* action buttons */
.pd-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pd-btn-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    height: 52px;
    border-radius: var(--r);
    background: var(--ink);
    color: #fff;
    font-family: 'Tajawal', sans-serif;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(7,8,15,.2);
    transition: background .2s, transform .15s;
}

    .pd-btn-cart::before {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(135deg, transparent 30%, rgba(255,255,255,.08) 50%, transparent 70%);
        transform: translateX(200%);
        transition: transform .5s;
    }

    .pd-btn-cart:hover::before {
        transform: translateX(-200%);
    }

    .pd-btn-cart:hover {
        background: var(--blue);
        transform: translateY(-2px);
        color: #fff;
    }

    .pd-btn-cart:active {
        transform: scale(.98);
    }

.pd-btn-row2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.pd-btn-shop {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 46px;
    border-radius: var(--r);
    background: var(--gray);
    color: var(--ink);
    font-family: 'Tajawal', sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    border: 1.5px solid #e4e8f3;
    transition: border-color .2s, background .2s;
}

    .pd-btn-shop:hover {
        border-color: var(--blue);
        background: #f0f4ff;
        color: var(--blue);
    }

.pd-btn-wa {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 46px;
    border-radius: var(--r);
    background: #e8fdf1;
    color: #16a34a;
    font-family: 'Tajawal', sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background .2s;
}

    .pd-btn-wa:hover {
        background: #d1fae5;
    }

/* orders link */
.pd-orders-link {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--blue);
    text-decoration: none;
}

    .pd-orders-link:hover {
        text-decoration: underline;
    }

/* trust strip */
.pd-trust {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 8px;
}

.pd-trust-item {
    background: #fff;
    border: 1px solid #e4e8f3;
    border-radius: 10px;
    padding: 12px 8px;
    text-align: center;
}

    .pd-trust-item i {
        font-size: 20px;
        color: var(--blue);
        display: block;
        margin-bottom: 5px;
    }

    .pd-trust-item span {
        font-size: 11px;
        font-weight: 700;
        color: var(--muted);
    }

/* ════════════════════════════
       COMPARE MODAL
    ════════════════════════════ */
.cmp-modal .modal-content {
    border-radius: 16px;
    border: none;
    font-family: 'Tajawal', sans-serif;
}

.cmp-modal .modal-header {
    background: var(--ink);
    color: #fff;
    border-radius: 16px 16px 0 0;
    padding: 16px 20px;
    border: none;
}

.cmp-modal .modal-title {
    font-size: 15px;
    font-weight: 800;
}

.cmp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px,1fr));
    gap: 14px;
    padding: 16px;
}

.cmp-card {
    background: var(--gray);
    border: 1px solid #e4e8f3;
    border-radius: 12px;
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
}

    .cmp-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 24px rgba(22,72,212,.1);
    }

.cmp-img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
}

.cmp-body {
    padding: 12px;
}

.cmp-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 4px;
}

.cmp-supplier {
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 6px;
}

.cmp-price-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.cmp-price-new {
    font-size: 16px;
    font-weight: 900;
    color: var(--red);
}

.cmp-price-old {
    font-size: 12px;
    color: var(--muted);
    text-decoration: line-through;
}

.cmp-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    height: 38px;
    border-radius: 8px;
    background: var(--gold);
    color: var(--ink);
    font-family: 'Tajawal', sans-serif;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background .2s;
}

    .cmp-add-btn:hover {
        background: #d89000;
        color: var(--ink);
    }

/* ════════════════════════════
       PRODUCT ADDED MODAL
    ════════════════════════════ */
.added-modal .modal-content {
    border-radius: 16px;
    border: none;
    font-family: 'Tajawal', sans-serif;
}

.added-modal .modal-header {
    background: linear-gradient(135deg,#0f766e,#14b8a6);
    color: #fff;
    border-radius: 16px 16px 0 0;
    padding: 16px 20px;
    border: none;
}

.added-modal .modal-title {
    font-size: 15px;
    font-weight: 800;
}

.added-product {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 16px;
    background: var(--gray);
    border-radius: 12px;
    margin: 14px 14px 0;
}

.added-img {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #fff;
}

.added-name {
    font-size: 14px;
    font-weight: 800;
    color: var(--ink);
    margin-bottom: 4px;
}

.added-price {
    font-size: 16px;
    font-weight: 900;
    color: var(--red);
}

.added-actions {
    padding: 12px 14px 16px;
    display: flex;
    gap: 8px;
}

.added-cart-btn {
    flex: 1;
    height: 44px;
    border-radius: 10px;
    background: var(--gold);
    color: var(--ink);
    font-family: 'Tajawal', sans-serif;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background .2s;
}

    .added-cart-btn:hover {
        background: #d89000;
        color: var(--ink);
    }

.added-continue-btn {
    flex: 1;
    height: 44px;
    border-radius: 10px;
    background: var(--gray);
    color: var(--ink);
    font-family: 'Tajawal', sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    border: 1.5px solid #e4e8f3;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background .2s;
}

    .added-continue-btn:hover {
        background: #e8edf8;
    }

/* ════════════════════════════
       RELATED PRODUCTS
    ════════════════════════════ */
.pd-related {
    max-width: 1100px;
    margin: 24px auto 0;
    padding: 0 16px;
}

.pd-related-title {
    font-size: 18px;
    font-weight: 900;
    color: var(--ink);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e4e8f3;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .pd-related-title i {
        color: var(--blue);
    }

/* ════════════════════════════
       MOBILE STICKY ADD
    ════════════════════════════ */
.pd-mob-sticky {
    display: none;
    position: fixed;
    bottom: 68px;
    right: 0;
    left: 0;
    background: #fff;
    border-top: 1px solid #e4e8f3;
    padding: 10px 16px;
    z-index: 700;
    box-shadow: 0 -4px 20px rgba(0,0,0,.08);
    gap: 10px;
    align-items: center;
}

@media (max-width: 768px) {
    .pd-mob-sticky {
        display: flex;
    }
}

.mob-sticky-price {
    font-size: 18px;
    font-weight: 900;
    color: var(--blue);
}

    .mob-sticky-price small {
        font-size: 12px;
        color: var(--muted);
        text-decoration: line-through;
        margin-right: 6px;
    }

.mob-sticky-btn {
    flex: 1;
    height: 46px;
    border-radius: 10px;
    background: var(--ink);
    color: #fff;
    font-family: 'Tajawal', sans-serif;
    font-size: 14px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background .2s;
}

    .mob-sticky-btn:hover {
        background: var(--blue);
        color: #fff;
    }

/* reveal animation */
.pd-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .5s ease, transform .5s ease;
}

    .pd-reveal.visible {
        opacity: 1;
        transform: none;
    }

