/* DocSquire Cart */

/* ── Hide footer icon wrap — using nav item instead ── */
#dscart-icon-wrap { display: none !important; }

/* ── Nav item must be position:relative for dropdown ── */
.dscart-nav-item {
    position: relative !important;
}

/* ── Overlay ── */
#dscart-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 99998;
}
#dscart-overlay.dscart-overlay--visible {
    display: block;
}

/* ── Slide-out drawer ── */
#dscart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 360px;
    max-width: 100vw;
    height: 100vh;
    background: #fff;
    box-shadow: -4px 0 24px rgba(0,0,0,0.12);
    z-index: 99999;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(.4,0,.2,1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    overflow: hidden;
}
#dscart-drawer.dscart-drawer--open {
    transform: translateX(0);
}
#dscart-drawer-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* ── Dropdown header ── */
#dscart-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .875rem 1rem .75rem;
    border-bottom: 1px solid #f3f4f6;
}
#dscart-drawer-title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}


#dscart-drawer-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    padding: 4px;
    display: flex;
    align-items: center;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}
#dscart-drawer-close:hover {
    background: #f3f4f6;
    color: #111827;
}
#dscart-drawer-items {
    flex: 1;
    overflow-y: auto;
    padding: .5rem 1rem;
}

/* ── Cart items ── */
.dscart-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
}
.dscart-item:last-child { border-bottom: none; }
.dscart-item-info { flex: 1; min-width: 0; }
.dscart-item-name  { font-size: 13px; font-weight: 500; color: #111827; line-height: 1.4; }
.dscart-item-price { font-size: 12px; color: #6b7280; margin-top: 1px; }
.dscart-remove-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #d1d5db;
    padding: 3px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    border-radius: 4px;
    transition: color 0.15s;
}
.dscart-remove-btn:hover { color: #ef4444; }

/* ── Empty state ── */
.dscart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    text-align: center;
    gap: 10px;
}
.dscart-empty p { font-size: 13px; color: #9ca3af; margin: 0; }

/* ── Footer ── */
#dscart-drawer-footer {
    padding: .75rem 1rem;
    border-top: 1px solid #f3f4f6;
    background: #fafafa;
}
#dscart-drawer-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}
#dscart-checkout-btn {
    display: block;
    width: 100%;
    text-align: center;
    background: #f58220;
    color: #fff !important;
    text-decoration: none !important;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    transition: opacity 0.15s;
    box-sizing: border-box;
}
#dscart-checkout-btn:hover { opacity: 0.9; }

/* ── Mobile ── */
@media (max-width: 480px) {
    #dscart-drawer { width: calc(100vw - 24px); right: 12px; }
    #dscart-popup  { left: 16px; right: 16px; width: auto; bottom: 16px; }
}
