/**
 * Doggos Fast Checkout - Side Cart Only Styles
 *
 * Lightweight CSS loaded on non-checkout/cart pages where only
 * the floating cart button and side cart drawer are needed.
 * Avoids loading the full combined CSS which can conflict with
 * theme styles (product gallery, sliders, etc.).
 *
 * @package Doggos_Fast_Checkout
 * @version 4.1.0
 */

:root {
    --dfc-primary: #2d5016;
    --dfc-primary-hover: #3d6b1e;
    --dfc-accent: #f59e0b;
    --dfc-success: #10b981;
    --dfc-error: #ef4444;
    --dfc-text: #1f2937;
    --dfc-text-light: #6b7280;
    --dfc-border: #e5e7eb;
    --dfc-bg: #f9fafb;
    --dfc-white: #ffffff;
    --dfc-radius: 12px;
    --dfc-shadow: 0 1px 3px rgba(0,0,0,0.1);
    --dfc-shadow-lg: 0 4px 12px rgba(0,0,0,0.1);
}

/* ============================================
   FLOATING CART BUTTON
   ============================================ */
.dfc-cart-trigger {
    position: fixed;
    bottom: 180px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: var(--dfc-primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    z-index: 9990;
    transition: transform 0.3s, background 0.3s;
}

.dfc-cart-trigger:hover {
    transform: scale(1.1);
    background: var(--dfc-primary-hover);
}

.dfc-cart-trigger svg { width: 24px; height: 24px; }

.dfc-cart-trigger-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--dfc-accent);
    color: white;
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

.dfc-cart-trigger-count.dfc-pulse {
    animation: dfcPulse 0.3s ease;
}

@keyframes dfcPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.dfc-cart-trigger-count:empty,
.dfc-cart-trigger-count[data-count="0"] { display: none; }

.woocommerce-cart .dfc-cart-trigger,
.woocommerce-checkout .dfc-cart-trigger { display: none; }

/* ============================================
   SIDE CART OVERLAY & DRAWER
   ============================================ */
.dfc-side-cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 9998;
    will-change: opacity;
}

.dfc-side-cart-overlay.open { opacity: 1; visibility: visible; }

.dfc-side-cart {
    position: fixed;
    top: 0;
    right: 0;
    width: var(--dfc-side-cart-width, 400px);
    max-width: 100vw;
    height: 100%;
    background: var(--dfc-white);
    z-index: 99999;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 30px rgba(0,0,0,0.15);
    overflow: hidden;
    will-change: transform;
    contain: layout style;
}

.dfc-side-cart.position-left {
    left: 0;
    right: auto;
    transform: translateX(-100%);
    box-shadow: 4px 0 30px rgba(0,0,0,0.15);
}

.dfc-side-cart.open { transform: translateX(0); }

/* Side Cart Header */
.dfc-side-cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--dfc-border);
    background: var(--dfc-white);
    flex-shrink: 0;
}

.dfc-side-cart-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--dfc-text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dfc-side-cart-title svg { width: 24px; height: 24px; }

.dfc-cart-count-badge {
    background: var(--dfc-primary);
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
}

.dfc-side-cart-close {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--dfc-bg);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.dfc-side-cart-close:hover { background: var(--dfc-border); }
.dfc-side-cart-close svg { width: 20px; height: 20px; color: var(--dfc-text); }

/* Side Cart Content */
.dfc-side-cart-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.dfc-sc-scrollable {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    contain: layout style;
    content-visibility: auto;
    contain-intrinsic-size: 0 500px;
}

/* Side Cart Footer */
.dfc-side-cart-footer {
    padding: 16px;
    background: var(--dfc-white);
    border-top: 1px solid var(--dfc-border);
    flex-shrink: 0;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.08);
}

/* Shipping Progress */
.dfc-sc-shipping-progress {
    padding: 16px 20px;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-bottom: 1px solid #bbf7d0;
}

.dfc-sc-progress-bar {
    height: 8px;
    background: rgba(255,255,255,0.8);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.dfc-sc-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--dfc-primary), var(--dfc-success));
    border-radius: 4px;
    transition: width 0.4s ease;
    position: relative;
    overflow: hidden;
}

.dfc-sc-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
    animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 200%; }
}

.dfc-sc-progress-text {
    font-size: 13px;
    color: #166534;
    text-align: center;
    font-weight: 500;
}

.dfc-sc-progress-text strong { color: var(--dfc-primary); }
.dfc-sc-free-shipping { text-align: center; font-size: 14px; font-weight: 600; color: #166534; }

/* Cart Items */
.dfc-sc-items { padding: 0; }

.dfc-sc-item {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--dfc-border);
    position: relative;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.dfc-sc-item:last-child { border-bottom: none; }

.dfc-sc-item-image {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--dfc-bg);
}

.dfc-sc-item-image img { width: 100%; height: 100%; object-fit: cover; }

.dfc-sc-item-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dfc-sc-item-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--dfc-text);
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.dfc-sc-item-name a { color: inherit; text-decoration: none; }
.dfc-sc-item-name a:hover { color: var(--dfc-primary); }

.dfc-sc-item-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--dfc-primary);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.dfc-sc-item-price del { color: var(--dfc-text-light); font-weight: 400; font-size: 12px; }

/* Bundle Badges */
.dfc-sc-bundle-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #166534;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 4px;
}

.dfc-sc-bundle-savings { font-size: 11px; color: #15803d; margin-top: 2px; }

/* Quantity Controls */
.dfc-sc-qty-wrap { display: flex; align-items: center; gap: 8px; margin-top: 6px; }

.dfc-sc-qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--dfc-border);
    border-radius: 6px;
    overflow: hidden;
    background: var(--dfc-bg);
}

.dfc-sc-qty button {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--dfc-text);
    transition: background 0.2s, transform 0.1s;
}

.dfc-sc-qty button:hover { background: var(--dfc-border); }
.dfc-sc-qty button:disabled { opacity: 0.4; cursor: not-allowed; }
.dfc-sc-qty button:active { transform: scale(0.9); }

.dfc-sc-qty-value {
    width: 32px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--dfc-text);
    background: var(--dfc-white);
}

.dfc-sc-item-remove {
    background: none;
    border: none;
    color: var(--dfc-text-light);
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
    margin-left: auto;
}

.dfc-sc-item-remove:hover { color: var(--dfc-error); }
.dfc-sc-item-remove svg { width: 16px; height: 16px; }

/* Loading / Updating States */
.dfc-sc-item.loading,
.dfc-side-cart-content.loading {
    opacity: 0.5;
    pointer-events: none;
}

.dfc-sc-item.dfc-updating {
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.2s;
}

/* Empty Cart */
.dfc-sc-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    flex: 1;
}

.dfc-sc-empty-icon { font-size: 64px; margin-bottom: 16px; opacity: 0.5; }
.dfc-sc-empty-text { font-size: 18px; font-weight: 600; color: var(--dfc-text); margin: 0 0 8px; }
.dfc-sc-empty-subtext { font-size: 14px; color: var(--dfc-text-light); margin: 0 0 20px; }

.dfc-sc-shop-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--dfc-primary);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: background 0.2s;
}

.dfc-sc-shop-btn:hover { background: var(--dfc-primary-hover); color: white; }

/* Charity */
.dfc-sc-charity {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-top: 1px solid #fcd34d;
}

.dfc-sc-charity-icon { font-size: 28px; animation: dogWag 1s ease-in-out infinite; }
.dfc-sc-charity-text { flex: 1; font-size: 13px; color: #92400e; }
.dfc-sc-charity-text strong { display: block; font-size: 14px; margin-bottom: 2px; }

@keyframes dogWag {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

/* Coupon */
.dfc-sc-coupon-wrap {
    margin-bottom: 12px;
}

.dfc-sc-coupon-toggle {
    font-size: 13px;
    color: var(--dfc-text-light);
    cursor: pointer;
    padding: 6px 0;
    display: flex;
    align-items: center;
    gap: 4px;
    user-select: none;
}

.dfc-sc-coupon-toggle:hover {
    color: var(--dfc-primary);
}

.dfc-sc-coupon-toggle::marker,
.dfc-sc-coupon-toggle::-webkit-details-marker {
    display: none;
}

.dfc-sc-coupon-toggle::before {
    content: '+';
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--dfc-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.dfc-sc-coupon-wrap[open] .dfc-sc-coupon-toggle::before {
    content: '−';
}

.dfc-sc-coupon-wrap .dfc-sc-coupon {
    margin-top: 8px;
}

.dfc-sc-coupon { display: flex; gap: 8px; margin-bottom: 12px; }

.dfc-sc-coupon input {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid var(--dfc-border);
    border-radius: 6px;
    font-size: 13px;
    text-transform: uppercase;
    min-width: 0;
}

.dfc-sc-coupon input:focus { outline: none; border-color: var(--dfc-primary); }

.dfc-sc-coupon button {
    padding: 8px 12px;
    background: var(--dfc-text);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}

.dfc-sc-coupon-applied {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: #dcfce7;
    border-radius: 6px;
    font-size: 12px;
    color: #166534;
    margin-bottom: 10px;
}

.dfc-sc-coupon-applied button {
    margin-left: auto;
    background: none;
    border: none;
    color: #991b1b;
    cursor: pointer;
    padding: 0;
    font-size: 14px;
}

/* Totals */
.dfc-sc-totals { margin-bottom: 12px; }

.dfc-sc-total-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 13px;
    color: var(--dfc-text-light);
}

.dfc-sc-total-row.grand-total {
    font-size: 16px;
    font-weight: 700;
    color: var(--dfc-text);
    padding-top: 10px;
    margin-top: 6px;
    border-top: 2px solid var(--dfc-border);
}

.dfc-sc-discount { color: var(--dfc-success); }
.dfc-sc-free-ship { color: var(--dfc-success); font-weight: 500; }

/* Footer Buttons */
.dfc-sc-buttons { display: flex; flex-direction: column; gap: 8px; }

.dfc-sc-checkout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    background: var(--dfc-primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s;
}

.dfc-sc-checkout-btn:hover { background: var(--dfc-primary-hover); color: white; }
.dfc-sc-checkout-btn:active { transform: scale(0.98); }
.dfc-sc-checkout-btn .dfc-btn-price { background: rgba(255,255,255,0.2); padding: 3px 8px; border-radius: 5px; font-size: 13px; }

.dfc-sc-cart-link {
    display: block;
    text-align: center;
    padding: 10px;
    color: var(--dfc-text);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid var(--dfc-border);
    border-radius: 8px;
    transition: border-color 0.2s, background 0.2s;
}

.dfc-sc-cart-link:hover { border-color: var(--dfc-primary); background: var(--dfc-bg); color: var(--dfc-text); }

/* ============================================
   TIER PROGRESS TRACKER
   ============================================ */
.dfc-tier-progress {
    padding: 14px 20px 12px;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border-bottom: 1px solid #bbf7d0;
}

.dfc-tier-milestones {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    padding: 0 4px;
}

.dfc-tier-milestone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.dfc-tier-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #d1d5db;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.4s, transform 0.3s;
    flex-shrink: 0;
}

.dfc-tier-milestone.reached .dfc-tier-dot {
    transform: scale(1.1);
}

.dfc-tier-dot svg { stroke: #fff; }

.dfc-tier-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--dfc-text-light);
    white-space: nowrap;
}

.dfc-tier-milestone.reached .dfc-tier-label {
    color: #166534;
}

.dfc-tier-bar {
    height: 6px;
    background: rgba(255,255,255,0.8);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.dfc-tier-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.dfc-tier-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.4) 50%, transparent 100%);
    animation: shimmer 2s ease-in-out infinite;
}

.dfc-tier-text {
    font-size: 12px;
    color: #166534;
    text-align: center;
    line-height: 1.5;
    margin-top: 8px;
}

.dfc-tier-text strong { color: var(--dfc-primary); }

.dfc-tier-incentive {
    font-size: 13px;
    font-weight: 600;
    color: var(--dfc-text);
    text-align: center;
    padding: 8px 20px;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border-bottom: 1px solid #bbf7d0;
}

.dfc-tier-savings-calc {
    font-size: 11px;
    color: #166534;
    text-align: center;
    margin-top: 6px;
    padding: 4px 8px;
    background: rgba(22, 101, 52, 0.08);
    border-radius: 4px;
    font-weight: 500;
    line-height: 1.3;
}

.dfc-tier-celebration {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.dfc-tier-emoji { font-size: 16px; }

.dfc-tier-progress.dfc-tier-celebrate {
    animation: dfcTierFlash 0.6s ease-out;
}

@keyframes dfcTierFlash {
    0% { background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%); }
    30% { background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%); }
    100% { background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%); }
}

.dfc-tier-confetti {
    position: absolute;
    pointer-events: none;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    animation: dfcConfetti 0.8s ease-out forwards;
}

@keyframes dfcConfetti {
    0% { opacity: 1; transform: translate(0, 0) scale(1); }
    100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0); }
}

/* ============================================
   SMART UPSELLS
   ============================================ */
.dfc-upsells {
    padding: 14px 16px;
    border-top: 1px solid var(--dfc-border);
    background: var(--dfc-bg);
}

.dfc-upsells-header { margin-bottom: 10px; }

.dfc-upsells-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--dfc-text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dfc-upsells-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dfc-upsell-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--dfc-white);
    border-radius: 10px;
    border: 1px solid var(--dfc-border);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.dfc-upsell-item:hover {
    border-color: var(--dfc-primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.dfc-upsell-image {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--dfc-bg);
}

.dfc-upsell-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dfc-upsell-info {
    flex: 1;
    min-width: 0;
}

.dfc-upsell-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--dfc-text);
    margin: 0 0 2px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.dfc-upsell-price {
    font-size: 13px;
    font-weight: 700;
    color: var(--dfc-primary);
}

.dfc-upsell-variants {
    display: flex;
    gap: 4px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.dfc-upsell-variant-btn {
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 600;
    border: 1px solid var(--dfc-border);
    border-radius: 4px;
    background: var(--dfc-white);
    color: var(--dfc-text);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    min-height: 24px;
}

.dfc-upsell-variant-btn:hover {
    border-color: var(--dfc-primary);
}

.dfc-upsell-variant-btn.active {
    border-color: var(--dfc-primary);
    background: rgba(45, 80, 22, 0.08);
    color: var(--dfc-primary);
}

.dfc-upsell-add {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border: 2px solid var(--dfc-primary);
    background: transparent;
    color: var(--dfc-primary);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s, transform 0.15s;
}

.dfc-upsell-add:hover {
    background: var(--dfc-primary);
    color: var(--dfc-white);
}

.dfc-upsell-add:active { transform: scale(0.9); }

.dfc-upsell-item.dfc-upsell-adding .dfc-upsell-add {
    pointer-events: none;
    opacity: 0.5;
    animation: btnSpin 0.7s linear infinite;
}

@keyframes btnSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.dfc-upsell-item.dfc-upsell-added {
    border-color: var(--dfc-success);
    background: #f0fdf4;
}

.dfc-upsell-item.dfc-upsell-added .dfc-upsell-add {
    background: var(--dfc-success);
    border-color: var(--dfc-success);
    color: #fff;
}

.dfc-upsell-item.dfc-upsell-removing {
    animation: dfcUpsellSlideOut 0.35s ease forwards;
}

@keyframes dfcUpsellSlideOut {
    0% { opacity: 1; transform: translateX(0); max-height: 100px; }
    50% { opacity: 0; transform: translateX(20px); }
    100% { opacity: 0; transform: translateX(20px); max-height: 0; padding: 0; margin: 0; border: 0; overflow: hidden; }
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.dfc-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10000;
    opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
    max-width: 90%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.dfc-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.dfc-toast-success { background: #166534; color: white; }
.dfc-toast-error { background: var(--dfc-error); color: white; }
.dfc-toast-info { background: var(--dfc-text); color: white; }

/* ============================================
   THEME CONFLICT OVERRIDES
   ============================================ */
.dfc-side-cart .blockUI,
.dfc-side-cart .blockOverlay {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 480px) {
    .dfc-cart-trigger { bottom: 140px; right: 12px; width: 48px; height: 48px; }
    .dfc-cart-trigger svg { width: 20px; height: 20px; }
    .dfc-cart-trigger-count { font-size: 10px; min-width: 18px; height: 18px; }
    .dfc-side-cart { width: 100vw; }
    .dfc-side-cart-header { padding: 12px 14px; }
    .dfc-side-cart-title { font-size: 16px; }
    .dfc-cart-count-badge { font-size: 11px; padding: 2px 6px; }
    .dfc-sc-shipping-progress { padding: 12px 14px; }
    .dfc-sc-progress-text { font-size: 12px; }
    .dfc-sc-item { padding: 12px 14px; gap: 10px; }
    .dfc-sc-item-image { width: 60px; height: 60px; }
    .dfc-sc-item-name { font-size: 12px; }
    .dfc-sc-item-price { font-size: 13px; }
    .dfc-sc-bundle-badge { font-size: 9px; padding: 2px 5px; }
    .dfc-sc-bundle-savings { font-size: 10px; }
    .dfc-side-cart-footer { padding: 12px 14px; }
    .dfc-sc-checkout-btn { padding: 12px 16px; font-size: 14px; }
    .dfc-sc-cart-link { padding: 8px; font-size: 12px; }

    .dfc-tier-progress { padding: 10px 14px 8px; }
    .dfc-tier-dot { width: 20px; height: 20px; font-size: 9px; }
    .dfc-tier-label { font-size: 9px; }
    .dfc-tier-text { font-size: 11px; }

    .dfc-upsells { padding: 10px 14px; }
    .dfc-upsell-image { width: 44px; height: 44px; }
    .dfc-upsell-name { font-size: 11px; }
    .dfc-upsell-price { font-size: 12px; }
    .dfc-upsell-add { width: 32px; height: 32px; min-width: 32px; }
    .dfc-upsell-variant-btn { font-size: 9px; padding: 2px 6px; min-height: 22px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .dfc-tier-bar-fill::after { animation: none; }
    .dfc-sc-progress-fill::after { animation: none; }
    .dfc-tier-progress.dfc-tier-celebrate { animation: none; }
    .dfc-upsell-item.dfc-upsell-adding .dfc-upsell-add { animation: none; }
    .dfc-upsell-item.dfc-upsell-removing { animation: none; display: none; }
    .dfc-sc-charity-icon { animation: none; }
}

/* ============================================
   STICKY ADD TO CART BAR (Mobile Only)
   Styles loaded here in <head> to avoid late
   reflow from inline <style> in footer that
   breaks theme product gallery initialization.
   ============================================ */
.dfc-sticky-atc {
    position: fixed;
    bottom: 60px;
    left: 0;
    right: 0;
    z-index: 9989;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 -1px 8px rgba(0, 0, 0, 0.06);
    padding: 10px 16px;
    transform: translateY(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dfc-sticky-atc.dfc-sticky-atc-hidden {
    transform: translateY(100%);
    pointer-events: none;
}

.dfc-sticky-atc-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
}

.dfc-sticky-atc-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dfc-sticky-atc-name {
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.dfc-sticky-atc-price {
    font-size: 14px;
    font-weight: 700;
    color: #2d5016;
    line-height: 1.3;
}

.dfc-sticky-atc-price del {
    color: #6b7280;
    font-weight: 400;
    font-size: 12px;
}

.dfc-sticky-atc-price ins {
    text-decoration: none;
}

.dfc-sticky-atc-btn {
    flex-shrink: 0;
    padding: 10px 20px;
    background: #2d5016;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, transform 0.1s;
}

.dfc-sticky-atc-btn:active { transform: scale(0.97); }
.dfc-sticky-atc-btn:hover { background: #3d6b1e; }
.dfc-sticky-atc-btn.loading { opacity: 0.7; pointer-events: none; }
.dfc-sticky-atc-btn.added { background: #10b981; }

@media (min-width: 768px) {
    .dfc-sticky-atc { display: none !important; }
}

/* Screen reader only text */
.screen-reader-text {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}
