/* ── 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 */
.pd-actions { display: flex; flex-direction: column; gap: 10px; }
.pd-btn-cart {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 14px;
    border-radius: 12px;
    border: none;
    background: var(--pd-primary);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .25s;
    box-shadow: 0 4px 16px rgba(102,126,234,.35);
}
.pd-btn-cart:hover:not(:disabled) { background: var(--pd-primary-d); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(102,126,234,.45); }
.pd-btn-cart:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

.pd-btn-buy {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 14px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .25s;
    box-shadow: 0 4px 18px rgba(245, 158, 11, 0.4);
    letter-spacing: 0.3px;
}
.pd-btn-buy:hover:not(:disabled) {
    background: linear-gradient(135deg, #d97706 0%, #dc2626 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(245, 158, 11, 0.5);
}
.pd-btn-buy:active:not(:disabled) { transform: translateY(0); box-shadow: 0 3px 10px rgba(245,158,11,.35); }
.pd-btn-buy:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

.pd-btn-wish {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 13px;
    border-radius: 12px;
    border: 1.5px solid #ffd0ce;
    background: #fff3f3;
    color: #e5534b;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .25s;
}
.pd-btn-wish:hover { background: #ffe8e7; border-color: #e5534b; }
.pd-btn-wish.active { background: #e5534b; color: #fff; border-color: #e5534b; }

/* 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 ─────────────────────────────────── */
.pd-related-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--pd-dark);
    display: flex;
    align-items: center;
    gap: 12px;
}
.pd-related-title::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, var(--pd-primary) 0%, transparent 100%);
    border-radius: 2px;
}

.swiper-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    z-index: 10; width: 34px; height: 34px;
    background: #fff; border: 1px solid var(--pd-border); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.1);
    transition: all .25s; color: var(--pd-dark);
}

.swiper-nav:hover { background: var(--pd-primary); color: #fff; border-color: var(--pd-primary); }
.swiper-nav.prev { left: -17px; }
.swiper-nav.next { right: -17px; }

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

/* ── Share Button ──────────────────────────── */
.pd-btn-share {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 13px;
    border-radius: 12px;
    border: 1.5px solid var(--pd-border);
    background: #fff;
    color: var(--pd-dark);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .25s;
    width: 100%;
}
.pd-btn-share:hover { background: #f0f4ff; 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; }
}
