/* =============================================================
   WC Product Packs – Frontend Styles
   Designed to sit comfortably inside WoodMart's single-product layout.
   Variables fall back to WoodMart custom properties where available.
   ============================================================= */

/* ── Widget container ─────────────────────────────────────── */
.wcpp-widget {
    margin: 0 0 24px;
    font-family: inherit;
}

/* ── Two-card row ─────────────────────────────────────────── */
.wcpp-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}

@media (max-width: 480px) {
    .wcpp-options {
        grid-template-columns: 1fr;
    }
}

/* ── Card base ────────────────────────────────────────────── */
.wcpp-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1.5px solid #e8e8e8;
    border-radius: 14px;
    padding: 22px 18px 18px;
    background: #fff;
    transition: border-color .18s, box-shadow .18s;
    cursor: default;
}

.wcpp-card:hover {
    border-color: #d0d0d0;
    box-shadow: 0 4px 18px rgba(0,0,0,.07);
}

/* ── Pack card highlight ──────────────────────────────────── */
.wcpp-card--pack {
    border-color: var(--woodmart-primary-color, #e83e8c);
    border-width: 2px;
    box-shadow: 0 2px 14px rgba(232, 62, 140, .10);
}

.wcpp-card--out-of-stock {
    opacity: .65;
    pointer-events: none;
}

/* ── Badge ────────────────────────────────────────────────── */
.wcpp-card__badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--woodmart-primary-color, #e83e8c);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    padding: 4px 12px;
    border-radius: 20px;
    white-space: nowrap;
    letter-spacing: .02em;
}

/* ── Icon ─────────────────────────────────────────────────── */
.wcpp-card__icon {
    color: #bbb;
    margin-bottom: 6px;
}
.wcpp-card--pack .wcpp-card__icon {
    color: var(--woodmart-primary-color, #e83e8c);
}

/* ── Title ────────────────────────────────────────────────── */
.wcpp-card__title {
    font-size: 13px;
    font-weight: 700;
    margin: 0 0 10px;
    color: #333;
    line-height: 1.3;
}

/* ── Prices ───────────────────────────────────────────────── */
.wcpp-card__old-price {
    font-size: 12px;
    color: #999;
    text-decoration: line-through;
    margin-bottom: 2px;
    min-height: 17px;
}
.wcpp-card__old-price .woocommerce-Price-amount,
.wcpp-card__old-price bdi {
    font-size: inherit;
    color: inherit;
    text-decoration: inherit;
}

.wcpp-card__price {
    font-size: 20px;
    font-weight: 800;
    color: var(--woodmart-primary-color, #e83e8c);
    margin-bottom: 6px;
    line-height: 1.1;
}
.wcpp-card--single .wcpp-card__price {
    color: #333;
}
.wcpp-card__price .woocommerce-Price-amount,
.wcpp-card__price bdi {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

/* ── Savings / desc lines ─────────────────────────────────── */
.wcpp-card__savings,
.wcpp-card__desc {
    font-size: 12px;
    color: #555;
    margin-bottom: 4px;
    line-height: 1.4;
}
.wcpp-card__savings--none {
    color: #bbb;
}
.wcpp-card__desc {
    color: #777;
}

/* ── Stock indicator ──────────────────────────────────────── */
.wcpp-card__stock {
    font-size: 11px;
    color: #e08a00;
    margin-top: 6px;
}

/* ── Note line (single card) ──────────────────────────────── */
.wcpp-card__note {
    font-size: 11px;
    color: #888;
    margin-top: 6px;
}

/* ── Add-to-cart area ─────────────────────────────────────── */
.wcpp-card__atc {
    width: 100%;
    margin-top: 12px;
}

/* The single card hosts the native WC form – keep it clean */
.wcpp-card__atc--single .cart {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}
.wcpp-card__atc--single .quantity {
    width: 100%;
}
.wcpp-card__atc--single .quantity input {
    width: 100%;
    text-align: center;
    border-radius: 8px;
    border: 1.5px solid #ddd;
    padding: 8px;
}
.wcpp-card__atc--single .single_add_to_cart_button {
    width: 100%;
    border-radius: 8px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #555 !important;
    color: #fff !important;
    border-color: #555 !important;
    font-size: 14px !important;
    padding: 10px 14px !important;
}
.wcpp-card__atc--single .single_add_to_cart_button:hover {
    background: #333 !important;
    border-color: #333 !important;
}

/* ── Pack button ──────────────────────────────────────────── */
.wcpp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    padding: 11px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s, transform .1s;
    line-height: 1;
}

.wcpp-btn--pack {
    background: var(--woodmart-primary-color, #e83e8c);
    color: #fff;
}
.wcpp-btn--pack:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}
.wcpp-btn--pack:active {
    transform: translateY(0);
}
.wcpp-btn--pack.wcpp-loading {
    opacity: .7;
    pointer-events: none;
}
.wcpp-btn--disabled {
    background: #ccc;
    color: #fff;
    cursor: not-allowed;
}

/* ── Callout bar ──────────────────────────────────────────── */
.wcpp-callout {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: #fff8f0;
    border: 1px solid #ffe0bb;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 12px;
    color: #7a4a00;
    line-height: 1.45;
}

.wcpp-callout__icon {
    flex-shrink: 0;
    color: #e08a00;
    margin-top: 1px;
}

.wcpp-callout strong {
    display: block;
    margin-bottom: 2px;
    color: #5c3600;
}

/* ── Cart label ───────────────────────────────────────────── */
.wcpp-cart-label {
    font-size: 12px;
    color: var(--woodmart-primary-color, #e83e8c);
    font-weight: 600;
}