/* ── Variables ─────────────────────────────── */
:root {
    --pd-primary:   #000000;
    --pd-primary-d: #5a6fd6;
    --pd-dark:      #1a1a2e;
    --pd-muted:     #6c757d;
    --pd-border:    #e9ecef;
    --pd-radius:    14px;
    --pd-shadow:    0 8px 32px rgba(102,126,234,.12);
}

/* ── Page ──────────────────────────────────── */
.pd-page { background: #f8f9fc; min-height: 100vh; }

/* ── Breadcrumb ────────────────────────────── */
.pd-breadcrumb { font-size: .85rem; }
.pd-breadcrumb a { color: var(--pd-primary); text-decoration: none; }
.pd-breadcrumb .separator { color: var(--pd-border); margin: 0 6px; }

/* ── Gallery ───────────────────────────────── */
.pd-gallery { display: flex; gap: 14px; position: sticky; top: 80px; }

.pd-thumbs-col {
    width: 80px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 520px;
    overflow: hidden;
}
.pd-thumbs-col .swiper { height: 100%; }
.pd-thumbs-col .swiper-slide {
    height: auto !important;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color .2s;
}
.pd-thumbs-col .swiper-slide-thumb-active,
.pd-thumbs-col .swiper-slide:hover { border-color: var(--pd-primary); }
.pd-thumbs-col img { width: 100%; height: 80px; object-fit: cover; display: block; }

.pd-main-img {
    flex: 1;
    border-radius: var(--pd-radius);
    overflow: hidden;
    background: #fff;
    box-shadow: var(--pd-shadow);
    position: relative;
}
.pd-main-img .swiper { height: 520px; }
.pd-main-img .swiper-slide { display: flex; align-items: center; justify-content: center; background: #fff; }
.pd-main-img img { max-height: 480px; width: 100%; object-fit: contain; }

/* Lightbox trigger */
.pd-lightbox-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: relative;
    cursor: zoom-in;
}
.pd-zoom-hint {
    position: absolute;
    bottom: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,.92);
    color: var(--pd-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .2s ease, transform .2s ease;
    pointer-events: none;
}
.pd-lightbox-link:hover .pd-zoom-hint,
.pd-lightbox-link:focus-visible .pd-zoom-hint {
    opacity: 1;
    transform: translateY(0);
}
@media (max-width: 768px) {
    .pd-zoom-hint { opacity: 1; transform: none; bottom: 10px; right: 10px; width: 30px; height: 30px; font-size: .7rem; }
}

/* Sale badge over image */
.pd-sale-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 10;
    background: linear-gradient(135deg,#fa709a,#fee140);
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,.2);
}

/* Nav arrows */
.pd-main-img .swiper-button-next,
.pd-main-img .swiper-button-prev {
    width: 36px; height: 36px;
    background: rgba(255,255,255,.9);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
    color: var(--pd-dark);
}
.pd-main-img .swiper-button-next::after,
.pd-main-img .swiper-button-prev::after { font-size: 13px; font-weight: 900; }

/* ── Info Panel ─────────────────────────────── */
.pd-info { display: flex; flex-direction: column; gap: 0; }

.pd-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(102,126,234,.1);
    color: var(--pd-primary);
    font-size: .75rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
    width: fit-content;
}

.pd-product-name {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--pd-dark);
    line-height: 1.25;
    margin: 0 0 14px;
}

/* Rating row */
.pd-rating-row { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; font-size: .9rem; }
.pd-stars { display: flex; gap: 2px; }
.pd-stars i { color: #ffc107; font-size: 15px; }
.pd-stars i.empty { color: #ddd; }
.pd-rating-num { font-weight: 700; color: var(--pd-dark); }
.pd-rating-count { color: var(--pd-muted); }
.pd-reviews-link { color: var(--pd-primary); text-decoration: none; font-size: .85rem; }

/* Divider */
.pd-divider { border: none; border-top: 1px solid var(--pd-border); margin: 18px 0; }

/* Price */
.pd-price-row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.pd-price { font-size: 2rem; font-weight: 800; color: var(--pd-primary); }
.pd-price-old { font-size: 1.1rem; color: var(--pd-muted); text-decoration: line-through; }
.pd-discount-pill {
    background: #fff3f3;
    color: #e5534b;
    font-size: .75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid #ffd0ce;
}

/* Stock */
.pd-stock { font-size: .85rem; font-weight: 600; display: flex; align-items: center; gap: 5px; }
.pd-stock.in  { color: #2da44e; }
.pd-stock.out { color: #e5534b; }

/* Variant label */
.pd-label {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--pd-muted);
    margin-bottom: 10px;
}
.pd-label span { color: var(--pd-dark); font-weight: 600; text-transform: none; letter-spacing: 0; margin-left: 6px; }

/* Color swatches */
.pd-swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.pd-swatch {
    width: 32px; height: 32px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    outline: 2px solid transparent;
    outline-offset: 2px;
    transition: all .2s;
    padding: 0;
    flex-shrink: 0;
}
.pd-swatch:hover  { outline-color: var(--pd-muted); }
.pd-swatch.active { outline-color: var(--pd-primary); border-color: #fff; }

/* Size pills */
.pd-sizes { display: flex; flex-wrap: wrap; gap: 8px; }
.pd-size-btn {
    min-width: 48px;
    padding: 6px 14px;
    border-radius: 8px;
    border: 1.5px solid var(--pd-border);
    background: #fff;
    font-size: .85rem;
    font-weight: 600;
    color: var(--pd-dark);
    cursor: pointer;
    transition: all .2s;
}
.pd-size-btn:hover  { border-color: var(--pd-primary); color: var(--pd-primary); }
.pd-size-btn.active { border-color: var(--pd-primary); background: var(--pd-primary); color: #fff; }

/* Quantity */
.pd-qty {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid var(--pd-border);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}
.pd-qty button {
    width: 42px; height: 42px;
    border: none;
    background: transparent;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--pd-dark);
    cursor: pointer;
    transition: background .15s;
}
.pd-qty button:hover { background: var(--pd-border); }
.pd-qty input {
    width: 54px;
    height: 42px;
    border: none;
    border-left: 1.5px solid var(--pd-border);
    border-right: 1.5px solid var(--pd-border);
    text-align: center;
    font-weight: 700;
    font-size: .95rem;
    outline: none;
}
.pd-qty input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* Action buttons — quantity, cart, buy, wishlist, share in one row */
.pd-actions {
    display: flex;
    align-items: stretch;
    gap: 10px;
}
.pd-actions .pd-qty { flex-shrink: 0; }
.pd-actions .pd-qty button,
.pd-actions .pd-qty input { height: 48px; }
.pd-actions .pd-qty button { width: 38px; }
.pd-actions .pd-qty input { width: 44px; -moz-appearance: textfield; }

.pd-buy-form { display: flex; flex: 1 1 0; min-width: 0; margin: 0; }

.pd-btn-cart,
.pd-btn-buy {
    flex: 1 1 0;
    min-width: 0;
    height: 48px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 0 14px;
    border-radius: 12px;
    border: none;
    color: #fff;
    font-size: .95rem;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: all .25s;
}
.pd-btn-cart span,
.pd-btn-buy span { overflow: hidden; text-overflow: ellipsis; }

.pd-btn-cart {
    background: var(--pd-primary);
    box-shadow: 0 4px 14px rgba(0,0,0,.18);
}
.pd-btn-cart:hover:not(:disabled) { background: #222; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.pd-btn-cart:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

.pd-btn-buy {
    width: 100%;
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    box-shadow: 0 4px 14px rgba(245,158,11,.35);
}
.pd-btn-buy:hover:not(:disabled) {
    background: linear-gradient(135deg, #d97706 0%, #dc2626 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(245,158,11,.45);
}
.pd-btn-buy:active:not(:disabled) { transform: translateY(0); }
.pd-btn-buy:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

/* Square icon buttons (wishlist / share) */
.pd-btn-icon {
    flex: 0 0 48px;
    width: 48px; height: 48px;
    display: flex; align-items: center; justify-content: center;
    padding: 0;
    border-radius: 12px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all .25s;
}
.pd-btn-wish {
    border: 1.5px solid #ffd0ce;
    background: #fff3f3;
    color: #e5534b;
}
.pd-btn-wish:hover { background: #ffe8e7; border-color: #e5534b; }
.pd-btn-wish.active { background: #e5534b; color: #fff; border-color: #e5534b; }

/* Wide-ish laptop columns: cart/buy move to their own row */
@media (min-width: 992px) and (max-width: 1199px) {
    .pd-actions { flex-wrap: wrap; }
    .pd-actions .pd-btn-cart,
    .pd-actions .pd-buy-form { order: 2; flex: 1 1 calc(50% - 5px); }
    .pd-actions .pd-btn-wish { margin-inline-start: auto; }
}

/* Phones: qty + icons on top, cart + buy below */
@media (max-width: 575px) {
    .pd-actions { flex-wrap: wrap; gap: 8px; }
    .pd-actions .pd-btn-wish { margin-inline-start: auto; }
    .pd-actions .pd-btn-cart,
    .pd-actions .pd-buy-form { order: 2; flex: 1 1 calc(50% - 4px); }
    .pd-btn-cart, .pd-btn-buy { padding: 0 10px; font-size: .9rem; gap: 6px; }
}

/* Trust badges */
.pd-trust { display: flex; gap: 6px; flex-wrap: wrap; }
.pd-trust-item {
    flex: 1;
    min-width: 110px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 6px;
    border-radius: 10px;
    border: 1px solid var(--pd-border);
    background: #fff;
    font-size: .72rem;
    font-weight: 600;
    color: var(--pd-muted);
    text-align: center;
}
.pd-trust-item i { font-size: 1.1rem; color: var(--pd-primary); }

/* ── Tabs ───────────────────────────────────── */
.pd-tabs-wrapper { background: #fff; border-radius: var(--pd-radius); box-shadow: 0 2px 12px rgba(0,0,0,.05); overflow: hidden; }
.pd-tab-nav { display: flex; gap: 0; border-bottom: 1px solid var(--pd-border); padding: 0 24px; }
.pd-tab-btn {
    padding: 16px 20px;
    border: none;
    background: transparent;
    font-weight: 600;
    font-size: .9rem;
    color: var(--pd-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all .2s;
    white-space: nowrap;
}
.pd-tab-btn:hover  { color: var(--pd-dark); }
.pd-tab-btn.active { color: var(--pd-primary); border-bottom-color: var(--pd-primary); }
.pd-tab-body { padding: 28px 24px; min-height: 120px; }
.pd-tab-pane { display: none; }
.pd-tab-pane.active { display: block; }

/* ── Related Products Section & Swiper ───────────────── */
.pd-related-section {
    position: relative;
    margin-top: 48px;
    padding-top: 28px;
    border-top: 1px solid var(--pd-border);
}

.pd-related-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.pd-related-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--pd-dark);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    flex: 1;
}

.pd-related-title::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, var(--pd-primary) 0%, rgba(99, 102, 241, 0.05) 100%);
    border-radius: 2px;
}

[dir="rtl"] .pd-related-title::after {
    background: linear-gradient(270deg, var(--pd-primary) 0%, rgba(99, 102, 241, 0.05) 100%);
}

.pd-related-arrows {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pd-related-arrow {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    border: 1.5px solid var(--pd-border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--pd-dark);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.pd-related-arrow:hover:not(.swiper-button-disabled) {
    background: var(--pd-primary);
    border-color: var(--pd-primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
    transform: translateY(-1px);
}

.pd-related-arrow.swiper-button-disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

[dir="rtl"] .pd-related-arrow i,
[dir="rtl"] .swiper-nav i {
    transform: scaleX(-1);
}

.pd-related-wrapper {
    position: relative;
}

.related-products-swiper {
    padding: 10px 4px 44px 4px;
    margin: -10px -4px 0 -4px;
    overflow: hidden;
    position: relative;
}

.related-products-swiper .swiper-wrapper {
    align-items: stretch;
}

.related-products-swiper .swiper-slide {
    height: auto !important;
    display: flex;
    flex-direction: column;
}

.related-products-swiper .swiper-slide > * {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.related-products-swiper .swiper-slide .mn-product-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.related-products-swiper .swiper-slide .mn-product-card .mn-product-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.related-products-swiper .swiper-slide .mn-product-card .mn-product-footer {
    margin-top: auto;
}

.related-products-pagination {
    bottom: 8px !important;
    text-align: center;
}

.related-products-pagination .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: #94a3b8;
    opacity: 0.5;
    transition: all 0.25s ease;
}

.related-products-pagination .swiper-pagination-bullet-active {
    background: var(--pd-primary);
    opacity: 1;
    width: 24px;
    border-radius: 4px;
}

/* Floating side navigation buttons */
.swiper-nav {
    position: absolute;
    top: 45%;
    transform: translateY(-50%);
    z-index: 10;
    width: 40px;
    height: 40px;
    background: #fff;
    border: 1.5px solid var(--pd-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
    transition: all .25s ease;
    color: var(--pd-dark);
}

.swiper-nav:hover:not(.swiper-button-disabled) {
    background: var(--pd-primary);
    color: #fff;
    border-color: var(--pd-primary);
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.3);
    transform: translateY(-50%) scale(1.08);
}

.swiper-nav.swiper-button-disabled {
    opacity: 0.25;
    cursor: not-allowed;
    pointer-events: none;
}

.swiper-nav.prev {
    left: -20px;
}

.swiper-nav.next {
    right: -20px;
}

[dir="rtl"] .swiper-nav.prev {
    left: auto;
    right: -20px;
}

[dir="rtl"] .swiper-nav.next {
    right: auto;
    left: -20px;
}

@media (max-width: 991px) {
    .swiper-nav {
        display: none !important;
    }
}

/* ── Share Button ──────────────────────────── */
.pd-btn-share {
    border: 1.5px solid var(--pd-border);
    background: #fff;
    color: var(--pd-dark);
}
.pd-btn-share:hover { background: #f5f5f5; border-color: var(--pd-primary); color: var(--pd-primary); }
.pd-btn-share.copied { background: #e8f5e9; border-color: #2da44e; color: #2da44e; }


/* ── Vendor Card ────────────────────────────── */
.pd-vendor-card {
    margin-top: 20px;
    border-radius: var(--pd-radius);
    border: 1px solid var(--pd-border);
    background: #fff;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.05);
}
.pd-vendor-card-header {
    background: linear-gradient(135deg, #f8f9fc 0%, #eef0f7 100%);
    padding: 14px 18px;
    border-bottom: 1px solid var(--pd-border);
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--pd-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}
.pd-vendor-body {
    padding: 16px 18px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
.pd-vendor-avatar {
    width: 56px; height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--pd-border);
    flex-shrink: 0;
}
.pd-vendor-avatar-placeholder {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pd-primary) 0%, var(--pd-primary-d) 100%);
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-size: 1.4rem;
    font-weight: 700;
    flex-shrink: 0;
    border: 2px solid var(--pd-border);
}
.pd-vendor-info { flex: 1; min-width: 0; }
.pd-vendor-name-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}
.pd-vendor-name {
    font-size: 1rem;
    font-weight: 800;
    color: var(--pd-dark);
    text-decoration: none;
}
.pd-vendor-name:hover { color: var(--pd-primary); }
.pd-vendor-verified {
    background: #e6f4ea;
    color: #2da44e;
    font-size: .7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    border: 1px solid #a8d5b5;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
.pd-vendor-desc {
    font-size: .82rem;
    color: var(--pd-muted);
    margin: 4px 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.pd-vendor-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: .78rem;
    color: var(--pd-muted);
    flex-wrap: wrap;
}
.pd-vendor-meta span { display: flex; align-items: center; gap: 4px; }
.pd-btn-visit-store {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 7px 16px;
    border-radius: 8px;
    border: 1.5px solid var(--pd-primary);
    background: transparent;
    color: var(--pd-primary);
    font-size: .82rem;
    font-weight: 700;
    text-decoration: none;
    transition: all .2s;
}
.pd-btn-visit-store:hover { background: var(--pd-primary); color: #fff; }


/* ── Responsive ─────────────────────────────── */
@media (max-width: 767px) {
    .pd-gallery { flex-direction: column-reverse; position: static; }
    .pd-thumbs-col { width: 100%; flex-direction: row; max-height: none; height: 70px; }
    .pd-thumbs-col .swiper { width: 100%; }
    .pd-thumbs-col img { height: 66px; }
    .pd-main-img .swiper { height: 320px; }
    .pd-product-name { font-size: 1.35rem; }
    .pd-price { font-size: 1.6rem; }
    .pd-trust-item { min-width: 90px; }
    .pd-tab-btn { padding: 12px 14px; font-size: .82rem; }
    .pd-tab-body { padding: 20px 16px; }
}
