/* Product detail page (PDP) — Digikala-inspired RTL layout */

.store-pdp {
    max-width: 1280px;
    margin: 0 auto;
    padding: 16px;
}

.store-pdp-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--store-muted);
    margin-bottom: 12px;
}

.store-pdp-breadcrumb a {
    color: var(--store-muted);
    text-decoration: none;
}

.store-pdp-breadcrumb a:hover { color: var(--store-red); }

/* Main grid */
.store-pdp-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    background: var(--store-card);
    border-radius: var(--store-radius);
    box-shadow: var(--store-shadow);
    padding: 16px;
}

@media (min-width: 768px) {
    .store-pdp-grid {
        grid-template-columns: 320px 1fr;
        padding: 24px;
    }
}

@media (min-width: 1100px) {
    .store-pdp-grid {
        grid-template-columns: 360px 1fr 300px;
        gap: 24px;
    }
}

/* Gallery */
.store-pdp-gallery {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--store-card);
    border: 1px solid var(--store-border);
    border-radius: var(--store-radius);
    padding: 16px;
    min-height: 260px;
}

.store-pdp-gallery-trigger {
    position: relative;
    display: block;
    width: 100%;
    max-width: 360px;
    padding: 0;
    border: 0;
    background: none;
    cursor: zoom-in;
}

.store-pdp-gallery img,
.store-pdp-gallery-trigger img {
    width: 100%;
    max-width: 360px;
    aspect-ratio: 1;
    object-fit: contain;
    border-radius: 8px;
    display: block;
}

.store-pdp-zoom-hint {
    position: absolute;
    bottom: 8px;
    inset-inline-start: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    opacity: 0;
    transition: opacity .15s ease;
    pointer-events: none;
}

.store-pdp-gallery-trigger:hover .store-pdp-zoom-hint,
.store-pdp-gallery-trigger:focus-visible .store-pdp-zoom-hint {
    opacity: 1;
}

/* Lightbox */
body.store-pdp-noscroll { overflow: hidden; }

.store-pdp-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .88);
    padding: 24px;
    animation: pdpLightboxFade .15s ease;
}

.store-pdp-lightbox[hidden] { display: none; }

@keyframes pdpLightboxFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.store-pdp-lightbox-stage {
    max-width: 92vw;
    max-height: 88vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.store-pdp-lightbox-stage img {
    max-width: 92vw;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 8px;
    cursor: zoom-in;
    transition: transform .2s ease;
}

.store-pdp-lightbox-stage img.zoomed {
    transform: scale(2.2);
    cursor: zoom-out;
}

.store-pdp-lightbox-close {
    position: absolute;
    top: 16px;
    inset-inline-end: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    cursor: pointer;
    transition: background .15s ease;
}

.store-pdp-lightbox-close:hover { background: rgba(255, 255, 255, .28); }

.store-pdp-discount-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--store-red);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    z-index: 1;
}

/* Info column */
.store-pdp-info { min-width: 0; }

.store-pdp-category {
    display: inline-block;
    font-size: 12px;
    color: #1c8ce3;
    text-decoration: none;
    margin-bottom: 6px;
}

.store-pdp-title {
    font-size: 18px;
    font-weight: 800;
    line-height: 1.7;
    color: var(--store-text);
    margin: 0 0 10px;
}

@media (min-width: 768px) {
    .store-pdp-title { font-size: 21px; }
}

.store-pdp-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    padding-bottom: 12px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--store-border);
    font-size: 12px;
    color: var(--store-muted);
}

.store-pdp-stats span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Variants */
.store-pdp-variant-group { margin-bottom: 14px; }

.store-pdp-variant-group h3 {
    font-size: 13px;
    font-weight: 700;
    color: var(--store-text);
    margin: 0 0 8px;
}

.store-pdp-variant-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.store-pdp-variant-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid var(--store-border);
    border-radius: 999px;
    padding: 5px 14px;
    font-size: 12px;
    color: var(--store-text);
    background: var(--store-card);
}

.store-pdp-variant-chip small {
    color: var(--store-muted);
    font-size: 11px;
}

.store-pdp-variant-chip.out {
    opacity: 0.45;
    text-decoration: line-through;
}

/* Feature list */
.store-pdp-features {
    list-style: none;
    margin: 4px 0 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.store-pdp-features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--store-muted);
}

.store-pdp-features li svg { flex-shrink: 0; margin-top: 2px; }

.store-pdp-features li div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.store-pdp-features strong {
    font-size: 13px;
    color: var(--store-text);
    font-weight: 600;
}

.store-pdp-features span { font-size: 12px; }

.store-pdp-low-stock {
    color: var(--store-red) !important;
    font-weight: 700;
}

/* Buy box */
.store-pdp-buybox {
    border: 1px solid var(--store-border);
    border-radius: var(--store-radius);
    padding: 16px;
    background: var(--store-soft);
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-self: start;
}

@media (min-width: 1100px) {
    .store-pdp-buybox {
        position: sticky;
        top: 140px;
    }
}

.store-pdp-seller {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--store-border);
}

.store-pdp-seller img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--store-border);
}

.store-pdp-seller-name {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.store-pdp-seller-name span {
    font-size: 11px;
    color: var(--store-muted);
}

.store-pdp-seller-name strong {
    font-size: 13px;
    color: var(--store-text);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.store-pdp-verified { flex-shrink: 0; }

/* Price */
.store-pdp-price-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.store-pdp-price-discount {
    background: var(--store-red);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    border-radius: 999px;
    padding: 2px 9px;
}

.store-pdp-prices {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.store-pdp-prices del {
    color: var(--store-muted);
    font-size: 12px;
}

.store-pdp-prices strong {
    font-size: 18px;
    font-weight: 800;
    color: var(--store-text);
}

/* CTA */
.store-pdp-buy-btn {
    display: block;
    text-align: center;
    background: var(--store-red);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    border-radius: 8px;
    padding: 12px 18px;
    text-decoration: none;
    transition: background 0.15s;
}

.store-pdp-buy-btn:hover { background: var(--store-red-dark); }

.store-pdp-buy-btn.disabled {
    background: #c3c5c9;
    cursor: default;
    pointer-events: none;
}

.store-pdp-login-hint {
    margin: 0;
    font-size: 11px;
    color: var(--store-muted);
    text-align: center;
    line-height: 1.8;
}

/* Content sections */
.store-pdp-section {
    background: var(--store-card);
    border-radius: var(--store-radius);
    box-shadow: var(--store-shadow);
    padding: 16px;
    margin-top: 16px;
}

@media (min-width: 768px) {
    .store-pdp-section { padding: 24px; }
}

.store-pdp-section h2 {
    font-size: 16px;
    font-weight: 800;
    color: var(--store-text);
    margin: 0 0 14px;
    padding-right: 10px;
    border-right: 3px solid var(--store-red);
}

.store-pdp-description {
    margin: 0;
    font-size: 13px;
    line-height: 2.2;
    color: var(--store-text);
    white-space: pre-line;
}

/* Specs table */
.store-pdp-specs {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.store-pdp-specs th,
.store-pdp-specs td {
    padding: 10px 12px;
    text-align: right;
}

.store-pdp-specs th {
    width: 35%;
    max-width: 220px;
    color: var(--store-muted);
    font-weight: 500;
    background: var(--store-soft);
    border-radius: 8px;
}

.store-pdp-specs td { color: var(--store-text); }

.store-pdp-specs tr + tr th,
.store-pdp-specs tr + tr td {
    border-top: 6px solid var(--store-card);
}

/* Similar products */
.store-pdp-similar-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(150px, 180px);
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
}

/* Mobile sticky buy bar */
.store-pdp-mobile-bar {
    position: fixed;
    bottom: 56px;
    right: var(--bale-nav-width, 0);
    left: 0;
    z-index: 25;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--store-card);
    border-top: 1px solid var(--store-border);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
    padding: 10px 16px;
}

.store-pdp-mobile-bar .store-pdp-buy-btn {
    flex-shrink: 0;
    padding: 10px 22px;
}

.store-pdp-mobile-price {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.store-pdp-mobile-price strong {
    font-size: 15px;
    font-weight: 800;
    color: var(--store-text);
    white-space: nowrap;
}

@media (min-width: 901px) {
    .store-pdp-mobile-bar { display: none; }
    .store-pdp { padding: 24px; }
}

@media (max-width: 900px) {
    .store-pdp-buybox .store-pdp-buy-btn,
    .store-pdp-buybox .store-pdp-price-row { display: none; }
    .bale-store-main:has(.store-pdp) { padding-bottom: 130px; }
}
