/* =========================================================
   YODEDE V24 — PRODUCT PAGE REDESIGN
   Scoped to .ypd-* so the rest of the site stays untouched.
   ========================================================= */

.ypd-page {
    padding-top: 18px !important;
    padding-bottom: 16px;
}

.ypd-breadcrumbs {
    margin: 8px 0 20px !important;
    font-size: 13px !important;
}

/* ---------- top product hero ---------- */

.ypd-hero {
    display: grid;
    grid-template-columns: minmax(360px, .92fr) minmax(360px, .96fr) minmax(300px, .72fr);
    gap: clamp(26px, 3vw, 48px);
    align-items: stretch;
    padding: 30px;
    border: 1px solid #e1e8f2;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 16px 44px rgba(28, 48, 82, .055);
}

.ypd-gallery {
    min-width: 0;
}

.ypd-main-image {
    position: relative;
    min-height: 500px;
    display: grid;
    place-items: center;
    padding: 26px;
    border-radius: 18px;
    background:
        radial-gradient(circle at 50% 42%, rgba(244,248,255,.9), rgba(247,249,252,.98) 70%);
}

.ypd-main-image img {
    display: block;
    width: 100%;
    height: 448px;
    object-fit: contain;
}

.ypd-zoom {
    position: absolute;
    right: 16px;
    bottom: 16px;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid #dce5f1;
    border-radius: 50%;
    color: #31527e;
    background: rgba(255,255,255,.96);
    box-shadow: 0 9px 24px rgba(31,52,86,.11);
}

.ypd-zoom svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ypd-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.ypd-thumb {
    width: 68px;
    height: 68px;
    display: grid;
    place-items: center;
    padding: 5px;
    border: 1px solid #dce4ef;
    border-radius: 10px;
    background: #fff;
    cursor: default;
}

.ypd-thumb.is-active {
    border: 2px solid #1761ff;
    box-shadow: 0 0 0 2px rgba(23,97,255,.06);
}

.ypd-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ---------- middle overview ---------- */

.ypd-overview {
    min-width: 0;
    align-self: center;
    padding: 12px 0;
}

.ypd-category,
.ypd-offer-kicker {
    color: #1761ff;
    font-size: 12px;
    line-height: 1;
    font-weight: 950;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.ypd-overview h1 {
    margin: 11px 0 8px;
    color: #101d38;
    font-size: 30px;
    line-height: .98;
    font-weight: 950;
    letter-spacing: -.055em;
}

.ypd-brand {
    margin-bottom: 22px;
    color: #6f7f98;
    font-size: 20px;
    font-weight: 800;
}

.ypd-summary {
    max-width: 630px;
    margin: 0 0 24px;
    color: #53647d;
    font-size: 16px;
    line-height: 1.65;
}

.ypd-quick-facts {
    overflow: hidden;
    border: 1px solid #e5eaf2;
    border-radius: 14px;
    background: #f9fbfe;
}

.ypd-quick-facts > div {
    display: grid;
    grid-template-columns: 145px minmax(0,1fr);
    gap: 14px;
    padding: 13px 16px;
    border-bottom: 1px solid #e9eef5;
}

.ypd-quick-facts > div:last-child {
    border-bottom: 0;
}

.ypd-quick-facts span {
    color: #6e7c91;
    font-size: 13px;
}

.ypd-quick-facts strong {
    color: #273751;
    font-size: 13px;
    font-weight: 850;
    word-break: break-word;
}

.ypd-details-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    color: #1761ff;
    font-size: 14px;
    font-weight: 900;
    text-decoration: none;
}

/* ---------- merchant offer ---------- */

.ypd-offer {
    align-self: center;
    min-width: 0;
    padding: 28px 24px 22px;
    border: 1px solid #d9e5f8;
    border-radius: 18px;
    background:
        linear-gradient(145deg, #fbfdff 0%, #f2f7ff 100%);
    box-shadow: 0 12px 30px rgba(35,66,111,.055);
}

.ypd-price-row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.ypd-price-row strong {
    color: #101d38;
    font-size: clamp(34px, 3vw, 46px);
    line-height: 1;
    font-weight: 950;
    letter-spacing: -.045em;
}

.ypd-price-row span {
    color: #9ca6b5;
    font-size: 15px;
    text-decoration: line-through;
}

.ypd-discount {
    display: inline-flex;
    margin-top: 10px;
    padding: 6px 9px;
    border-radius: 999px;
    color: #d23349;
    background: #fff0f3;
    font-size: 12px;
    font-weight: 900;
}

.ypd-offer-divider {
    height: 1px;
    margin: 22px 0 18px;
    background: #dce6f2;
}

.ypd-merchant {
    display: grid;
    grid-template-columns: 30px minmax(0,1fr) auto;
    gap: 9px;
    align-items: center;
    color: #192a45;
}

.ypd-store-icon {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: #1761ff;
    background: #eaf2ff;
}

.ypd-store-icon svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ypd-merchant strong {
    font-size: 17px;
    font-weight: 900;
}

.ypd-external {
    color: #1761ff;
    font-size: 20px;
    font-weight: 900;
}

.ypd-cta {
    width: 100%;
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
    padding: 10px 16px;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, #1761ff, #0f55e9);
    box-shadow: 0 12px 24px rgba(23,97,255,.20);
    font-size: 15px;
    font-weight: 950;
    text-align: center;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.ypd-cta:hover {
    color: #fff;
    transform: translateY(-1px);
    background: linear-gradient(135deg, #0f55e9, #0b49cf);
    box-shadow: 0 15px 30px rgba(23,97,255,.25);
}

.ypd-price-note {
    margin: 15px 0 0;
    color: #7b8ba2;
    font-size: 12px;
    line-height: 1.55;
}

.ypd-affiliate-note {
    display: grid;
    grid-template-columns: 24px minmax(0,1fr);
    gap: 9px;
    align-items: start;
    margin-top: 20px;
    padding: 13px;
    border-radius: 12px;
    background: #eaf2ff;
}

.ypd-affiliate-note > span {
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    margin-top: 1px;
    border-radius: 50%;
    color: #fff;
    background: #1761ff;
    font-size: 12px;
    font-weight: 900;
}

.ypd-affiliate-note p {
    margin: 0;
    color: #52647f;
    font-size: 11px;
    line-height: 1.5;
}

/* ---------- tabs ---------- */

.ypd-tabs {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 28px;
    border-bottom: 1px solid #dfe6ef;
}

.ypd-tabs a {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 58px;
    padding: 0 20px;
    color: #475a74;
    font-size: 14px;
    font-weight: 850;
    text-decoration: none;
}

.ypd-tabs a > span {
    color: #5d7394;
    font-size: 20px;
}

.ypd-tabs a.is-active {
    color: #1761ff;
}

.ypd-tabs a.is-active::after {
    content: "";
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: -1px;
    height: 3px;
    border-radius: 999px 999px 0 0;
    background: #1761ff;
}

/* ---------- description/details ---------- */

.ypd-content {
    display: grid;
    grid-template-columns: minmax(0,1.4fr) minmax(320px,.72fr);
    gap: 44px;
    align-items: start;
    padding: 34px 0 8px;
}

.ypd-description {
    padding: 6px 8px 0;
}

.ypd-description h2,
.ypd-details-card h2 {
    margin: 8px 0 18px;
    color: #101d38;
    font-size: 30px;
    line-height: 1.1;
    letter-spacing: -.035em;
}

.ypd-description-text,
.ypd-description-fallback {
    max-width: 850px;
    color: #50617a;
    font-size: 16px;
    line-height: 1.78;
}

.ypd-description-fallback {
    padding: 18px 20px;
    border: 1px solid #e3e9f2;
    border-radius: 14px;
    background: #f8faff;
}

.ypd-details-card {
    padding: 22px;
    border: 1px solid #e1e7f0;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 9px 26px rgba(35,54,85,.035);
    scroll-margin-top: 120px;
}

.ypd-details-card dl {
    margin: 0;
    overflow: hidden;
    border-radius: 12px;
    background: #f8faff;
}

.ypd-details-card dl > div {
    display: grid;
    grid-template-columns: 120px minmax(0,1fr);
    gap: 12px;
    padding: 13px 14px;
    border-bottom: 1px solid #e6ecf4;
}

.ypd-details-card dl > div:last-child {
    border-bottom: 0;
}

.ypd-details-card dt {
    color: #64748b;
    font-size: 13px;
}

.ypd-details-card dd {
    margin: 0;
    color: #273751;
    font-size: 13px;
    font-weight: 850;
    word-break: break-word;
}

.ypd-details-source {
    margin: 13px 0 0;
    color: #91a0b3;
    font-size: 11px;
    line-height: 1.45;
}

/* ---------- related products ---------- */

.ypd-related {
    padding-top: 38px !important;
    scroll-margin-top: 120px;
}

.ypd-related-head {
    align-items: end;
}

.ypd-related-head > a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #1761ff;
    font-size: 14px;
    font-weight: 900;
    text-decoration: none;
}

.ypd-related-grid {
    grid-template-columns: repeat(4, minmax(0,1fr)) !important;
    gap: 18px !important;
}

.ypd-related-card {
    height: 100%;
    border-radius: 16px !important;
    border-color: #e1e7f0 !important;
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.ypd-related-card:hover {
    transform: translateY(-3px);
    border-color: #ccd9ed !important;
    box-shadow: 0 13px 28px rgba(31,52,86,.07);
}

.ypd-related-card .product-image {
    /* Zona imaginii are dimensiune fixă și nu permite imaginii să intre peste text. */
    flex: 0 0 270px;
    height: 270px;
    min-height: 270px;
    padding: 18px;
    overflow: hidden !important;

    display: flex;
    align-items: center;
    justify-content: center;

    position: relative;
    z-index: 0;
    background: #fff;
}

.ypd-related-card .product-image img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;

    object-fit: contain;
    object-position: center;

    position: static !important;
    transform: none !important;
}

.ypd-related-card .product-card-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 245px;
    padding: 15px;

    position: relative;
    z-index: 2;
    background: #fff;
}

.ypd-related-card .product-category {
    position: static !important;
    margin: 0 0 7px;
    line-height: 1.25;
}

.ypd-related-card h3 {
    margin: 0 0 10px;
    font-size: 15px;
    line-height: 1.35;

    /* Toate cardurile rezervă exact 3 rânduri pentru titlu. */
    min-height: 61px;
    max-height: 61px;
    overflow: hidden;

    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.ypd-related-card h3 a {
    color: inherit;
    text-decoration: none;
}

.ypd-related-card .price-row {
    min-height: 29px;
}

.ypd-related-card .product-merchant {
    margin-top: auto;
}

.ypd-related-card .product-details-button {
    margin-top: 14px;
}




.ypd-related-card .product-details-button {
    margin-top: auto;
}

/* ---------- responsive ---------- */

@media (max-width: 1320px) {
    .ypd-hero {
        grid-template-columns: minmax(350px,.9fr) minmax(350px,1fr);
    }

    .ypd-offer {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: minmax(0,1fr) minmax(280px,.8fr);
        gap: 12px 28px;
        align-items: center;
    }

    .ypd-offer-kicker,
    .ypd-price-row,
    .ypd-discount,
    .ypd-offer-divider {
        grid-column: 1;
    }

    .ypd-merchant,
    .ypd-cta,
    .ypd-price-note,
    .ypd-affiliate-note {
        grid-column: 2;
    }

    .ypd-offer-divider {
        margin-bottom: 0;
    }
}

@media (max-width: 1000px) {
    .ypd-hero {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 22px;
    }

    .ypd-gallery {
        max-width: 720px;
        width: 100%;
        margin-inline: auto;
    }

    .ypd-overview,
    .ypd-offer {
        width: 100%;
    }

    .ypd-offer {
        display: block;
    }

    .ypd-content {
        grid-template-columns: 1fr;
        gap: 26px;
    }

    .ypd-related-grid {
        grid-template-columns: repeat(2, minmax(0,1fr)) !important;
    }
}

@media (max-width: 700px) {
    .ypd-page {
        padding-top: 8px !important;
    }

    .ypd-breadcrumbs {
        margin-bottom: 14px !important;
    }

    .ypd-hero {
        padding: 14px;
        border-radius: 18px;
    }

    .ypd-main-image {
        min-height: 380px;
        padding: 18px;
    }

    .ypd-main-image img {
        height: 340px;
    }

    .ypd-overview h1 {
        font-size: 40px;
    }

    .ypd-summary {
        font-size: 15px;
    }

    .ypd-quick-facts > div {
        grid-template-columns: 110px minmax(0,1fr);
    }

    .ypd-offer {
        padding: 20px 18px;
    }

    .ypd-tabs {
        overflow-x: auto;
        scrollbar-width: none;
    }

    .ypd-tabs::-webkit-scrollbar {
        display: none;
    }

    .ypd-tabs a {
        flex: 0 0 auto;
        padding: 0 12px;
    }

    .ypd-content {
        padding-top: 24px;
    }

    .ypd-description {
        padding-inline: 2px;
    }

    .ypd-description h2,
    .ypd-details-card h2 {
        font-size: 26px;
    }

    .ypd-related-grid {
        grid-template-columns: 1fr !important;
    }

    .ypd-related-card .product-image {
        height: 310px;
    }
}
