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

/* Modal */
.draftshop-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;}
.draftshop-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);}
.draftshop-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;}}
.draftshop-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);}
.draftshop-modal-body{padding:24px;text-align:center;overflow-y:auto;flex:1;}
.draftshop-modal-img{width:140px;height:140px;margin:0 auto 18px;border-radius:14px;overflow:hidden;background:#f4f4f5;}
.draftshop-modal-img img{width:100%;height:100%;object-fit:cover;}
#draftshop-modal-title{font-size:1.3rem;font-weight:400;margin:0 0 6px;color:#111;}
#draftshop-modal-price{font-size:1.1rem;color:#71717a;margin:0 0 24px;}

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

/* Buttons */
.draftshop-checkout-btn, .draftshop-add-cart-btn{background:#635bff;color:#fff;border:none;padding:11px 22px;border-radius:8px;font-size:.95rem;font-weight:400;cursor:pointer;}
.draftshop-full-width{width:100%;padding:14px!important;font-size:1.05rem!important;}

/* Checkout bar */
.draftshop-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;}}
.draftshop-checkout-inner{display:flex;align-items:center;justify-content:space-between;}
.draftshop-cart-summary{display:flex;flex-direction:column;cursor:pointer;}
#draftshop-cart-count{font-weight:400;font-size:.9rem;color:#111;}
.draftshop-view-bag-text{font-size:.7rem;font-weight:400;text-transform:uppercase;color:#71717a;letter-spacing:.05em;}

/* Cart modal */
.draftshop-cart-title{font-size:1.3rem;font-weight:400;margin:0 0 18px;}
#draftshop-cart-items{max-height:280px;overflow-y:auto;margin-bottom:16px;text-align:left;}
.draftshop-cart-item{display:flex;align-items:center;justify-content:space-between;padding:12px 0;border-bottom:1px solid #f4f4f5;}
.draftshop-cart-item-img{width:44px;height:44px;object-fit:cover;border-radius:8px;margin-right:12px;background:#f4f4f5;}
.draftshop-cart-item-info{display:flex;flex-direction:column;gap:2px;flex:1;}
.draftshop-cart-item-title{font-size:.9rem;font-weight:400;color:#111;}
.draftshop-cart-item-price{font-size:.82rem;color:#71717a;}
.draftshop-cart-item-actions{display:flex;align-items:center;gap:12px;}
.draftshop-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;}
.draftshop-cart-footer{border-top:1px solid #e4e4e7;padding-top:18px;}
.draftshop-cart-total-row{display:flex;justify-content:space-between;font-size:1.05rem;font-weight:400;margin-bottom:18px;}

/* Payment options */
.draftshop-payment-list{margin-bottom:16px;}
.draftshop-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;}
.draftshop-pay-option:has(input:checked){border-color:#000;background:#f8fafc;}
.draftshop-pay-option input[type=radio]{margin-right:10px;accent-color:#000;}
.draftshop-pay-text{flex:1;font-size:.9rem;font-weight:400;color:#111;}

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

/* ── Page content wrapper — one place to change the site width ─────── */
:root { --ds-page-width: 1200px; --ds-page-padding: 40px; }
.ds-page { max-width: var(--ds-page-width); margin: 0 auto; padding: var(--ds-page-padding); box-sizing: border-box; }
@media (max-width: 700px) { .ds-page { padding: 20px 16px; } }

/* ── Sidebar layout ──────────────────────────────────────────────────── */
.ds-with-sidebar { display: grid; grid-template-columns: 240px 1fr; gap: 32px; align-items: start; padding-top: 32px; padding-bottom: 40px; }
@media (max-width: 860px) { .ds-with-sidebar { grid-template-columns: 1fr; } }

.ds-client-sidebar { position: sticky; top: 80px; }
.ds-sidebar-form { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 20px; }
.ds-sidebar-section { margin-bottom: 24px; }
.ds-sidebar-title { font-size: 0.75rem; font-weight: 400; letter-spacing: .08em; text-transform: uppercase; color: #94a3b8; margin: 0 0 14px; }

/* Price slider */
.ds-price-track { position: relative; height: 4px; background: #e2e8f0; border-radius: 99px; margin: 20px 0 24px; }
.ds-price-range-fill { position: absolute; height: 100%; background: #111; border-radius: 99px; pointer-events: none; }
.ds-range { position: absolute; top: 50%; transform: translateY(-50%); width: 100%; height: 4px; background: none; outline: none; border: none; pointer-events: none; -webkit-appearance: none; appearance: none; }
.ds-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid #111; cursor: pointer; pointer-events: all; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.ds-range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid #111; cursor: pointer; pointer-events: all; box-shadow: 0 1px 4px rgba(0,0,0,.15); }

.ds-price-inputs { display: flex; align-items: center; gap: 8px; }
.ds-price-input-wrap { display: flex; align-items: center; gap: 4px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 6px 10px; flex: 1; }
.ds-price-input-wrap span { font-size: 0.8rem; color: #94a3b8; }
.ds-price-input-wrap input { border: none; background: none; outline: none; width: 100%; font-size: 0.875rem; font-family: inherit; color: #111; }
.ds-price-sep { color: #94a3b8; font-size: 0.875rem; flex-shrink: 0; }

.ds-sidebar-apply { width: 100%; padding: 10px; background: #111; color: #fff; border: none; border-radius: 8px; font-size: 0.875rem; font-weight: 400; font-family: inherit; cursor: pointer; }


/* ── Sort Bar ─────────────────────────────────────────────────────────── */
.ds-sort-bar { width: 100%; background: #fff; border-bottom: 1px solid #e2e8f0; }
.draftshop-scheme-dark .ds-sort-bar { background: #111; border-bottom-color: rgba(255,255,255,0.1); }

.ds-sort-form { max-width: var(--ds-page-width); margin: 0 auto; padding: 10px var(--ds-page-padding, 40px); box-sizing: border-box; }
.ds-sort-bar-inner { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }

.ds-type-pills { display: flex; align-items: center; gap: 4px; }
.ds-type-pill { display: inline-flex; align-items: center; padding: 6px 16px; border-radius: 8px; border: 1px solid #e2e8f0; background: #f8fafc; color: #64748b; font-size: 0.82rem; cursor: pointer; transition: background 0.15s, color 0.15s, border-color 0.15s; user-select: none; }
.ds-type-pill input[type=radio] { display: none; }
.ds-type-pill--active, .ds-type-pill:has(input:checked) { background: #ff7520; color: #fff; border-color: #ff7520; }
.draftshop-scheme-dark .ds-type-pill { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.12); color: #94a3b8; }
.draftshop-scheme-dark .ds-type-pill--active,
.draftshop-scheme-dark .ds-type-pill:has(input:checked) { background: #fff; color: #111; border-color: #fff; }

.ds-sort-sep { width: 1px; height: 22px; background: #e2e8f0; flex-shrink: 0; }
.draftshop-scheme-dark .ds-sort-sep { background: rgba(255,255,255,0.12); }

.ds-sort-wrap { position: relative; display: inline-flex; align-items: center; }
.ds-sort-select { appearance: none; -webkit-appearance: none; border: 1px solid #e2e8f0; border-radius: 99px; background: #f8fafc; color: #111; font-size: 0.82rem; font-weight: 400; font-family: inherit; padding: 7px 36px 7px 14px; cursor: pointer; outline: none; }
.draftshop-scheme-dark .ds-sort-select { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.15); color: #fff; }
.ds-sort-chevron { position: absolute; right: 12px; pointer-events: none; color: #64748b; }
.draftshop-scheme-dark .ds-sort-chevron { color: #94a3b8; }

@media (max-width: 700px) {
    .ds-sort-form { padding: 10px 16px; }
    .ds-type-pills { gap: 3px; }
    .ds-type-pill { padding: 5px 12px; font-size: 0.78rem; }
}

/* ── Shop Grid ────────────────────────────────────────────────────────── */
.draftshop-shop-container { padding: 40px 0; }
.draftshop-shop-grid { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr);
    gap: 32px; 
}
.draftshop-shop-item { background: transparent; border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; height: 100%; }
.draftshop-shop-link { text-decoration: none !important; display: flex; flex-direction: column; flex: 1; color: inherit; height: 100%; }
.draftshop-shop-img { width: 100% !important; aspect-ratio: 1 / 1 !important; overflow: hidden !important; border-radius: 16px; background: #f4f4f5; margin-bottom: 16px; flex-shrink: 0; display: block !important; position: relative !important; }
.draftshop-shop-img img { width: 100% !important; height: 100% !important; max-width: 100% !important; max-height: 100% !important; object-fit: cover !important; object-position: center !important; display: block !important; position: absolute !important; top: 0 !important; left: 0 !important; }
.draftshop-shop-no-img { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #a1a1aa; font-weight: 400; }
.draftshop-shop-info { text-align: left; padding: 0 4px; display: flex; flex-direction: column; flex: 1; }
.draftshop-shop-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 24px; flex-grow: 1; }
.draftshop-shop-title { flex: 1; font-size: 1.15rem; font-weight: 400; margin: 0; line-height: 1.3; }
.draftshop-shop-price { flex-shrink: 0; font-size: 1.05rem; font-weight: 400; margin: 0; text-align: right; color: var(--accent, #b8935a); }
.draftshop-shop-seller { font-size: 0.8rem; color: #94a3b8; margin-top: 4px; display: block; }
.draftshop-search-card-seller { display: block; font-size: 0.78rem; color: #94a3b8; text-decoration: none; padding: 6px 0 2px; font-weight: 400; }

.draftshop-shop-price small { font-weight: 400; opacity: 0.8; margin-left: 2px; }

/* Buttons Shared */
.draftshop-shop-btn, .draftshop-btn-buy { 
    display: inline-flex !important; align-items:center; justify-content: center; gap:8px; 
    background: #635bff; color: var(--ds-btn-text, #fff);
    padding: 13px 24px !important; border-radius: 10px !important; 
    font-size: 0.95rem !important; font-weight: 400 !important; 
    text-decoration:none !important; cursor:pointer; border: none !important;
}
.draftshop-shop-btn { background: #f4f4f5 !important; color: #71717a !important; }
.draftshop-scheme-dark .draftshop-shop-btn { background: rgba(255,255,255,0.1) !important; color: #fff !important; }


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

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

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

/* WP Admin Bar Fix */
#wpadminbar { z-index: 999999 !important; }
.admin-bar .draftshop-shop-container { margin-top: 32px !important; }
.admin-bar header, .admin-bar .site-header, .admin-bar #masthead {
    top: 32px !important;
}
@media screen and (max-width: 782px) {
    .admin-bar .draftshop-shop-container { margin-top: 46px !important; }
    .admin-bar header, .admin-bar .site-header, .admin-bar #masthead {
        top: 46px !important;
    }
}

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

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

@media (max-width: 480px) {
    .draftshop-cart-summary { display: none !important; }
    .draftshop-checkout-btn, .draftshop-add-cart-btn { width: 100% !important; border-radius: 12px !important; padding: 10px 16px !important; }
}

/* Favorites Button */
.ds-fav-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: #a1a1aa;
    padding: 0;
}

.ds-fav-btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.2s;
}
.ds-fav-btn.is-fav {
    background: #fff;
    color: #f43f5e;
    border-color: rgba(244, 63, 94, 0.2);
}
.ds-fav-btn.is-fav svg {
    fill: currentColor;
    transform: scale(1.05);
}
.ds-fav-btn:active {
    transform: scale(0.95);
}
