/* ===== Smart Side Cart Styles ===== */

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

/* Overlay */
.ssc-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 99998;
    transition: opacity 0.3s ease;
}
.ssc-overlay.ssc-visible { display: block; }
/* Woo default remove icon hide - only WooCommerce native anchor remove links */
a.remove::before,
a.remove::after {
    display: none !important;
    content: none !important;
}

/* Button styling - clear pseudo so SVG renders */
.ssc-remove-btn {
    font-size: 0 !important;
    position: relative;
    line-height: 0;
}
.ssc-remove-btn::before,
.ssc-remove-btn::after {
    display: none !important;
    content: none !important;
}

/* Drawer */
.ssc-drawer {
    position: fixed !important;
    top: 0 !important;
    right: -100% !important;
    width: 400px !important;
    max-width: 100vw !important;
    height: 100% !important;
    background: #fff !important;
    z-index: 999999 !important;
    display: flex !important;
    flex-direction: column !important;
    transition: right 0.32s cubic-bezier(0.4,0,0.2,1) !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    box-shadow: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateX(100%);
}
.ssc-drawer.ssc-open {
    right: 0 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    box-shadow: -4px 0 24px rgba(0,0,0,0.15) !important;
    transform: translateX(0);
}
@media (max-width: 480px) {
    .ssc-drawer { width: 100vw !important; }
}

/* Header */
.ssc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid #eee;
    background: #fff;
}
.ssc-header-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.5px;
    color: #111;
}
.ssc-cart-icon { font-size: 18px; }
.ssc-close-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #555;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}
.ssc-close-btn:hover { background: #f5f5f5; }

/* COD Banner */
.ssc-cod-banner {
    background: #111;
    color: #fff;
    text-align: center;
    padding: 10px 16px;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* Progress Section */
.ssc-progress-section {
    padding: 0px 16px 1px !important;
    border-bottom: 1px solid #f0f0f0;
    background: #fafafa;
}
.ssc-progress-msg {
    text-align: center;
    font-size: 13px;
    color: #228B22;
    margin: 0 0 14px;
    font-weight: 500;
}
.ssc-bar-wrap { position: relative; padding: 0 0 38px; }
.ssc-bar-track {
    height: 6px;
    background: #ddd;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    margin: 0;
    width: 100%;
}
.ssc-progress-section {
    overflow: visible;
}

.ssc-bar-wrap {
    width: 100%;
    overflow: visible;
}





#ssc-bar-fill {
    max-width: 100% !important;
}
.ssc-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #2e7d32);
    border-radius: 10px;
    width: 0%;
    transition: width 0.4s ease;
    max-width: 100%;
}
.ssc-milestones-icons {
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    width: 100%;
    box-sizing: border-box;
}
.ssc-milestone {
    position: absolute;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 999;
}
/* Last milestone: shift left so badge + label stay inside the track */
.ssc-milestone#ssc-m3 {
    transform: translateX(-80%);
}
.ssc-drawer {
    max-width: 100%;
    overflow-x: hidden !important;
}

.ssc-cart-content,
.ssc-milestone-wrapper {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
.ssc-milestone {
    width: auto;
    max-width: none;
    box-sizing: border-box;
}
.ssc-milestone-badge {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #ddd;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    border: 2px solid #ccc;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}
.ssc-milestone.active .ssc-milestone-badge {
    background: #4CAF50;
    border-color: #4CAF50;
    color: #fff;
}
.ssc-milestone-label {
    font-size: 11px;
    color: #aaa;
    margin-top: 4px;
    font-weight: 600;
    white-space: nowrap;
}
.ssc-milestone.active .ssc-milestone-label { color: #4CAF50; }
.ssc-milestone-text {
    font-size: 11px;
    color: #777;
    white-space: nowrap;
    margin-top: 1px;
}
.ssc-milestone.active .ssc-milestone-text { color: #2e7d32; font-weight: 600; }

/* Items area */
.ssc-items-wrap {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}
.ssc-items-wrap::-webkit-scrollbar { width: 4px; }
.ssc-items-wrap::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }

/* Empty state */
.ssc-empty {
    text-align: center;
    padding: 48px 24px;
    color: #aaa;
}
.ssc-empty span { font-size: 48px; }
.ssc-empty p { margin-top: 12px; font-size: 15px; }

/* Cart item */
.ssc-cart-item {
    display: flex;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid #f5f5f5;
    align-items: flex-start;
    transition: background 0.2s;
}
.ssc-cart-item:hover { background: #fafafa; }
.ssc-item-image {
    width: 72px;
    height: 72px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #eee;
    flex-shrink: 0;
}
.ssc-item-details { flex: 1; min-width: 0; }
.ssc-item-name {
    font-size: 13px;
    font-weight: 500;
    color: #222;
    margin: 0 0 4px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ssc-item-price {
    font-size: 14px;
    font-weight: 700;
    color: #111;
    margin: 0 0 8px;
}
.ssc-item-price .ssc-regular { text-decoration: line-through; color: #aaa; font-size: 12px; font-weight: 400; margin-left: 4px; }
.ssc-qty-row {
    display: flex;
    align-items: center;
    gap: 6px;
}
.ssc-remove-btn {
    background: white;
    border: 1px solid #ddd;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    transition: all 0.2s;
    flex-shrink: 0;
}
.ssc-remove-btn svg {
    display: block !important;
    pointer-events: none;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}


.ssc-remove-btn:hover { border-color: #e74c3c; color: #e74c3c; }
.ssc-qty-ctrl {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}
.ssc-qty-btn {
    background: #f5f5f5;
    border: none;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    color: #555;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ssc-qty-btn:hover { background: #e8e8e8; }
.ssc-qty-num {
    width: 32px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    background: #fff;
    border: none;
    padding: 0;
}

/* Coupon section */
.ssc-coupon-section {
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}
.ssc-coupon-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 18px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #2e7d32;
    transition: background 0.2s;
}
.ssc-coupon-toggle:hover { background: #f9fff9; }
.ssc-coupon-arrow {
    font-size: 20px;
    transition: transform 0.3s;
    color: #666;
}
.ssc-coupon-panel { padding: 0 18px 14px; background: #fafafa; }
.ssc-coupon-card {
    background: #fff;
    border: 1.5px dashed #4CAF50;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.ssc-coupon-card.ssc-coupon-unavailable {
    border-color: #ddd;
    opacity: 0.65;
}
.ssc-coupon-info { flex: 1; }
.ssc-coupon-code {
    font-size: 14px;
    font-weight: 700;
    color: #111;
    letter-spacing: 0.5px;
}
.ssc-coupon-desc { font-size: 12px; color: #555; margin-top: 2px; }
.ssc-coupon-save { font-size: 12px; color: #2e7d32; font-weight: 600; margin-top: 3px; }
.ssc-coupon-apply-btn {
    background: #fff;
    color: #4CAF50;
    border: 1.5px solid #4CAF50;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.ssc-coupon-apply-btn:hover { background: #4CAF50; color: #fff; }
.ssc-coupon-apply-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.ssc-coupon-input-wrap {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}
.ssc-coupon-input-wrap input {
    flex: 1;
    padding: 9px 12px;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    transition: border 0.2s;
}
.ssc-coupon-input-wrap input:focus { border-color: #4CAF50; }
.ssc-coupon-input-wrap button {
    background: #111;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.ssc-coupon-input-wrap button:hover { background: #333; }
.ssc-coupon-msg {
    margin-top: 8px;
    font-size: 13px;
    min-height: 18px;
    line-height: 1.4;
}

/* Discount bar */
.ssc-discount-bar {
    padding: 10px 18px;
    background: #f0fff0;
    font-size: 13px;
    color: #2e7d32;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Footer */
.ssc-footer {
    padding: 14px 18px 18px;
    border-top: 1px solid #eee;
    background: #fff;
}
.ssc-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.ssc-total-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #555;
    font-weight: 500;
}
.ssc-total-icon { font-size: 16px; }
.ssc-total-amount { text-align: right; }
.ssc-total-amount span#ssc-grand-total {
    font-size: 18px;
    font-weight: 800;
    color: #111;
    display: block;
}
.ssc-saved {
    font-size: 12px;
    color: #2e7d32;
    font-weight: 600;
    display: block;
    margin-top: 2px;
}
/* Checkout button — mirrors WooCommerce default cart page .checkout-button.
   Razorpay Magic Checkout intercepts .checkout-button clicks automatically.
   Extra specificity ensures button is never hidden inside the drawer. */
.ssc-checkout-btn,
a.ssc-checkout-btn.checkout-button {
    display: block !important;
    width: 100% !important;
    background: #111;
    color: #fff !important;
    text-align: center;
    padding: 15px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none !important;
    letter-spacing: 0.5px;
    cursor: pointer !important;
    pointer-events: auto !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative;
    z-index: 10;
    transition: background 0.2s, transform 0.1s;
    box-sizing: border-box;
}
.ssc-checkout-btn:hover,
a.ssc-checkout-btn.checkout-button:hover { background: #333; transform: translateY(-1px); color: #fff !important; }
.ssc-checkout-btn:active,
a.ssc-checkout-btn.checkout-button:active { transform: translateY(0); }

/* Open Cart button (shortcode) */
.ssc-open-btn {
    background: #111;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.ssc-open-btn:hover { background: #333; }

/* Loading spinner */
.ssc-loading {
    text-align: center;
    padding: 24px;
    color: #aaa;
    font-size: 13px;
}

/* Responsive — mobile full width, still uses transform so no peek */
@media (max-width: 480px) {
    .ssc-drawer { width: 100vw; }
}

/* ═══════════════════════════════════════════════════════════
   Shortcode Float Button  [smart_side_cart]
   ═══════════════════════════════════════════════════════════ */

.ssc-float-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 10px 18px 10px 14px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    transition: background 0.2s, transform 0.15s;
    letter-spacing: 0.2px;
    white-space: nowrap;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    vertical-align: middle;
}
.ssc-float-btn:hover { background: #333; transform: translateY(-1px); }
.ssc-float-btn:active { transform: translateY(0); }

.ssc-fb-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.ssc-fb-icon svg { display: block; }

.ssc-fb-total {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    line-height: 1;
}

.ssc-fb-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #111;
    font-size: 12px;
    font-weight: 700;
    border-radius: 50px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    line-height: 1;
}

.ssc-float-btn[data-empty="true"] .ssc-fb-count {
    background: rgba(255,255,255,0.3);
    color: #fff;
}

/* ===== Razorpay Magic Checkout — Side Cart Button Fix =====
   Razorpay globally hides .checkout-button with display:none !important
   (see rzp-cart-checkout-btn.php template).
   Side cart ke andar yeh hide na ho isliye override karte hain.
   #btn-1cc bhi proper styling mile.
========================================================== */
.ssc-footer .wc-proceed-to-checkout,
.ssc-footer .wc-proceed-to-checkout a.checkout-button,
.ssc-footer .wc-proceed-to-checkout #btn-1cc,
.ssc-footer .wc-proceed-to-checkout button#btn-1cc {
    display: block !important;
    width: 100% !important;
    background: #111 !important;
    color: #fff !important;
    text-align: center !important;
    padding: 15px !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    letter-spacing: 0.5px !important;
    cursor: pointer !important;
    border: none !important;
    box-sizing: border-box !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}
.ssc-footer .wc-proceed-to-checkout a.checkout-button:hover,
.ssc-footer .wc-proceed-to-checkout #btn-1cc:hover {
    background: #333 !important;
    color: #fff !important;
}
.ssc-proceed-checkout-wrap {
    margin: 0;
    padding: 0;
}
