/* ============================================
   Pack/Unit Selector — Unified Styles
   Inspired by goloflash.com pill-button design
   ============================================ */

/* Container */
.pack-selector {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}

/* Individual pill button */
.pack-selector .pack-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 0;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.pack-selector .pack-btn .pack-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
    line-height: 1.2;
    margin-bottom: 2px;
}

.pack-selector .pack-btn .pack-price {
    font-size: 1rem;
    font-weight: 800;
    color: #198754;
    line-height: 1.3;
}

/* Selected state */
.pack-selector .pack-btn.active {
    background: #198754;
    border-color: #198754;
    box-shadow: 0 2px 8px rgba(25, 135, 84, 0.3);
}

.pack-selector .pack-btn.active .pack-label {
    color: rgba(255, 255, 255, 0.85);
}

.pack-selector .pack-btn.active .pack-price {
    color: #fff;
}

/* Hover state (non-selected) */
.pack-selector .pack-btn:not(.active):hover {
    border-color: #198754;
    background: #f0fdf4;
}

.pack-selector .pack-btn:not(.active):hover .pack-price {
    color: #0e5c3a;
}

/* Savings badge */
.pack-savings {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.65rem;
    font-weight: 700;
    color: #198754;
    background: #d1e7dd;
    border: 1px solid #badbcc;
    border-radius: 20px;
    padding: 2px 8px;
    margin-top: 4px;
    line-height: 1.3;
}

.pack-savings i {
    font-size: 0.6rem;
}

/* Simple price (no pack) */
.price-simple {
    font-size: 1.2rem;
    font-weight: 700;
    color: #198754;
    margin-bottom: 8px;
}

/* Add to cart button enhancements */
.pack-selector ~ .qty-controls .cl-grid-add-cart {
    transition: all 0.2s ease;
}

.pack-selector ~ .qty-controls .cl-grid-add-cart.pack-mode {
    background: #198754;
    border-color: #198754;
}

/* Quickview modal specifics */
#productQuickViewModal .pack-selector .pack-btn {
    padding: 10px 14px;
}

#productQuickViewModal .pack-selector .pack-btn .pack-label {
    font-size: 0.75rem;
}

#productQuickViewModal .pack-selector .pack-btn .pack-price {
    font-size: 1.1rem;
}

#productQuickViewModal .pack-savings {
    font-size: 0.75rem;
    padding: 4px 12px;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .pack-selector .pack-btn {
        padding: 6px 8px;
        border-radius: 8px;
    }

    .pack-selector .pack-btn .pack-label {
        font-size: 0.6rem;
    }

    .pack-selector .pack-btn .pack-price {
        font-size: 0.85rem;
    }

    .pack-savings {
        font-size: 0.6rem;
        padding: 2px 6px;
    }
}
