/**
 * bebarefoot.eu — product detail v2
 * Requires bebarefoot-global-desktop.css. Shoptet Classic, desktop only.
 */

@media (min-width: 992px) {
  body.type-product #content-wrapper.container {
    width: 100% !important;
    max-width: none !important;
  }

  body.type-product #content.content {
    width: 100%;
    max-width: none;
    padding-right: 32px;
    padding-left: 32px;
  }

  body.type-product .content-wrapper {
    padding-bottom: 72px;
  }

  body.type-product .p-detail-inner {
    width: 100%;
    max-width: 1840px;
    margin: 0 auto;
  }

  body.type-product .p-detail-inner-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 28px;
    margin: 0 0 30px;
    padding: 0 0 10px;
    border-bottom: 0;
  }

  body.type-product .p-detail-inner-header h1 {
    max-width: 920px;
    margin: 0;
    color: var(--beb-ink);
    font-family: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: clamp(29px, 2.55vw, 42px);
    font-weight: 700;
    letter-spacing: -.025em;
    line-height: 1.08;
    text-align: left !important;
  }

  body.type-product .beb-title-code {
    display: inline-block;
    margin: 0 .12em;
    color: var(--beb-muted);
    font-size: .52em;
    font-weight: 650;
    letter-spacing: .025em;
    vertical-align: .16em;
    white-space: nowrap;
  }

  body.type-product .p-detail-inner-header .p-code {
    align-self: end;
    margin-bottom: 5px;
    color: var(--beb-muted);
    font-size: 12px;
    font-weight: 650;
    letter-spacing: .045em;
    white-space: nowrap;
  }

  body.type-product .flag.flag-new {
    padding: 5px 9px !important;
    border: 1px solid var(--beb-accent) !important;
    border-radius: 0 !important;
    background: var(--beb-white) !important;
    color: var(--beb-accent-dark) !important;
    font-size: 11px !important;
    font-weight: 750 !important;
    letter-spacing: .06em;
    line-height: 1.2 !important;
    text-transform: uppercase;
  }

  body.type-product .product-top {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(440px, .8fr);
    align-items: start;
    gap: clamp(28px, 3vw, 52px);
    margin: 0;
  }

  body.type-product .product-top > .col-xs-12:first-child {
    position: absolute;
    z-index: 4;
    top: 12px;
    left: 12px;
    width: auto;
    min-height: 0;
    padding: 0;
  }

  body.type-product .product-top .p-image-wrapper,
  body.type-product .product-top .p-info-wrapper {
    float: none;
    width: auto;
    padding: 0;
  }

  /* Classic keeps a full-width badge element as the first child. Explicit grid
     placement prevents it from shifting gallery and buying panel by one cell. */
  body.type-product .product-top > .p-image-wrapper {
    grid-column: 1;
    grid-row: 1;
  }

  body.type-product .product-top > .p-info-wrapper {
    grid-column: 2;
    grid-row: 1;
  }

  /* Gallery fallback: native Shoptet gallery remains functional until JS builds
     the desktop image grid. */
  body.type-product .p-image-wrapper {
    min-width: 0;
  }

  body.type-product .p-image-wrapper .p-image {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 620px;
    border-radius: var(--beb-radius-md);
    background: #faf9f7;
    overflow: hidden;
  }

  body.type-product .p-image-wrapper .p-image img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 620px;
    object-fit: contain;
    mix-blend-mode: multiply;
  }

  body.type-product .p-image-wrapper.beb-gallery-ready > .p-image,
  body.type-product .p-image-wrapper.beb-gallery-ready > .p-thumbnails-wrapper {
    display: none !important;
  }

  body.type-product .beb-product-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
  }

  body.type-product .beb-product-gallery__item {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--beb-radius-sm);
    background: #faf9f7;
    cursor: zoom-in;
  }

  body.type-product .beb-product-gallery__item img {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: contain;
    transition: transform .3s ease;
  }

  body.type-product .beb-product-gallery__item:hover img {
    transform: scale(1.025);
  }

  body.type-product .beb-product-gallery__item:focus-visible {
    outline: 3px solid rgba(228, 71, 47, .24);
    outline-offset: 3px;
  }

  /* Purchase panel */
  body.type-product .p-info-wrapper {
    position: sticky;
    top: 24px;
    padding: clamp(30px, 3vw, 42px) !important;
    border: 0;
    border-radius: 0;
    background: var(--beb-white);
    box-shadow: none;
  }

  body.type-product .p-final-price-wrapper {
    margin: 0 0 22px;
  }

  body.type-product .p-final-price-wrapper .price-final {
    display: block;
    color: var(--beb-ink);
    font-family: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: clamp(36px, 2.8vw, 44px);
    font-weight: 700;
    letter-spacing: -.03em;
    line-height: 1;
  }

  body.type-product .p-final-price-wrapper .price-additional {
    display: block;
    margin-top: 8px;
    color: var(--beb-muted);
    font-size: 13px;
  }

  body.type-product .availability-value {
    margin: 0 0 20px;
    color: var(--beb-muted);
    font-size: 13px;
    font-weight: 700;
  }

  body.type-product .availability-value .availability-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(47, 100, 104, .1);
    color: var(--beb-stock) !important;
    line-height: 1.2;
  }

  body.type-product .availability-value .availability-label::before {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: currentColor;
    content: "";
  }

  body.type-product .availability-value .default-variant {
    display: none !important;
  }

  body.type-product .p-info-wrapper .detail-parameters {
    width: 100%;
    margin: 0 0 22px;
  }

  body.type-product .p-info-wrapper .variant-list {
    display: block;
  }

  body.type-product .p-info-wrapper .variant-list > th,
  body.type-product .p-info-wrapper .variant-list > td {
    display: block;
    width: auto;
    padding: 0;
    border: 0;
  }

  body.type-product .p-info-wrapper .variant-list > th {
    display: none;
  }

  body.type-product .beb-size-heading {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    margin: 0 0 10px;
    color: var(--beb-ink);
    font-size: 13px;
    font-weight: 750;
    letter-spacing: .025em;
    text-transform: uppercase;
  }

  body.type-product .beb-size-guide {
    display: inline !important;
    width: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 1px 0 !important;
    border: 0 !important;
    border-bottom: 1px solid currentColor !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--beb-muted) !important;
    font: inherit !important;
    font-weight: 650 !important;
    letter-spacing: 0 !important;
    line-height: 1.3 !important;
    text-transform: none !important;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    text-decoration: none !important;
  }

  body.type-product .beb-size-guide:hover {
    color: var(--beb-accent-dark) !important;
  }

  body.beb-modal-open {
    overflow: hidden;
  }

  .beb-size-modal {
    position: fixed;
    z-index: 10050;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(20, 19, 18, .48);
  }

  .beb-size-modal.is-open {
    display: flex;
  }

  .beb-size-modal__dialog {
    position: relative;
    width: min(760px, 100%);
    max-height: min(86vh, 820px);
    overflow: auto;
    padding: clamp(28px, 4vw, 46px);
    background: #fff;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .2);
  }

  .beb-size-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
  }

  .beb-size-modal__title {
    margin: 0;
    color: var(--beb-ink);
    font-family: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -.02em;
  }

  .beb-size-modal__close {
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f3f1ed;
    color: var(--beb-ink);
    font-family: Arial, sans-serif;
    font-size: 25px;
    font-weight: 300;
    line-height: 42px;
    cursor: pointer;
  }

  .beb-size-modal__intro {
    margin: -8px 0 20px;
    color: var(--beb-muted);
    font-size: 15px;
    line-height: 1.55;
  }

  .beb-size-modal table {
    width: 100%;
    margin: 0;
    border: 0;
    border-collapse: collapse;
    background: transparent;
    font-size: 15px;
  }

  .beb-size-modal th,
  .beb-size-modal td {
    padding: 13px 14px;
    border: 0;
    border-bottom: 1px solid var(--beb-line);
    background: transparent;
    text-align: left;
  }

  .beb-size-modal thead th {
    color: var(--beb-muted);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .045em;
    text-transform: uppercase;
  }

  .beb-size-modal tbody tr.beb-size-selectable {
    cursor: pointer;
    transition: background-color .18s ease;
  }

  .beb-size-modal tbody tr.beb-size-selectable:hover,
  .beb-size-modal tbody tr.beb-size-selectable:focus {
    outline: none;
    background: #f6f4f0;
  }

  .beb-size-modal tbody tr.beb-size-selectable td:first-child {
    color: var(--beb-ink);
    font-weight: 750;
    text-decoration: underline;
    text-decoration-color: var(--beb-accent);
    text-underline-offset: 4px;
  }

  .beb-size-modal tbody tr:not(.beb-size-selectable) {
    color: #aaa59f;
  }

  .beb-size-modal__note {
    margin: 18px 0 0;
    color: var(--beb-muted);
    font-size: 13px;
    line-height: 1.55;
  }

  body.type-product .p-info-wrapper select.form-control {
    width: 100% !important;
    height: 58px !important;
    margin: 0 !important;
    padding: 0 50px 0 16px !important;
    border: 1px solid #9f9b95 !important;
    border-radius: 6px !important;
    background-color: var(--beb-white) !important;
    background-image: linear-gradient(45deg, transparent 50%, #211f1d 50%), linear-gradient(135deg, #211f1d 50%, transparent 50%) !important;
    background-position: calc(100% - 21px) 26px, calc(100% - 15px) 26px !important;
    background-repeat: no-repeat !important;
    background-size: 6px 6px, 6px 6px !important;
    box-shadow: none !important;
    color: var(--beb-ink) !important;
    font-size: 16px !important;
    font-weight: 650 !important;
    appearance: none !important;
    -webkit-appearance: none !important;
  }

  body.type-product .p-info-wrapper select.form-control:focus {
    border-color: var(--beb-ink) !important;
    box-shadow: 0 0 0 3px rgba(33, 31, 29, .1) !important;
  }

  body.type-product .add-to-cart {
    display: grid;
    grid-template-columns: 142px minmax(0, 1fr);
    gap: 12px;
    width: 100%;
    margin: 0;
  }

  body.type-product .add-to-cart .quantity {
    display: grid !important;
    grid-template-columns: 44px 54px 44px;
    grid-template-areas: "minus value plus";
    width: 142px !important;
    height: 58px !important;
    border: 1px solid #9f9b95 !important;
    border-radius: 6px !important;
    background: var(--beb-white) !important;
    overflow: hidden;
  }

  body.type-product .add-to-cart .quantity label {
    grid-area: value;
    width: 54px !important;
    height: 56px !important;
    margin: 0 !important;
  }

  body.type-product .add-to-cart .quantity .amount {
    width: 54px !important;
    height: 56px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--beb-ink) !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    text-align: center !important;
    appearance: textfield !important;
    -moz-appearance: textfield !important;
  }

  body.type-product .add-to-cart .quantity .amount::-webkit-inner-spin-button,
  body.type-product .add-to-cart .quantity .amount::-webkit-outer-spin-button {
    margin: 0;
    -webkit-appearance: none;
  }

  body.type-product .add-to-cart .quantity .increase,
  body.type-product .add-to-cart .quantity .decrease {
    position: static !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 44px !important;
    height: 56px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: var(--beb-white) !important;
    color: var(--beb-ink) !important;
    font-size: 20px !important;
    line-height: 1 !important;
  }

  body.type-product .add-to-cart .quantity .decrease {
    grid-area: minus;
    border-right: 1px solid var(--beb-line) !important;
  }

  body.type-product .add-to-cart .quantity .increase {
    grid-area: plus;
    border-left: 1px solid var(--beb-line) !important;
  }

  body.type-product .add-to-cart .quantity .increase:hover,
  body.type-product .add-to-cart .quantity .decrease:hover {
    background: #f1eee9 !important;
  }

  body.type-product .add-to-cart .quantity .increase::before,
  body.type-product .add-to-cart .quantity .increase::after,
  body.type-product .add-to-cart .quantity .decrease::before,
  body.type-product .add-to-cart .quantity .decrease::after {
    display: none !important;
    content: none !important;
  }

  body.type-product .add-to-cart .quantity .increase__sign,
  body.type-product .add-to-cart .quantity .decrease__sign {
    position: static !important;
    display: inline !important;
    width: auto !important;
    height: auto !important;
    color: inherit !important;
    font-family: Arial, sans-serif !important;
    font-size: 20px !important;
    font-weight: 400 !important;
    line-height: 1 !important;
  }

  body.type-product .add-to-cart .add-to-cart-button {
    width: 100%;
    min-height: 58px;
    border: 1px solid var(--beb-ink) !important;
    border-radius: 6px !important;
    background: var(--beb-ink) !important;
    box-shadow: none !important;
    color: #fff !important;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .035em;
    text-transform: uppercase;
  }

  body.type-product .add-to-cart .add-to-cart-button::before,
  body.type-product .add-to-cart .add-to-cart-button::after {
    display: none !important;
  }

  body.type-product .add-to-cart .add-to-cart-button:hover,
  body.type-product .add-to-cart .add-to-cart-button:focus {
    border-color: #000 !important;
    background: #000 !important;
  }

  body.type-product .p-info-wrapper > p:has(a[href="#description"]) {
    margin: 20px 0 0;
    text-align: center;
  }

  body.type-product .p-info-wrapper a[href="#description"] {
    padding-bottom: 3px;
    border-bottom: 1px solid currentColor;
    color: var(--beb-ink);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
  }

  body.type-product .beb-purchase-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--beb-line);
  }

  body.type-product .beb-purchase-links a {
    color: var(--beb-muted);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
  }

  body.type-product .beb-purchase-links a:hover {
    color: var(--beb-accent-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
  }

  body.type-product .beb-dispatch-note {
    margin: -12px 0 20px;
    color: var(--beb-muted);
    font-size: 13px;
    line-height: 1.45;
  }

  body.type-product .beb-dispatch-note[hidden] {
    display: none !important;
  }

  body.type-product .beb-product-code-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--beb-line);
    color: var(--beb-muted);
    font-size: 13px;
  }

  body.type-product .beb-product-code-row .p-code {
    margin: 0;
    color: var(--beb-ink);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .02em;
  }

  /* Compact product information accordion inside the buying panel. */
  body.type-product .beb-product-accordion {
    margin-top: 18px;
    border-top: 1px solid var(--beb-line);
  }

  body.type-product .beb-product-accordion details {
    margin: 0;
    border-bottom: 1px solid var(--beb-line);
  }

  body.type-product .beb-product-accordion summary {
    position: relative;
    padding: 17px 28px 17px 0;
    color: var(--beb-ink);
    font-size: 15px;
    font-weight: 760;
    letter-spacing: .015em;
    line-height: 1.35;
    list-style: none;
    cursor: pointer;
  }

  body.type-product .beb-product-accordion summary::-webkit-details-marker {
    display: none;
  }

  body.type-product .beb-product-accordion summary::before,
  body.type-product .beb-product-accordion summary::after {
    position: absolute;
    top: 50%;
    right: 2px;
    width: 11px;
    height: 1px;
    background: currentColor;
    content: "";
    transition: transform .2s ease;
  }

  body.type-product .beb-product-accordion summary::after {
    transform: rotate(90deg);
  }

  body.type-product .beb-product-accordion details[open] summary::after {
    transform: rotate(0deg);
  }

  body.type-product .beb-product-accordion__content {
    padding: 0 0 20px;
    color: #4f4c48;
    font-size: 15px;
    line-height: 1.68;
  }

  body.type-product .beb-product-accordion__content > :first-child {
    margin-top: 0;
  }

  body.type-product .beb-product-accordion__content > :last-child {
    margin-bottom: 0;
  }

  body.type-product .beb-product-accordion__content h2,
  body.type-product .beb-product-accordion__content h3,
  body.type-product .beb-product-accordion__content h4 {
    margin: 20px 0 9px;
    color: var(--beb-ink);
    font-size: 15px;
    font-weight: 750;
    line-height: 1.35;
  }

  body.type-product .beb-product-accordion__content p,
  body.type-product .beb-product-accordion__content ul {
    margin: 0 0 12px;
  }

  body.type-product .beb-product-accordion__content ul {
    padding-left: 18px;
  }

  body.type-product .beb-product-accordion__content table {
    width: 100%;
    margin: 10px 0;
    border: 0;
    border-collapse: collapse;
    background: transparent;
    font-size: 14px;
  }

  body.type-product .beb-product-accordion__content th,
  body.type-product .beb-product-accordion__content td {
    padding: 7px 5px;
    border: 0;
    border-bottom: 1px solid var(--beb-line);
    background: transparent;
    text-align: left;
  }

  body.type-product #description.beb-accordion-moved {
    display: none !important;
  }

  body.type-product .social-buttons-wrapper {
    margin-top: 16px;
    opacity: .7;
  }

  /* Existing description: improve readability without changing its content. */
  body.type-product #description {
    margin-top: 78px;
  }

  body.type-product #description .description-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, .34fr);
    gap: clamp(48px, 6vw, 84px);
    align-items: start;
  }

  body.type-product #description .basic-description {
    max-width: 840px;
    color: var(--beb-ink);
    font-size: 16px;
    line-height: 1.72;
  }

  body.type-product #description .basic-description > h3:first-child {
    display: none;
  }

  body.type-product #description .basic-description h2,
  body.type-product #description .basic-description h3 {
    margin: 42px 0 16px;
    color: var(--beb-ink);
    font-weight: 750;
    letter-spacing: -.025em;
    line-height: 1.15;
  }

  body.type-product #description .basic-description h3 {
    font-size: 27px;
  }

  body.type-product #description .basic-description p,
  body.type-product #description .basic-description li {
    color: #4f4c48;
  }

  body.type-product #description .basic-description hr {
    margin: 42px 0;
    border: 0;
    border-top: 1px solid var(--beb-line);
  }

  body.type-product #description .basic-description table,
  body.type-product #description .extended-description table {
    width: 100%;
    border: 0;
    border-top: 2px solid var(--beb-ink);
    border-collapse: collapse;
    background: transparent;
  }

  body.type-product #description table th,
  body.type-product #description table td {
    padding: 12px 14px;
    border: 0;
    border-bottom: 1px solid var(--beb-line);
    background: transparent;
    text-align: left;
  }

  body.type-product #description .extended-description {
    display: block !important;
    position: sticky;
    top: 24px;
    padding: 26px;
    border-radius: var(--beb-radius-md);
    background: var(--beb-paper);
  }

  body.type-product #description .extended-description > h3 {
    margin: 0 0 18px;
    font-size: 20px;
    font-weight: 750;
  }

  body.type-product #description .extended-description .detail-parameters {
    margin: 0;
  }

  body.type-product #description .extended-description th,
  body.type-product #description .extended-description td {
    font-size: 13px;
    line-height: 1.5;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.type-product .beb-product-gallery__item img {
    transition: none;
  }
}
