/* Toplu Sipariş Pro v11.1 */

.ts {
    all: unset;
    display: block;
    margin: 0 auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    box-sizing: border-box;
}
.ts *, .ts *:before, .ts *:after { box-sizing: border-box; }

/* Head */
.ts-head { text-align: center; margin-bottom: 30px; }
.ts-head h1 { all: unset; display: block; font-size: 26px; font-weight: 700; color: #111; }

/* Filters */
.ts-filters {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}
.ts-filter {
    all: unset;
    padding: 9px 18px;
    background: #f5f5f5;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    transition: all 0.2s;
}
.ts-filter:hover { background: #eee; color: #111; }
.ts-filter.active { background: #111; color: #fff; }

/* ── Grid ── */
.ts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

/* ── Card ── */
.ts-card {
    all: unset;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0,0,0,0.07);
    cursor: pointer;
    transition: all 0.25s;
}
.ts-card:hover { transform: translateY(-3px); box-shadow: 0 8px 28px rgba(0,0,0,0.1); }
.ts-card.hide { display: none; }

/* Görsel — aspect-ratio yerine padding-bottom trick, tam sığacak */
.ts-img {
    position: relative;
    width: 100%;
    background: #f9f9f9;
    overflow: hidden;
}
.ts-img img,
.ts-img img.wp-post-image,
.ts-img .attachment-woocommerce_thumbnail,
.ts-img .size-woocommerce_thumbnail {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-height: 280px !important;
    object-fit: contain !important;
    padding: 12px !important;
    background: #f9f9f9 !important;
}

/* Badges */
.ts-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #1e3a5f;
    color: #fff;
    padding: 4px 9px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.ts-discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #b91c1c;
    color: #fff;
    padding: 4px 9px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.3px;
}
.ts-stock-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #6b7280;
    color: #fff;
    padding: 4px 9px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.ts-card.out-of-stock { opacity: 0.7; }
.ts-card.out-of-stock .ts-btn { background: #9ca3af; }
.ts-card.out-of-stock:hover .ts-btn { background: #9ca3af; }

.ts-body { padding: 14px 14px 8px; flex: 1; }
.ts-body h3 {
    all: unset;
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #111;
    margin-bottom: 8px;
    line-height: 1.4;
}

/* Info line */
.ts-info-line { margin-bottom: 8px; }
.ts-qty-range, .ts-item-count {
    display: inline-block;
    font-size: 11px;
    color: #666;
    background: #f3f4f6;
    padding: 3px 10px;
    border-radius: 20px;
}

/* Prices */
.ts-price-range { font-size: 14px; font-weight: 600; color: #111; margin-bottom: 6px; }
.ts-price-range .ts-sep { color: #ccc; margin: 0 4px; }
.ts-price-single { font-size: 17px; font-weight: 700; color: #111; margin-bottom: 6px; }
.ts-price-sale { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.ts-price-sale del { font-size: 12px; color: #aaa; }
.ts-price-sale strong { font-size: 17px; font-weight: 700; color: #111; }

.ts-adv {
    background: #f0fdf4;
    color: #15803d;
    padding: 4px 9px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.ts-btn {
    all: unset;
    display: block;
    margin: 8px 14px 14px;
    padding: 11px;
    background: #111;
    color: #fff;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    transition: background 0.2s;
}
.ts-card:hover .ts-btn { background: #333; }

/* ── Back link ── */
.ts-back {
    all: unset;
    display: inline-block;
    padding: 7px 18px;
    background: #f3f4f6;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    border-radius: 6px;
    margin-bottom: 24px;
    transition: background 0.2s;
}
.ts-back:hover { background: #e5e7eb; color: #111; }

/* ── Detail layout ── */
.ts-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

/* Detail image — galeri wrapper */
.ts-detail-img { position: relative; }

/* Öne çıkarılan görsel tam sığacak */
.ts-main-img {
    width: 100%;
    border-radius: 10px;
    display: block;
    object-fit: contain;
    background: #f9f9f9;
    padding: 10px;
    max-height: 420px;
}

/* Galeri thumbnails */
.ts-gallery-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
.ts-gallery-thumb {
    width: calc(25% - 6px);
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    background: #f9f9f9;
    transition: border-color 0.2s;
    flex-shrink: 0;
}
.ts-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
    display: block;
}
.ts-gallery-thumb.active { border-color: #1e3a5f; }
.ts-gallery-thumb:hover { border-color: #aab; }

.ts-out-of-stock-badge {
    position: absolute;
    top: 12px; right: 12px;
    background: #6b7280;
    color: #fff;
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 700;
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.ts-out-of-stock-notice {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    padding: 11px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 18px;
}
.ts-add.out-of-stock { background: #9ca3af !important; cursor: not-allowed; }

@media (min-width: 769px) {
    .ts-detail-img { position: sticky; top: 160px; }
}

.ts-detail-info h1 {
    all: unset;
    display: block;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 14px;
    color: #111;
    line-height: 1.3;
}
.ts-detail-info p, .ts-detail-info li { color: #333; line-height: 1.6; }

.ts-desc {
    all: unset;
    display: block;
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 18px;
}
.ts-adv-big {
    background: #f0fdf4;
    color: #15803d;
    padding: 11px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 18px;
}

/* Variations */
.ts-vars { margin-bottom: 18px; }
.ts-var { margin-bottom: 12px; }
.ts-var label { display: block; font-size: 12px; font-weight: 600; color: #555; margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.3px; }
.ts-var select {
    all: unset;
    display: block;
    width: 100%;
    padding: 10px 12px;
    background: #f8f8f8;
    border: 1.5px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    box-sizing: border-box;
}
.ts-var select:focus { border-color: #1e3a5f; }

/* Tiers */
.ts-tiers { margin-bottom: 18px; }
.ts-tier-label { display: block; font-size: 12px; font-weight: 600; color: #555; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.3px; }
.ts-tier {
    all: unset;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    background: #f8f8f8;
    border: 1.5px solid #e5e7eb;
    border-radius: 6px;
    margin-bottom: 7px;
    cursor: pointer;
    transition: all 0.15s;
    width: 100%;
}
.ts-tier:hover { border-color: #bbb; }
.ts-tier.sel { background: #212121; border-color: #a78028; }
.ts-tier input[type="radio"] { display: block; width: 15px; height: 15px; margin: 0; flex-shrink: 0; accent-color: #a78028; }
.ts-tier-qty { font-size: 14px; font-weight: 700; min-width: 65px; color: #111; }
.ts-tier-price { font-size: 14px; flex: 1; color: #111; }
.ts-tier.sel .ts-tier-qty,
.ts-tier.sel .ts-tier-price { color: #fff !important; }
.ts-tier.sel bdi { color: #fff !important; }
.ts-tier-unit { font-size: 11px; color: #888; }
.ts-tier.sel .ts-tier-unit { color: rgba(255,255,255,0.7) !important; }

/* Summary */
.ts-summary { background: #f8f8f8; border-radius: 6px; padding: 14px; margin-bottom: 18px; }
.ts-sum-row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 14px; }
.ts-sum-row span { color: #666; }
.ts-sum-row strong { color: #111; }
.ts-sum-total { border-top: 1px solid #e5e7eb; margin-top: 8px; padding-top: 10px; }
.ts-sum-total strong { font-size: 20px; color: #15803d; }
.sum-unit { color: #15803d !important; }

/* Note */
.ts-note { margin-bottom: 18px; }
.ts-note label { display: block; font-size: 12px; font-weight: 600; color: #555; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.3px; }
.ts-note textarea {
    all: unset;
    display: block;
    width: 100%;
    padding: 11px 12px;
    background: #f8f8f8;
    border: 1.5px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    min-height: 80px;
    resize: vertical;
    box-sizing: border-box;
}
.ts-note textarea:focus { border-color: #1e3a5f; }

/* Add button */
.ts-add {
    all: unset;
    display: block;
    width: 100%;
    padding: 14px;
    background: #111;
    color: #fff;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    box-sizing: border-box;
}
.ts-add:hover { background: #333; }
.ts-add:disabled { background: #d1d5db; cursor: not-allowed; color: #9ca3af; }
.ts-add.loading { opacity: 0.7; }
.ts-add.done { background: #15803d; }

/* Product link */
.ts-product-link {
    display: block;
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    background: transparent;
    color: #666;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s;
    box-sizing: border-box;
}
.ts-product-link:hover { background: #f5f5f5; border-color: #ccc; color: #333; }

/* Package items */
.ts-pkg-items { margin-bottom: 18px; margin-top: 18px; }
.ts-pkg-title { all: unset; display: block; font-size: 12px; font-weight: 700; color: #555; text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 10px; }
.ts-pkg-item { display: flex; align-items: center; gap: 10px; padding: 9px; background: #f8f8f8; border-radius: 6px; margin-bottom: 7px; }
.ts-pkg-item img { width: 42px; height: 42px; border-radius: 5px; object-fit: cover; flex-shrink: 0; }
.ts-pkg-item-info { flex: 1; }
.ts-pkg-item-info strong { display: block; font-size: 13px; color: #111; }
.ts-pkg-item-qty { font-size: 12px; font-weight: 600; color: #444; background: #e5e7eb; padding: 4px 9px; border-radius: 4px; white-space: nowrap; }

/* Package price */
.ts-pkg-price { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; padding: 14px; background: #f8f8f8; border-radius: 6px; }
.ts-pkg-price del { font-size: 13px; color: #999; }
.ts-pkg-price strong { font-size: 22px; color: #111; font-weight: 700; }
.ts-save { background: #dcfce7; color: #15803d; padding: 4px 9px; border-radius: 4px; font-size: 12px; font-weight: 600; white-space: nowrap; }

/* Cart badges */
.ts-cart-badge { display: inline-block; padding: 2px 7px; border-radius: 3px; font-size: 10px; font-weight: 700; margin-right: 6px; vertical-align: middle; text-transform: uppercase; letter-spacing: 0.4px; }
.ts-cart-badge.bulk { background: #1e3a5f; color: #fff; }
.ts-cart-badge.pkg  { background: #374151; color: #fff; }

/* Toast */
.ts-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #111;
    color: #fff;
    padding: 10px 22px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    opacity: 0;
    transition: all 0.3s;
    z-index: 99999;
    pointer-events: none;
}
.ts-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ══════════ MOBILE ══════════ */
@media (max-width: 768px) {
    .ts { padding: 0 12px; }
    .ts-head h1 { font-size: 20px; }
    
    .ts-filters { gap: 6px; }
    .ts-filter { padding: 7px 14px; font-size: 12px; }
    
    .ts-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .ts-body { padding: 10px 10px 6px; }
    .ts-body h3 { font-size: 13px; }
    .ts-btn { margin: 6px 10px 10px; padding: 9px; font-size: 12px; }
    
    /* Detail: tek kolon */
    .ts-detail { grid-template-columns: 1fr; gap: 20px; }
    .ts-detail-img { position: static !important; }
    
    /* Galeri thumblar 4'lü → 5'li sığar */
    .ts-gallery-thumb { width: calc(20% - 7px); }
    
    .ts-detail-info h1 { font-size: 18px; }
    
    .ts-tier { padding: 10px 12px; gap: 10px; }
    .ts-tier-qty { min-width: 55px; font-size: 13px; }
    .ts-tier-price { font-size: 13px; }
    
    .ts-add { padding: 13px; font-size: 15px; }
    
    /* Paket detay */
    .ts-pkg-item img { width: 36px; height: 36px; }
    .ts-pkg-price strong { font-size: 20px; }
    .ts-pkg-price { flex-wrap: wrap; }
}

@media (max-width: 480px) {
    .ts-grid { grid-template-columns: 1fr; }
    .ts-filters { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
    .ts-filter { flex-shrink: 0; }
    .ts-gallery-thumb { width: calc(25% - 6px); }
}

/* ══════════ SLIDER ══════════ */
.ts-slider {
    position: relative;
    width: 100%;
    background: #f9f9f9;
    border-radius: 10px;
    overflow: hidden;
    user-select: none;
}

.ts-slides { position: relative; width: 100%; }

.ts-slide {
    display: none;
    width: 100%;
}
.ts-slide.active { display: block; }

.ts-slide img {
    display: block;
    width: 100%;
    height: auto;
    min-height: 320px;
    max-height: 500px;
    object-fit: contain;
    padding: 16px;
    background: #f9f9f9;
}

/* Prev / Next okları */
.ts-slider-prev,
.ts-slider-next {
    all: unset !important;
    box-sizing: border-box !important;
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: rgba(0,0,0,0.55) !important;
    color: #fff !important;
    border: none !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    border-radius: 50% !important;
    font-size: 20px !important;
    line-height: 36px !important;
    cursor: pointer !important;
    z-index: 10 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    outline: none !important;
    text-align: center !important;
    opacity: 1 !important;
    visibility: visible !important;
    transition: background 0.2s !important;
}
.ts-slider-prev { left: 10px !important; right: auto !important; }
.ts-slider-next { right: 10px !important; left: auto !important; }
.ts-slider-prev:hover,
.ts-slider-next:hover { background: rgba(0,0,0,0.8) !important; }

/* Dot indikatörleri */
.ts-slider-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 8px 0 4px;
}
.ts-dot {
    all: unset !important;
    box-sizing: border-box !important;
    display: inline-block !important;
    width: 7px !important;
    height: 7px !important;
    min-width: 7px !important;
    max-width: 7px !important;
    border-radius: 50% !important;
    background: #ccc !important;
    border: none !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin: 0 !important;
    transition: background 0.2s, transform 0.2s !important;
    flex-shrink: 0 !important;
}
.ts-dot.active { background: #1e3a5f !important; transform: scale(1.3) !important; }

/* Thumbnail strip */
.ts-slider-thumbs {
    display: flex;
    gap: 8px;
    padding: 8px 12px 12px;
    overflow-x: auto;
    scrollbar-width: thin;
}
.ts-slider-thumbs::-webkit-scrollbar { height: 4px; }
.ts-slider-thumbs::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }

.ts-sthumb {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    background: #f3f4f6;
    transition: border-color 0.2s;
}
.ts-sthumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 3px;
    display: block;
}
.ts-sthumb.active { border-color: #111; }
.ts-sthumb:hover { border-color: #999; }

/* ══ Kısa ve uzun açıklama ══ */
.ts-short-desc {
    font-size: 14px;
    color: #444;
    line-height: 1.6;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}
.ts-short-desc p { margin: 0 0 8px 0; }
.ts-short-desc p:last-child { margin: 0; }

.ts-long-desc {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid #f0f0f0;
    font-size: 14px;
    color: #444;
    line-height: 1.7;
}
.ts-long-desc h2, .ts-long-desc h3 { color: #111; font-weight: 700; margin: 18px 0 8px; }
.ts-long-desc ul, .ts-long-desc ol { padding-left: 20px; margin: 10px 0; }
.ts-long-desc p { margin: 0 0 10px; }

/* Tier seçilince buton aktif — siyah */
.ts-add { background: #111 !important; }
.ts-add:not(:disabled):hover { background: #222 !important; }
.ts-add.done { background: #15803d !important; }

/* ══ Mobil slider ══ */
@media (max-width: 768px) {
    .ts-slide img { min-height: 220px; max-height: 340px; padding: 10px; }
    .ts-sthumb { width: 50px; height: 50px; }
    .ts-slider-prev, .ts-slider-next { width: 30px; height: 30px; font-size: 18px; }
}