/* ============================================
   unified-cart.css
   CSS cho giỏ hàng & checkout multi-vendor (Shopee style)
   Dùng chung với shop-module.css của MIA
   ============================================ */

/* ── Vendor group ────────────────────────────────── */
.uc-group {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    margin-bottom: 16px;
    overflow: hidden;
}
.uc-group-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: #f8fafc;
    border-bottom: 1px solid #e8ddd8;
}
.uc-vendor-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 40px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}
.uc-ship-tag {
    font-size: 12px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 5px;
}
.uc-ship-tag.uc-ship-free { color: #10b981; font-weight: 500; }

/* ── Table header ─────────────────────────────────── */
.uc-thead {
    display: grid;
    grid-template-columns: 3fr 1fr 1.2fr 1fr 40px;
    gap: 10px;
    padding: 10px 20px;
    background: #fafafa;
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #94a3b8;
    font-weight: 600;
    border-bottom: 1px solid #f0ebe4;
}
.uc-row {
    display: grid;
    grid-template-columns: 3fr 1fr 1.2fr 1fr 40px;
    gap: 10px;
    padding: 16px 20px;
    border-bottom: 1px solid #f0ebe4;
    align-items: center;
}
.uc-row:last-child { border-bottom: none; }

.uc-col-product { display: flex; align-items: center; gap: 12px; }
.uc-img-link {
    display: block;
    width: 72px;
    height: 72px;
    flex-shrink: 0;
}
.uc-img {
    width: 72px; height: 72px;
    max-width: 72px; max-height: 72px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    background: #f0ebe4;
}
.uc-item-name { font-size: 14px; font-weight: 500; margin-bottom: 4px; color: #2c1f1a; }
.uc-item-sub  { font-size: 12px; color: #8c6b62; display: flex; gap: 8px; flex-wrap: wrap; }

.uc-col-price .uc-price-now { font-size: 14px; font-weight: 600; display: block; color: #2c1f1a; }
.uc-col-price .uc-price-old { font-size: 11px; color: #94a3b8; text-decoration: line-through; }

.uc-col-total strong { font-size: 14px; font-weight: 700; color: #c9847a; }

/* Qty control */
.uc-qty {
    display: flex;
    align-items: center;
    border: 1px solid #e8ddd8;
    border-radius: 6px;
    overflow: hidden;
    width: fit-content;
}
.uc-minus, .uc-plus {
    width: 30px; height: 34px;
    background: none; border: none;
    cursor: pointer; font-size: 14px; color: #334155;
    transition: background .2s;
}
.uc-minus:hover, .uc-plus:hover { background: #f0ebe4; }
.uc-qty-input {
    width: 42px; height: 34px;
    border: none;
    border-left: 1px solid #e8ddd8;
    border-right: 1px solid #e8ddd8;
    text-align: center;
    font-size: 13px; outline: none;
}

.uc-del {
    background: none; border: none;
    cursor: pointer; color: #94a3b8;
    font-size: 15px; padding: 4px;
    transition: color .2s;
}
.uc-del:hover { color: #ef4444; }

.uc-group-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: #f8fafc;
    border-top: 1px solid #e8ddd8;
    font-size: 14px;
    color: #64748b;
}
.uc-group-footer strong { font-size: 16px; font-weight: 700; color: #2c1f1a; }

/* ── Checkout summary vendor ─────────────────────── */
.uc-summary-vendor {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e8ddd8;
}
.uc-summary-vendor:last-of-type { border-bottom: none; }
.uc-summary-vendor-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.uc-summary-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f0ebe4;
}
.uc-summary-item:last-child { border-bottom: none; }
.uc-summary-item img {
    width: 44px; height: 44px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    background: #f0ebe4;
}
.uc-summary-item-info { flex: 1; font-size: 13px; }
.uc-summary-item-sub  { font-size: 11px; color: #94a3b8; }
.uc-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 13px;
    color: #64748b;
}
.uc-summary-row.uc-bold { font-weight: 600; color: #2c1f1a; }

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 768px) {
    .uc-thead { display: none; }
    .uc-row {
        grid-template-columns: 72px 1fr auto;
        grid-template-rows: auto auto auto;
        column-gap: 10px; row-gap: 8px;
        padding: 14px 12px;
    }
    .uc-col-product { grid-column: 1/3; grid-row: 1; }
    .uc-col-price   { grid-column: 2;   grid-row: 2; }
    .uc-col-qty     { grid-column: 1;   grid-row: 3; }
    .uc-col-total   { grid-column: 3;   grid-row: 1; text-align: right; align-self: start; }
    .uc-col-del     { grid-column: 3;   grid-row: 3; text-align: right; }
    .uc-img         { width: 60px; height: 60px; }
    .uc-group-header { flex-wrap: wrap; padding: 10px 12px; }
    .uc-group-footer { padding: 10px 12px; }
}

/* ── OME Product Detail – Video & Usage tabs ─────── */
.ome-video-wrapper {
    position: relative;
    padding-top: 56.25%; /* 16:9 */
    background: #0f172a;
    border-radius: 10px;
    overflow: hidden;
}
.ome-video-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}
.ome-video-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 60px 20px;
    background: #f8fafc;
    border-radius: 10px;
    color: #94a3b8;
    text-align: center;
}
.ome-video-placeholder i {
    font-size: 52px;
    color: #cbd5e1;
}
.ome-video-placeholder p {
    font-size: 15px;
}

/* ── Coupon / Voucher Modal Section ──────────────── */
.shop-coupon-section {
    margin: 16px 0;
}
.shop-btn-voucher-select {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #fff5f8;
    border: 1px dashed var(--c-primary, #d6248c);
    border-radius: 8px;
    color: var(--c-primary, #d6248c);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.shop-btn-voucher-select:hover {
    background: #ffe4ef;
    transform: translateY(-1px);
}
.shop-voucher-btn-text {
    display: flex;
    align-items: center;
    gap: 8px;
}
.shop-voucher-applied-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #fdf2f8;
    border: 1px solid #fbcfe8;
    border-radius: 8px;
}
.shop-voucher-applied-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #9d174d;
}
.shop-voucher-applied-code {
    background: var(--c-primary, #d6248c);
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 12px;
}
.shop-voucher-applied-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.shop-btn-voucher-change, .shop-btn-voucher-remove {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
}
.shop-btn-voucher-change {
    color: var(--c-primary, #d6248c);
}
.shop-btn-voucher-change:hover {
    text-decoration: underline;
}
.shop-btn-voucher-remove {
    color: #94a3b8;
}
.shop-btn-voucher-remove:hover {
    color: #ef4444;
}

/* Voucher Modal */
.shop-voucher-modal {
    max-width: 480px;
    width: 90%;
    padding: 0;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
}
.shop-voucher-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid #f1f5f9;
    background: #fff;
}
.shop-voucher-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}
.shop-voucher-modal-header h3 i {
    color: var(--c-primary, #d6248c);
}
.shop-voucher-modal-body {
    padding: 20px;
    max-height: 75vh;
    overflow-y: auto;
}
.shop-voucher-input-group {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
.shop-voucher-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}
.shop-voucher-input:focus {
    border-color: var(--c-primary, #d6248c);
}
.shop-btn-apply-custom {
    padding: 10px 18px;
    background: var(--c-primary, #d6248c);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s;
}
.shop-btn-apply-custom:hover {
    opacity: 0.9;
}
.shop-voucher-divider {
    position: relative;
    text-align: center;
    margin: 20px 0 16px;
}
.shop-voucher-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e2e8f0;
    z-index: 1;
}
.shop-voucher-divider span {
    position: relative;
    z-index: 2;
    background: #fff;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.shop-voucher-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.shop-voucher-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
    background: #fafafa;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}
.shop-voucher-card:hover {
    border-color: var(--c-primary, #d6248c);
    background: #fff;
    box-shadow: 0 4px 12px rgba(214, 36, 140, 0.08);
    transform: translateY(-1px);
}
.shop-voucher-card.active {
    border-color: var(--c-primary, #d6248c);
    background: #fdf2f8;
}
.shop-voucher-card-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}
.shop-voucher-code-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--c-primary, #d6248c);
    letter-spacing: 0.5px;
}
.shop-voucher-card-sub {
    font-size: 13.5px;
    font-weight: 600;
    color: #1e293b;
}
.shop-voucher-card-extra {
    font-size: 12px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 5px;
    line-height: 1.4;
}
.shop-voucher-card-extra i {
    color: var(--c-primary, #d6248c);
}
.shop-voucher-card-check {
    font-size: 22px;
    color: #cbd5e1;
    transition: color 0.2s ease, transform 0.2s ease;
    margin-left: 12px;
}
.shop-voucher-card.active .shop-voucher-card-check {
    color: #10b981;
    transform: scale(1.1);
}

.shop-voucher-error-msg {
    color: #ef4444;
    font-size: 13px;
    font-weight: 600;
    margin-top: 6px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.shop-voucher-input.is-invalid {
    border-color: #ef4444 !important;
    background-color: #fef2f2;
}
