/**
 * Product detail — flat, single-surface layout (no stacked floating cards).
 * Related / "Recommended for you" mosaic styles preserved.
 */

body.pdp-2040-page {
    background: var(--unimart-bg-muted, #f5f6f8);
}

body.pdp-2040-page .content-wrapper,
body.pdp-2040-page .content-inner {
    background: var(--unimart-bg-muted, #f5f6f8);
}

.pdp-hub {
    --pdp-accent: var(--unimart-orange, #f68b1e);
    --pdp-slate: var(--unimart-slate, #2c3e50);
    --pdp-line: rgba(44, 62, 80, 0.1);
    max-width: 720px;
    margin: 0 auto;
    padding: 0 0 6rem;
    color: var(--unimart-text, #1a1a2e);
    box-sizing: border-box;
}

.pdp-hub .breadcrumb {
    padding: 0.65rem 1rem 0;
    margin-bottom: 0.5rem;
    background: transparent;
}

.pdp-hub__layout {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border: 1px solid var(--pdp-line);
    border-radius: 0;
    overflow: hidden;
}

.pdp-hub__gallery,
.pdp-hub__buy {
    min-width: 0;
}

/* Image stage — flat, no card chrome */
.pdp-hub__stage {
    position: relative;
    margin: 0;
    min-height: 220px;
    max-height: 52vh;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f3f4f6;
    cursor: zoom-in;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.pdp-hub__stage-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #f3f4f6;
    padding: 0;
}

.pdp-hub__stage-shade,
.pdp-hub__stage-copy {
    display: none;
}

.pdp-hub__stage-badge {
    position: absolute;
    left: 0.75rem;
    bottom: 0.75rem;
    z-index: 2;
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
    background: rgba(255, 193, 7, 0.95);
    color: #1c2430;
    font-size: 0.75rem;
    font-weight: 700;
}

.pdp-hub__price {
    color: var(--pdp-accent);
}

.pdp-hub__thumbs {
    display: flex;
    gap: 0.45rem;
    overflow-x: auto;
    padding: 0.65rem 1rem;
    border-top: 1px solid var(--pdp-line);
    background: #fff;
    scrollbar-width: thin;
}

.pdp-hub__quick {
    display: flex;
    gap: 0.5rem;
    padding: 0.85rem 1.1rem 0;
    margin: 0;
    background: transparent;
}

.pdp-hub__quick .um-cta {
    min-height: 2.4rem;
    padding: 0.45rem 0.85rem;
    font-size: 0.82rem;
    box-shadow: none !important;
}

.pdp-hub__quick .btn {
    flex: 1;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Buy column — flat content, not a nested card */
.pdp-hub__card {
    margin: 0;
    padding: 0.85rem 1.1rem 1.25rem;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.pdp-hub__card .pdp-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.45rem 0.65rem;
    margin-bottom: 0.25rem;
}

.pdp-hub__card .pdp-title-row h1 {
    flex: 1 1 12rem;
    font-size: clamp(1.15rem, 3.5vw, 1.4rem);
    line-height: 1.2;
    margin-bottom: 0.15rem !important;
}

.pdp-hub__card .pdp-ai-pill {
    margin-bottom: 0.75rem !important;
}

.pdp-hub__contact-hint {
    margin: 0.35rem 0 0.85rem;
    font-size: 0.78rem;
    color: var(--unimart-muted, #6b7280);
}

/* Kill nested floating boxes from commerce-pdp-checkout */
body.pdp-2040-page .pdp-hub .pdp-seller-strip {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    margin: 0.35rem 0 0.85rem;
    border-radius: 0;
    background: transparent !important;
    border: none !important;
    border-top: 1px solid var(--pdp-line) !important;
    border-bottom: 1px solid var(--pdp-line) !important;
    box-shadow: none !important;
}

body.pdp-2040-page .pdp-hub .pdp-buy-box {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}

body.pdp-2040-page .pdp-hub .pdp-delivery-fee-banner,
body.pdp-2040-page .pdp-hub .pdp-buy-hint,
body.pdp-2040-page .pdp-hub .pdp-no-whatsapp-hint {
    box-shadow: none;
    border-radius: 8px;
}

body.pdp-2040-page .pdp-hub .quantity-section {
    margin: 0.85rem 0 1rem;
    padding: 0;
    background: transparent;
    border: none;
}

body.pdp-2040-page .pdp-hub .quantity-control {
    border: 1px solid var(--pdp-line);
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
    display: inline-flex;
}

body.pdp-2040-page .pdp-hub .um-lead-bar {
    margin: 0.5rem 0 0;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

body.pdp-2040-page .pdp-hub .pdp-whatsapp-cta,
body.pdp-2040-page .pdp-hub .pdp-cart-cta {
    box-shadow: none !important;
}

body.pdp-2040-page .pdp-hub .pdp-whatsapp-cta:hover:not(:disabled) {
    transform: none;
}

/* Related — leave mosaic as-is */
.pdp-hub__related {
    padding: 0 1rem;
}

.pdp-hub__related .uz-hub__mosaic {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
}

@media (min-width: 540px) {
    .pdp-hub__related .uz-hub__mosaic {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.pdp-hub__related .uz-hub__tile {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 12px;
    overflow: hidden;
}

.pdp-hub__related .uz-hub__tile-media {
    position: relative;
    display: block;
    aspect-ratio: 1;
    background: var(--pdp-slate);
}

.pdp-hub__related .uz-hub__tile-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pdp-hub__related .uz-hub__tile-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(44, 62, 80, 0.82) 100%);
    pointer-events: none;
}

.pdp-hub__related .uz-hub__tile-float {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    padding: 0.55rem 0.6rem;
    color: #fff;
}

.pdp-hub__related .uz-hub__tile-title {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
}

.pdp-hub__related .uz-hub__tile-meta {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--pdp-accent);
    margin-top: 0.15rem;
}

.pdp-hub__related .uz-hub__tile-type {
    position: absolute;
    top: 0.45rem;
    left: 0.45rem;
    z-index: 1;
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.2rem 0.4rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--pdp-slate);
}

.pdp-hub .product-tabs {
    margin: 1.25rem 1rem 0;
    padding-top: 0.5rem;
}

/* Tablet+ — rounded single board */
@media (min-width: 768px) {
    .pdp-hub {
        max-width: min(96vw, 1100px);
        padding: 0 1.25rem 4.5rem;
    }

    .pdp-hub .breadcrumb {
        padding: 0.75rem 0 0.55rem;
    }

    .pdp-hub__layout {
        border-radius: 14px;
    }

    .pdp-hub__stage {
        min-height: 300px;
        max-height: none;
        aspect-ratio: 1 / 1;
        background: #f3f4f6;
    }

    .pdp-hub__thumbs {
        padding: 0.65rem 1.15rem;
    }

    .pdp-hub__quick {
        padding: 1rem 1.25rem 0;
    }

    .pdp-hub__card {
        padding: 0.85rem 1.25rem 1.35rem;
    }

    .pdp-hub .product-tabs {
        margin-left: 0;
        margin-right: 0;
    }

    .pdp-hub__related {
        padding: 0;
    }

    .pdp-hub__related .uz-hub__mosaic {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.75rem;
        padding: 0.85rem 0;
    }
}

/* Desktop — gallery | buy inside one board */
@media (min-width: 992px) {
    .pdp-hub {
        max-width: min(96vw, 1280px);
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .pdp-hub__layout {
        display: grid;
        grid-template-columns: minmax(0, 1.08fr) minmax(18rem, 0.92fr);
        gap: 0;
        align-items: stretch;
        border-radius: 16px;
    }

    .pdp-hub__gallery {
        position: sticky;
        top: 5.1rem;
        align-self: start;
        border-right: 1px solid var(--pdp-line);
        background: #fff;
    }

    .pdp-hub__stage {
        aspect-ratio: 1 / 1;
        max-height: min(70vh, 580px);
        min-height: 380px;
        border-radius: 0;
        background: #f3f4f6;
        border: none;
        box-shadow: none;
    }

    .pdp-hub__stage-img {
        object-fit: contain;
        padding: 1rem;
        background: #f3f4f6;
    }

    .pdp-hub__thumbs {
        border-top: 1px solid var(--pdp-line);
        padding: 0.75rem 1rem;
        gap: 0.5rem;
    }

    .pdp-hub__buy {
        display: flex;
        flex-direction: column;
        padding: 0;
        background: #fff;
    }

    .pdp-hub__quick {
        padding: 1.15rem 1.35rem 0;
    }

    .pdp-hub__card {
        padding: 0.75rem 1.35rem 1.5rem;
        width: 100%;
    }

    .pdp-hub__card .pdp-buy-box .um-cta--block,
    .pdp-hub__card .um-lead-bar {
        width: 100%;
    }

    .pdp-hub .product-tabs {
        margin-top: 1.35rem;
    }

    .pdp-hub__related .uz-hub__mosaic {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        padding: 1rem 0;
        gap: 0.9rem;
    }
}

@media (min-width: 1200px) {
    .pdp-hub {
        max-width: min(96vw, 1360px);
        padding-left: 1.75rem;
        padding-right: 1.75rem;
    }

    .pdp-hub__layout {
        grid-template-columns: minmax(0, 1.12fr) minmax(20rem, 0.88fr);
    }

    .pdp-hub__stage {
        max-height: min(72vh, 640px);
        min-height: 420px;
    }

    .pdp-hub__quick,
    .pdp-hub__card {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1400px) {
    .pdp-hub {
        max-width: min(96vw, 1440px);
    }
}
