/**
 * Market V3 – Product detail page (PDP) redesign
 * Gallery, buy actions, support specialist, trust badges, tabs, and related grids
 */

.market-v3-pdp {
    max-width: 1440px;
    margin: 0 auto;
    padding: 2rem var(--mv3-spacing, 1.5rem);
    font-family: var(--mv3-font, sans-serif);
}

/* Breadcrumbs */
.market-v3-pdp__breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem 0.5rem;
    font-size: 0.8rem;
    text-transform: capitalize;
    color: var(--mv3-text-muted, #64748b);
    margin-bottom: 2rem;
    font-weight: 500;
}

.market-v3-pdp__breadcrumbs a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.market-v3-pdp__breadcrumbs a:hover {
    color: var(--el-primary, #ef4444);
}

.market-v3-pdp__breadcrumbs-sep {
    font-size: 0.8rem;
    opacity: 0.5;
}

.market-v3-pdp__breadcrumbs-current {
    color: var(--mv3-text, #1e293b);
    font-weight: 600;
}

html.dark .market-v3-pdp__breadcrumbs-current {
    color: #f1f5f9;
}

/* Hero container proportions */
.market-v3-pdp__hero-container {
    display: grid;
    gap: 3rem;
    margin-bottom: 4rem;
}

@media (min-width: 992px) {
    .market-v3-pdp__hero-container {
        grid-template-columns: 7fr 5fr;
    }
}

/* Gallery Column (Left) */
.pdp-gallery-col {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

/* Tilted Discount Badge */
.pdp-gallery-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: #ef4444;
    color: #ffffff;
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 4px;
    z-index: 4;
}

/* Main Image Box Window */
.pdp-main-image-window {
    position: relative;
    width: 100%;
    height: 480px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 2rem;
}

html.dark .pdp-main-image-window {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.05);
}

.pdp-main-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.pdp-main-image-window:hover .pdp-main-img {
    transform: scale(1.03);
}

.pdp-main-img-placeholder {
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pdp-main-img-placeholder .material-icons-round {
    font-size: 5rem;
}

/* Gallery Arrow Navigation Buttons */
.pdp-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1e293b;
    cursor: pointer;
    z-index: 5;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s, color 0.2s, opacity 0.2s;
    opacity: 0.8;
}

html.dark .pdp-gallery-nav {
    background: #0f172a;
    border-color: rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
}

.pdp-gallery-nav:hover {
    background: var(--el-primary, #ef4444);
    color: #ffffff;
    opacity: 1;
}

.pdp-gallery-nav--prev {
    left: 1rem;
}
.pdp-gallery-nav--next {
    right: 1rem;
}

/* Gallery zoom button */
.pdp-gallery-zoom {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1e293b;
    cursor: pointer;
    z-index: 5;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s, color 0.2s;
}

html.dark .pdp-gallery-zoom {
    background: #0f172a;
    border-color: rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
}

.pdp-gallery-zoom:hover {
    background: var(--el-primary, #ef4444);
    color: #ffffff;
}

/* Thumbnails list */
.pdp-thumbnails-list {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.pdp-thumbnail-btn {
    width: 5.5rem;
    height: 5.5rem;
    border: 2px solid rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    background: #ffffff;
    padding: 0.35rem;
    cursor: pointer;
    transition: border-color 0.2s;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

html.dark .pdp-thumbnail-btn {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.05);
}

.pdp-thumbnail-btn img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.pdp-thumbnail-btn:hover,
.pdp-thumbnail-btn--active {
    border-color: #1e293b !important;
}

html.dark .pdp-thumbnail-btn:hover,
html.dark .pdp-thumbnail-btn--active {
    border-color: #ffffff !important;
}

/* Info Column (Right) */
.pdp-info-col {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.pdp-product-title {
    font-size: 2rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.25;
    margin: 0;
}

html.dark .pdp-product-title {
    color: #f1f5f9;
}

/* Meta rating row */
.pdp-meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    font-size: 0.85rem;
}

.pdp-stars-icons {
    display: flex;
    color: #fbbf24;
}
.pdp-stars-icons .material-icons {
    font-size: 1.1rem;
}

.pdp-meta-link {
    color: var(--mv3-text-muted, #64748b);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}
.pdp-meta-link:hover {
    color: var(--el-primary, #ef4444);
}

.pdp-meta-sep {
    color: rgba(0, 0, 0, 0.1);
}
html.dark .pdp-meta-sep {
    color: rgba(255, 255, 255, 0.1);
}

.pdp-meta-sku {
    color: var(--mv3-text-muted, #64748b);
}

/* Stock Indicator */
.pdp-stock-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.65rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
}
.pdp-stock-status--in {
    background: rgba(16, 185, 129, 0.08);
    color: #10b981;
}
.pdp-stock-status--out {
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
}
.pdp-stock-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* Price row */
.pdp-price-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pdp-price-old {
    font-size: 1.25rem;
    color: var(--mv3-text-muted, #64748b);
    text-decoration: line-through;
    font-weight: 500;
}

.pdp-price-current {
    font-size: 2.25rem;
    font-weight: 800;
    color: #ef4444;
}
html.dark .pdp-price-current {
    color: #f87171;
}

/* Spec list bullets */
.pdp-specs-bullets {
    margin: 0;
    padding: 0 0 0 1.25rem;
    font-size: 0.9rem;
    color: var(--mv3-text-muted, #64748b);
    line-height: 1.6;
}
[dir="rtl"] .pdp-specs-bullets {
    padding: 0 1.25rem 0 0;
}
.pdp-specs-bullets li {
    margin-bottom: 0.5rem;
}

/* Actions panel */
.pdp-actions-panel {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
html.dark .pdp-actions-panel {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

/* Qty selector */
.pdp-qty-selector {
    display: flex;
    align-items: center;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    overflow: hidden;
    height: 3rem;
    background: #ffffff;
}
html.dark .pdp-qty-selector {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.1);
}

.pdp-qty-btn {
    width: 2.5rem;
    height: 100%;
    border: none;
    background: transparent;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    cursor: pointer;
    transition: background-color 0.2s;
}
html.dark .pdp-qty-btn {
    color: #f1f5f9;
}
.pdp-qty-btn:hover {
    background: rgba(0, 0, 0, 0.03);
}
html.dark .pdp-qty-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.pdp-qty-input {
    width: 3rem;
    height: 100%;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    pointer-events: none;
}
html.dark .pdp-qty-input {
    color: #f1f5f9;
}

/* Add to Cart primary button */
.pdp-add-to-cart-btn {
    flex: 1;
    height: 3rem;
    border: none;
    border-radius: 8px;
    background: #00b894;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s, opacity 0.2s;
}
.pdp-add-to-cart-btn:hover {
    background: #00a885;
}
.pdp-add-to-cart-btn--out {
    background: #94a3b8;
    cursor: not-allowed;
}

/* Favorites wishlist line */
.pdp-favorites-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--mv3-text-muted, #64748b);
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
html.dark .pdp-favorites-row {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.pdp-favorites-btn {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1e293b;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}
html.dark .pdp-favorites-btn {
    border-color: rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
}
.pdp-favorites-btn:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: #ffffff;
}

/* Specialist support box */
.pdp-specialist-box {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.04);
}
html.dark .pdp-specialist-box {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.04);
}

.pdp-specialist-avatar {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffffff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.pdp-specialist-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.pdp-specialist-label {
    font-size: 0.8rem;
    color: var(--mv3-text-muted, #64748b);
    margin: 0;
    font-weight: 500;
}

.pdp-specialist-phone {
    font-size: 1.1rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
}
html.dark .pdp-specialist-phone {
    color: #f1f5f9;
}

.pdp-specialist-chat-link {
    font-size: 0.8rem;
    font-weight: 700;
    color: #00b894;
    text-decoration: none;
    width: fit-content;
}
.pdp-specialist-chat-link:hover {
    text-decoration: underline;
}

/* Trust badges 2x2 grid */
.pdp-trust-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
html.dark .pdp-trust-grid {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.pdp-trust-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pdp-trust-icon {
    font-size: 2rem;
    color: var(--mv3-text-muted, #64748b);
}

.pdp-trust-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.15rem;
}
html.dark .pdp-trust-title {
    color: #f1f5f9;
}

.pdp-trust-desc {
    font-size: 0.75rem;
    color: var(--mv3-text-muted, #64748b);
    margin: 0;
}

/* Categories metadata link */
.pdp-meta-categories {
    font-size: 0.85rem;
    color: var(--mv3-text-muted, #64748b);
}

.pdp-meta-categories a {
    color: #1e293b;
    text-decoration: none;
    font-weight: 600;
}
html.dark .pdp-meta-categories a {
    color: #f1f5f9;
}
.pdp-meta-categories a:hover {
    color: var(--el-primary, #ef4444);
}

/* Social Share Row */
.pdp-social-share {
    display: flex;
    gap: 0.5rem;
}

.pdp-social-btn {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 0.9rem;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.2s;
}
.pdp-social-btn:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

.pdp-social-btn--facebook { background: #3b5998; }
.pdp-social-btn--twitter { background: #1da1f2; }
.pdp-social-btn--pinterest { background: #bd081c; }
.pdp-social-btn--linkedin { background: #0077b5; }
.pdp-social-btn--whatsapp { background: #25d366; }

/* Description / Reviews Tab Panes */
.market-v3-pdp__tabs {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 3rem;
}
html.dark .market-v3-pdp__tabs {
    border-top-color: rgba(255, 255, 255, 0.05);
}

.market-v3-pdp__tablist {
    display: flex;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
    gap: 1.5rem;
}
html.dark .market-v3-pdp__tablist {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.market-v3-pdp__tab {
    padding: 1rem 0;
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--mv3-text-muted, #64748b);
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    margin-bottom: -1px;
}

.market-v3-pdp__tab:hover {
    color: #1e293b;
}
html.dark .market-v3-pdp__tab:hover {
    color: #f1f5f9;
}

.market-v3-pdp__tab--active {
    color: var(--el-primary, #ef4444) !important;
    border-bottom-color: var(--el-primary, #ef4444);
}

.pdp-tabs-desc-text {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--mv3-text-muted, #64748b);
}
.pdp-tabs-desc-text p {
    margin-bottom: 1.25rem;
}

.market-v3-pdp__panel {
    display: none;
}
.market-v3-pdp__panel--active {
    display: block;
}

/* Reviews tab cards layout */
.pdp-review-card {
    display: flex;
    gap: 1.25rem;
    padding: 1.5rem;
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 12px;
    background: #ffffff;
}
html.dark .pdp-review-card {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.05);
}

.pdp-reviewer-avatar {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    object-fit: cover;
}

.pdp-review-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pdp-review-header {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
}

.pdp-reviewer-name {
    font-weight: 700;
    color: #1e293b;
}
html.dark .pdp-reviewer-name {
    color: #f1f5f9;
}

.pdp-review-date {
    font-size: 0.8rem;
    color: var(--mv3-text-muted, #64748b);
}

.pdp-stars-icons--review {
    color: #fbbf24;
}

.pdp-review-text {
    font-size: 0.9rem;
    color: var(--mv3-text-muted, #64748b);
    line-height: 1.6;
    margin: 0;
}

/* Related Products Grid Sections */
.pdp-related-section {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 3rem;
}
html.dark .pdp-related-section {
    border-top-color: rgba(255, 255, 255, 0.05);
}

.pdp-related-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 2rem;
}
html.dark .pdp-related-title {
    color: #f1f5f9;
}

/* 5 Columns layout for PDP related grids */
@media (min-width: 1200px) {
    .el-products-grid--pdp-related {
        grid-template-columns: repeat(5, 1fr) !important;
        gap: 1.25rem !important;
    }
}
