/* =====================================================
   E-Ticaret Script - Bilesen Stilleri
   ===================================================== */

/* =====================================================
   PRODUCT CARD
   ===================================================== */
.product-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color var(--transition), box-shadow var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.product-card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    background: var(--bg-gray);
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.product-card:hover .product-card-image img {
    transform: scale(1.04);
}

.product-card-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-gray);
    color: var(--border);
}

.product-card-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 2;
}

/* Favorite Button */
.fav-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0;
    transform: scale(0.8);
    color: var(--text-muted);
}

.product-card:hover .fav-btn,
.fav-btn.active {
    opacity: 1;
    transform: scale(1);
}

.fav-btn:hover {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    color: #e53935;
}

.fav-btn.active {
    color: #e53935;
}

.fav-btn.active svg {
    fill: #e53935;
}

.product-card-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-card-category {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.product-card-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-name a {
    color: inherit;
    transition: color var(--transition);
}

.product-card-name a:hover {
    color: var(--accent);
}

.product-card-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 10px;
}

.product-card-price-current {
    font-size: 17px;
    font-weight: 700;
    color: var(--primary);
}

.product-card-price-onrequest {
    font-size: 14px !important;
    font-style: italic;
    color: var(--text-light) !important;
}

.product-card-price-old {
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: line-through;
}

.product-card-price-unit {
    font-size: 13px;
    color: var(--text-muted);
}

.product-card-price-note {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.product-card-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.product-card-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
    transition: all var(--transition);
}

.product-card-btn:hover {
    background: #f97316;
    color: var(--white);
    border-color: #f97316;
}

.product-card-btn-disabled {
    background: #f3f4f6 !important;
    color: #4b5563 !important;
    border-color: #e5e7eb !important;
    cursor: default;
}
.product-card-btn-disabled:hover {
    background: #f3f4f6 !important;
    color: #4b5563 !important;
    border-color: #e5e7eb !important;
}

.product-card-btn svg {
    width: 14px;
    height: 14px;
}

/* =====================================================
   PRODUCT DETAIL
   ===================================================== */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 48px;
}

/* Gallery */
.product-gallery {
    position: relative;
}

.product-gallery-main {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--bg-gray);
    margin-bottom: 12px;
    cursor: zoom-in;
}

.product-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-gallery-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
}

.product-gallery-thumb {
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    border-radius: 4px;
    border: 2px solid var(--border);
    overflow: hidden;
    cursor: pointer;
    transition: border-color var(--transition);
}

.product-gallery-thumb:hover,
.product-gallery-thumb.active {
    border-color: var(--primary);
}

.product-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Product Info */
.product-info {
    padding-top: 8px;
}

.product-info-category {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.product-info-category a {
    color: var(--accent);
    transition: color var(--transition);
}

.product-info-category a:hover { color: var(--primary); }

.product-info-name {
    font-size: 26px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.3;
    margin-bottom: 16px;
}

.product-info-short-desc {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 20px;
}

.product-info-price {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
}

.product-info-price-current {
    font-size: 30px;
    font-weight: 700;
    color: var(--primary);
}

.product-info-price-old {
    font-size: 18px;
    color: var(--text-muted);
    text-decoration: line-through;
}

.product-info-price-unit {
    font-size: 16px;
    color: var(--text-muted);
}

.product-info-price-note {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-top: -12px;
    margin-bottom: 20px;
}

.product-info-sale-badge {
    font-size: 12px;
    font-weight: 700;
    background: var(--danger);
    color: #fff;
    padding: 3px 10px;
    border-radius: 4px;
}

/* Stock info */
.product-stock-info {
    font-size: 13px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stock-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.stock-dot-in { background: var(--success); }
.stock-dot-low { background: var(--warning); }
.stock-dot-out { background: var(--danger); }

/* Variants */
.product-variants {
    margin-bottom: 24px;
}

.variant-group {
    margin-bottom: 16px;
}

.variant-group-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.variant-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.variant-option {
    padding: 7px 16px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    background: var(--bg);
    cursor: pointer;
    transition: all var(--transition);
}

.variant-option:hover { border-color: var(--primary); }

.variant-option.selected {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.variant-option.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Quantity + Add to cart */
.product-add-to-cart {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.quantity-input {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.quantity-btn {
    width: 40px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-alt);
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: var(--text);
    transition: background var(--transition);
}

.quantity-btn:hover { background: var(--border); }

.quantity-input input {
    width: 50px;
    height: 42px;
    text-align: center;
    border: none;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    -moz-appearance: textfield;
}

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

.add-to-cart-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary);
    color: var(--white);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background var(--transition);
}

.add-to-cart-btn:hover { background: var(--primary-light); }

.add-to-cart-btn:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
}

/* Product Meta */
.product-meta {
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.product-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 6px;
}

.product-meta-item strong {
    color: var(--text);
    font-weight: 500;
}

/* Product Tabs */
.product-tabs {
    margin-top: 48px;
}

.product-tabs-nav {
    display: flex;
    border-bottom: 2px solid var(--border);
    gap: 0;
}

.product-tab-btn {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color var(--transition), border-color var(--transition);
}

.product-tab-btn:hover { color: var(--text); }

.product-tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.product-tab-content {
    display: none;
    padding: 24px 0;
    font-size: 14px;
    line-height: 1.8;
    color: var(--text);
}

.product-tab-content.active { display: block; }

.product-tab-content h2,
.product-tab-content h3 {
    margin: 16px 0 8px;
    color: var(--primary);
}

.product-tab-content p { margin-bottom: 12px; }

.product-tab-content ul,
.product-tab-content ol {
    margin: 8px 0 16px 20px;
    list-style: disc;
}

.product-tab-content ol { list-style: decimal; }

.product-tab-content img {
    border-radius: var(--radius);
    margin: 12px 0;
}

/* =====================================================
   CART PAGE
   ===================================================== */
.cart-table {
    width: 100%;
    border-collapse: collapse;
}

.cart-table th {
    text-align: left;
    padding: 12px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    border-bottom: 2px solid var(--border);
}

.cart-table td {
    padding: 16px 12px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
    font-size: 14px;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.cart-item-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.cart-item-name {
    font-weight: 600;
    color: var(--text);
}

.cart-item-variant {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.cart-remove {
    color: var(--text-muted);
    font-size: 13px;
    transition: color var(--transition);
}

.cart-remove:hover { color: var(--danger); }

/* Cart Summary */
.cart-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
}

.cart-summary {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    position: sticky;
    top: 80px;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-light);
}

.cart-summary-row.total {
    border-top: 2px solid var(--border);
    margin-top: 8px;
    padding-top: 12px;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

/* =====================================================
   CHECKOUT PAGE
   ===================================================== */
.checkout-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 32px;
    align-items: flex-start;
}

.checkout-section {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
}

.checkout-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-light);
}

.checkout-order-item {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}

.checkout-order-item:last-child {
    border-bottom: none;
}

.checkout-order-item-img {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 4px;
    object-fit: cover;
    background: var(--bg-gray);
}

.checkout-order-item-info {
    flex: 1;
    font-size: 13px;
}

.checkout-order-item-name {
    font-weight: 600;
    margin-bottom: 2px;
}

.checkout-order-item-variant {
    font-size: 12px;
    color: var(--text-muted);
}

.checkout-order-item-price {
    font-weight: 600;
    white-space: nowrap;
}

/* Payment Methods */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.payment-method-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color var(--transition);
}

.payment-method-option:hover,
.payment-method-option.selected {
    border-color: var(--primary);
}

.payment-method-option input[type="radio"] {
    accent-color: var(--primary);
}

.payment-method-option .method-name {
    font-weight: 600;
    font-size: 14px;
}

.payment-method-option .method-desc {
    font-size: 12px;
    color: var(--text-muted);
}

/* =====================================================
   TOAST NOTIFICATION
   ===================================================== */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    min-width: 280px;
    max-width: 380px;
    padding: 14px 18px;
    border-radius: var(--radius);
    font-size: 14px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toastIn 0.3s ease;
}

.toast-success { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
.toast-danger { background: #ffebee; color: #c62828; border: 1px solid #ffcdd2; }
.toast-warning { background: #fff3e0; color: #e65100; border: 1px solid #ffe0b2; }
.toast-info { background: #e3f2fd; color: #1565c0; border: 1px solid #bbdefb; }

.toast-close {
    margin-left: auto;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity var(--transition);
    background: none;
    border: none;
    color: inherit;
    font-size: 16px;
}

.toast-close:hover { opacity: 1; }

@keyframes toastIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Header action text */
.header-action-text {
    font-size: 13px;
    font-weight: 500;
}

/* =====================================================
   BLOG CARDS
   ===================================================== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.blog-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.blog-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.blog-card-image {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--bg-gray);
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.04);
}

.blog-card-body {
    padding: 18px;
}

.blog-card-date {
    font-size: 12px;
    color: #555555;
    margin-bottom: 6px;
}

.blog-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-title a {
    color: inherit;
    transition: color var(--transition);
}

.blog-card-title a:hover { color: var(--accent); }

.blog-card-excerpt {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* =====================================================
   404 PAGE
   ===================================================== */
.error-page {
    text-align: center;
    padding: 80px 20px;
}

.error-page-code {
    font-size: 120px;
    font-weight: 800;
    color: var(--border);
    line-height: 1;
    margin-bottom: 16px;
}

.error-page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
}

.error-page-message {
    font-size: 15px;
    color: var(--text-light);
    margin-bottom: 32px;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

.error-page-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* =====================================================
   BLOG DETAIL
   ===================================================== */
.blog-detail {
    max-width: 720px;
    margin: 0 auto;
}

.blog-detail-back {
    font-size: 13px;
    color: var(--text-muted);
    display: inline-block;
    margin-bottom: 16px;
    transition: color var(--transition);
}

.blog-detail-back:hover { color: var(--primary); }

.blog-detail-title {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.3;
    color: var(--primary);
    margin-bottom: 12px;
}

.blog-detail-meta {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 24px;
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.blog-detail-image {
    margin-bottom: 32px;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.blog-detail-image img {
    width: 100%;
    height: auto;
    display: block;
}

.blog-detail-content {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-light);
}

.blog-detail-content h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    margin: 32px 0 12px;
}

.blog-detail-content h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 24px 0 10px;
}

.blog-detail-content p { margin-bottom: 16px; }
.blog-detail-content ul, .blog-detail-content ol { margin: 0 0 16px 20px; }
.blog-detail-content img { max-width: 100%; border-radius: var(--radius); }
.blog-detail-content blockquote {
    border-left: 3px solid var(--primary);
    padding: 12px 20px;
    margin: 16px 0;
    background: var(--bg-alt);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
}

.blog-detail-share {
    margin-top: 32px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
    display: flex;
    gap: 12px;
    align-items: center;
    font-size: 13px;
}

.blog-detail-share a {
    color: var(--accent);
    font-weight: 500;
    transition: color var(--transition);
}

.blog-detail-share a:hover { color: var(--primary); }

/* =====================================================
   STATIC PAGE
   ===================================================== */
.static-page {
    max-width: 800px;
    margin: 0 auto;
}

.static-page-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.static-page-content {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-light);
}

.static-page-content h2 { font-size: 20px; font-weight: 700; margin: 24px 0 10px; color: var(--primary); }
.static-page-content h3 { font-size: 17px; font-weight: 600; margin: 20px 0 8px; }
.static-page-content p { margin-bottom: 14px; }
.static-page-content ul, .static-page-content ol { margin: 0 0 14px 20px; }
.static-page-content table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.static-page-content table th, .static-page-content table td { padding: 10px; border: 1px solid var(--border); text-align: left; }
.static-page-content table th { background: var(--bg-alt); font-weight: 600; }

