/* ============================================
   Offer Zone for WooCommerce — Frontend styles
   ============================================ */

/* Tier table on product page */
.ozwc-tier-table-wrap {
    margin: 20px 0;
    padding: 16px;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    background: linear-gradient(135deg, #fff 0%, #f9fafb 100%);
}
.ozwc-tier-title {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 700;
    color: #0057ff;
}
.ozwc-tier-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.ozwc-tier-table th,
.ozwc-tier-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    text-align: left;
}
.ozwc-tier-table th {
    background: #f0f6fc;
    font-weight: 600;
    color: #1a1a1a;
}
.ozwc-tier-table tbody tr:hover {
    background: #fff8e1;
}
.ozwc-discount-badge {
    display: inline-block;
    padding: 4px 10px;
    background: #f5a623;
    color: #fff;
    border-radius: 4px;
    font-weight: 700;
    font-size: 13px;
}

/* Offers grid */
.ozwc-offers-grid {
    display: grid;
    gap: 20px;
    margin: 20px 0;
}
.ozwc-cols-1 { grid-template-columns: 1fr; }
.ozwc-cols-2 { grid-template-columns: repeat(2, 1fr); }
.ozwc-cols-3 { grid-template-columns: repeat(3, 1fr); }
.ozwc-cols-4 { grid-template-columns: repeat(4, 1fr); }
.ozwc-cols-5 { grid-template-columns: repeat(5, 1fr); }
.ozwc-cols-6 { grid-template-columns: repeat(6, 1fr); }

@media (max-width: 991px) {
    .ozwc-cols-4, .ozwc-cols-5, .ozwc-cols-6 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 767px) {
    .ozwc-cols-3, .ozwc-cols-4, .ozwc-cols-5, .ozwc-cols-6 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 479px) {
    .ozwc-offers-grid { grid-template-columns: 1fr !important; }
}

.ozwc-offer-card {
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: transform .2s, box-shadow .2s;
}
.ozwc-offer-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 87, 255, 0.12);
}
.ozwc-offer-link {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 16px;
}
.ozwc-offer-image {
    margin: -16px -16px 12px;
    background: #f9fafb;
}
.ozwc-offer-image img {
    width: 100%;
    height: auto;
    display: block;
}
.ozwc-offer-title {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
}
.ozwc-offer-product {
    margin: 0 0 12px;
    color: #666;
    font-size: 14px;
}
.ozwc-offer-details {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
.ozwc-moq {
    padding: 4px 10px;
    background: #f0f6fc;
    color: #0057ff;
    border-radius: 4px;
    font-weight: 600;
    font-size: 13px;
}
.ozwc-discount {
    padding: 4px 10px;
    background: #f5a623;
    color: #fff;
    border-radius: 4px;
    font-weight: 700;
    font-size: 13px;
}
.ozwc-offer-expiry {
    margin: 10px 0 0;
    color: #b32d2e;
    font-size: 12px;
    font-weight: 600;
}

/* Cart: freebie / BOGO labels */
.ozwc-free-label {
    display: inline-block;
    padding: 3px 10px;
    background: #00a32a;
    color: #fff;
    border-radius: 4px;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.5px;
}
.ozwc-freebie-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    background: #fff8e1;
    color: #b8860b;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}
.ozwc-freebie-qty {
    display: inline-block;
    padding: 4px 12px;
    background: #f0f0f0;
    border-radius: 4px;
    font-weight: 600;
}

/* ============================================
   Live price update — single product page
   ============================================ */
.summary .price.ozwc-loading,
.product-summary .price.ozwc-loading,
.entry-summary .price.ozwc-loading {
    opacity: 0.5;
    transition: opacity .2s;
}
.ozwc-live-price {
    color: #00a32a;
    font-weight: 700;
}
.ozwc-live-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 4px 10px;
    background: #f5a623;
    color: #fff;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
    vertical-align: middle;
    animation: ozwcPulse 1.5s ease-in-out infinite;
}
@keyframes ozwcPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
.ozwc-live-info {
    margin: 12px 0;
    padding: 12px 16px;
    background: linear-gradient(135deg, #fff8e1 0%, #fff3cd 100%);
    border-left: 4px solid #f5a623;
    border-radius: 4px;
    font-size: 14px;
}
.ozwc-live-savings {
    color: #00a32a;
    font-weight: 600;
    margin-bottom: 4px;
}
.ozwc-live-savings strong {
    font-size: 16px;
}
.ozwc-live-freebie,
.ozwc-live-shipping {
    color: #1a1a1a;
    margin: 4px 0;
    font-weight: 500;
}
.ozwc-live-offer-name {
    color: #666;
    font-size: 12px;
    margin-top: 6px;
    font-style: italic;
}

/* Tier table — highlight active tier */
.ozwc-tier-table tbody tr.ozwc-active-tier {
    background: #fff8e1 !important;
    box-shadow: inset 4px 0 0 #f5a623;
}
.ozwc-tier-table tbody tr.ozwc-active-tier td {
    font-weight: 700;
}

/* ============================================
   Cart page — savings row & line item display
   ============================================ */
.ozwc-savings-row th,
.ozwc-savings-row td {
    background: linear-gradient(135deg, #e7f6ec 0%, #f0f9f1 100%) !important;
    border-bottom: 2px solid #00a32a !important;
    color: #00a32a;
    font-weight: 700;
}
.ozwc-savings-amount {
    color: #00a32a;
    font-weight: 700;
    font-size: 16px;
}
.ozwc-line-saved {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 8px;
    background: #e7f6ec;
    color: #00a32a;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.woocommerce-cart-form del,
.cart_item del {
    opacity: 0.6;
    margin-right: 4px;
}
.woocommerce-cart-form ins,
.cart_item ins {
    background: transparent;
    color: #00a32a;
    font-weight: 700;
    text-decoration: none;
}

/* Unit price stack */
.ozwc-price-stack {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.3;
}
.ozwc-price-stack .ozwc-mrp {
    color: #888;
    font-size: 12px;
    opacity: 0.75;
    text-decoration: line-through;
}
.ozwc-price-stack .ozwc-now {
    color: #00a32a;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    background: transparent;
}

/* Tabular breakdown in subtotal cell */
.ozwc-line-breakdown {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin: 0;
    background: #fafbfc;
    border: 1px solid #e6e8eb;
    border-radius: 6px;
    overflow: hidden;
}
.ozwc-line-breakdown th,
.ozwc-line-breakdown td {
    padding: 6px 10px;
    border: 0;
    border-bottom: 1px solid #eef0f2;
    text-align: left;
    background: transparent;
    font-weight: 500;
}
.ozwc-line-breakdown tr:last-child th,
.ozwc-line-breakdown tr:last-child td {
    border-bottom: 0;
}
.ozwc-line-breakdown td {
    text-align: right;
    white-space: nowrap;
}
.ozwc-line-breakdown .ozwc-row-mrp th,
.ozwc-line-breakdown .ozwc-row-mrp td {
    color: #777;
}
.ozwc-line-breakdown .ozwc-row-mrp del {
    opacity: 1;
    margin: 0;
    color: #777;
}
.ozwc-line-breakdown .ozwc-row-offer th {
    color: #1a1a1a;
    font-weight: 600;
}
.ozwc-line-breakdown .ozwc-row-offer td {
    color: #1a1a1a;
    font-weight: 700;
}
.ozwc-line-breakdown .ozwc-row-saved {
    background: #e7f6ec;
}
.ozwc-line-breakdown .ozwc-row-saved th,
.ozwc-line-breakdown .ozwc-row-saved td {
    color: #00a32a;
    font-weight: 700;
}
