/* ============================================
   Product Detail - Global Styles
   ============================================ */

/* Product Detail Action Bar */
.product-action-bar {
    position: sticky;
    top: 0;
    z-index: 999;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
    margin: -1rem -1rem 1.5rem -1rem;
}

.action-bar-container {
    padding: 1rem 1.5rem;
}

.action-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
}

.action-bar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.back-button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(-3px);
}

.back-button i {
    font-size: 20px;
}

.product-info {
    display: flex;
    flex-direction: column;
}

.product-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
    margin-bottom: 2px;
}

.product-name {
    color: white;
    font-weight: 600;
    margin: 0;
    font-size: 1.25rem;
}

.action-bar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.action-btn i {
    font-size: 18px;
}

.primary-btn {
    background: white;
    color: #667eea;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.menu-item-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem;
}

.menu-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.menu-icon i {
    font-size: 18px;
    color: white;
}

.menu-icon.success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.menu-icon.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.menu-icon.danger {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
}

.menu-icon.warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.menu-icon.info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.menu-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.menu-title {
    font-weight: 500;
    color: #2d3748;
    font-size: 0.875rem;
}

.menu-subtitle {
    font-size: 0.75rem;
    color: #718096;
}

/* ============================================
   Variant Selector
   ============================================ */
.variant-box {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    min-width: 140px;
    text-align: center;
}

.variant-box:hover {
    border-color: #5156be;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(81, 86, 190, 0.15);
}

.variant-box.selected {
    border-color: #5156be;
    background: #f8f9ff;
}

.variant-image {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    border-radius: 6px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.variant-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-image-placeholder {
    color: #6c757d;
}

/* ============================================
   Variant Details Card
   ============================================ */
.mini-stat {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.2s ease;
}

.mini-stat:hover {
    transform: translateY(-2px);
}

.mini-stat-info {
    flex: 1;
}

.mini-stat-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
}

.variant-header h4 {
    color: #5156be;
    font-weight: 600;
}

/* ============================================
   Image Gallery
   ============================================ */
.product-main-gallery {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
}

.main-image-container {
    text-align: center;
    background: white;
    border-radius: 6px;
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 2px solid #e9ecef;
    overflow: hidden;
    max-width: 500px;
    margin: 0 auto;
}

.main-product-image {
    width: 100%;
    max-width: 450px;
    height: auto;
    max-height: 350px;
    object-fit: contain;
    background: #f8f9fa;
    cursor: zoom-in;
    transition: transform 0.3s ease;
}

.main-product-image:hover {
    transform: scale(1.05);
}

.no-image-container {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 30px 15px;
    border: 2px dashed #dee2e6;
}

.no-image-placeholder-large {
    text-align: center;
    padding: 30px 20px;
}

.image-thumbnails {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 8px 0;
}

.image-thumbnails::-webkit-scrollbar {
    height: 6px;
}

.image-thumbnails::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.image-thumbnails::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.image-thumbnails::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.thumbnail-item {
    flex-shrink: 0;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s ease;
}

.thumbnail-item img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid #dee2e6;
    transition: all 0.2s ease;
}

.thumbnail-item:hover img {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.thumbnail-item.active img {
    border: 3px solid #0d6efd;
}

.main-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 10px;
    padding: 2px 6px;
}

/* ============================================
   Product Basic Info
   ============================================ */
.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.info-item:last-child {
    border-bottom: none;
}

.info-item .label {
    font-weight: 500;
    color: #6c757d;
    font-size: 0.875rem;
}

.info-item .value {
    font-weight: 600;
    color: #495057;
}

.product-header h3 {
    color: #495057;
    font-weight: 600;
}

/* ============================================
   Product Wizard
   ============================================ */

/* MudStepper - sadece alt butonları gizle, header'ı koru */
.custom-mud-stepper .mud-stepper-actions {
    display: none !important;
}

.custom-mud-stepper .mud-step-content .mud-button-group {
    display: none !important;
}

/* MudStepper header'ının görünür olmasını sağla */
.custom-mud-stepper .mud-stepper-header {
    display: block !important;
    visibility: visible !important;
}

/* MudStepper görsel düzenleme */
.custom-mud-stepper {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

.wizard-navigation {
    background: #f8f9fa;
    margin: 0 -20px -20px -20px;
    padding: 20px;
    border-radius: 0 0 8px 8px;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

/* Custom Step Header */
.custom-step-header {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.step-indicators {
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 120px;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.step-item .step-circle {
    background: #e9ecef;
    color: #6c757d;
    border: 2px solid #e9ecef;
}

.step-item.active .step-circle {
    background: #5156be;
    color: white;
    border: 2px solid #5156be;
    box-shadow: 0 0 0 4px rgba(81, 86, 190, 0.1);
}

.step-item.completed .step-circle {
    background: #28a745;
    color: white;
    border: 2px solid #28a745;
}

.step-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6c757d;
    transition: color 0.3s ease;
}

.step-item.active .step-label {
    color: #5156be;
    font-weight: 600;
}

.step-item.completed .step-label {
    color: #28a745;
}

.step-connector {
    height: 2px;
    width: 60px;
    background: #e9ecef;
    margin: 0 10px;
    margin-top: -20px;
    transition: background 0.3s ease;
}

.step-connector.completed {
    background: #28a745;
}

/* Step content area */
.step-content-area {
    background: white;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Step placeholder styling */
.step-placeholder {
    padding: 40px 20px;
}

.step-placeholder i {
    font-size: 3rem;
    opacity: 0.7;
}

.step-placeholder h5 {
    margin: 15px 0 10px 0;
    color: #495057;
}

.step-placeholder p {
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.step-placeholder small {
    font-size: 0.85rem;
    font-style: italic;
}

/* ============================================
   Receive Stock Modal
   ============================================ */
.ms-receive-modal .mud-dialog-title {
    padding-bottom: .25rem;
}

.ms-receive-modal .input-group-like {
    position: relative;
}

.ms-receive-modal .input-group-like .prefix {
    position: absolute;
    z-index: 2;
    left: .5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--mud-palette-text-secondary);
    font-size: .85rem;
}

.ms-receive-modal .input-group-like .mud-input-root {
    padding-left: 1.5rem; /* ₺ alanı için boşluk */
}

/* ============================================
   Image Management Modal
   ============================================ */
.image-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.image-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.image-container {
    position: relative;
    overflow: hidden;
}

.image-container img {
    transition: transform 0.3s ease;
}

.image-container:hover img {
    transform: scale(1.05);
}

.border-success {
    border-width: 3px !important;
}

/* ============================================
   Responsive Styles
   ============================================ */
@media (max-width: 768px) {
    .action-bar-container {
        padding: 0.75rem 1rem;
    }

    .product-name {
        font-size: 1rem;
    }

    .product-label {
        font-size: 0.7rem;
    }

    .action-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8125rem;
    }

    .action-btn span {
        display: none;
    }

    .action-btn i {
        margin: 0;
    }

    .back-button {
        width: 36px;
        height: 36px;
    }
    
    .main-image-container {
        max-width: 100%;
        padding: 5px;
    }
    
    .main-product-image {
        max-height: 250px;
    }

    /* Wizard Steps - Mobilde küçült */
    .step-item {
        min-width: 70px;
        font-size: 0.75rem;
    }

    .step-circle {
        width: 32px;
        height: 32px;
        font-size: 14px;
        margin-bottom: 4px;
    }

    .step-label {
        font-size: 0.7rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 70px;
    }

    .step-connector {
        width: 30px;
        margin: 0 5px;
    }

    /* Wizard header'ı scroll edilebilir yap */
    .step-indicators {
        overflow-x: auto;
        padding: 10px 5px;
        -webkit-overflow-scrolling: touch;
    }

    /* Scrollbar'ı gizle ama scroll çalışsın */
    .step-indicators::-webkit-scrollbar {
        display: none;
    }

    .step-indicators {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
}

@media (max-width: 576px) {
    /* Çok küçük ekranlarda daha da küçült */
    .step-item {
        min-width: 60px;
    }

    .step-circle {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .step-label {
        font-size: 0.65rem;
        max-width: 60px;
    }

    .step-connector {
        width: 20px;
        margin: 0 3px;
    }

    .custom-step-header {
        padding: 15px 10px;
        margin-bottom: 15px;
    }

    .step-content-area {
        padding: 15px 10px;
    }
}

@media (max-width: 576px) {
    .action-bar-left {
        gap: 0.75rem;
    }

    .product-label {
        display: none;
    }
}

/* Nav Tabs - Template CSS zaten var, buraya ekleme yapmaya gerek yok */

/* ============================================
   Dark Mode Support
   ============================================ */
body[data-bs-theme=dark] .variant-box {
    background: #313533;
    border-color: #383d3b;
}

body[data-bs-theme=dark] .variant-box:hover {
    border-color: #5156be;
}

body[data-bs-theme=dark] .variant-box.selected {
    background: #383d3b;
    border-color: #5156be;
}

body[data-bs-theme=dark] .variant-image {
    background: #2C302E;
}

body[data-bs-theme=dark] .product-main-gallery {
    background: #2C302E;
}

body[data-bs-theme=dark] .main-image-container {
    background: #313533;
    border-color: #383d3b;
}

body[data-bs-theme=dark] .main-product-image {
    background: #313533;
}

body[data-bs-theme=dark] .no-image-container {
    background: #2C302E;
    border-color: #383d3b;
}

body[data-bs-theme=dark] .image-thumbnails::-webkit-scrollbar-track {
    background: #2C302E;
}

body[data-bs-theme=dark] .image-thumbnails::-webkit-scrollbar-thumb {
    background: #5156be;
}

body[data-bs-theme=dark] .thumbnail-item img {
    border-color: #383d3b;
}

body[data-bs-theme=dark] .thumbnail-item.active img {
    border-color: #5156be;
}

body[data-bs-theme=dark] .info-item {
    border-bottom-color: #383d3b;
}

body[data-bs-theme=dark] .info-item .label {
    color: #74788d;
}

body[data-bs-theme=dark] .info-item .value {
    color: #adb5bd;
}

body[data-bs-theme=dark] .product-header h3 {
    color: #adb5bd;
}

body[data-bs-theme=dark] .menu-title {
    color: #adb5bd;
}

body[data-bs-theme=dark] .menu-subtitle {
    color: #74788d;
}

body[data-bs-theme=dark] .custom-mud-stepper {
    background: #2C302E;
}

body[data-bs-theme=dark] .wizard-navigation {
    background: #2C302E;
}

body[data-bs-theme=dark] .step-content-area {
    background: #313533;
    border-color: #383d3b;
}

body[data-bs-theme=dark] .step-item .step-circle {
    background: #2C302E;
    border-color: #383d3b;
    color: #74788d;
}

body[data-bs-theme=dark] .step-item.active .step-circle {
    background: #5156be;
    border-color: #5156be;
    box-shadow: 0 0 0 4px rgba(81, 86, 190, 0.2);
}

body[data-bs-theme=dark] .step-connector {
    background: #383d3b;
}

body[data-bs-theme=dark] .step-placeholder h5 {
    color: #adb5bd;
}

body[data-bs-theme=dark] .loading-content {
    background: #313533;
    color: #adb5bd;
}

body[data-bs-theme=dark] .custom-step-header {
    background: #2C302E;
}