/* ========================================
   E-Ticaret Sistemi - Ana CSS
   ======================================== */

:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --border-color: #e2e8f0;
    --text-color: #334155;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--light-color);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #1d4ed8;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-color);
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Cards */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }

.ajax-loader{
	position: absolute;
	top: 25%;
	left: 50%;
	transform-origin: 50% 50%;
	transform: rotate(90deg) translate(-50%, 0%);
	font-size: 50px;
	width: 1em;
	height: 3em;
	color: #d31145;

	.paw{
		width: 1em;
		height: 1em;
		animation: 2050ms pawAnimation ease-in-out infinite;
		opacity: 0;
		
		svg{
			width: 100%;
			height: 100%;
		}
		
		.icon{
			fill: currentColor;
		}

		&:nth-child(odd){
			transform: rotate(-10deg);
		}

		&:nth-child(even){
			transform: rotate(10deg) translate(125%, 0);
		}

		@for $i from 1 through 6{
            &:nth-child(#{$i}){
            	animation-delay: #{ (($i * -1)+6)*0.25 }s;
            }
        }

        .no-cssanimations &{
        	opacity: 1;
        }
	}
}

@keyframes pawAnimation {
	0%{
		opacity: 1;
	}
	50%{
		opacity: 0;
	}
	100%{
		opacity: 0;
	}
}


/* Category Slider Section */
.category-slider-section {
    padding: 60px 0;
    background: #f9fafb;
}

.category-slider-wrapper {
    position: relative;
    margin-top: 30px;
    display: flex;
    align-items: center;
    gap: 0;
}

.products-slider-wrapper {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.category-slider {
    display: flex;
    gap: 24px;
    transition: transform 0.4s ease-in-out;
    will-change: transform;
    padding: 10px 0;
}

.category-slider .product-card {
    flex: 0 0 calc((100% - (4 * 24px)) / 5);
    min-width: calc((100% - (4 * 24px)) / 5);
}

/* Product Card Base Styles */
.product-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
    border-color: #F6B519;
}

.product-image {
    position: relative;
    display: block;
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: #f8f9fa;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #F6B519;
    color: #333;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 1;
}

.product-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
    min-height: 40px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.product-title a {
    color: #1f2937;
    text-decoration: none;
}

.product-title a:hover {
    color: #F6B519;
}

.product-brand {
    color: #6b7280;
    font-size: 12px;
    margin-bottom: 8px;
    font-weight: 500;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    margin-top: auto;
}

.current-price {
    font-size: 20px;
    font-weight: 700;
    color: #F6B519;
}

.old-price {
    text-decoration: line-through;
    color: #9ca3af;
    font-size: 15px;
}

.slider-product-card {
    flex: 0 0 280px;
    min-width: 280px;
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: white;
    border: 1px solid #e5e7eb;
    color: #374151;
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.slider-arrow:hover {
    background: #4f46e5;
    color: white;
    border-color: #4f46e5;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.slider-prev {
    left: -20px;
}

.slider-next {
    right: -20px;
}

.slider-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.slider-arrow:disabled:hover {
    background: white;
    color: #374151;
    border-color: #e5e7eb;
}

/* Responsive */
@media (max-width: 1024px) {
    .category-slider .product-card {
        flex: 0 0 calc((100% - (2 * 24px)) / 3);
        min-width: calc((100% - (2 * 24px)) / 3);
    }
}

@media (max-width: 768px) {
    .category-slider .product-card {
        flex: 0 0 calc((100% - 24px) / 2);
        min-width: calc((100% - 24px) / 2);
    }
    
    .slider-arrow {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .slider-prev {
        left: -10px;
    }
    
    .slider-next {
        right: -10px;
    }
}

@media (max-width: 480px) {
    .category-slider .product-card {
        flex: 0 0 100%;
        min-width: 100%;
    }
    
    .category-slider {
        gap: 15px;
    }
}


/* Coupon Input */
.coupon-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.coupon-input-group input {
    flex: 1;
}

.coupon-message {
    margin-top: 10px;
    font-size: 14px;
}

.coupon-message .success {
    color: #10b981;
    background: #d1fae5;
    padding: 8px 12px;
    border-radius: 6px;
    margin: 0;
}

.coupon-message .error {
    color: #ef4444;
    background: #fee2e2;
    padding: 8px 12px;
    border-radius: 6px;
    margin: 0;
}

.coupon-message .info {
    color: #3b82f6;
    background: #dbeafe;
    padding: 8px 12px;
    border-radius: 6px;
    margin: 0;
}

.coupon-discount {
    font-weight: 600;
}
