/* =========================================================
   WC Order Widget — Frontend Styles v1.1
   ========================================================= */

/* ── CSS Variables ──────────────────────────────────────── */
.wcow-wrap {
    --wcow-primary:       #2563eb;
    --wcow-primary-dark:  #1d4ed8;
    --wcow-primary-light: #eff6ff;
    --wcow-success:       #16a34a;
    --wcow-success-light: #f0fdf4;
    --wcow-danger:        #dc2626;
    --wcow-text:          #111827;
    --wcow-text-muted:    #6b7280;
    --wcow-border:        #e5e7eb;
    --wcow-border-focus:  #93c5fd;
    --wcow-bg:            #ffffff;
    --wcow-bg-subtle:     #f9fafb;
    --wcow-radius:        10px;
    --wcow-radius-sm:     6px;
    --wcow-shadow-sm:     0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
    --wcow-shadow:        0 4px 16px rgba(0,0,0,.10);
    --wcow-shadow-lg:     0 20px 60px rgba(0,0,0,.18);
    --wcow-transition:    0.2s ease;
    font-family: inherit;
    font-size: 14px;
    color: var(--wcow-text);
    line-height: 1.5;
}

.wcow-wrap *,
.wcow-wrap *::before,
.wcow-wrap *::after { box-sizing: border-box; }

/* ════════════════════════════════════════════════════════
   FILTER BAR — Widget 1 (styled same as AP filter bar)
   ════════════════════════════════════════════════════════ */

.wcow-filter-bar {
    background: var(--wcow-bg);
    border: 1.5px solid var(--wcow-border);
    border-radius: var(--wcow-radius);
    padding: 18px 20px;
    margin-bottom: 18px;
    box-shadow: var(--wcow-shadow-sm);
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.wcow-filter-left {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex: 1;
    flex-wrap: wrap;
}

.wcow-filter-right { flex-shrink: 0; align-self: flex-end; }

/* Search group — label + input stacked */
.wcow-search-group {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 180px;
}

.wcow-search-label {
    display: block;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--wcow-text-muted);
    margin-bottom: 7px;
}

.wcow-search {
    width: 100%;
    height: 46px;
    padding: 0 16px;
    border: 1.5px solid var(--wcow-border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--wcow-text);
    background: var(--wcow-bg-subtle);
    outline: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
    -webkit-appearance: none;
    appearance: none;
}
.wcow-search::-webkit-search-cancel-button,
.wcow-search::-webkit-search-decoration { -webkit-appearance: none; }
.wcow-search::placeholder { color: #9ca3af; }
.wcow-search:focus {
    border-color: var(--wcow-primary);
    background: var(--wcow-bg);
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

.wcow-filter-cat,
.wcow-filter-brand {
    height: 46px;
    padding: 0 36px 0 14px;
    border: 1.5px solid var(--wcow-border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--wcow-text);
    background: var(--wcow-bg-subtle) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 12px center;
    -webkit-appearance: none; appearance: none;
    outline: none; cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
}
.wcow-filter-cat:focus,
.wcow-filter-brand:focus {
    border-color: var(--wcow-primary);
    background: var(--wcow-bg);
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

/* View Cart Button — matches AP filter bar height */
.wcow-wrap .wcow-btn-view-cart,
.wcow-ap-wrap .wcow-btn-view-cart {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 46px;
    padding: 0 22px;
    background: var(--wcow-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, transform .2s, box-shadow .2s;
    white-space: nowrap;
}
.wcow-wrap .wcow-btn-view-cart:hover,
.wcow-ap-wrap .wcow-btn-view-cart:hover {
    background: var(--wcow-primary-dark);
    transform: translateY(-1px);
}
.wcow-wrap .wcow-btn-view-cart:active,
.wcow-ap-wrap .wcow-btn-view-cart:active { transform: none; }
.wcow-cart-icon { font-size: 16px; }

.wcow-cart-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    background: rgba(255,255,255,.25);
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}
.wcow-cart-count.has-items { background: #fff; color: var(--wcow-primary); }

@keyframes wcow-badge-bounce {
    0%,100% { transform: scale(1); }
    40%      { transform: scale(1.4); }
    60%      { transform: scale(0.9); }
}
.wcow-badge-bounce { animation: wcow-badge-bounce .45s ease; }

/* ════════════════════════════════════════════════════════
   PRODUCT TABLE
   ════════════════════════════════════════════════════════ */

.wcow-table-wrap {
    border-radius: var(--wcow-radius);
    box-shadow: var(--wcow-shadow-sm);
    overflow: hidden;            /* clips thead corner background to border-radius */

}

/* Scroll container — handles horizontal overflow */
.wcow-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1.5px solid #bababa;   /* default, overrideable via Elementor */
    border-radius: var(--wcow-radius);
    scrollbar-width: thin;
    scrollbar-color: #e5e7eb transparent;
}
.wcow-table-scroll::-webkit-scrollbar { height: 4px; }
.wcow-table-scroll::-webkit-scrollbar-track { background: transparent; }
.wcow-table-scroll::-webkit-scrollbar-thumb { background: #e5e7eb; border-radius: 2px; }

.wcow-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin: 0 !important;
    padding: 0 !important;
}
.wcow-table-wrap { margin-bottom: 0 !important; }

.wcow-table thead tr {
    background: var(--wcow-bg-subtle);
    border-bottom: 1.5px solid var(--wcow-border);
}

.wcow-table th {
    padding: 13px 16px;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--wcow-text-muted);
    text-align: left;
    white-space: nowrap;
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
}

.wcow-table td {
    padding: 14px 16px;
    vertical-align: middle;
    border-bottom: 1px solid var(--wcow-border);
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
}

.wcow-table tbody tr { transition: background .15s; }
.wcow-table tbody tr:last-child td { border-bottom: none; }
.wcow-table tbody tr:hover { background: #f5f8ff; }

.wcow-col-name   { width: auto; }
.wcow-col-price  { width: 120px; white-space: nowrap; }
.wcow-col-qty    { width: 130px; }
.wcow-col-action { width: 140px; }

.wcow-product-name {
    font-weight: 600;
    color: var(--wcow-text);
    line-height: 1.3;
    margin-bottom: 3px;
}
.wcow-product-sku { font-size: 11.5px; color: #9ca3af; }

.wcow-price { font-weight: 700; font-size: 14.5px; color: var(--wcow-text); }
.wcow-out-of-stock {
    font-size: 11.5px; font-weight: 600; color: var(--wcow-danger);
    background: #fef2f2; padding: 3px 8px; border-radius: 4px;
    display: inline-block; margin-top: 3px;
}

/* Qty Input — circle outline style */
.wcow-qty-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    background: transparent;
    height: auto;
    overflow: visible;
}
.wcow-qty-wrap:focus-within { box-shadow: none; }

.wcow-wrap .wcow-qty-btn {
    width: 28px; height: 28px;
    border: 1.5px solid var(--wcow-border);
    border-radius: 50%;
    background: transparent;
    color: var(--wcow-text-muted);
    font-size: 16px; font-weight: 400;
    cursor: pointer;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    line-height: 1; user-select: none;
    transition: border-color .2s, color .2s, background-color .2s;
    padding: 0;
}
.wcow-wrap .wcow-qty-btn:hover {
    border-color: var(--wcow-primary);
    color: var(--wcow-primary);
    background-color: transparent;
}
.wcow-wrap .wcow-qty-btn:active { opacity: .7; }

.wcow-qty-input {
    width: 32px;
    height: 28px;
    border: none;
    text-align: center;
    font-size: 14px; font-weight: 600;
    color: var(--wcow-text);
    background: transparent;
    outline: none;
    -moz-appearance: textfield; appearance: textfield;
    padding: 0;
    pointer-events: all;
    cursor: text;
}
.wcow-qty-input::-webkit-outer-spin-button,
.wcow-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Add to Cart Button */
.wcow-wrap .wcow-btn-atc {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 6px; height: 38px; padding: 0 16px;
    background-color: var(--wcow-primary);  /* solid color — Elementor can override this */
    background-image: none;
    color: #fff; border: none; border-radius: 8px;
    font-size: 13px; font-weight: 600; cursor: pointer;
    white-space: nowrap;
    transition: background-color .2s, opacity .2s, transform .2s, box-shadow .2s;
}
.wcow-wrap .wcow-btn-atc:hover:not(:disabled) {
    background-color: var(--wcow-primary-dark);
    transform: translateY(-1px);
}
.wcow-wrap .wcow-btn-atc:active:not(:disabled) { transform: none; }
.wcow-wrap .wcow-btn-atc:disabled { opacity: .45; cursor: not-allowed; }
.wcow-wrap .wcow-btn-atc.is-adding,
.wcow-wrap .wcow-btn-atc.is-added  { opacity: .85; cursor: default; }

.wcow-no-products {
    text-align: center; padding: 48px 20px;
    color: var(--wcow-text-muted); font-size: 14px;
}

/* Pagination */
.wcow-pagination {
    display: flex; align-items: center; justify-content: center;
    gap: 4px; padding: 16px 0 4px; flex-wrap: wrap;
}
.wcow-pagination .wcow-page-btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 34px; height: 34px; padding: 0 8px;
    border: 1.5px solid var(--wcow-border); border-radius: 7px;
    background-color: var(--wcow-bg); background-image: none;
    color: var(--wcow-text-muted);
    font-size: 13px; font-weight: 600; cursor: pointer;
    transition: all .18s; text-decoration: none;
}
.wcow-pagination .wcow-page-btn:hover:not(:disabled):not(.is-active) {
    border-color: var(--wcow-primary); color: var(--wcow-primary);
    background-color: var(--wcow-primary-light); background-image: none;
}
.wcow-pagination .wcow-page-btn.is-active {
    background-color: var(--wcow-primary); background-image: none;
    border-color: var(--wcow-primary);
    color: #fff; cursor: default;
}
/* Prev/Next — lebih lebar sedikit untuk tanda panah */
.wcow-pagination .wcow-page-btn.wcow-page-prev,
.wcow-pagination .wcow-page-btn.wcow-page-next {
    font-size: 16px; min-width: 34px; padding: 0 10px;
}
.wcow-pagination .wcow-page-btn:disabled {
    opacity: .35; cursor: not-allowed;
    pointer-events: none;
}
.wcow-page-info { font-size: 13px; color: var(--wcow-text-muted); padding: 0 8px; }
.wcow-page-ellipsis {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 28px; height: 34px;
    font-size: 14px; letter-spacing: 1px;
    color: var(--wcow-text-muted);
    user-select: none; pointer-events: none;
    letter-spacing: 1px;
}

/* ════════════════════════════════════════════════════════
   ALL PRODUCTS FILTER BAR (Widget 2)
   ════════════════════════════════════════════════════════ */

.wcow-ap-filter-bar {
    background: var(--wcow-bg);
    border: 1.5px solid var(--wcow-border);
    border-radius: var(--wcow-radius);
    padding: 18px 20px;
    margin-bottom: 18px;
    box-shadow: var(--wcow-shadow-sm);
}

.wcow-ap-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    align-items: end;
}

.wcow-ap-filter-label {
    display: block;
    font-size: 11.5px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .5px;
    color: var(--wcow-text-muted);
    margin-bottom: 7px;
}

.wcow-ap-search-wrap { position: relative; }

.wcow-ap-search {
    width: 100%; height: 46px;
    padding: 0 16px;
    border: 1.5px solid var(--wcow-border);
    border-radius: 8px;
    font-size: 14px; color: var(--wcow-text);
    background: var(--wcow-bg-subtle);
    outline: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
    -webkit-appearance: none; appearance: none;
}
.wcow-ap-search::-webkit-search-cancel-button,
.wcow-ap-search::-webkit-search-decoration { -webkit-appearance: none; }
.wcow-ap-search::placeholder { color: #9ca3af; }
.wcow-ap-search:focus {
    border-color: var(--wcow-primary);
    background: var(--wcow-bg);
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

.wcow-ap-select-wrap { position: relative; }

.wcow-ap-select {
    width: 100%; height: 46px;
    padding: 0 40px 0 14px;
    border: 1.5px solid var(--wcow-border);
    border-radius: 8px;
    font-size: 14px; color: var(--wcow-text);
    background: var(--wcow-bg-subtle);
    -webkit-appearance: none; appearance: none;
    outline: none; cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
}
.wcow-ap-select:focus {
    border-color: var(--wcow-primary);
    background: var(--wcow-bg);
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

.wcow-ap-select-arrow {
    position: absolute; right: 14px; top: 50%;
    transform: translateY(-50%);
    color: #9ca3af; pointer-events: none; font-size: 13px;
}

.wcow-ap-filter-actions {
    display: flex; align-items: flex-end; gap: 10px;
    padding-top: 4px; margin-top: 14px;
    border-top: 1px solid var(--wcow-border);
}

.wcow-ap-wrap .wcow-ap-btn-view-cart {
    display: inline-flex; align-items: center; gap: 8px;
    height: 46px; padding: 0 22px;
    background: var(--wcow-primary); color: #fff;
    border: none; border-radius: 8px;
    font-size: 14px; font-weight: 600; cursor: pointer;
    transition: background .2s, transform .2s, box-shadow .2s;
    white-space: nowrap;
}
.wcow-ap-wrap .wcow-ap-btn-view-cart:hover {
    background: var(--wcow-primary-dark);
    transform: translateY(-1px);
}
.wcow-ap-wrap .wcow-ap-btn-view-cart:active { transform: none; }
.wcow-ap-wrap .wcow-ap-btn-view-cart .wcow-cart-count { background: rgba(255,255,255,.25); }
.wcow-ap-wrap .wcow-ap-btn-view-cart .wcow-cart-count.has-items { background: #fff; color: var(--wcow-primary); }

/* ════════════════════════════════════════════════════════
   CART MODAL — Slide-in Drawer
   ════════════════════════════════════════════════════════ */

.wcow-modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99998;
    opacity: 0; transition: opacity .25s ease;
    pointer-events: none;
}
.wcow-modal-overlay.is-open { opacity: 1; pointer-events: all; }

.wcow-cart-modal {
    /* Re-declare variables karena position:fixed keluar dari .wcow-wrap inheritance */
    --wcow-primary:       #2563eb;
    --wcow-primary-dark:  #1d4ed8;
    --wcow-danger:        #dc2626;
    --wcow-text:          #111827;
    --wcow-text-muted:    #6b7280;
    --wcow-border:        #e5e7eb;
    --wcow-bg:            #ffffff;
    --wcow-bg-subtle:     #f9fafb;
    --wcow-radius:        10px;
    --wcow-shadow-lg:     0 20px 60px rgba(0,0,0,.18);

    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: 420px; max-width: 100vw;
    background: #fff;
    z-index: 99999;
    display: flex; flex-direction: column;
    box-shadow: -8px 0 40px rgba(0,0,0,.18);
    transform: translateX(100%);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.wcow-cart-modal.is-open { transform: translateX(0); }

/* Header */
.wcow-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 22px 24px 18px;
    border-bottom: 1.5px solid var(--wcow-border);
    flex-shrink: 0;
}
.wcow-modal-title-wrap { display: flex; align-items: center; gap: 12px; }
.wcow-modal-icon {
    width: 40px; height: 40px;
    background: var(--wcow-primary-light);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; flex-shrink: 0;
}
.wcow-modal-title { font-size: 17px; font-weight: 700; color: var(--wcow-text); margin: 0; }
.wcow-modal-subtitle { font-size: 12px; color: var(--wcow-text-muted); margin: 2px 0 0; }

.wcow-cart-modal .wcow-modal-close {
    width: 34px; height: 34px;
    border: 1.5px solid #f9a8d4 !important;
    border-radius: 8px;
    background: #fdf2f8 !important;
    font-size: 16px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: #ec4899 !important;
    transition: all .2s; flex-shrink: 0;
}
.wcow-cart-modal .wcow-modal-close:hover {
    background: #fce7f3 !important;
    border-color: #f472b6 !important;
    color: #db2777 !important;
}

/* Body */
.wcow-modal-body {
    flex: 1; overflow-y: auto; padding: 0;
    scrollbar-width: thin; scrollbar-color: #e5e7eb transparent;
}
.wcow-modal-body::-webkit-scrollbar { width: 5px; }
.wcow-modal-body::-webkit-scrollbar-track { background: transparent; }
.wcow-modal-body::-webkit-scrollbar-thumb { background: #e5e7eb; border-radius: 3px; }

.wcow-cart-empty {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 60px 32px; text-align: center;
    min-height: 240px;
}
.wcow-cart-empty-icon { font-size: 52px; margin-bottom: 16px; opacity: .4; }
.wcow-cart-empty p { font-size: 14px; color: var(--wcow-text-muted); margin: 0; }

/* Items */
.wcow-cart-items { padding: 8px 0; }

.wcow-cart-item {
    display: flex; align-items: flex-start; gap: 14px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--wcow-border);
    transition: background .15s;
}
.wcow-cart-item:last-child { border-bottom: none; }
.wcow-cart-item:hover { background: var(--wcow-bg-subtle); }

.wcow-cart-item-thumb {
    width: 52px; height: 52px;
    border-radius: 8px;
    background: linear-gradient(135deg, #f0f4f8, #e2e8f0);
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    border: 1.5px solid var(--wcow-border);
    overflow: hidden;
}
.wcow-cart-item-thumb img { width: 100%; height: 100%; object-fit: cover; }

.wcow-cart-item-info { flex: 1; min-width: 0; }
.wcow-cart-item-name {
    font-size: 13.5px; font-weight: 600; color: var(--wcow-text);
    margin: 0 0 3px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wcow-cart-item-price { font-size: 12.5px; color: var(--wcow-text-muted); margin: 0 0 8px; }

.wcow-cart-item-controls { display: flex; align-items: center; gap: 10px; }

.wcow-cart-qty-wrap {
    display: inline-flex; align-items: center;
    gap: 6px;
    border: none; border-radius: 0;
    overflow: visible; height: auto; background: transparent;
}
.wcow-cart-modal .wcow-cart-qty-btn {
    width: 26px; height: 26px;
    border: 1.5px solid var(--wcow-border);
    border-radius: 50%;
    background: transparent;
    color: var(--wcow-text-muted);
    font-size: 15px; font-weight: 400; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: border-color .2s, color .2s; user-select: none; flex-shrink: 0;
    padding: 0; line-height: 1;
}
.wcow-cart-modal .wcow-cart-qty-btn:hover { border-color: var(--wcow-primary); color: var(--wcow-primary); background: transparent; }

.wcow-cart-qty-val {
    width: 28px;
    height: 26px;
    border: none;
    text-align: center;
    font-size: 13px; font-weight: 700; color: var(--wcow-text);
    background: transparent; outline: none;
    -moz-appearance: textfield; appearance: textfield;
    padding: 0;
    pointer-events: all;
    cursor: text;
}
.wcow-cart-qty-val::-webkit-outer-spin-button,
.wcow-cart-qty-val::-webkit-inner-spin-button { -webkit-appearance: none; }

.wcow-cart-modal .wcow-cart-remove {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px;
    color: #ef4444 !important;
    border: 1.5px solid #fecaca !important;
    background: #fef2f2 !important;
    cursor: pointer;
    border-radius: 6px;
    transition: all .2s; padding: 0; flex-shrink: 0;
}
.wcow-cart-modal .wcow-cart-remove svg { display: block; pointer-events: none; }
.wcow-cart-modal .wcow-cart-remove:hover {
    background: #fee2e2 !important;
    border-color: #fca5a5 !important;
    color: #dc2626 !important;
    transform: scale(1.08);
}

.wcow-cart-item-subtotal { text-align: right; flex-shrink: 0; }
.wcow-cart-item-subtotal-val { font-size: 14px; font-weight: 700; color: var(--wcow-text); display: block; }
.wcow-cart-item-subtotal-lbl { font-size: 11px; color: var(--wcow-text-muted); }

.wcow-cart-item.is-updating { opacity: .5; pointer-events: none; }

/* Footer */
.wcow-modal-footer { flex-shrink: 0; border-top: 1.5px solid var(--wcow-border); background: var(--wcow-bg); }

.wcow-modal-totals { padding: 16px 24px 14px; }

.wcow-modal-total-row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; font-size: 13px; color: var(--wcow-text-muted);
    margin-bottom: 6px;
}
.wcow-modal-total-row:last-child {
    margin-bottom: 0; font-size: 15px; font-weight: 700;
    padding-top: 8px;
    border-top: 1.5px solid var(--wcow-border);
    margin-top: 8px;
}
.wcow-total-label { color: var(--wcow-text-muted); }
.wcow-total-count  { font-weight: 700; color: var(--wcow-text); }
.wcow-total-value  { font-weight: 700; font-size: 17px; color: var(--wcow-primary); }

.wcow-modal-cta { padding: 0 24px 22px; display: flex; flex-direction: column; gap: 10px; }

.wcow-cart-modal .wcow-btn-checkout {
    display: flex; align-items: center; justify-content: center;
    gap: 8px; width: 100%; height: 50px;
    background-color: #2271b1;
    background-image: none;
    color: #fff; border: none; border-radius: 10px;
    font-size: 15px; font-weight: 700; cursor: pointer;
    text-decoration: none;
    transition: background .2s, opacity .2s, transform .2s, box-shadow .2s;
    letter-spacing: .2px;
}
.wcow-cart-modal .wcow-btn-checkout:hover {
    opacity: .92; transform: translateY(-1px);
    color: #fff; text-decoration: none;
}

.wcow-cart-modal .wcow-btn-cart {
    display: flex; align-items: center; justify-content: center;
    gap: 8px; width: 100%; height: 44px;
    background-color: var(--wcow-bg);
    background-image: none;
    color: var(--wcow-text-muted);
    border: 1.5px solid var(--wcow-border); border-radius: 10px;
    font-size: 13.5px; font-weight: 600; cursor: pointer;
    text-decoration: none;
    transition: all .2s;
}
.wcow-cart-modal .wcow-btn-cart:hover {
    border-color: var(--wcow-primary); color: var(--wcow-primary);
    background-color: var(--wcow-primary-light);
    background-image: none;
    text-decoration: none;
}

/* Loading */
.wcow-modal-loading {
    display: flex; align-items: center; justify-content: center;
    padding: 48px 20px;
}
.wcow-spinner {
    width: var(--wcow-spinner-size, 32px);
    height: var(--wcow-spinner-size, 32px);
    border-width: var(--wcow-spinner-thickness, 3px);
    border-style: solid;
    border-color: var(--wcow-spinner-track, var(--wcow-border));
    border-top-color: var(--wcow-spinner-color, var(--wcow-primary));
    border-radius: 50%;
    animation: wcow-spin .7s linear infinite;
}
@keyframes wcow-spin { to { transform: rotate(360deg); } }

/* ════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .wcow-filter-bar  { flex-direction: column; align-items: stretch; }
    .wcow-filter-left { flex-direction: column; }
    .wcow-filter-right { align-self: stretch; }
    .wcow-filter-right .wcow-btn-view-cart { width: 100%; justify-content: center; }
    .wcow-search-group { width: 100%; }
    .wcow-table       { min-width: 560px; }
    /* Name column gets more space, others tighter */
    .wcow-col-name    { min-width: 260px; width: auto; }
    .wcow-col-price   { width: 80px; }
    .wcow-col-qty     { width: 100px; }
    .wcow-col-action  { width: 100px; }
    /* Product name wraps naturally with enough room */
    .wcow-product-name { white-space: normal; overflow: visible; text-overflow: unset; max-width: none; }
    .wcow-ap-filter-grid { grid-template-columns: 1fr; }

    /* Cart modal — bottom sheet on mobile */
    .wcow-cart-modal {
        top: auto !important;       /* override inline top:0 */
        right: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        max-height: 92vh;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -8px 40px rgba(0,0,0,.18);
        transform: translateY(100%) !important;
    }
    .wcow-cart-modal.is-open {
        transform: translateY(0) !important;
    }

    /* Pull indicator for bottom sheet */
    .wcow-modal-header::before {
        content: '';
        position: absolute;
        top: 10px; left: 50%;
        transform: translateX(-50%);
        width: 36px; height: 4px;
        background: var(--wcow-border);
        border-radius: 2px;
    }
    .wcow-modal-header { position: relative; }
}


/* ════════════════════════════════════════════════════════
   Cart Button Widget (WCOW)
   ════════════════════════════════════════════════════════ */

/* Outer flex container — untuk alignment */
.wcow-cb-outer {
    display: flex;
    width: 100%;
}

/* Tombol utama — reset semua browser default */
.wcow-cb-outer .wcow-cb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background-color: transparent;
    background-image: none;
    border: none;
    padding: 0;
    cursor: pointer;
    text-decoration: none;
    transition: color .2s, background .2s, transform .2s;
    line-height: 1;
}

/* Layout: icon di atas label */
.wcow-cb-outer .wcow-cb-btn--col {
    flex-direction: column;
}

/* Layout: icon di kiri label */
.wcow-cb-outer .wcow-cb-btn--row {
    flex-direction: row;
}

/* Icon wrap — position relative agar badge bisa absolute di dalamnya */
.wcow-cb-outer .wcow-cb-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    flex-shrink: 0;
    transition: background-color .2s, box-shadow .2s;
}

.wcow-cb-icon-wrap i,
.wcow-cb-outer .wcow-cb-icon-wrap svg {
    display: block;
    transition: color .2s, fill .2s;
}

/* Badge — posisi absolut pojok kanan atas icon */
.wcow-cb-outer .wcow-cb-badge {
    position: absolute;
    top: -15%;
    left: 62%;
    min-width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #e91e8c !important;
    color: #ffffff !important;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    padding: 0 5px;
    line-height: 1;
    pointer-events: none;
    white-space: nowrap;
    z-index: 1;
    transition: transform .2s;
}

.wcow-cb-outer .wcow-cb-btn:hover .wcow-cb-badge {
    transform: scale(1.1);
}

@keyframes wcow-badge-pop {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.35); }
    100% { transform: scale(1); }
}

.wcow-cb-outer .wcow-cb-badge.has-items {
    animation: wcow-badge-pop .35s cubic-bezier(.36,.07,.19,.97) both;
}

/* Label teks opsional */
.wcow-cb-outer .wcow-cb-label {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    transition: color .2s;
    white-space: nowrap;
}

    50%  { transform: scale(1.3); }
    100% { transform: scale(1); }
}

@media (max-width: 480px) {
    .wcow-cart-item    { padding: 14px 16px; }
    .wcow-modal-header { padding: 18px 16px 14px; }
    .wcow-modal-totals { padding: 14px 16px 12px; }
    .wcow-modal-cta    { padding: 0 16px 18px; }
    .wcow-cart-item-thumb { width: 42px; height: 42px; font-size: 18px; }
}
