/* ============================================================
   HOL Sales Grid – styles that fully override the theme
   All colours driven by CSS variables set inline per-instance
   ============================================================ */

/* Reset / isolation */
.hol-sg-wrapper *,
.hol-sg-wrapper *::before,
.hol-sg-wrapper *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ---- Grid ---- */
.hol-sg-wrapper {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
    font-family: inherit;
}

.hol-sg-grid {
    display: grid;
    grid-template-columns: repeat( var(--hol-cols, 4), 1fr );
    gap: 24px;
    width: 100%;
    list-style: none;
}

/* ---- Card ---- */
.hol-sg-card {
    background: #fff;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* ---- Image wrapper ---- */
.hol-sg-img-wrap {
    display: block;
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 4/3;
    text-decoration: none !important;
    border: none !important;
    background: #e8e8e8;
}

.hol-sg-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block !important;
    border: none !important;
    box-shadow: none !important;
    transition: transform 0.35s ease;
}

.hol-sg-img-wrap:hover img {
    transform: scale(1.04);
}

/* ---- Badge ---- */
.hol-sg-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--hol-badge-bg, #e02b2b);
    color: var(--hol-badge-text, #fff);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
    padding: 8px;
    pointer-events: none;
    z-index: 2;
    text-transform: none;
    letter-spacing: 0;
}

/* ---- Body ---- */
.hol-sg-body {
    padding: 10px 4px 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

/* ---- Product name ---- */
.hol-sg-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--hol-name, #1a6ec7) !important;
    text-decoration: none !important;
    line-height: 1.35;
    transition: color 0.2s;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.hol-sg-name:hover {
    color: var(--hol-name-hover, #0d4fa0) !important;
    text-decoration: underline !important;
}

/* ---- Prices ---- */
.hol-sg-prices {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
}

/* Normal / regular price – black, crossed out in red */
.hol-sg-regular {
    font-size: 14px;
    font-weight: 500;
    color: var(--hol-normal-price, #111) !important;
    text-decoration: line-through !important;
    -webkit-text-decoration-color: var(--hol-sale-price, #e02b2b) !important;
    text-decoration-color: var(--hol-sale-price, #e02b2b) !important;
    text-decoration-thickness: 2px !important;
}

/* Sale price */
.hol-sg-sale {
    font-size: 16px;
    font-weight: 700;
    color: var(--hol-sale-price, #e02b2b) !important;
    text-decoration: none !important;
}

/* ---- Countdown ---- */
.hol-sg-hurry {
    font-size: 11px;
    color: #444;
    margin-top: 6px !important;
    margin-bottom: 4px !important;
    font-style: italic;
}

.hol-sg-countdown {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.hol-sg-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--hol-cd-bg, #f0f0f0);
    color: var(--hol-cd-text, #111);
    min-width: 40px;
    padding: 4px 6px;
    border-radius: 4px;
}

.hol-sg-num {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--hol-cd-text, #111);
}

.hol-sg-label {
    font-size: 9px;
    text-transform: lowercase;
    color: var(--hol-cd-text, #111);
    opacity: 0.7;
}

/* ---- Stock ---- */
.hol-sg-stock {
    font-size: 11px;
    color: var(--hol-stock, #555) !important;
    margin-top: 6px !important;
    font-style: italic;
}

/* ---- No products ---- */
.hol-sg-no-products {
    padding: 20px;
    text-align: center;
    color: #888;
    font-style: italic;
}

/* ---- Responsive ---- */
@media ( max-width: 1024px ) {
    .hol-sg-grid {
        grid-template-columns: repeat( min( var(--hol-cols, 4), 3 ), 1fr );
    }
}

@media ( max-width: 768px ) {
    .hol-sg-grid {
        grid-template-columns: repeat( 2, 1fr );
    }
}

@media ( max-width: 480px ) {
    .hol-sg-grid {
        grid-template-columns: 1fr;
    }
    .hol-sg-badge {
        width: 66px;
        height: 66px;
        font-size: 9px;
    }
}

/* ---- CTA Buttons (Enquire / Pre-Order) ---- */
.hol-sg-cta-wrap {
    margin-top: 10px;
}

.hol-sg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none !important;
    border-radius: 4px;
    border: none !important;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
    line-height: 1;
    white-space: nowrap;
}

.hol-sg-btn:hover {
    opacity: 0.88;
    transform: translateY(-1px);
    text-decoration: none !important;
}

.hol-sg-btn--enquire {
    background: var(--hol-enquire-bg, #7ab648) !important;
    color: var(--hol-enquire-text, #fff) !important;
}

.hol-sg-btn--preorder {
    background: var(--hol-preorder-bg, #7ab648) !important;
    color: var(--hol-preorder-text, #fff) !important;
}

/* ============================================================
   HOL Single Product Sale Banner
   Uses fully isolated class names (.hol-sp-*) to avoid any
   theme or WooCommerce styles interfering.
   ============================================================ */

/* ---- Price wrap — replaces WC price output ---- */
.hol-sp-price-wrap {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: baseline !important;
    gap: 16px !important;
    margin: 0 0 6px 0 !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
    line-height: 1.2 !important;
}

/* Force these to show as inline-block so no theme flex/grid swallows them */
.hol-sp-regular,
.hol-sp-sale {
    display: inline-block !important;
    font-family: inherit !important;
    line-height: 1.2 !important;
    padding: 0 !important;
    margin: 0 !important;
    background: none !important;
    border: none !important;
}

.hol-sp-regular {
    font-size: 2rem !important;
    font-weight: 400 !important;
    color: var(--hol-sp-normal, #111111) !important;
    text-decoration: line-through !important;
    -webkit-text-decoration-line: line-through !important;
    text-decoration-line: line-through !important;
    -webkit-text-decoration-color: var(--hol-sp-normal, #111111) !important;
    text-decoration-color: var(--hol-sp-normal, #111111) !important;
    text-decoration-thickness: 2px !important;
    opacity: 1 !important;
}

.hol-sp-sale {
    font-size: 2rem !important;
    font-weight: 400 !important;
    color: var(--hol-sp-sale, #5b2d8e) !important;
    text-decoration: none !important;
    -webkit-text-decoration: none !important;
}

/* ---- Below-price block (stock + divider + countdown) ---- */
.hol-sp-below-price {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    clear: both !important;
}

/* ---- Stock ---- */
.hol-sp-stock {
    display: block !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    font-style: normal !important;
    color: var(--hol-sp-stock, #333333) !important;
    margin: 0 0 14px 0 !important;
    padding: 0 !important;
    line-height: 1.5 !important;
}

/* ---- Divider ---- */
.hol-sp-divider {
    display: block !important;
    height: 0 !important;
    border: none !important;
    border-top: 1px solid #dddddd !important;
    margin: 0 0 20px 0 !important;
    padding: 0 !important;
    background: none !important;
    clear: both !important;
}

/* ---- Countdown wrap ---- */
.hol-sp-countdown-wrap {
    display: block !important;
    margin: 0 0 20px 0 !important;
    padding: 0 !important;
}

.hol-sp-hurry {
    display: block !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    font-style: normal !important;
    color: #888888 !important;
    margin: 0 0 12px 0 !important;
    padding: 0 !important;
    text-align: left !important;
    line-height: 1.5 !important;
}

/* Countdown row — targets the shared .hol-sg-countdown class when inside single product */
.hol-sp-countdown-wrap .hol-sg-countdown {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    align-items: flex-start !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    background: none !important;
}

/* Override shared grid unit styles — white box with border, larger */
.hol-sp-countdown-wrap .hol-sg-unit {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 72px !important;
    height: 72px !important;
    min-width: 72px !important;
    background: #ffffff !important;
    border: 1.5px solid #cccccc !important;
    border-radius: 6px !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
}

/* Number */
.hol-sp-countdown-wrap .hol-sg-num {
    display: block !important;
    font-size: 28px !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    color: var(--hol-sp-cd, #222222) !important;
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
    font-family: inherit !important;
}

/* Label */
.hol-sp-countdown-wrap .hol-sg-label {
    display: block !important;
    font-size: 11px !important;
    font-weight: 400 !important;
    color: #888888 !important;
    text-transform: lowercase !important;
    opacity: 1 !important;
    margin: 4px 0 0 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
    font-family: inherit !important;
}

/* ---- Responsive ---- */
@media ( max-width: 480px ) {
    .hol-sp-regular,
    .hol-sp-sale    { font-size: 1.6rem !important; }
    .hol-sp-countdown-wrap .hol-sg-unit { width: 58px !important; height: 58px !important; min-width: 58px !important; }
    .hol-sp-countdown-wrap .hol-sg-num  { font-size: 22px !important; }
}
