/* Single product page. Modern defaults kept at low specificity — enough to
   beat WooCommerce's own CSS, never Elementor's controls — so every widget
   stays fully styleable in the editor. The template's outer container has
   the class "pm-product" (Værktøjer → Produktside). */

.pm-product {
    --pm-buy-radius: 12px;
}

/* ---------- Gallery ---------- */
div.product .pm-product .woocommerce-product-gallery__image img,
div.product .pm-product .woocommerce-product-gallery .flex-viewport {
    border-radius: var(--pm-buy-radius);
}

div.product .pm-product .woocommerce-product-gallery__wrapper {
    background: var(--pm-soft, #f5f7fa);
    border-radius: var(--pm-buy-radius);
}

div.product .pm-product .woocommerce-product-gallery__image img {
    mix-blend-mode: multiply;
}

/* Square grey box whatever the photo's shape, so wide, low products (a
   rack cabinet) look like the rest; the photo is fitted inside it. The
   box is the grey background showing through. */
div.product .pm-product .woocommerce-product-gallery__image img,
div.product .pm-product .flex-control-thumbs img {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: contain;
}

div.product .pm-product .woocommerce-product-gallery__image img {
    padding: 6%;
    box-sizing: border-box;
}

/* The grey on each slide too: with several photos the slider's transformed
   track isolates the photos, so they cannot blend with the wrapper. */
div.product .pm-product .woocommerce-product-gallery__image {
    background: var(--pm-soft, #f5f7fa);
    border-radius: var(--pm-buy-radius);
}

div.product .pm-product .flex-control-thumbs {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-top: 12px !important;
}

div.product .pm-product .flex-control-thumbs li {
    width: auto !important;
    margin: 0 !important;
}

div.product .pm-product .flex-control-thumbs img {
    border: 1px solid var(--pm-line, #e6e9f0);
    border-radius: 8px;
    background: var(--pm-soft, #f5f7fa);
    opacity: .7;
    transition: opacity .2s, border-color .2s;
}

div.product .pm-product .flex-control-thumbs img.flex-active,
div.product .pm-product .flex-control-thumbs img:hover {
    opacity: 1;
    border-color: var(--pm-navy, #2b3c6c);
}

/* ---------- Buy box ---------- */
/* Doubled with .e-con: Elementor's own `.e-con { position: relative }`
   loads later and would turn `top` into a plain 110px offset. */
.e-con.pm-product__buy {
    position: sticky;
    top: 110px;
    align-self: flex-start;
}

div.product .pm-product .product_title {
    margin: 0;
    line-height: 1.2;
}

/* Specificity (0,4,2): above WooCommerce's olive price (0,3,2), below the
   Price widget's own colour control (0,5,0). */
div.product .pm-product p.price.price,
div.product .pm-product span.price.price {
    margin: 0;
    color: var(--pm-navy, #2b3c6c);
    font-size: 30px;
    font-weight: 700;
}

div.product .pm-product .price .pmenergi-vat-label {
    font-size: 14px;
    font-weight: 400;
    color: var(--pm-muted, #6b7280);
}

div.product .pm-product .price .pmenergi-vat-other {
    font-size: 14px;
    color: var(--pm-muted, #6b7280);
}

/* Quantity stepper + full-width button. */
div.product .pm-product form.cart {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0;
}

div.product .pm-product form.cart .quantity.pm-qty {
    margin: 0 !important;
    height: 54px;
}

/* (0,3,2): above WooCommerce's purple .button.alt (0,3,1), below the Add
   to Cart widget's button controls (0,4,1). */
.pm-product form.cart button.single_add_to_cart_button {
    flex: 1 1 200px;
    min-height: 54px;
    border: 0;
    border-radius: 8px;
    background-color: var(--pm-blue, #004aff);
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    transition: background-color .2s;
}

.pm-product form.cart button.single_add_to_cart_button:hover {
    background-color: var(--pm-navy, #2b3c6c);
    color: #fff;
}

/* ---------- Availability ---------- */
.pm-availability {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 15px;
}

.pm-availability__status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #15803d;
}

.pm-availability__status::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 18%, transparent);
}

.pm-availability--backorder .pm-availability__status { color: #b45309; }
.pm-availability--outofstock .pm-availability__status { color: #b91c1c; }

.pm-availability__delivery {
    color: var(--pm-muted, #6b7280);
}

/* ---------- USPs ---------- */
.pm-usps {
    display: flex;
    flex-direction: column;
    gap: 12px;
    list-style: none;
    margin: 0;
    padding: 18px 20px;
    border-radius: 12px;
    background: var(--pm-soft, #f5f7fa);
}

.pm-usps__item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pm-usps__icon {
    display: inline-flex;
    flex: none;
    width: 18px;
    font-size: 18px;
    color: var(--pm-blue, #004aff);
    fill: currentColor;
}

.pm-usps__icon svg {
    width: 18px;
    height: 18px;
}

.pm-usps__text {
    color: #374151;
    font-size: 15px;
}

/* ---------- Tabs ---------- */
div.product .pm-product .woocommerce-tabs ul.tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    white-space: nowrap;
    gap: 28px;
    margin: 0 0 24px !important;
    padding: 0 !important;
    border-bottom: 1px solid var(--pm-line, #e6e9f0);
}

div.product .pm-product .woocommerce-tabs ul.tabs::before,
div.product .pm-product .woocommerce-tabs ul.tabs li::before,
div.product .pm-product .woocommerce-tabs ul.tabs li::after {
    display: none !important;
}

div.product .pm-product .woocommerce-tabs ul.tabs li {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: none !important;
}

div.product .pm-product .woocommerce-tabs ul.tabs li a {
    display: block;
    padding: 12px 0 !important;
    color: var(--pm-muted, #6b7280);
    font-weight: 600;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

div.product .pm-product .woocommerce-tabs ul.tabs li.active a {
    color: var(--pm-navy, #2b3c6c);
    border-bottom-color: var(--pm-blue, #004aff);
}

div.product .pm-product .woocommerce-tabs .panel {
    margin: 0;
    padding: 0;
    border: 0;
}

div.product .pm-product table.woocommerce-product-attributes {
    border: 0;
    border-radius: 12px;
    overflow: hidden;
}

div.product .pm-product table.woocommerce-product-attributes th,
div.product .pm-product table.woocommerce-product-attributes td {
    padding: 12px 16px;
    border: 0;
    background: none;
    vertical-align: middle;
    font-style: normal;
}

/* WooCommerce wraps the value in a <p> with its own padding and margin,
   which put "2000 VA" lower than its label "Effekt". */
div.product .pm-product table.woocommerce-product-attributes td p {
    margin: 0;
    padding: 0;
}

div.product .pm-product table.woocommerce-product-attributes tr:nth-child(odd) {
    background: var(--pm-soft, #f5f7fa);
}

/* ---------- Sticky buy bar ---------- */
.pm-stickybar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9990;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: #fff;
    box-shadow: 0 -6px 24px rgba(17, 24, 39, .12);
    transform: translateY(110%);
    transition: transform .25s ease;
}

.pm-stickybar.is-visible {
    transform: none;
}

.pm-stickybar[hidden] {
    display: none;
}

.pm-stickybar.is-preview {
    position: relative;
    transform: none;
    box-shadow: 0 0 0 1px var(--pm-line, #e6e9f0);
}

.pm-stickybar__product {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.pm-stickybar__product img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 8px;
    background: var(--pm-soft, #f5f7fa);
    mix-blend-mode: multiply;
}

.pm-stickybar__title {
    display: block;
    overflow: hidden;
    max-width: 46vw;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--pm-navy, #2b3c6c);
    font-size: 14px;
    font-weight: 600;
}

.pm-stickybar__price {
    display: block;
    color: var(--pm-navy, #2b3c6c);
    font-size: 15px;
    font-weight: 700;
}

.pm-stickybar__price .pmenergi-vat-other,
.pm-stickybar__price .pmenergi-vat-label {
    display: none;
}

.pm-stickybar .pm-stickybar__button {
    flex: none;
    padding: 12px 20px;
    border: 0;
    border-radius: 8px;
    background: var(--pm-blue, #004aff);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

@media (min-width: 1025px) {
    .pm-stickybar--mobile:not(.is-preview) {
        display: none;
    }
}

@media (max-width: 1024px) {
    .e-con.pm-product__buy {
        position: relative;
        top: auto;
    }
}

/* Quantity stepper (also in checkout.css for the cart). */
.pm-product .pm-qty {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.pm-product .pm-qty button {
    width: 44px;
    padding: 0;
    border: 0;
    background: #fff;
    color: var(--pm-navy, #2b3c6c);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.pm-product .pm-qty button:hover,
.pm-product .pm-qty button:focus {
    background: var(--pm-soft, #f5f7fa);
    color: var(--pm-navy, #2b3c6c);
}

div.product .pm-product .pm-qty input.qty {
    width: 52px;
    height: 100%;
    padding: 0;
    border: 0;
    text-align: center;
    font-weight: 600;
    -moz-appearance: textfield;
}

div.product .pm-product .pm-qty input.qty::-webkit-outer-spin-button,
div.product .pm-product .pm-qty input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
