/* ── DraftShop Checkout UI ─────────────────────────────────────────────── */

/* Modal */
.ds-modal{position:fixed;top:0;left:0;width:100%;height:100%;z-index:9000;display:flex;align-items:center;justify-content:center;padding:20px;box-sizing:border-box;}
.ds-modal-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.4);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);}
.ds-modal-content{position:relative;background:#fff;width:100%;max-width:420px;border-radius:28px;box-shadow:0 25px 60px rgba(0,0,0,.2);animation:dsModalPop .3s cubic-bezier(.34,1.56,.64,1);max-height:90vh;display:flex;flex-direction:column;}
@keyframes dsModalPop{from{transform:scale(.9);opacity:0;}to{transform:scale(1);opacity:1;}}
.ds-modal-close{position:absolute;top:14px;right:14px;width:32px;height:32px;border-radius:50%;background:#fff;border:1px solid #eee;font-size:20px;cursor:pointer;display:flex;align-items:center;justify-content:center;z-index:10;box-shadow:0 2px 8px rgba(0,0,0,.1);}
.ds-modal-body{padding:24px;text-align:center;overflow-y:auto;flex:1;}
.ds-modal-img{width:140px;height:140px;margin:0 auto 18px;border-radius:14px;overflow:hidden;background:#f4f4f5;}
.ds-modal-img img{width:100%;height:100%;object-fit:cover;}
#ds-modal-title{font-size:1.3rem;font-weight:700;margin:0 0 6px;color:#111;}
#ds-modal-price{font-size:1.1rem;color:#71717a;margin:0 0 24px;}

/* Qty */
.ds-modal-section{margin-bottom:20px;text-align:center;}
.ds-modal-section label{display:block;font-size:.85rem;font-weight:600;color:#71717a;margin-bottom:8px;}
.ds-qty-selector{display:inline-flex;align-items:center;background:#fff;border:1px solid #e4e4e7;border-radius:8px;overflow:hidden;}
.ds-qty-btn{width:32px;height:32px;border:none;background:transparent;cursor:pointer;font-size:18px;font-weight:700;color:#71717a;display:flex;align-items:center;justify-content:center;}
.ds-qty-input{width:36px;border:none;text-align:center;font-size:15px;padding:0;-moz-appearance:textfield;}
.ds-qty-input::-webkit-outer-spin-button,.ds-qty-input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}

/* Buttons */
.ds-checkout-btn{background:#000;color:#fff;border:none;padding:11px 22px;border-radius:8px;font-size:.95rem;font-weight:700;cursor:pointer;transition:background .15s;}
.ds-checkout-btn:hover{background:#222;}
.ds-full-width{width:100%;padding:14px!important;font-size:1.05rem!important;}

/* Checkout bar */
.ds-checkout-bar{position:fixed;bottom:20px;left:50%;transform:translateX(-50%);width:90%;max-width:440px;background:rgba(255,255,255,.9);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);border:1px solid rgba(228,228,231,.6);border-radius:20px;padding:12px 20px;box-shadow:0 15px 40px rgba(0,0,0,.15);z-index:8000;animation:dsSlideUp .4s cubic-bezier(.16,1,.3,1);}
@keyframes dsSlideUp{from{transform:translate(-50%,100%);opacity:0;}to{transform:translate(-50%,0);opacity:1;}}
.ds-checkout-inner{display:flex;align-items:center;justify-content:space-between;}
.ds-cart-summary{display:flex;flex-direction:column;cursor:pointer;}
#ds-cart-count{font-weight:600;font-size:.9rem;color:#111;}
.ds-view-bag-text{font-size:.7rem;font-weight:700;text-transform:uppercase;color:#71717a;letter-spacing:.05em;}

/* Cart modal */
.ds-cart-title{font-size:1.3rem;font-weight:700;margin:0 0 18px;}
#ds-cart-items{max-height:280px;overflow-y:auto;margin-bottom:16px;text-align:left;}
.ds-cart-item{display:flex;align-items:center;justify-content:space-between;padding:12px 0;border-bottom:1px solid #f4f4f5;}
.ds-cart-item-img{width:44px;height:44px;object-fit:cover;border-radius:8px;margin-right:12px;background:#f4f4f5;}
.ds-cart-item-info{display:flex;flex-direction:column;gap:2px;flex:1;}
.ds-cart-item-title{font-size:.9rem;font-weight:600;color:#111;}
.ds-cart-item-price{font-size:.82rem;color:#71717a;}
.ds-cart-item-actions{display:flex;align-items:center;gap:12px;}
.ds-cart-remove{width:24px;height:24px;background:#f4f4f5;border:none;color:#71717a;border-radius:50%;font-size:18px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .15s;}
.ds-cart-remove:hover{background:#fee2e2;color:#ef4444;}
.ds-cart-footer{border-top:1px solid #e4e4e7;padding-top:18px;}
.ds-cart-total-row{display:flex;justify-content:space-between;font-size:1.05rem;font-weight:700;margin-bottom:18px;}

/* Payment options */
.ds-payment-list{margin-bottom:16px;}
.ds-pay-option{display:flex;align-items:center;justify-content:space-between;padding:13px 16px;background:#fff;border:1px solid #e4e4e7;border-radius:12px;margin-bottom:10px;cursor:pointer;transition:border-color .15s;}
.ds-pay-option:hover{border-color:#000;}
.ds-pay-option:has(input:checked){border-color:#000;background:#f8fafc;}
.ds-pay-option input[type=radio]{margin-right:10px;accent-color:#000;}
.ds-pay-text{flex:1;font-size:.9rem;font-weight:600;color:#111;}

/* Shipping selector */
.ds-ship-box{margin-top:16px;padding:14px;background:#f9f9f9;border-radius:10px;}
.ds-ship-box label{display:block;font-size:.75rem;font-weight:700;color:#71717a;margin-bottom:8px;text-transform:uppercase;}
.ds-ship-box select{width:100%;padding:8px 10px;border-radius:8px;border:1px solid #ddd;}

/* ── Shop Grid ────────────────────────────────────────────────────────── */
.ds-shop-container { padding: 40px 0; }
.ds-shop-grid { 
    display: grid; 
    grid-template-columns: repeat(var(--ds-shop-cols, 3), 1fr); 
    gap: 32px; 
}
.ds-shop-item { background: transparent; border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; }
.ds-shop-link { text-decoration: none !important; display: flex; flex-direction: column; flex: 1; color: inherit; }
.ds-shop-link:hover { text-decoration: none !important; }
.ds-shop-img { width: 100%; aspect-ratio: 1; overflow: hidden; border-radius: 16px; background: #f4f4f5; margin-bottom: 16px; flex-shrink: 0; }
.ds-shop-img img { width: 100%; height: 100%; object-fit: cover; }
.ds-shop-no-img { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #a1a1aa; font-weight: 600; }
.ds-shop-info { text-align: left; padding: 0 4px; display: flex; flex-direction: column; flex: 1; justify-content: space-between; }
.ds-shop-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 24px; }
.ds-shop-title { flex: 1; font-size: 1.15rem; font-weight: 700; margin: 0; line-height: 1.3; }
.ds-shop-price { flex-shrink: 0; font-size: 1rem; font-weight: 600; margin: 0; text-align: right; }
.ds-shop-price small { font-weight: 400; opacity: 0.8; margin-left: 2px; }

/* Buttons Shared */
.ds-shop-btn, .ds-btn-buy { 
    display: inline-flex !important; align-items:center; justify-content: center; gap:8px; 
    padding: 12px 24px !important; border-radius: 10px !important; 
    font-size: 0.95rem !important; font-weight: 700 !important; 
    text-decoration:none !important; cursor:pointer;
}


/* Page background only — separate class so no color/variable inheritance hits the header */
body.ds-bg-dark  { background: #000 !important; }
body.ds-bg-light { background: #fff !important; }

/* Scheme Support - Scoped internals */
.ds-scheme-dark { background: #000; color: #fff; --text: #fff; --text-2: #ccc; --accent: #b8935a; --border: rgba(255,255,255,0.12); }
.ds-scheme-light { background: #fff; color: #111; --text: #111; --text-2: #71717a; --accent: #b8935a; --border: rgba(0,0,0,0.1); }

.ds-scheme-dark .ds-shop-title, .ds-scheme-dark .ds-hero-title, .ds-scheme-dark .ds-section-title, .ds-scheme-dark .ds-faq-q { color: #fff !important; }
.ds-scheme-dark .ds-shop-price, .ds-scheme-dark .ds-hero-price { color: #ccc !important; }
.ds-scheme-dark .ds-hero-desc, .ds-scheme-dark .ds-bullets li, .ds-scheme-dark .ds-faq-a-inner p { color: #bbb !important; }
.ds-scheme-dark .ds-shop-btn, .ds-scheme-dark .ds-btn-buy { background: #fff !important; color: #000 !important; border: 1px solid #000 !important; }
.ds-scheme-light .ds-shop-title, .ds-scheme-light .ds-hero-title, .ds-scheme-light .ds-section-title, .ds-scheme-light .ds-faq-q { color: #111 !important; }
.ds-scheme-light .ds-shop-price, .ds-scheme-light .ds-hero-price { color: #71717a !important; }
.ds-scheme-light .ds-hero-desc, .ds-scheme-light .ds-bullets li, .ds-scheme-light .ds-faq-a-inner p { color: #444 !important; }
.ds-scheme-light .ds-shop-btn, .ds-scheme-light .ds-btn-buy { background: #000 !important; color: #fff !important; border: none !important; }

/* WP Admin Bar Fix */
#wpadminbar { z-index: 999999 !important; }
.admin-bar .ds-shop-container { margin-top: 32px !important; }
.admin-bar main.ds-scheme-dark, .admin-bar main.ds-scheme-light {
    padding-top: calc(var(--header-h, 160px) + 32px) !important;
}
.admin-bar header, .admin-bar .site-header, .admin-bar #masthead {
    top: 32px !important;
}
@media screen and (max-width: 782px) {
    .admin-bar .ds-shop-container { margin-top: 46px !important; }
    .admin-bar main.ds-scheme-dark, .admin-bar main.ds-scheme-light {
        padding-top: calc(var(--header-h, 160px) + 46px) !important;
    }
    .admin-bar header, .admin-bar .site-header, .admin-bar #masthead {
        top: 46px !important;
    }
}

/* Long Description / Explanatory Text */
.ds-long-desc { font-size: 1rem; line-height: 1.8; margin-bottom: 40px; }
.ds-long-desc p { margin-bottom: 20px; }

@media (max-width: 640px) {
    .ds-shop-grid { grid-template-columns: repeat(var(--ds-shop-cols-mobile, 1), 1fr) !important; gap: 24px; }
}
