/* Article layout matched to MojaIgracka/shop/static/css/bera-home.css.
   Existing Ecommerce gallery/cart hooks are retained; this file owns the page layout. */
.product-mobile-reference .product-detail {
    --pd-ink: #0c2036;
    --pd-muted: #73879a;
    --pd-line: #e0edf7;
    --pd-blue: #0095d2;
    box-sizing: border-box;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 18px 28px 48px;
    color: var(--pd-ink);
    font-family: Arial, Helvetica, sans-serif;
    background: #fff;
}
.product-mobile-reference .product-detail *,
.product-mobile-reference .product-detail *::before,
.product-mobile-reference .product-detail *::after { box-sizing: border-box; }
.product-mobile-reference .product-detail:has(.product-gallery.has-thumbnails) {
    /* Match the start of the thumbnail rail in the left product column. */
    --pd-breadcrumb-inset: max(0px, calc((100% - 28px) * 1.15 / 2.15 * .22 - 11.36px));
}
.product-mobile-reference .pd-reference-breadcrumb {
    display: flex; flex-wrap: wrap; gap: 10px;
    margin: 0 0 24px; padding: 0 0 0 var(--pd-breadcrumb-inset, 0px);
    font-size: 12px; line-height: 1.6; color: var(--pd-muted);
}
.product-mobile-reference .pd-reference-breadcrumb a,
.product-mobile-reference .pd-reference-category { color: #008dbd; text-decoration: none; }
.product-mobile-reference .product-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    grid-template-areas: none;
    gap: 28px; align-items: start;
    padding: 0; border: 0; border-radius: 0; box-shadow: none; background: none;
}
.product-mobile-reference .product-gallery {
    position: relative; display: block;
    width: 100%; max-width: none; min-width: 0; margin: 0; padding: 0;
    grid-area: auto;
}
.product-mobile-reference .product-gallery.has-thumbnails {
    --pd-frame-width: 100%;
    display: grid; grid-template-columns: minmax(72px, 1fr) minmax(0, calc((100% - 88px) * .78)); gap: 8px; align-items: stretch;
}
.product-mobile-reference .product-gallery-main {
    display: block; grid-area: auto; grid-column: 2; grid-row: 1;
    position: relative; width: var(--pd-frame-width, 78%); min-width: 0; margin-left: auto; justify-self: end;
    height: auto; min-height: 0; padding: 0; aspect-ratio: auto;
    border: 1px solid var(--pd-line); border-radius: 16px;
    overflow: hidden; background: #fff; box-shadow: none;
    touch-action: pan-y pinch-zoom;
}
.product-mobile-reference .pd-reference-toolbar {
    display: flex; flex-direction: row-reverse; align-items: center;
    justify-content: space-between; gap: 10px;
    min-height: 44px; padding: 10px 12px 0;
}
.product-mobile-reference .product-detail-corner-badge {
    padding: 4px 12px; border-radius: 7px; background: var(--storefront-action-gradient); color: #fff; font-size: 13px; font-weight: 600;
}
.product-mobile-reference .product-gallery-overlays {
    position: static; display: flex; flex-direction: row;
    max-width: none; gap: 8px;
}
.product-mobile-reference .pd-reference-heart {
    position: static; display: grid; place-items: center; flex-shrink: 0;
    width: 26px; height: 26px; margin-left: auto; padding: 2px;
    border: 0; border-radius: 0; background: transparent; box-shadow: none;
    color: #83a5c6; cursor: pointer;
}
.product-mobile-reference .pd-reference-heart svg { width: 20px; height: 20px; fill: none; }
.product-mobile-reference .pd-reference-heart[aria-pressed="true"] { color: var(--pd-blue); }
.product-mobile-reference .pd-reference-heart[aria-pressed="true"] svg { fill: currentColor; }
.product-mobile-reference .pd-reference-photo {
    display: grid; place-items: center; position: relative;
    min-width: 0; aspect-ratio: 1.1; padding: 6px;
}
.product-mobile-reference .pd-reference-photo #mainProductImage {
    position: static; display: block;
    width: 100%; height: 100%; min-width: 0; min-height: 0;
    max-height: 550px; padding: 0; object-fit: contain;
    background: #fff; user-select: none; -webkit-user-drag: none;
}
.product-mobile-reference .product-image-placeholder--large { aspect-ratio: auto; }
.product-mobile-reference .product-gallery .pd-gallery-bar {
    grid-column: 1; grid-row: 1; position: relative;
    inset: auto; width: 72px; min-width: 0; height: auto; min-height: 0;
    margin: 0; padding: 0; transform: none; justify-self: end;
}
.product-mobile-reference .pd-gallery-bar .product-thumbnails {
    position: absolute; inset: 0; display: flex; flex-direction: column;
    align-items: flex-start; justify-content: flex-start; gap: 8px;
    width: 100%; height: 100%; max-height: none;
    padding: 2px; margin: 0; overflow-x: hidden; overflow-y: auto;
    scrollbar-width: none;
}
.product-mobile-reference .product-thumbnails::-webkit-scrollbar { display: none; }
.product-mobile-reference .product-gallery .product-thumbnail {
    display: block; flex: 0 0 66px; width: 66px; min-width: 0; height: 66px;
    padding: 3px; border: 1px solid #d2e0e9; border-radius: 8px;
    background: #fff; box-shadow: none;
}
.product-mobile-reference .product-thumbnail::before { content: none; }
.product-mobile-reference .product-gallery .product-thumbnail.active { border: 2px solid #008fc6; }
.product-mobile-reference .product-gallery .product-thumbnail img { display: block; width: 100%; height: 100%; object-fit: contain; }
.product-mobile-reference .product-thumbnail:focus-visible { outline: 2px solid #008fc6; outline-offset: 2px; }
.product-mobile-reference .pd-options-below-description { margin-top: 12px; }
.product-mobile-reference .pd-image-options { position: static; }
.product-mobile-reference .product-detail-info {
    display: block; grid-area: auto; min-width: 0; padding: 10px 0 18px;
}
.product-mobile-reference .pd-reference-category { display: inline-block; font-size: 13px; margin-bottom: 12px; }
.product-mobile-reference .product-detail-title-row {
    display: flex; flex-direction: row; align-items: flex-start;
    gap: 12px; margin: 0; width: 100%; max-width: 444px; grid-area: auto;
}
.product-mobile-reference .product-detail-title-row h1 {
    flex: 1; min-width: 0; margin: 0 0 14px;
    font-size: 28px; font-weight: 700; line-height: 1.3;
    letter-spacing: -.6px; color: var(--pd-ink);
}
.product-mobile-reference .pd-reference-share {
    display: grid; place-items: center; flex-shrink: 0;
    width: 44px; height: 44px; padding: 10px;
    border: 1px solid #fff; border-radius: 50%;
    background: #fff; color: #ff5a00; cursor: pointer;
}
.product-mobile-reference .pd-reference-share:hover { background: #fff; color: #e04f00; }
.product-mobile-reference .pd-reference-share svg { width: 22px; height: 22px; }
.product-mobile-reference .pd-reference-share-status { font-size: 13px; color: #007eaa; margin: 0 0 12px; }
.product-mobile-reference .product-detail-body { display: block; grid-area: auto; width: 100%; min-width: 0; }
.product-mobile-reference .product-detail .pd-options-price {
    display: flex; flex-direction: column; align-items: stretch;
    gap: 0; width: 100%; max-width: none; margin: 0 0 14px;
    padding: 0; border: 0; background: none;
}
.product-mobile-reference .pd-options-price__price { min-width: 0; }
.product-mobile-reference .product-detail .pd-price-stock {
    order: -1; margin: 0 0 14px; padding: 0;
    border: 0; border-radius: 0; background: none;
}
.product-mobile-reference .pd-price-stock .product-stock-label {
    display: flex; align-items: center; justify-content: flex-start;
    gap: 4px; margin: 0; font-size: 12px; font-weight: 400; line-height: 1.4;
    color: #147a40; white-space: normal;
}
.product-mobile-reference .product-stock-label__icon { display: none; }
.product-mobile-reference .product-stock-label--out { color: #64778a; }
.product-mobile-reference .product-detail .pd-options-price :is(.product-price--detail, .card-dwell-prices) {
    display: flex; flex-direction: row; align-items: center;
    flex-wrap: wrap; justify-content: flex-start; gap: 12px; margin: 0;
}
.product-mobile-reference .product-detail .pd-options-price .card-dwell-sale-cluster { display: contents; }
.product-mobile-reference .product-detail .pd-options-price :is(.price-current, .price-sale, .card-dwell-now) {
    order: 1; font-size: 26px !important; color: #00396e !important;
    margin: 0; font-weight: 700; line-height: 1.3;
}
.product-mobile-reference .product-detail .pd-options-price :is(.price-original, .card-dwell-was) {
    order: 2; margin: 0; font-size: 13px; font-weight: 400; color: #596f83;
    text-decoration: line-through;
}
.product-mobile-reference .product-detail .pd-options-price :is(.card-dwell-deal, .pd-dwell-flash) {
    width: 100%; padding: 0 !important; margin: 0 !important;
    border: 0 !important; background: none !important; box-shadow: none !important;
}
.product-mobile-reference .pd-options-price :is(.card-dwell-deal, .pd-dwell-flash)::before { content: none; }
.product-mobile-reference .pd-options-price :is(.card-dwell-timer, .card-dwell-label) { display: none; }
.product-mobile-reference .pd-reference-brand-logo { display: flex; align-items: center; min-height: 24px; margin-bottom: 22px; font-size: 13px; }
.product-mobile-reference .pd-reference-brand-logo img { display: block; width: 70px; height: 24px; object-fit: contain; object-position: left center; }
.product-mobile-reference .product-detail-purchase { display: block; width: 100%; max-width: 420px; margin: 0; }
.product-mobile-reference .product-detail-purchase .product-qty-selector { display: none; }
.product-mobile-reference .product-detail-purchase__cta { width: 100%; height: auto; }
.product-mobile-reference .product-detail-purchase .btn-add-to-bag {
    display: flex; align-items: center; justify-content: center; gap: 12px;
    width: 100%; height: auto; min-height: 44px; max-height: none;
    padding: 11px 18px; border: 0; border-radius: 10px;
    background: var(--site-action-gradient); color: #fff;
    font-size: 15px; font-weight: 700; text-transform: none; letter-spacing: 0;
    box-shadow: none;
}
.product-mobile-reference .btn-add-to-bag svg { display: block; width: 18px; height: 18px; }
.product-mobile-reference .pd-reference-overview { width: 100%; max-width: 444px; margin-top: 20px; }
.product-mobile-reference .pd-reference-facts { max-width: 444px; margin: 0; border-top: 1px solid var(--pd-line); font-size: 12px; }
.product-mobile-reference .pd-reference-facts > div { display: flex; justify-content: space-between; gap: 20px; padding: 10px 0; border-bottom: 1px solid var(--pd-line); }
.product-mobile-reference .pd-reference-facts dt { color: var(--pd-muted); font-weight: 400; }
.product-mobile-reference .pd-reference-facts dd { margin: 0; text-align: right; }
.product-mobile-reference .pd-reference-description-link { max-width: 444px; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 56px; padding: 16px 14px; border-bottom: 1px solid var(--pd-line); color: var(--pd-blue); font-size: 16px; font-weight: 400; text-decoration: none; }
.product-mobile-reference .product-detail > .pd-inline-bundle {
    display: grid; grid-template-columns: minmax(0, 1fr) 230px;
    gap: 16px 22px; width: 100%; max-width: 1000px; margin: 26px 0;
    padding: 22px; border: 1px solid #d4eaf2; border-radius: 18px;
    background: linear-gradient(125deg, #f0faff, #eafafb); box-shadow: 0 4px 20px #124d6b06;
}
.product-mobile-reference .pd-inline-bundle__header { grid-column: 1 / -1; }
.product-mobile-reference .pd-inline-bundle__header h2 { margin: 0 0 5px; font-size: 18px; letter-spacing: -.3px; color: #006d96; }
.product-mobile-reference .pd-inline-bundle__header p { margin: 0; font-size: 12px; line-height: 1.6; color: #64819b; }
.product-mobile-reference .pd-inline-bundle__items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; min-width: 0; }
.product-mobile-reference .pd-inline-bundle__item { display: flex; flex-direction: column; min-width: 0; padding: 12px; border: 1px solid #e0edf3; border-radius: 10px; background: #fff; box-shadow: 0 2px 8px #15445d05; }
.product-mobile-reference .pd-inline-bundle__image { display: grid; place-items: center; width: 100%; height: 145px; margin-bottom: 12px; }
.product-mobile-reference .pd-inline-bundle__image img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.product-mobile-reference .pd-inline-bundle__copy { flex: 1; min-width: 0; }
.product-mobile-reference .pd-inline-bundle__copy h3 { margin: 0 0 8px; font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.product-mobile-reference .pd-inline-bundle__copy h3 a { color: var(--pd-ink); text-decoration: none; }
.product-mobile-reference .pd-inline-bundle__quantity { display: block; font-size: 11px; color: #64819b; }
.product-mobile-reference .pd-inline-bundle__copy strong { display: block; margin-top: 7px; font-size: 17px; color: var(--pd-blue); }
.product-mobile-reference .pd-inline-bundle__copy s { font-size: 11px; color: #64819b; }
.product-mobile-reference .pd-inline-bundle__summary { display: flex; flex-direction: column; align-self: center; gap: 9px; padding: 18px; border: 1px solid #d5eaf1; border-radius: 12px; background: #ffffffb8; font-size: 13px; }
.product-mobile-reference .pd-inline-bundle__summary > strong { font-size: 25px; letter-spacing: -.5px; color: var(--pd-blue); }
.product-mobile-reference .pd-inline-bundle__summary > s { font-size: 13px; color: #64819b; }
.product-mobile-reference .pd-bundle__form { width: 100%; margin: 0; }
.product-mobile-reference .pd-inline-bundle__button { width: 100%; min-height: 42px; margin-top: 4px; padding: 11px 10px; border: 0; border-radius: 9px; background: var(--site-action-gradient); color: #fff; font: inherit; font-size: 12px; font-weight: 600; white-space: normal; line-height: 1.5; cursor: pointer; }
.product-mobile-reference .pd-purchase-related {
    margin: 24px 0 0;
}
.product-mobile-reference .pd-purchase-related,
.product-mobile-reference .product-detail-content,
.product-mobile-reference .product-detail > .product-detail-policies {
    padding-left: var(--pd-breadcrumb-inset, 0px);
    padding-right: max(0px, calc((100% - 28px) / 2.15 - 444px));
}
.product-mobile-reference .pd-purchase-related h2 { margin: 0 0 12px; font-size: 18px; }
.product-mobile-reference .pd-purchase-related .pd-related-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding: 0; width: 100%; }
.product-mobile-reference .product-detail-content { display: block; margin: 40px 0 0; }
.product-mobile-reference .product-detail-opis-col { display: block; padding: 24px 0 0; border-top: 1px solid var(--pd-line); scroll-margin-top: 180px; }
.product-mobile-reference .product-detail-opis-col h2 { font-size: 22px; font-weight: 400; color: #00396e; margin: 0 0 12px; }
.product-mobile-reference .product-detail-description { display: block; font-size: 15px; line-height: 1.85; font-weight: 400; color: #526575; }
.product-mobile-reference .product-detail-description img { max-width: 100%; height: auto; }
.product-mobile-reference .product-detail-description p { margin: 0 0 12px; }
.product-mobile-reference .product-detail > .product-detail-policies { margin: 24px 0 0; }
@media (min-width: 901px) {
    .product-mobile-reference .pd-reference-photo { aspect-ratio: 1.2; padding: 8px; }
    .product-mobile-reference .pd-reference-photo #mainProductImage { max-height: 440px; }
    .product-mobile-reference .product-detail:has(.product-gallery.has-thumbnails) > .pd-inline-bundle { margin-left: 88px; width: calc(100% - 88px); }
}
@media (max-width: 900px) {
    .product-mobile-reference .product-detail { padding: 18px 16px 32px; }
    .product-mobile-reference .product-detail-grid { gap: 24px; }
    .product-mobile-reference .pd-purchase-related,
    .product-mobile-reference .product-detail-content,
    .product-mobile-reference .product-detail > .product-detail-policies { padding-right: max(0px, calc((100% - 24px) / 2.15 - 444px)); }
    .product-mobile-reference .pd-purchase-related .pd-related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
    .product-mobile-reference .product-detail > .pd-inline-bundle { grid-template-columns: minmax(0, 1fr); padding: 14px; gap: 14px; margin: 20px 0; border-radius: 14px; }
    .product-mobile-reference .pd-inline-bundle__header h2 { font-size: 17px; }
    .product-mobile-reference .pd-inline-bundle__item { padding: 10px; }
    .product-mobile-reference .pd-inline-bundle__image { height: 125px; margin-bottom: 10px; }
    .product-mobile-reference .pd-inline-bundle__summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 12px; padding: 14px; }
    .product-mobile-reference .pd-inline-bundle__summary > strong { grid-column: 2; grid-row: 1 / 3; font-size: 24px; }
    .product-mobile-reference .pd-bundle__form { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
    .product-mobile-reference .product-detail:has(.product-gallery.has-thumbnails) { --pd-breadcrumb-inset: max(0px, calc(22% - 13.2px)); }
    .product-mobile-reference .product-detail-grid { grid-template-columns: 1fr; gap: 14px; }
    .product-mobile-reference .pd-purchase-related,
    .product-mobile-reference .product-detail-content,
    .product-mobile-reference .product-detail > .product-detail-policies { padding-right: max(0px, calc(100% - 444px)); }
    .product-mobile-reference .product-gallery.has-thumbnails { grid-template-columns: minmax(52px, 1fr) minmax(0, calc((100% - 60px) * .78)); gap: 8px; }
    .product-mobile-reference .product-gallery .pd-gallery-bar { width: 52px; }
    .product-mobile-reference .product-gallery .product-thumbnail { flex-basis: 46px; width: 46px; height: 46px; }
    .product-mobile-reference .pd-reference-toolbar { min-height: 40px; padding: 8px 9px 0; }
    .product-mobile-reference .pd-reference-photo { padding: 4px; }
    .product-mobile-reference .product-detail-info { padding: 10px 0; }
    .product-mobile-reference .product-detail-title-row h1 { font-size: 25px; }
    .product-mobile-reference .product-detail-purchase { max-width: none; }
}
@media (max-width: 360px) {
    .product-mobile-reference .pd-inline-bundle__items { grid-template-columns: 1fr; }
    .product-mobile-reference .pd-inline-bundle__item { display: grid; grid-template-columns: 85px minmax(0, 1fr); gap: 10px; padding: 9px; }
    .product-mobile-reference .pd-inline-bundle__image { height: 105px; margin: 0; }
}

/* Keep sharing separate from the global orange action-button theme. */
html body.product-mobile-reference #productDetailInfo .product-detail-title-row button.pd-reference-share {
    background: #fff !important;
    color: #ff5a00 !important;
    border-color: #fff !important;
}
html body.product-mobile-reference #productDetailInfo .product-detail-title-row button.pd-reference-share svg {
    color: #ff5a00 !important;
    stroke: currentColor;
}

/* Match options to the white share and zoom controls. */
html body.product-mobile-reference #productOtherOptionsBtn.product-other-options-btn {
    background: #fff !important;
    color: #ff5a00 !important;
    border-color: #fff !important;
}
html body.product-mobile-reference #productOtherOptionsBtn.product-other-options-btn svg {
    color: #ff5a00 !important;
    stroke: currentColor;
}

/* Quantity is selected after pressing the full-width purchase action. */
html body.product-mobile-reference #mainAddToCartForm .product-detail-purchase,
html body.product-mobile-reference #mainAddToCartForm .product-detail-purchase__cta {
    width: 100%; max-width: none;
}
html body.product-mobile-reference #mainAddToCartForm button#mainAddToCartBtn {
    width: 100% !important; height: 36px !important; min-height: 36px !important;
    padding: 6px 20px !important; font-size: 16px; line-height: 24px !important;
}
.pd-quantity-dialog { position: fixed; inset: 0; margin: auto; width: min(400px, calc(100vw - 32px)); padding: 24px; border: 0; border-radius: 16px; color: #0c2036; background: #fff; }
.pd-quantity-dialog::backdrop { background: #0008; }
.pd-quantity-dialog h2 { margin: 0 0 20px; font-size: 22px; }
.pd-quantity-dialog label { display: block; margin-bottom: 8px; }
.pd-quantity-dialog input { text-align: center; box-sizing: border-box; width: 100%; min-height: 48px; padding: 10px; border: 1px solid #d2e0e9; border-radius: 8px; font-size: 18px; }
.pd-quantity-dialog__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.pd-quantity-dialog__actions button { flex: 1; min-height: 44px; padding: 10px; border: 0; border-radius: 8px; cursor: pointer; }

/* Orange wishlist, header cart and category accents on product pages. */
html body.product-mobile-reference .product-detail .pd-reference-category,
html body.product-mobile-reference .product-detail button.pd-reference-heart,
html body.product-mobile-reference .product-detail button.home-card-heart {
    color: #ff5a00 !important;
}
html body.product-mobile-reference .product-detail button.pd-reference-heart svg,
html body.product-mobile-reference .product-detail button.home-card-heart svg {
    color: #ff5a00 !important;
    stroke: #ff5a00 !important;
}
html body.product-mobile-reference .product-detail button.pd-reference-heart[aria-pressed="true"] svg {
    fill: #ff5a00 !important;
}

/* Text banner accents match the product page's orange controls. */
html body.product-mobile-reference .product-detail :is(.product-detail-policy-icon,.product-detail-policy-label,.product-why-buy-title,.product-why-buy > h2,.deal-promo-line1,.deal-discount,.pd-ponuda-hint__text) {
    color: #ff5a00 !important;
}
html body.product-mobile-reference .product-detail :is(.product-detail-policy-item,.product-why-buy-item,.pd-ponuda-hint) {
    border-color: #ffdcc7;
}

/* Orange breadcrumb links and header count badges. */
html body.product-mobile-reference .pd-reference-breadcrumb a {
    color: #ff5a00 !important;
}

/* Description accents match the orange category and breadcrumb links. */
html body.product-mobile-reference .pd-reference-description-link,
html body.product-mobile-reference .product-detail-opis-col > h2 {
    color: #ff5a00 !important;
}
