/**
 * Discount Banner Module - Frontend Styles
 *
 * THEME OVERRIDE for guttercentre theme.
 * Original at /modules/pch_custombanner/views/css/front.css.
 * Overridden 2026-05-11 (MZS) to fix .pch-product-banner layout in the
 * rev 8.x miniature card: removed absolute positioning + calc(-54px) widths
 * so the banner renders as a normal full-width horizontal strip below the
 * image instead of an absolute-positioned badge that broke our 35%-wide
 * .pla-section--image flex column.
 *
 * .pch-discount-banner section + countdown styling is unchanged from upstream.
 *
 * @author    PrestaChamps
 * @copyright PrestaChamps
 * @license   https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
 */

/* Banner Container - Full Width */
.pch-discount-banner {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    padding: 15px 20px;
    box-sizing: border-box;
    position: relative;
}

/* Banner Link */
.pch-banner-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.pch-banner-link:hover {
    text-decoration: none;
    color: inherit;
}

/* Inner Container */
.pch-banner-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

/* Content Section (Left) */
.pch-banner-content {
    flex: 1;
    min-width: 0;
}

.pch-banner-title {
    font-size: 18px;
    font-weight: 700;
    color: inherit;
    margin: 0;
    line-height: 1.3;
}

.pch-banner-description {
    font-size: 14px;
    color: inherit;
    opacity: 0.9;
    margin-top: 5px;
    line-height: 1.4;
}

/* Countdown Section (Right) */
.pch-banner-countdown {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.pch-countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 50px;
}

.pch-countdown-value {
    font-size: 28px;
    font-weight: 700;
    color: inherit;
    line-height: 1;
    font-family: 'Courier New', Courier, monospace;
}

.pch-countdown-label {
    font-size: 10px;
    font-weight: 600;
    color: inherit;
    opacity: 0.8;
    text-transform: uppercase;
    margin-top: 3px;
    letter-spacing: 0.5px;
}

.pch-countdown-separator {
    font-size: 24px;
    font-weight: 700;
    color: inherit;
    margin: 0 2px;
    align-self: flex-start;
    padding-top: 2px;
}

/* Responsive - Tablet */
@media (max-width: 991px) {
    .pch-banner-inner {
        gap: 20px;
    }

    .pch-banner-title {
        font-size: 16px;
    }

    .pch-banner-description {
        font-size: 13px;
    }

    .pch-countdown-value {
        font-size: 24px;
    }

    .pch-countdown-item {
        min-width: 42px;
    }
}

/* Responsive - Mobile */
@media (max-width: 767px) {
    .pch-discount-banner {
        padding: 12px 15px;
    }

    .pch-banner-inner {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        gap: 8px;
    }

    .pch-banner-title {
        font-size: 15px;
    }

    .pch-banner-description {
        font-size: 12px;
        margin-top: 2px;
    }

    .pch-banner-countdown {
        gap: 3px;
    }

    .pch-countdown-value {
        font-size: 20px;
    }

    .pch-countdown-item {
        min-width: 36px;
    }

    .pch-countdown-separator {
        font-size: 18px;
    }

    /* MZS 2026-05-11 - keep the banner full-width (no calc shrink) on mobile */
    .pch-product-banner--full-width {
        width: 100%;
    }

    .pch-product-banner {
        max-width: 100%;
    }
}

/* Small Mobile */
@media (max-width: 479px) {
    .pch-discount-banner {
        padding: 6px 8px;
    }

    .pch-banner-inner {
        gap: 5px;
    }

    .pch-banner-title {
        font-size: 13px;
        line-height: 16px;
    }

    .pch-banner-description {
        font-size: 11px;
    }

    .pch-countdown-value {
        font-size: 17px;
    }

    .pch-countdown-item {
        min-width: 30px;
    }

    .pch-countdown-separator {
        font-size: 15px;
    }

    .pch-countdown-label {
        font-size: 8px;
    }
}

/* Product Miniature Banner Badge
 * MZS 2026-05-11 - reworked from upstream absolute-badge to a normal
 * horizontal block that sits below the image. See file header for context. */
.pch-product-banner {
    position: static;
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 4px 0 0 0;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1.3;
    border-radius: 3px;
    text-align: center;
    overflow: visible;
    box-sizing: border-box;
}

.pch-product-banner-text {
    display: inline;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
}

/* Product Banner - Full Width Style Modifier */
.pch-product-banner--full-width {
    display: block;
    width: 100%;
    text-align: center;
}

/* Product Banner - Hide on Mobile */
@media (max-width: 767px) {
    .pch-product-banner--hide-mobile {
        display: none !important;
    }
}
