/* Bulk Add to Cart - Frontend Styles */

.batc-frontend-container {
    max-width: 100%;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.batc-table-wrapper {
    overflow-x: auto;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Tablo Stilleri */
.batc-product-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.batc-product-table thead {
    background: #f7f7f7;
    border-bottom: 2px solid #e0e0e0;
}

.batc-product-table thead th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.batc-product-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.2s ease;
}

.batc-product-table tbody tr:hover {
    background-color: #f9f9f9;
}

.batc-product-table tbody tr:last-child {
    border-bottom: none;
}

.batc-product-table td {
    padding: 15px;
    vertical-align: middle;
}

/* Sütun Genişlikleri */
.batc-col-image {
    width: 100px;
}

.batc-col-name {
    width: auto;
}

.batc-col-price {
    width: 150px;
    text-align: right;
}

.batc-col-quantity {
    width: 180px;
    text-align: center;
}

/* Ürün Resmi */
.batc-product-image {
    width: 80px;
    height: 80px;
    overflow: hidden;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.batc-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Ürün Adı */
.batc-product-name a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.2s ease;
}

.batc-product-name a:hover {
    color: #0073aa;
}

.batc-product-sku {
    display: block;
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

/* Fiyat */
.batc-product-price {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

/* Miktar Kontrolü */
.batc-quantity-wrapper {
    display: inline-flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}

.batc-qty-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    transition: all 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.batc-qty-btn:hover {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.batc-qty-btn:active {
    transform: scale(0.95);
    background: #005177;
}

.batc-qty-btn:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.batc-quantity-input {
    width: 60px;
    height: 36px;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    text-align: center;
    font-size: 15px;
    font-weight: 500;
    appearance: textfield;
    -moz-appearance: textfield;
}

.batc-quantity-input::-webkit-outer-spin-button,
.batc-quantity-input::-webkit-inner-spin-button {
    appearance: none;
    -webkit-appearance: none;
    margin: 0;
}

.batc-quantity-input:focus {
    outline: none;
    background: #f9f9f9;
}

.batc-quantity-input.batc-error {
    border-color: #d63638;
    background: #fff5f5;
}

.batc-recommended-qty-note {
    display: block;
    font-size: 11px;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

/* Footer */
.batc-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f7f7f7;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-top: 20px;
}

.batc-total-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.batc-subtotal-row,
.batc-discount-row,
.batc-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.batc-subtotal-row {
    border-bottom: 1px solid #e0e0e0;
}

.batc-discount-row {
    color: #27ae60;
    border-bottom: 1px solid #e0e0e0;
}

.batc-total-row {
    border-top: 2px solid #333;
    padding-top: 12px;
    margin-top: 5px;
}

.batc-subtotal-label,
.batc-discount-label {
    font-size: 15px;
    font-weight: 500;
    color: #666;
}

.batc-discount-badge {
    display: inline-block;
    background: #27ae60;
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-left: 5px;
    font-weight: 600;
}

.batc-subtotal-price,
.batc-discount-amount {
    font-size: 16px;
    font-weight: 600;
    color: #666;
}

.batc-discount-amount {
    color: #27ae60;
}

.batc-total-label {
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

.batc-total-price {
    font-size: 26px;
    font-weight: 700;
    color: #0073aa;
}

.batc-actions-section {
    display: flex;
    gap: 10px;
}

/* Sepete Ekle Butonu */
.batc-add-to-cart-btn {
    padding: 12px 30px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: #0073aa !important;
    color: #fff !important;
    border: none !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.batc-add-to-cart-btn:hover {
    background: #005a87 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,115,170,0.3);
}

.batc-add-to-cart-btn:active {
    transform: translateY(0);
}

.batc-add-to-cart-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed !important;
    transform: none !important;
}

.batc-add-to-cart-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Mesajlar */
.batc-messages {
    margin-top: 20px;
}

.batc-message {
    padding: 15px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
}

.batc-message.batc-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.batc-message.batc-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Animasyon */
@keyframes batc-spin {
    100% {
        transform: rotate(360deg);
    }
}

.batc-spin {
    animation: batc-spin 1s linear infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    .batc-product-table {
        font-size: 14px;
    }
    
    .batc-product-table thead {
        display: none;
    }
    
    .batc-product-table tbody tr {
        display: block;
        margin-bottom: 20px;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        overflow: hidden;
    }
    
    .batc-product-table td {
        display: block;
        text-align: left !important;
        padding: 12px 15px;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .batc-product-table td:last-child {
        border-bottom: none;
    }
    
    .batc-product-table td:before {
        content: attr(data-label);
        font-weight: 600;
        display: block;
        margin-bottom: 5px;
        color: #666;
        font-size: 12px;
        text-transform: uppercase;
    }
    
    .batc-col-image,
    .batc-col-name,
    .batc-col-price,
    .batc-col-quantity {
        width: 100%;
    }
    
    .batc-product-image {
        width: 100%;
        height: 200px;
    }
    
    .batc-footer {
        flex-direction: column;
        gap: 15px;
    }
    
    .batc-total-section {
        width: 100%;
        justify-content: space-between;
    }
    
    .batc-actions-section {
        width: 100%;
    }
    
    .batc-add-to-cart-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .batc-product-price {
        font-size: 16px;
    }
    
    .batc-total-label {
        font-size: 16px;
    }
    
    .batc-total-price {
        font-size: 20px;
    }
    
    .batc-quantity-wrapper {
        width: 100%;
    }
    
    .batc-quantity-input {
        flex: 1;
    }
}

/* WooCommerce Uyumluluğu */
.woocommerce .batc-frontend-container {
    margin: 30px 0;
}

.woocommerce .batc-add-to-cart-btn {
    background-color: var(--wc-primary-color, #0073aa) !important;
}

.woocommerce .batc-add-to-cart-btn:hover {
    background-color: var(--wc-primary-hover-color, #005a87) !important;
}
