/* =============================================================
   DRW Public Styles — Sale Cards, Progress Bar, Volume Table
   ============================================================= */

/* ── Percentage badge ── */
.sale-perc {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    min-width: 48px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #e53935;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    text-align: center;
    box-shadow: 0 4px 10px rgba(229, 57, 53, 0.32);
    pointer-events: none;
}

/* ── Grid ── */
.drw-sale-items-grid {
    --drw-sale-columns: 4;
    container-type: inline-size;
    display: grid;
    grid-template-columns: repeat(var(--drw-sale-columns), minmax(0, 1fr));
    gap: 16px;
    width: 100%;
}

/* ── Card ── */
.drw-sale-item {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #ffffff;
    border: 1px solid #ececec;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.22s ease, transform 0.22s ease;
}

.drw-sale-item:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.11);
    transform: translateY(-3px);
}

/* ── Link wrapper ── */
.drw-sale-item-link {
    display: flex;
    flex-direction: column;
    flex: 1;
    color: inherit;
    text-decoration: none;
}

.drw-sale-item-link:hover {
    text-decoration: none;
    color: inherit;
}

/* ── Image — 1:1 square ── */
.drw-sale-item-media {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: #f5f5f5;
}

.drw-sale-item-media img,
.drw-sale-item-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.30s ease;
}

.drw-sale-item:hover .drw-sale-item-media img,
.drw-sale-item:hover .drw-sale-item-image {
    transform: scale(1.05);
}

/* ── Body (category + title + price) ── */
.drw-sale-item-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 10px 10px 6px;
    flex: 1;
    text-align: center;
}

/* ── Category label ── */
.drw-sale-item-cat {
    display: block;
    color: #6daa38;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    line-height: 1.2;
}

/* ── Product title ── */
.drw-sale-item-title {
    display: block;
    color: #1a1a1a;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* ── Price ── */
.drw-sale-item-price {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 4px;
}

.drw-sale-item-price del {
    color: #b0b0b0;
    font-size: 11px;
    font-weight: 400;
    opacity: 1;
}

.drw-sale-item-price ins {
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

/* ── Footer ── */
.drw-sale-item-footer {
    padding: 6px 10px 12px;
}

/* ── Button — own class only, no WC .button conflict ── */
.drw-sale-item-btn {
    display: block !important;
    width: 100% !important;
    padding: 11px 14px !important;
    border-radius: 6px !important;
    border: none !important;
    outline: none !important;
    background: #2a2a2a !important;
    color: #ffffff !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    text-align: center !important;
    text-decoration: none !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
    transition: background 0.15s ease !important;
}

.drw-sale-item-btn:hover,
.drw-sale-item-btn:focus {
    background: #444444 !important;
    color: #ffffff !important;
    text-decoration: none !important;
    outline: none !important;
}

.drw-sale-item-btn:active {
    background: #111111 !important;
    color: #ffffff !important;
}

/* ── Empty state ── */
.drw-sale-items-empty {
    padding: 24px;
    border: 1px dashed #d1d5db;
    border-radius: 8px;
    color: #6b7280;
    text-align: center;
    font-size: 14px;
}

/* ── Responsive ── */
@container (max-width: 760px) {
    .drw-sale-items-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .drw-sale-item-title {
        font-size: 10px;
    }
}

@container (max-width: 420px) {
    .drw-sale-items-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    .drw-sale-item,
    .drw-sale-item-media img,
    .drw-sale-item-image,
    .drw-sale-item-btn {
        transition: none !important;
        transform: none !important;
        animation: none !important;
    }
}

/* ===== DRW Progress Bar ===== */
.drw-progress-wrap { margin: 1rem 0; }
.drw-progress-bar-outer { width: 100%; background: #e0e0e0; border-radius: 4px; height: 12px; overflow: hidden; margin-bottom: 0.5rem; }
.drw-progress-bar-inner { height: 100%; background: #4caf50; border-radius: 4px; transform-origin: left center; transition: transform 0.4s ease; }
.drw-progress-label { margin: 0; font-size: 0.9em; color: #555; }
.drw-progress-complete .drw-progress-label { color: #2e7d32; font-weight: 600; }

/* ===== DRW Volume Pricing Table ===== */
.drw-volume-pricing { margin: 1.5rem 0; }
.drw-volume-title { margin-bottom: 0.5rem; font-size: 1rem; }
.drw-volume-table { width: 100%; border-collapse: collapse; font-size: 0.9em; }
.drw-volume-table th, .drw-volume-table td { padding: 0.5rem 0.75rem; border: 1px solid #ddd; text-align: left; }
.drw-volume-table thead th { background: #f5f5f5; font-weight: 600; }
.drw-volume-table tbody tr:nth-child(even) { background: #fafafa; }
