:root {
    --p-bg: #ffffff;
    --p-text-main: #18181b;
    --p-text-muted: #71717a;
    --p-accent: #2f8d68;
    --p-radius: 20px;
    --p-gap: 20px;
    --p-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    --p-shadow-hover: 0 16px 40px rgba(0, 0, 0, 0.12);
    --p-border: #eef0f4;
}

/* CONTAINER */
.prods-showcase {
    --p-accent: var(--vp-primary, #3976e8);
    width: 100%;
    max-width: 1440px;
    min-width: 0;
    margin: 0 auto;
    padding: 48px 20px;
    direction: rtl;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

.prod-page-container {
    --p-accent: var(--vp-primary, #3976e8);
}

/* PRODUCT LIST GRID - صفحه مشاهده همه محصولات (۴ ستونه) */
.prod-page-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    width: 100%;
    margin-top: 12px;
}

.prod-all-products.is-category-filtered .prod-page-grid > :nth-child(n + 13) {
    display: none;
}

.prod-all-products-view-all {
    display: none;
    width: fit-content;
    margin: 18px auto 0;
    padding: 10px 16px;
    border: 1px solid color-mix(in srgb, var(--p-accent) 24%, white);
    border-radius: 12px;
    background: color-mix(in srgb, var(--p-accent) 6%, white);
    color: var(--p-accent);
    font-size: 0.84rem;
    font-weight: 800;
}

.prod-all-products-view-all.has-overflow-desktop {
    display: block;
}

@media (max-width: 1200px) {
    .prod-page-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 20px;
    }

    .prod-all-products.is-category-filtered .prod-page-grid > :nth-child(n + 10) {
        display: none;
    }

    .prod-all-products-view-all.has-overflow-desktop,
    .prod-all-products-view-all.has-overflow-tablet {
        display: block;
    }
}

@media (max-width: 1024px) {
    .prod-page-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .prod-all-products.is-category-filtered .prod-page-grid > :nth-child(n + 7) {
        display: none;
    }

    .prod-all-products-view-all.has-overflow-desktop,
    .prod-all-products-view-all.has-overflow-tablet,
    .prod-all-products-view-all.has-overflow-mobile {
        display: block;
    }
}

@media (max-width: 640px) {
    .prod-page-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
}

/* PRODUCT POPUP - مخفی به‌صورت پیش‌فرض، فقط با JS باز می‌شود */
.prod-popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
}

.prod-popup-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

/* PRODUCT PAGE HEADER */
.prod-page-container {
    max-width: 1400px;
    margin: 32px auto 0;
    width: 100%;
}

.prod-page-header {
    margin-bottom: 28px;
    padding-top: 8px;
}

.prod-page-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--p-text-main);
    margin: 0 0 6px 0;
    letter-spacing: -0.02em;
}

.prod-page-subtitle {
    font-size: 0.9rem;
    color: var(--p-text-muted);
    margin: 0;
}

.prod-page-breadcrumb { margin-bottom: 28px; }
.prod-category-section,
.prod-selected-category,
.prod-all-products {
    margin-top: 32px;
}
.prod-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}
.prod-section-title {
    margin: 0;
    color: var(--p-text-main);
    font-size: 1.15rem;
    font-weight: 800;
}
.prod-section-subtitle {
    margin: 6px 0 0;
    color: var(--p-text-muted);
    font-size: 0.84rem;
}
.prod-total-count {
    flex: 0 0 auto;
    padding: 6px 12px;
    border-radius: 999px;
    background: #eff6ff;
    color: var(--p-accent);
    font-size: 0.78rem;
    font-weight: 800;
}
.prod-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
}
.prod-category-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid #e8edf5;
    border-radius: 20px;
    background: linear-gradient(160deg, #fff 20%, #f8faff 100%);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
    text-decoration: none;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.prod-category-card:hover,
.prod-category-card.is-selected {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--p-accent) 55%, transparent);
    box-shadow: 0 16px 34px color-mix(in srgb, var(--p-accent) 16%, transparent);
}
.prod-category-card:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--p-accent) 35%, transparent);
    outline-offset: 3px;
}
.prod-category-image {
    position: relative;
    display: flex;
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    aspect-ratio: 1.8;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, color-mix(in srgb, var(--p-accent) 14%, white), color-mix(in srgb, var(--vp-accent, #3976e8) 12%, white));
    color: var(--p-accent);
    font-size: 2rem;
    font-weight: 800;
}
.prod-category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}
.prod-category-card:hover .prod-category-image img {
    transform: scale(1.05);
}
.prod-category-image-misc {
    background:
        radial-gradient(circle at 75% 25%, rgba(255,255,255,.55), transparent 28%),
        linear-gradient(135deg, color-mix(in srgb, var(--p-accent) 14%, white), color-mix(in srgb, var(--vp-accent, #3976e8) 12%, white) 48%, #e9d5ff);
    color: var(--p-accent);
    font-size: 3rem;
}
.prod-category-info {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
    min-width: 0;
    min-height: 82px;
    padding: 14px 18px;
    padding-left: 46px;
}
.prod-category-name {
    overflow: hidden;
    color: var(--p-text-main);
    font-size: 1rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.prod-category-count {
    color: var(--p-text-muted);
    font-size: 0.8rem;
}
.prod-category-arrow {
    position: absolute;
    left: 16px;
    bottom: 25px;
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 50%;
    background: color-mix(in srgb, var(--p-accent) 8%, white);
    color: var(--p-accent);
    font-size: 1.2rem;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease;
}
.prod-category-card:hover .prod-category-arrow,
.prod-category-card.is-selected .prod-category-arrow {
    transform: translateX(-3px);
    background: color-mix(in srgb, var(--p-accent) 14%, white);
}
.active-category-section {
    margin-top: 36px;
    padding: 20px;
    border-top: 2px dashed var(--p-border);
    border-radius: 16px;
    background: #f8fafc;
}
.active-category-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
    color: var(--p-text-main);
    font-size: 1.1rem;
    font-weight: 800;
}
.prod-selected-category {
    overflow: hidden;
    border: 1px solid var(--p-border);
    border-radius: 18px;
    background: #fff;
}
.prod-selected-category-cover {
    position: relative;
    display: flex;
    height: clamp(200px, 28vw, 360px);
    overflow: hidden;
    background: linear-gradient(135deg, color-mix(in srgb, var(--p-accent) 8%, white), #e0e7ff);
}
.prod-selected-category-cover > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.prod-selected-category-placeholder {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    color: color-mix(in srgb, var(--p-accent) 72%, transparent);
    font-size: clamp(4rem, 12vw, 9rem);
    font-weight: 800;
    background:
        radial-gradient(circle at 75% 25%, rgba(255,255,255,.75), transparent 24%),
        linear-gradient(135deg, color-mix(in srgb, var(--p-accent) 14%, white), #e0e7ff 52%, #f3e8ff);
}
.prod-selected-category-copy {
    padding: 20px 24px;
    background: #fff;
}
.prod-selected-category-copy h2 {
    margin: 4px 0 6px;
    font-size: 1.35rem;
    font-weight: 800;
}
.prod-selected-category-copy p {
    margin: 0;
    color: var(--p-text-muted);
    line-height: 1.8;
}
.prod-selected-eyebrow {
    color: var(--p-text-muted);
    font-size: 0.76rem;
    font-weight: 700;
}
.prod-selected-category-misc {
    padding: 22px 24px;
    background: linear-gradient(135deg, #f8fafc, #eef2f7);
}
.prod-selected-category > .prod-page-grid,
.prod-selected-category > .prod-page-empty {
    width: auto;
    margin: 0;
    padding: 18px;
}

.prod-page-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--p-text-muted);
    font-size: 0.95rem;
    border: 1px dashed var(--p-border);
    border-radius: 12px;
    background: #fafafa;
}

.prods-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.prods-category-row {
    margin-bottom: 20px;
}

.prods-category-row + .prods-category-row::before {
    display: none;
}

.prods-category-row .prods-row-wrapper {
    margin-bottom: 0;
}

.prods-row-wrapper.is-compact .p-card,
.prods-row-wrapper.is-compact .prod-card {
    flex: 0 0 min(320px, calc(50% - var(--p-gap)));
    width: min(320px, calc(50% - var(--p-gap)));
}

.prods-category-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 6px 12px;
}

.prods-category-heading h3 {
    margin: 0;
    color: var(--p-text-main);
    font-size: 1.05rem;
    font-weight: 800;
}

.prods-category-heading > span {
    color: var(--p-text-muted);
    font-size: 0.78rem;
}

.prods-category-heading a {
    margin-right: auto;
    color: var(--p-accent);
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
}

.prods-category-heading a:hover {
    text-decoration: underline;
}

.prods-main-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--p-text-main);
    margin: 0 0 6px 0;
    letter-spacing: -0.02em;
}

.prods-subtitle {
    font-size: 0.9rem;
    color: var(--p-text-muted);
}

.prods-view-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--p-accent);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.25s ease;
    padding: 8px 14px;
    border-radius: 12px;
    border: 1px solid transparent;
}

.prods-view-all:hover {
    color: var(--p-accent);
    background: color-mix(in srgb, var(--p-accent) 8%, white);
    border-color: color-mix(in srgb, var(--p-accent) 14%, white);
    transform: translateX(-4px);
}

/* SLIDER ROW */
.prods-row-wrapper {
    position: relative;
    margin-bottom: 36px;
    display: flex;
    align-items: center;
    min-width: 0;
}

.prods-slider-track {
    display: flex;
    flex: 1 1 0;
    gap: var(--p-gap);
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: 8px 6px;
    width: 100%;
}

.prods-slider-track::-webkit-scrollbar {
    display: none;
}

.prods-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: color-mix(in srgb, #ffffff 94%, var(--p-accent));
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.14);
    border: 1px solid color-mix(in srgb, var(--p-accent) 42%, white);
    z-index: 10;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    color: var(--p-accent);
}

.prods-nav-btn:hover {
    background: var(--p-accent);
    color: #ffffff;
    border-color: var(--p-accent);
    transform: translateY(-50%) scale(1.08);
}

.prods-nav-btn:active {
    transform: translateY(-50%) scale(0.96);
}

.prods-nav-btn.prev {
    right: 8px;
}

.prods-nav-btn.next {
    left: 8px;
}

/* CARD - unified for p-card and prod-card */
.p-card,
.prod-card {
    flex: 0 0 auto;
    width: calc(22.5% - var(--p-gap));
    background: var(--p-bg);
    border-radius: var(--p-radius);
    border: 1px solid var(--p-border);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: var(--p-shadow);
    isolation: isolate;
    height: 416px;
    min-height: 416px;
    max-height: 416px;
    cursor: pointer;
}

/* Slider card fixed height so content amount doesn't change card height */
.prods-slider-track .p-card,
.prods-slider-track .prod-card {
    height: 416px;
    min-height: 416px;
    max-height: 416px;
    flex-shrink: 0;
}

/* Keep supplier-home slider cards compact; listing-grid cards use their own width. */
.prods-showcase .prods-slider-track > .p-card,
.prods-showcase .prods-slider-track > .prod-card {
    flex: 0 0 calc(22.5% - var(--p-gap));
    width: calc(22.5% - var(--p-gap));
    min-width: 0;
}

/* Grid card uniform height */
.prod-page-grid .p-card,
.prod-page-grid .prod-card {
    width: 100%;
    height: 416px;
    min-height: 416px;
    max-height: 416px;
    flex-direction: column;
    flex-shrink: 0;
}

.p-card::before,
.prod-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    mask-image: linear-gradient(#fff, transparent);
    mask-composite: exclude;
    -webkit-mask-image: linear-gradient(#fff, transparent);
    -webkit-mask-composite: destination-out;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.35s ease;
    z-index: 0;
}

.p-card:hover::before,
.prod-card:hover::before {
    opacity: 1;
}

.p-card:hover,
.prod-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--p-shadow-hover);
    border-color: color-mix(in srgb, var(--p-accent) 18%, transparent);
    z-index: 2;
}

/* MEDIA / GALLERY - تصویر چیده شود و فضای خالی کارت را پر کند */
.p-media,
.prod-media-wrap {
    position: relative;
    width: 100%;
    flex: 1 1 210px;
    height: auto;
    min-height: 210px;
    max-height: none;
    overflow: hidden;
    background: linear-gradient(135deg, #f3f4f6 0%, #e9ecef 100%);
    border-bottom: 1px solid var(--p-border);
    margin-bottom: 0;
}

/* Grid view image constraints */
.prod-page-grid .p-media,
.prod-page-grid .prod-media-wrap {
    flex: 1 1 210px;
    height: auto;
    max-height: none;
    min-height: 210px;
    width: 100%;
}

.p-gallery {
    width: 100%;
    height: 100%;
    position: relative;
}

.p-ba-viewer {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.p-ba-stage {
    --ba-position: 50%;
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #e5e7eb;
    user-select: none;
}

.p-ba-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.p-ba-before {
    clip-path: inset(0 calc(100% - var(--ba-position)) 0 0);
}

.p-ba-divider {
    position: absolute;
    z-index: 3;
    top: 0;
    bottom: 0;
    left: var(--ba-position);
    width: 2px;
    background: #fff;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.4);
    transform: translateX(-50%);
    pointer-events: none;
}

.p-ba-handle {
    position: absolute;
    z-index: 4;
    top: 50%;
    left: var(--ba-position);
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 2px solid #fff;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    font-size: 1.15rem;
    transform: translate(-50%, -50%);
    cursor: ew-resize;
    pointer-events: auto;
    touch-action: none;
    user-select: none;
}

.p-ba-handle:focus-visible {
    outline: 3px solid #60a5fa;
    outline-offset: -3px;
}

.p-ba-label {
    position: absolute;
    z-index: 4;
    top: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    pointer-events: none;
}

.p-ba-label-before { left: 12px; }
.p-ba-label-after { right: 12px; }

.p-ba-controls {
    position: absolute;
    z-index: 5;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    pointer-events: none;
}

.p-ba-controls [data-ba-counter] {
    position: absolute;
    right: 50%;
    bottom: 10px;
    padding: 4px 8px;
    border: 1px solid rgba(255,255,255,.55);
    border-radius: 999px;
    background: rgba(15, 23, 42, .72);
    color: #fff;
    font-size: 0.72rem;
    transform: translateX(50%);
}

.p-ba-controls button {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--p-accent) 42%, white);
    border-radius: 50%;
    background: color-mix(in srgb, #ffffff 94%, var(--p-accent));
    color: var(--p-accent);
    font-size: 1.25rem;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.14);
    transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.p-ba-controls button:hover {
    background: var(--p-accent);
    border-color: var(--p-accent);
    color: #fff;
}

.p-card .p-ba-controls [data-ba-counter],
.prod-card .p-ba-controls [data-ba-counter] {
    display: none;
}

.p-card .p-ba-controls button,
.prod-card .p-ba-controls button {
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.p-card .p-media:hover .p-ba-controls button,
.p-card .p-ba-controls:focus-within button,
.prod-card .p-media:hover .p-ba-controls button,
.prod-card .p-ba-controls:focus-within button {
    opacity: 1;
    pointer-events: auto;
}

.p-item-type-badge {
    position: absolute;
    z-index: 5;
    top: 12px;
    right: 12px;
    padding: 5px 10px;
    border: 1px solid rgba(255,255,255,.7);
    border-radius: 999px;
    background: color-mix(in srgb, var(--p-accent) 90%, transparent);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
}

.p-service-label {
    align-self: flex-start;
    margin-bottom: 5px;
    color: var(--p-accent);
    font-size: 0.72rem;
    font-weight: 800;
}

.pd-hero-main .p-ba-viewer {
    position: absolute;
    inset: 0;
}

.p-img,
.prod-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.5s ease;
    will-change: transform;
}

.p-img.active,
.prod-img {
    opacity: 1;
}

.p-card:hover .p-img,
.prod-card:hover .prod-img {
    transform: scale(1.05);
}

.p-no-img,
.prod-img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--p-text-muted);
    font-size: 0.85rem;
    font-weight: 600;
}

/* DISCOUNT BADGE */
.prod-discount-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 4;
    padding: 4px 10px;
    border-radius: 20px;
    background: #ef4444;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.35);
}

/* STATUS BADGE */
.p-status,
.prod-status {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 4;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.p-status.is-available,
.prod-status-available {
    background: rgba(34, 197, 94, 0.12);
    color: #15803d;
    border-color: rgba(34, 197, 94, 0.35);
}

.p-status.is-out,
.prod-status-unavailable {
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
    border-color: rgba(239, 68, 68, 0.35);
}

/* GALLERY CONTROLS */
.p-img-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: color-mix(in srgb, #ffffff 94%, var(--p-accent));
    border: 1px solid color-mix(in srgb, var(--p-accent) 42%, white);
    color: var(--p-accent);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.25s ease;
    z-index: 3;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.p-media:hover .p-img-nav {
    opacity: 1;
}

.p-img-nav:hover {
    background: var(--p-accent);
    border-color: var(--p-accent);
    color: #ffffff;
    transform: translateY(-50%) scale(1.12);
}

.p-img-nav.prev {
    right: 10px;
}

.p-img-nav.next {
    left: 10px;
}

.p-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 3;
}

.p-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    transition: all 0.25s ease;
    border: none;
    padding: 0;
}

.p-dot.active {
    background: #ffffff;
    width: 16px;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* OVERLAY */
.prod-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    opacity: 0;
    transition: opacity 0.35s ease;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.prod-card:hover .prod-overlay {
    opacity: 1;
}

.prod-overlay-text {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    transform: translateY(6px);
    transition: transform 0.35s ease;
    opacity: 0;
}

.prod-card:hover .prod-overlay-text {
    transform: translateY(0);
    opacity: 1;
    transition-delay: 0.1s;
}

.prod-arrow {
    width: 22px;
    height: 22px;
    color: #fff;
    transform: scale(0.8);
    transition: transform 0.35s ease;
    opacity: 0;
}

.prod-card:hover .prod-arrow {
    transform: scale(1);
    opacity: 1;
    transition-delay: 0.15s;
}

/* DETAILS */
.p-details,
.prod-body {
    min-height: 0;
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    z-index: 1;
    background: var(--p-bg);
    overflow: hidden;
}

.p-title,
.prod-title {
    min-height: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--p-text-main);
    margin: 0 0 6px 0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.25s ease;
}

.p-card:hover .p-title,
.prod-card:hover .prod-title {
    color: var(--p-accent);
}

.p-desc,
.prod-desc {
    min-height: 0;
    font-size: 0.8rem;
    color: var(--p-text-muted);
    margin: 0 0 8px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

/* COLORS */
.p-colors,
.prod-colors {
    display: flex;
    min-height: 24px;
    max-height: 24px;
    gap: 7px;
    margin-bottom: 8px;
    align-items: center;
    overflow: hidden;
    white-space: nowrap;
}

.p-color-dot,
.prod-color-dot {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.5px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
    flex-shrink: 0;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.p-color-dot:hover,
.prod-color-dot:hover {
    transform: scale(1.35);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.5), 0 4px 12px rgba(0, 0, 0, 0.25);
    z-index: 5;
    position: relative;
}

.p-colors-label,
.prod-colors-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--p-text-muted);
    white-space: nowrap;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* SIZES */
.p-sizes,
.prod-sizes {
    display: flex;
    min-height: 28px;
    max-height: 28px;
    gap: 6px;
    margin-bottom: 8px;
    flex-wrap: wrap;
    align-items: center;
    overflow: hidden;
}

.p-size-box,
.prod-size-box {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 10px;
    border: 1.5px solid var(--p-border);
    border-radius: 10px;
    color: var(--p-text-main);
    background: #fff;
    flex-shrink: 0;
    transition: all 0.25s ease;
    cursor: default;
}

.p-size-box:hover,
.prod-size-box:hover {
    border-color: var(--p-accent);
    color: var(--p-accent);
    background: color-mix(in srgb, var(--p-accent) 8%, white);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px color-mix(in srgb, var(--p-accent) 12%, transparent);
}
.p-more-options {
    flex: 0 0 auto;
    color: var(--p-text-muted);
    font-size: 0.72rem;
    font-weight: 800;
}

.p-sizes-label,
.prod-sizes-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--p-text-muted);
    white-space: nowrap;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-right: 6px;
}

/* PRICE */
.p-price-area,
.prod-price-row {
    margin-top: auto;
    padding-top: 10px;
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.p-price-group {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.p-old-price,
.prod-price-old {
    font-size: 0.82rem;
    color: #a1a1aa;
    text-decoration: line-through;
    font-weight: 600;
}

.p-current-price,
.prod-price-new {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--p-text-main);
    letter-spacing: -0.01em;
}

.p-current-price small,
.prod-price-new small {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--p-text-muted);
    margin-left: 2px;
}

.p-inquiry-price,
.prod-price-negotiable {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--p-accent);
    margin-top: 2px;
}

/* DETAIL BUTTON */
.prod-btn-detail,
.p-card .prod-btn-detail {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 12px 0;
    border: none;
    background: var(--p-accent);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom-left-radius: var(--p-radius);
    border-bottom-right-radius: var(--p-radius);
}

.prod-btn-detail:hover {
    background: color-mix(in srgb, var(--p-accent) 82%, black);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px color-mix(in srgb, var(--p-accent) 30%, transparent);
}

.prod-btn-detail:active {
    transform: translateY(0);
}

/* RESPONSIVE */
@media (max-width: 1200px) {
    .p-card,
    .prod-card {
        width: calc(18% - var(--p-gap));
    }
    .prods-nav-btn.prev {
        right: 8px;
    }
    .prods-nav-btn.next {
        left: 8px;
    }
}

@media (max-width: 1024px) {
    .p-card,
    .prod-card {
        flex: 0 0 calc((100% - (var(--p-gap) * 2)) / 3);
        min-width: calc((100% - (var(--p-gap) * 2)) / 3);
    }
    .prods-nav-btn.prev {
        right: 8px;
    }
    .prods-nav-btn.next {
        left: 8px;
    }
}

@media (max-width: 768px) {
    .p-card,
    .prod-card {
        flex: 0 0 calc((100% - var(--p-gap)) / 2);
        min-width: calc((100% - var(--p-gap)) / 2);
    }
    .prods-showcase .prods-slider-track > .p-card,
    .prods-showcase .prods-slider-track > .prod-card {
        flex-basis: 220px;
        width: 220px;
    }
    .prods-nav-btn.prev,
    .prods-nav-btn.next {
        display: none;
    }
    .prods-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .prods-category-heading { gap: 8px; }
    .prods-category-heading h3 { font-size: 0.95rem; }
}

@media (max-width: 480px) {
    .p-card,
    .prod-card {
        flex: 0 0 100%;
        min-width: 100%;
    }
    .prods-showcase {
        padding: 32px 16px;
    }
    .prods-row-wrapper.is-compact .p-card,
    .prods-row-wrapper.is-compact .prod-card {
        flex-basis: calc(50% - (var(--p-gap) / 2));
        width: calc(50% - (var(--p-gap) / 2));
    }
}

/* =========================================================
   PRODUCT DETAIL POPUP (shared modal)
   ========================================================= */
.product-detail-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
}
.product-detail-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(6px);
    padding: 24px;
    animation: pd-fade 0.25s ease;
}
@keyframes pd-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}
.product-detail-backdrop {
    position: absolute;
    inset: 0;
    z-index: 1;
}
.product-detail-modal {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1080px;
    max-height: 90vh;
    overflow-y: auto;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(238, 240, 244, 0.6);
    animation: pd-slide 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    outline: none;
    padding: 24px;
    box-sizing: border-box;
}
@keyframes pd-slide {
    from { opacity: 0; transform: translateY(18px) scale(0.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.product-detail-close {
    position: absolute;
    top: -44px;
    right: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #ffffff;
    color: #18181b;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    transition: all 0.25s ease;
}
.product-detail-close:hover {
    background: #f3f4f6;
    transform: scale(1.1);
}
.product-detail-close svg {
    width: 20px;
    height: 20px;
}

.pd-content {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* Gallery */
.pd-grid {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 28px;
    align-items: start;
}
.pd-gallery-col { display: flex; flex-direction: column; gap: 16px; }
.pd-gallery-wrap { position: relative; border-radius: 20px; border: 1px solid var(--p-border); overflow: hidden; background: #f8fafc; aspect-ratio: 4 / 5; }
.pd-main-img { width: 100%; height: 100%; position: relative; overflow: hidden; background: #f3f4f6; }
.pd-main-img-el { width: 100%; height: 100%; object-fit: cover; display: block; }
.pd-main-img-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--p-text-muted); font-size: 0.9rem; font-weight: 600; }
.pd-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
}
.pd-thumb {
    width: 84px;
    height: 84px;
    flex: 0 0 auto;
    border-radius: 14px;
    object-fit: cover;
    border: 2px solid transparent;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.25s ease;
    background: #eef0f4;
}
.pd-thumb:hover { opacity: 1; border-color: var(--p-accent); }
.pd-thumb.active { opacity: 1; border-color: var(--p-accent); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18); }

/* Image navigation arrows in popup */
.pd-img-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--p-border);
    color: var(--p-text-main);
    font-size: 1.2rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.25s ease;
    line-height: 1;
}
.pd-img-nav:hover {
    background: #ffffff;
    border-color: var(--p-accent);
    color: var(--p-accent);
    transform: translateY(-50%) scale(1.1);
}
.pd-img-nav.pd-prev { right: 10px; }
.pd-img-nav.pd-next { left: 10px; }
.pd-gallery-wrap:hover .pd-img-nav { opacity: 1; }
.pd-img-nav { opacity: 0; transition: opacity 0.25s ease; }

/* Color dots - match product card style exactly: real color with white border */
.pd-color-dot {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1.5px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.18);
    flex-shrink: 0;
}

/* Section spacing */
.pd-description { margin: 14px 0; }
.pd-color-row { margin: 12px 0; }
.pd-size-row { margin: 12px 0; }
.pd-specs { margin: 14px 0; }
.pd-actions { margin-top: 14px; }
.product-detail-page .pd-actions { justify-content: flex-start; }
.product-detail-page .pd-actions .pd-btn-primary {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 0.78rem;
}
.pd-footer-note { margin-top: 14px; }
.pd-meta-top { margin-bottom: 12px; }
.pd-title { margin-bottom: 12px; }
.pd-price-row { margin-bottom: 12px; }
.pd-discount-timer { margin-bottom: 10px; }

.pd-color-row, .pd-size-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 58px;
}
.pd-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--p-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}
.pd-color-dots { display: flex; gap: 8px; flex-wrap: wrap; }
.pd-color-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    cursor: default;
    flex-shrink: 0;
}
.pd-size-boxes { display: flex; gap: 8px; flex-wrap: wrap; }
.pd-size-box {
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 12px;
    border: 1.5px solid var(--p-border);
    border-radius: 10px;
    color: var(--p-text-main);
    background: #fff;
}

/* Details */
.pd-meta-top {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 8px;
}
.pd-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 10px;
    border: 1px solid var(--p-border);
    background: #f8fafc;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--p-text-main);
}
.pd-category-img { width: 16px; height: 16px; border-radius: 4px; object-fit: cover; }
.pd-discount-badge {
    padding: 4px 10px;
    border-radius: 10px;
    background: #fee2e2;
    color: #b91c1c;
    font-size: 0.78rem;
    font-weight: 800;
}
.pd-availability-badge {
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.pd-avail { background: rgba(34, 197, 94, 0.12); color: #15803d; border: 1px solid rgba(34, 197, 94, 0.35); }
.pd-unavail { background: rgba(239, 68, 68, 0.12); color: #b91c1c; border: 1px solid rgba(239, 68, 68, 0.35); }

.pd-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--p-text-main);
    margin: 2px 0 10px 0;
    letter-spacing: -0.02em;
    line-height: 1.35;
}
.pd-price-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.pd-price-old {
    font-size: 1rem;
    color: #a1a1aa;
    text-decoration: line-through;
    font-weight: 600;
}
.pd-price-new {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--p-text-main);
    letter-spacing: -0.01em;
}
.pd-price-negotiable { color: var(--p-accent); font-weight: 800; font-size: 1.1rem; }
.pd-discount-timer {
    font-size: 0.8rem;
    color: #b91c1c;
    font-weight: 700;
    margin-top: 2px;
}

.pd-description,
.pd-specs,
.pd-color-row,
.pd-size-row {
    margin: 6px 0 14px;
    padding: 16px 18px;
    border: 1px solid var(--p-border);
    border-radius: 14px;
    background: #fafafa;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.03);
}

.pd-description {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.pd-section-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--p-text-main);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.pd-desc-body {
    margin: 0;
    font-size: 0.95rem;
    color: #3f3f46;
    line-height: 1.7;
    white-space: pre-wrap;
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
}

/* Specs table */
.pd-specs {
    margin-top: 2px;
}
.pd-spec-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--p-border);
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
}
.pd-spec-table th,
.pd-spec-table td {
    text-align: right;
    padding: 10px 14px;
    border-bottom: 1px solid var(--p-border);
}
.pd-spec-table tr:last-child th,
.pd-spec-table tr:last-child td { border-bottom: none; }
.pd-empty-spec { text-align: center; color: var(--p-text-muted); font-size: 0.86rem; padding: 12px; }

/* Specification table with title and columns */
.pd-spec-table-title {
    text-align: right;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--p-text-main);
    padding: 12px 14px;
    background: #f8fafc;
    border-bottom: 1px solid var(--p-border);
}
.pd-spec-table-header th {
    text-align: right;
    padding: 10px 14px;
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--p-text-main);
    background: #ffffff;
    border-bottom: 2px solid var(--p-text-main);
}
.pd-spec-table-header td { border: none; }
.pd-spec-table-header th:last-child,
.pd-spec-table-header td:last-child { border-right: none; }

.pd-actions {
    display: flex;
    gap: 10px;
    margin: 0;
}
.pd-btn-primary {
    flex: 1;
    min-height: 48px;
    padding: 12px 18px;
    border: none;
    border-radius: 12px;
    background: var(--p-accent);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
}
.pd-btn-primary:hover { background: #1d4ed8; transform: translateY(-1px); }
.pd-btn-primary:focus-visible,
.pd-page-breadcrumb a:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.4);
    outline-offset: 3px;
}
.pd-btn-outline {
    flex: 1;
    padding: 12px 18px;
    border: 1px solid var(--p-border);
    border-radius: 12px;
    background: #fff;
    color: var(--p-text-main);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
}
.pd-btn-outline:hover { background: #f8fafc; border-color: var(--p-text-muted); }
.pd-footer-note {
    font-size: 0.78rem;
    color: var(--p-text-muted);
    margin-top: 6px;
    text-align: center;
}

.pd-phone {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    font-size: 0.85rem;
    color: var(--p-text-main);
}
.pd-phone-label {
    font-size: 0.78rem;
    color: var(--p-text-muted);
    font-weight: 700;
}
.pd-phone-value {
    color: var(--p-accent);
    font-weight: 700;
    text-decoration: none;
}
.pd-phone-value:hover { text-decoration: underline; }
.pd-phone-mobile { display: none; }

/* Related products */
.pd-related {
    margin-top: 6px;
    padding-top: 20px;
    border-top: 1px dashed var(--p-border);
}
.pd-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
}
.pd-related-card {
    border: 1px solid var(--p-border);
    border-radius: 16px;
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.25s ease;
    cursor: pointer;
}
.pd-related-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--p-shadow-hover);
    border-color: rgba(37, 99, 235, 0.18);
}
.pd-related-media {
    width: 100%;
    height: 150px;
    overflow: hidden;
    background: #f3f4f6;
    position: relative;
}
.pd-related-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.pd-related-card:hover .pd-related-img { transform: scale(1.05); }
.pd-pinned-announcement {
    color: inherit;
    text-decoration: none;
}
.pd-pinned-announcement-description {
    overflow: hidden;
    color: var(--p-text-muted);
    font-size: 0.78rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}
.pd-related-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--p-text-muted);
    font-size: 0.75rem;
    font-weight: 600;
}
.pd-related-body { padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; flex-grow: 1; }
.pd-related-title-text {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--p-text-main);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.pd-related-price {
    margin-top: auto;
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--p-text-main);
}
.pd-related-negotiable { color: var(--p-accent); font-size: 0.8rem; font-weight: 700; }

/* Responsive modal */
@media (max-width: 900px) {
    .pd-grid { grid-template-columns: 1fr; }
    .product-detail-modal { max-height: 94vh; border-radius: 16px; }
    .product-detail-close { top: -40px; right: 0; }
    .pd-thumbs { display: none; }
}
@media (max-width: 480px) {
    .product-detail-overlay { padding: 12px; }
    .pd-title { font-size: 1.2rem; }
    .pd-price-new { font-size: 1.25rem; }
}

/* Make product cards clearly clickable */
.prod-card, .p-card { cursor: pointer; }

/* Loading / error states inside popup */
.pd-loading,
.pd-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--p-text-muted);
}
.pd-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--p-border);
    border-top-color: var(--p-accent);
    border-radius: 50%;
    animation: pd-spin 0.8s linear infinite;
    margin-bottom: 12px;
}
@keyframes pd-spin {
    to { transform: rotate(360deg); }
}
.pd-error { color: #b91c1c; }

/* Product detail page layout - RTL controlled */
.product-detail-page {
    max-width: 1440px;
    margin: 0 auto;
    padding: 28px 20px 36px;
    width: 100%;
    display: flex;
    gap: 32px;
    align-items: flex-start;
}
.product-detail-page .sidebar-column {
    flex: 0 0 260px;
    max-width: 260px;
}
.product-detail-page .main-column {
    flex: 1;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
}
.product-detail-page .pd-content {
    display: block;
}
.product-detail-page .pd-grid {
    display: block;
    width: auto;
    max-width: none;
    margin: 0;
}
.product-detail-page .pd-related-section {
    grid-column: auto;
    width: 100%;
    max-width: none;
}
.pd-page-breadcrumb {
    min-width: 0;
    margin-bottom: 4px;
}
.pd-page-breadcrumb ol {
    display: flex;
    align-items: center;
    gap: 0;
    min-width: 0;
    margin: 0;
    padding: 10px 14px;
    list-style: none;
    background: #fff;
    border: 1px solid var(--p-border);
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
    color: var(--p-text-muted);
    font-size: 0.84rem;
}
.pd-page-breadcrumb a {
    color: var(--p-accent);
    font-weight: 700;
    text-decoration: none;
}
.pd-page-breadcrumb a:hover { text-decoration: underline; }
.pd-page-breadcrumb li {
    min-width: 0;
    display: inline-flex;
    align-items: center;
}
.pd-page-breadcrumb li + li::before {
    content: "‹";
    margin: 0 12px;
    color: #a1a1aa;
    font-size: 1rem;
}
.pd-page-breadcrumb [aria-current="page"] {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--p-text-main);
    font-weight: 800;
}

/* Hero gallery - constrained luxury sizing */
.pd-hero {
    margin: 0;
}
.pd-hero-gallery {
    position: relative;
    width: 100%;
    max-width: 412px;
    margin: 0 auto;
    overflow: visible;
}
.pd-hero-main {
    width: 100%;
    aspect-ratio: 1 / 1;
    position: relative;
    overflow: hidden;
    background: #f3f4f6;
    border: 1px solid var(--p-border);
    border-radius: 16px;
}
.pd-hero-main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.pd-hero-main-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--p-text-muted);
    font-size: 1rem;
    font-weight: 600;
}
.pd-img-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--p-border);
    color: var(--p-text-main);
    font-size: 1.5rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.25s ease;
    line-height: 1;
    opacity: 0;
}
.pd-img-nav:hover {
    background: #ffffff;
    border-color: var(--p-accent);
    color: var(--p-accent);
    transform: translateY(-50%) scale(1.1);
}
.pd-img-nav.pd-prev { right: 12px; }
.pd-img-nav.pd-next { left: 12px; }
.pd-hero-gallery:hover .pd-img-nav { opacity: 1; }
@media (hover: none) {
    .pd-img-nav { opacity: 1; }
}

.pd-hero-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
    justify-content: center;
}
.pd-hero-thumb {
    width: 76px;
    height: 76px;
    flex: 0 0 auto;
    border-radius: 12px;
    border: 2px solid transparent;
    opacity: 0.7;
    transition: all 0.25s ease;
    background: #eef0f4;
    padding: 0;
    cursor: pointer;
}
.pd-hero-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pd-hero-thumb:hover { opacity: 1; border-color: var(--p-accent); }
.pd-hero-thumb.active { opacity: 1; border-color: var(--p-accent); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18); }
.pd-hero-thumb:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.4);
    outline-offset: 3px;
}

/* Content grid */
.pd-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    width: 70%;
    max-width: 900px;
    margin: 0 auto;
}
.pd-details-col { display: flex; flex-direction: column; gap: 20px; }
.product-detail-page .pd-details-col {
    gap: 16px;
    padding: clamp(18px, 2.4vw, 32px);
    box-sizing: border-box;
}
.product-detail-page .pd-details-col > * {
    margin-block: 0;
}

/* Related section */
.pd-related-section {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px dashed var(--p-border);
    width: 70%;
    max-width: 900px;
    margin: 40px auto 0 auto;
}
.pd-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
}

/* Responsive */
@media (max-width: 900px) {
    .product-detail-page {
        flex-direction: column;
        gap: 24px;
    }
    .product-detail-page .sidebar-column {
        flex: 0 0 auto;
        max-width: 100%;
        width: 100%;
    }
    .product-detail-page .main-column {
        width: 100%;
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }
    .pd-hero-main { max-height: 500px; }
    .pd-grid { max-width: 100%; }
    .pd-related-section { max-width: 100%; }
    .pd-phone-desktop { display: none; }
    .pd-phone-mobile { display: inline; }
    .product-detail-page .pd-actions .pd-btn-primary {
        flex: 1 1 auto;
        min-height: 48px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .product-detail-page { padding: 0 14px; }
    .pd-page-breadcrumb ol { font-size: 0.76rem; padding: 9px 10px; }
    .pd-page-breadcrumb li + li::before { margin: 0 7px; }
    .pd-hero-gallery { max-width: 100%; }
    .pd-details-col { gap: 16px; }
    .pd-title { font-size: 1.25rem; }
    .pd-price-new { font-size: 1.3rem; }
    .pd-desc-body { padding: 12px; font-size: 0.9rem; }
    .pd-spec-table th,
    .pd-spec-table td { padding: 9px 10px; }
    .prod-page-container { margin-top: 20px; }
    .prod-page-breadcrumb { margin-bottom: 22px; }
    .prod-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .prod-category-card { border-radius: 15px; }
    .prod-category-image { aspect-ratio: 1.35; }
    .prod-category-info { min-height: 70px; padding: 10px 11px; padding-left: 34px; gap: 5px; }
    .prod-category-name { font-size: 0.82rem; }
    .prod-category-count { font-size: 0.7rem; }
    .prod-category-arrow { left: 9px; bottom: 20px; width: 24px; height: 24px; font-size: 0.95rem; }
    .active-category-section { padding: 0; }
    .active-category-title { margin-bottom: 12px; padding: 14px 14px 0; font-size: 1rem; }
    .prod-selected-category > .prod-page-grid { padding: 0; }
    .prod-selected-category > .prod-page-empty { margin: 0 14px 14px; padding: 14px; }
    .prod-selected-category-cover { height: 190px; }
    .prod-selected-category-copy { padding: 16px; }
    .prod-selected-category-copy h2 { font-size: 1.15rem; }
    .prod-section-title { font-size: 1rem; }
    .prod-section-subtitle { font-size: 0.76rem; }
}

@media (max-width: 640px) {
    .prod-page-container {
        width: 100%;
        max-width: none;
        padding-inline: 0;
    }

    .prod-page-grid {
        min-width: 0;
    }

    .prod-page-grid .p-card,
    .prod-page-grid .prod-card,
    .prods-slider-track .p-card,
    .prods-slider-track .prod-card,
    .p-card,
    .prod-card {
        height: 416px;
        min-height: 416px;
        max-height: 416px;
    }
    .prod-page-grid .p-media,
    .prod-page-grid .prod-media-wrap,
    .p-media,
    .prod-media-wrap {
        flex-basis: 190px;
        height: auto;
        min-height: 190px;
        max-height: none;
    }

    .prod-page-grid .p-card,
    .prod-page-grid .prod-card {
        gap: 8px;
        height: 310px;
        min-height: 310px;
        max-height: 310px;
        overflow: visible;
        border: 0;
        border-radius: 14px;
        background: transparent;
        box-shadow: none;
    }

    .prod-page-grid .p-media,
    .prod-page-grid .prod-media-wrap {
        flex: 1 1 130px;
        min-height: 110px;
        border: 0;
        border-radius: 8px;
        background: #f0f1eb;
    }

    .prod-page-grid .p-card::before,
    .prod-page-grid .prod-card::before {
        display: none;
    }

    .prod-page-grid .p-details,
    .prod-page-grid .prod-body {
        align-items: center;
        padding: 8px 10px;
        border: 0;
        background: transparent;
        text-align: center;
    }

    .prod-page-grid .p-title,
    .prod-page-grid .prod-title,
    .prod-page-grid .p-desc,
    .prod-page-grid .prod-desc {
        width: 100%;
        text-align: center;
    }

    .prod-page-grid .p-title,
    .prod-page-grid .prod-title {
        margin-bottom: 4px;
        color: var(--supplier-product-title-color, var(--vp-primary));
        font-size: 0.88rem;
        font-weight: 850;
    }

    .prod-page-grid .p-desc,
    .prod-page-grid .prod-desc {
        margin-bottom: 5px;
        font-size: 0.74rem;
        -webkit-line-clamp: 1;
        line-clamp: 1;
    }

    .prod-page-grid .p-colors,
    .prod-page-grid .prod-colors,
    .prod-page-grid .p-sizes,
    .prod-page-grid .prod-sizes,
    .prod-page-grid .p-price-area,
    .prod-page-grid .prod-price-row,
    .prod-page-grid .p-price-group {
        justify-content: center;
    }
}

/* Color dots - match product card style exactly */
.pd-color-dot {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1.5px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.18);
    flex-shrink: 0;
}

/* Section spacing */
.pd-description { margin: 14px 0; }
.pd-color-row { margin: 12px 0; }
.pd-size-row { margin: 12px 0; }
.pd-specs { margin: 14px 0; }
.pd-actions { margin-top: 14px; }
.pd-footer-note { margin-top: 14px; }
.pd-meta-top { margin-bottom: 12px; }
.pd-title { margin-bottom: 12px; }
.pd-price-row { margin-bottom: 12px; }
.pd-discount-timer { margin-bottom: 10px; }

/* Spec table - شیک، بدون Border داخلی */
.pd-spec-table th,
.pd-spec-table td {
    text-align: right;
    padding: 10px 14px;
    border-bottom: 1px solid var(--p-border);
}
.pd-spec-table tr:last-child th,
.pd-spec-table tr:last-child td { border-bottom: none; }
.pd-empty-spec { text-align: center; color: var(--p-text-muted); font-size: 0.86rem; padding: 12px; }
.pd-spec-table-title {
    text-align: right;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--p-text-main);
    padding: 12px 14px;
    background: #f8fafc;
    border-bottom: 1px solid var(--p-border);
}
.pd-spec-table-header th {
    text-align: right;
    padding: 10px 14px;
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--p-text-main);
    background: #ffffff;
    border-bottom: 2px solid var(--p-text-main);
}
.pd-spec-table-header td { border: none; }

/* Related products clickable */
.pd-related-card { cursor: pointer; }
