/* Toplu Sipariş Pro - Kademe Bazlı */

* {
    box-sizing: border-box;
}

.ts {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.ts-header {
    text-align: center;
    margin-bottom: 30px;
}

.ts-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 10px;
    color: #1a1a1a;
}

.ts-header p {
    color: #64748b;
    margin: 0;
    font-size: 1rem;
}

/* Nav */
.ts-nav {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.ts-nav-btn {
    padding: 2px 22px;
    border: 2px solid #e2e8f0;
    background: #fff;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    color: #64748b;
    transition: all 0.2s;
}

.ts-nav-btn:hover {
    border-color: #cbd5e1;
    color: #1a1a1a;
}

.ts-nav-btn.active {
    background: #1a1a1a;
    border-color: #1a1a1a;
    color: #fff;
}

/* Grid */
.ts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* Card */
.ts-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s;
}

.ts-card:hover {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.ts-card.hidden {
    display: none;
}

.ts-card.ts-highlight {
    box-shadow: 0 0 0 3px #1a1a1a;
}

/* Image */
.ts-card-img {
    position: relative;
    width: 100%;
    padding-top: 100%;
    background: #f8fafc;
}

.ts-card-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ts-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #dc2626;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    z-index: 1;
}

.ts-tag-wholesale {
    background: #1a1a1a;
}

/* Content */
.ts-card-body {
    padding: 20px;
}

.ts-card-body h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 15px;
    line-height: 1.4;
    color: #1a1a1a;
}

/* Tier Selection */
.ts-tiers {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.ts-tier {
    position: relative;
    flex: 1;
    min-width: calc(33% - 6px);
    padding: 12px 8px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.ts-tier:hover {
    border-color: #cbd5e1;
}

.ts-tier.selected {
    border-color: #1a1a1a;
    background: #1a1a1a;
    color: #fff;
}

.ts-tier input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ts-tier-qty {
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 2px;
}

.ts-tier-price {
    display: block;
    font-size: 12px;
    font-weight: 500;
}

.ts-tier.selected .ts-tier-price {
    color: #4ade80;
}

.ts-tier.selected bdi {
	color: #35aa85 !important;
}

/* Totals */
.ts-totals {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    margin-bottom: 15px;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
}

.ts-totals > div {
    text-align: center;
}

.ts-totals span {
    display: block;
    color: #64748b;
    font-size: 11px;
    margin-bottom: 2px;
}

.ts-totals strong {
    color: #1a1a1a;
    font-size: 14px;
}

.ts-unit-price {
    color: #059669 !important;
}

/* Add Button */
.ts-add {
    width: 100%;
    padding: 14px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.ts-add:hover {
    background: #333;
}

.ts-add.loading {
    opacity: 0.6;
    pointer-events: none;
}

.ts-add.success {
    background: #059669;
}

/* Empty */
.ts-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px;
    color: #94a3b8;
    font-size: 16px;
}

/* Bar */
.ts-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1a1a1a;
    color: #fff;
    padding: 16px 24px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.ts-bar bdi {
	color: #29a57e !important;
}

.ts-bar.visible {
    transform: translateY(0);
}

.ts-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ts-bar-inner > span {
    font-size: 15px;
}

.ts-bar-inner > div {
    display: flex;
    gap: 12px;
}

.ts-bar-btn {
    padding: 5px 24px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.ts-bar-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.ts-bar-btn-primary {
    background: #fff;
    border-color: #fff;
    color: #1a1a1a;
}

.ts-bar-btn-primary:hover {
    background: #f1f5f9;
    color: #1a1a1a;
}

/* Toast */
.ts-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1a1a1a;
    color: #fff;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 14px;
    opacity: 0;
    transition: all 0.3s;
    z-index: 1001;
}

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

.ts-toast.error {
    background: #dc2626;
}

/* Responsive */
@media (max-width: 1200px) {
    .ts-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .ts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ts-tier {
        min-width: calc(50% - 4px);
    }
}

@media (max-width: 550px) {
    .ts {
        padding: 15px;
    }
	.ts-bar {
		bottom: 71px;
	}
	
    .ts-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }

    .ts-bar-inner {
        flex-direction: column;
        gap: 12px;
    }

    .ts-bar-inner > div {
        width: 100%;
    }

    .ts-bar-btn {
        flex: 1;
        text-align: center;
    }
}

/* Variations */
.ts-variations {
    margin-bottom: 15px;
}

.ts-variation-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.ts-variation-label {
    font-size: 12px;
    color: #64748b;
    min-width: 60px;
    flex-shrink: 0;
}

.ts-variation-select {
    flex: 1;
    width: 100%;
    min-width: 0;
    padding: 10px 35px 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.4;
    background-color: #fff;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.ts-variation-select::-ms-expand {
    display: none;
}

.ts-variation-select:focus {
    outline: none;
    border-color: #1a1a1a;
    box-shadow: 0 0 0 2px rgba(26, 26, 26, 0.1);
}

.ts-variation-select option {
    padding: 10px;
}

/* Variation not selected warning */
.ts-add.disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

/* selcet global */ 

.ts-variation-row select {
    width: 100% !important;
    max-width: 100% !important;
    padding: 6px 8px !important;
    height: 36px !important;
    min-height: 36px !important;
    line-height: 1.3 !important;

    background-color: #fff !important;
    border: 1px solid #c7c7c7 !important;
    border-radius: 6px !important;

    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;

    background-position: right 10px center !important;
    background-repeat: no-repeat !important;

    /* WooCommerce admin stili ile uyumlu ok işareti */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg width='10' height='6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23666' d='M5 6L0 0h10z'/%3E%3C/svg%3E") !important;
}

.ts-variation-row select:focus {
    border-color: #2271b1 !important;
    box-shadow: 0 0 0 1px #2271b1 !important;
    outline: none !important;
}

/* Safari & iOS özel fix */
.ts-variation-row select option {
    padding: 8px !important;
}
