/*
 * PZ-1015 — list-price-only mode styles.
 * Loaded from frontend/layouts/default.blade.php only when PRICING_DISPLAY_MODE=list.
 * Kept outside the gulp build on purpose so the feature can be removed by deleting this file
 * and the two partials in resources/views/components/pricing/.
 *
 * Prefix: .lp-  (list price)
 */

.lp-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Product card (components/product-list-price.blade.php) ---------- */

.lp-product-card {
    display: flex;
    flex-direction: column;
    padding-bottom: 8px;
}
/* Legacy top container has a 25px top/bottom padding; the media row now sits below the image. */
.lp-product-card .product-item-type-1-top-container {
    padding: 12px 0 0;
}
/*
 * Equal-height cards: every block between image and price has a fixed height, so the card height
 * no longer depends on label count, media badges or image proportions.
 * Images are 1:1 in the catalogue; the box is a square of the card width (overrides the legacy
 * per-breakpoint fixed heights) and non-square files are letterboxed with object-fit: contain.
 */
.product-item-type-1.lp-product-card .product-item-type-1-image,
.product-item-type-1.product-item-type-1-small.lp-product-card .product-item-type-1-image,
.product-item-carousel .product-item-type-1.lp-product-card .product-item-type-1-image {
    display: block;
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 1 / 1;
    object-fit: contain;
}

.lp-media {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    height: 26px;
    margin: 2px 0 3px;
}
.lp-media-actions {
    display: flex;
    align-items: center;
    gap: 5px;
    height: 26px;
}
.lp-media-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 22px;
    min-width: 26px;
    padding: 0 5px;
    border: 1px solid #e6ebe7;
    border-radius: 5px;
    background: #fafbf9;
    color: #707971;
    font-size: 10px;
    line-height: 14px;
    font-weight: 600;
    white-space: nowrap;
}
.lp-media-action svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.lp-media-action-video {
    background: #edf6ef;
    border-color: #e0eee4;
    color: #31845a;
}

.lp-colors {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}
.lp-color-circles {
    display: flex;
    align-items: center;
}
.lp-color-circles i {
    display: block;
    width: 20px;
    height: 20px;
    border: 1px solid #fff;
    border-radius: 50%;
    position: relative;
    z-index: 2;
    background: linear-gradient(to right, #3023ae 0%, #53a0fd 48%, #b4ec51 101%);
}
.lp-color-circles i + i {
    z-index: 1;
    margin-left: -6px;
    background: linear-gradient(to right, #6bceb4 0%, #f98cc2 48%, #fff781 101%);
}
.lp-color-count {
    margin-left: 4px;
    font-size: 8px;
    line-height: 10px;
    font-weight: 700;
    letter-spacing: .4px;
    color: #767a77;
}

.lp-product-card .lp-info {
    padding: 0 0 6px;
}
/* Reserved area for exactly two label rows (2 x 16px + 3px gap); empty on cards without labels. */
.lp-labels {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 3px;
    height: 35px;
    margin-bottom: 4px;
    overflow: hidden;
}
.lp-label {
    display: inline-block;
    max-width: 100%;
    height: 16px;
    padding: 0 4px;
    border-radius: 4px;
    font-size: 10px;
    line-height: 16px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* Title is clamped to two lines by the legacy theme; fix its height so one-line names do not shrink the card. */
/* Height = exactly two lines. Theme line-height: 16px (base and small variant), 20px (regular card >= 1366px). */
.lp-product-card .product-item-type-1-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    margin: 0;
    height: 32px;
    min-height: 32px;
    max-height: 32px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lp-product-card .product-item-type-1-title h3 {
    display: inline;
}
@media (min-width: 1366px) {
    .lp-product-card:not(.product-item-type-1-small) .product-item-type-1-title {
        height: 40px;
        min-height: 40px;
        max-height: 40px;
    }
}
.lp-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    margin-top: 4px;
}
.lp-sku {
    font-weight: 600;
}
.lp-card-min {
    font-size: 9px;
    line-height: 16px;
    color: #35463a;
    font-weight: 500;
    white-space: nowrap;
}
.lp-card-min strong {
    font-weight: 700;
}

/* Price block is pinned to the bottom; spare height goes above it, not under the SKU. */
.lp-card {
    margin-top: auto;
}

.lp-rotator {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2px;
    height: 26px;
    margin: 0 0 4px;
}
.lp-rotator-text {
    flex: 1 1 0;
    width: 0;
    min-width: 0;
    margin: 0;
    padding: 3px;
    border-radius: 3px;
    font-size: 10px;
    line-height: 16px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    background: #edf5ef;
    color: #28754d;
    transition: opacity .16s ease, transform .16s ease;
}
.lp-rotator[data-tone="neutral"] .lp-rotator-text {
    background: #f1f2f0;
    color: #5f6761;
}
.lp-rotator[data-tone="discount"] .lp-rotator-text {
    background: #fff3e9;
    color: #ae5a24;
}
.lp-rotator[data-tone="offer"] .lp-rotator-text {
    background: #edf5ef;
    color: #28754d;
}
.lp-rotator-text.is-leaving {
    opacity: 0;
    transform: translateY(-6px);
}
.lp-rotator-toggle {
    flex: 0 0 18px;
    width: 18px;
    height: 26px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #758078;
    font-size: 10px;
    cursor: pointer;
}
.lp-rotator-toggle:hover {
    background: #f2f5f1;
    color: #31573c;
}
.lp-rotator-toggle:focus-visible {
    outline: 2px solid #31845a;
    outline-offset: 2px;
}

.lp-purchase-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    min-height: 58px;
    padding: 7px;
    border-radius: 6px;
    background: #f6f7f5;
}
.lp-price-line {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    min-width: 0;
}
.lp-price-label {
    font-size: 9px;
    line-height: 13px;
    font-weight: 600;
    color: #687168;
    white-space: nowrap;
}
.lp-price-unit {
    font-size: 9px;
    font-weight: 600;
    color: #879087;
}
.lp-price {
    font-size: 19px;
    line-height: 24px;
    font-weight: 700;
    letter-spacing: -.4px;
    color: #2c3730;
    white-space: nowrap;
}
.lp-offer-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    padding: 0 12px;
    border: 1px solid #31845a;
    border-radius: 999px;
    background: #31845a;
    color: #fff;
    font-size: 11px;
    line-height: 16px;
    font-weight: 700;
    white-space: nowrap;
    text-decoration: none;
    transition: background .15s ease, border-color .15s ease, transform .1s ease;
}
.lp-offer-btn:hover,
.lp-offer-btn:focus {
    background: #286e4b;
    border-color: #286e4b;
    color: #fff;
    text-decoration: none;
}
.lp-offer-btn:active {
    transform: translateY(1px);
}

/* Compact card variant used in PDP "similar products" */
.product-item-type-1-small .lp-purchase-bar {
    min-height: 48px;
    padding: 5px 6px;
}
.product-item-type-1-small .lp-price {
    font-size: 15px;
    line-height: 20px;
}
.product-item-type-1-small .lp-offer-btn {
    height: 28px;
    padding: 0 15px;
    font-size: 13px;
}
@media (min-width: 1366px) {
    .product-item-type-1.product-item-type-1-small {
        padding-bottom: 10px;
    }
}

@media (min-width: 1200px) {
    .lp-card-min {
        font-size: 10px;
    }
    .lp-rotator-text {
        font-size: 11px;
        line-height: 18px;
    }
    .lp-rotator {
        height: 28px;
    }
    .lp-price {
        font-size: 21px;
        line-height: 26px;
    }
}

/* ---------- PDP sidebar ---------- */

/* Stylesheet is loaded in list mode only, so this does not affect the range view. */
@media (min-width: 1024px) {
    .pdp-sidebar-container .price-range-value {
        font-size: 24px;
        font-weight: 800;
    }
}
.lp-pdp-teaser {
    color: #2e6f4d;
}
.lp-pdp-tax {
    display: inline-block;
    margin-left: 4px;
    font-size: 10px;
    line-height: 15px;
    font-weight: 500;
    letter-spacing: 0;
    color: #87918a;
    white-space: nowrap;
    vertical-align: baseline;
}

.lp-pdp-info {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 14px;
    padding: 10px 11px;
    border-radius: 8px;
    background: #f1f2f3;
    color: #646d67;
    transition: background-color .25s ease, color .25s ease;
}
.lp-pdp-info[data-tone="neutral"]  { background: #f1f2f3; }
.lp-pdp-info[data-tone="discount"] { background: #fff5dc; color: #756747; }
.lp-pdp-info[data-tone="offer"]    { background: #eaf4ee; }

.lp-pdp-info-icon {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: #89938c;
    stroke-width: 1.35;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.lp-pdp-info[data-tone="discount"] .lp-pdp-info-icon { stroke: #9b874f; }
.lp-pdp-info[data-tone="offer"] .lp-pdp-info-icon    { stroke: #54856a; }

.lp-pdp-info-copy {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}
.lp-pdp-info .lp-rotator-text {
    width: auto;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    font-size: 13px;
    line-height: 22px;
    font-weight: 500;
    transition: opacity .18s ease, transform .18s ease;
}
.lp-pdp-info .lp-rotator-text.is-leaving {
    opacity: 0;
    transform: translateY(-4px);
}
.lp-pdp-info .lp-rotator-text strong {
    font-weight: 700;
    color: #39433d;
}
.lp-pdp-info[data-tone="offer"] .lp-rotator-text strong    { color: #287448; }
.lp-pdp-info[data-tone="discount"] .lp-rotator-text strong { color: #67562e; }

.lp-pdp-info-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}
.lp-pdp-info-nav button {
    display: grid;
    place-items: center;
    width: 24px;
    height: 26px;
    padding: 3px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #78867d;
    cursor: pointer;
}
.lp-pdp-info-nav svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.lp-pdp-info-nav button:hover {
    background: rgba(255, 255, 255, .56);
    color: #286b47;
}
.lp-pdp-info-nav button:focus-visible {
    outline: 2px solid #31845a;
    outline-offset: 1px;
}
.lp-pdp-info-nav button[disabled] {
    opacity: .4;
    cursor: default;
}

@media (max-width: 480px) {
    .lp-pdp-info {
        margin-top: 10px;
        padding: 9px 8px;
        gap: 5px;
    }
    .lp-pdp-info .lp-rotator-text {
        font-size: 12px;
        line-height: 21px;
    }
    .lp-pdp-tax {
        font-size: 9px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lp-rotator-text,
    .lp-pdp-info,
    .lp-offer-btn {
        transition: none;
    }
}
