/**
 * GTECH Window Configurator Pro - CSS
 * Modern, responsive tasarım, çoklu para birimi desteği
 */

/* Reset & Variables */
.gtech-configurator-wrap {
    --primary: #1565c0;
    --primary-dark: #0d47a1;
    --primary-light: #e3f2fd;
    --success: #22c55e;
    --danger: #ef4444;
    --bg: #f8fafc;
    --card: #ffffff;
    --border: #e2e8f0;
    --text: #1e293b;
    --text-light: #64748b;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --radius: 12px;
    --radius-sm: 8px;
    
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.gtech-configurator-wrap * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* RTL Support */
.gtech-configurator-wrap[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

/* Language Selector */
.gtech-lang-selector {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 100;
}

.gtech-lang-selector select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card);
    font-size: 14px;
    cursor: pointer;
    box-shadow: var(--shadow);
}

/* Main Container */
.gtech-main-container {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 24px;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

/* Left Panel */
.gtech-left-panel {
    background: linear-gradient(135deg, #f0f9ff 0%, #e3f2fd 100%);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.gtech-brand {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 0 10px 0;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.gtech-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

/* Preview Box */
.gtech-preview-box {
    background: var(--card);
    border-radius: var(--radius);
    padding: 10px;
    box-shadow: var(--shadow);
}

.gtech-preview-box canvas {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
}

/* Dimension Controls */
.gtech-dimension-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gtech-slider-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gtech-slider-row label {
    min-width: 70px;
    font-weight: 500;
    color: var(--text-light);
}

.gtech-slider-row input[type="range"] {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    background: #ddd;
    border-radius: 3px;
    cursor: pointer;
}

.gtech-slider-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.gtech-slider-value {
    min-width: 80px;
    padding: 6px 10px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-align: center;
    font-weight: 600;
    font-size: 13px;
}

.gtech-area-display {
    text-align: center;
    padding: 8px;
    background: rgba(21, 101, 192, 0.1);
    border-radius: var(--radius-sm);
    color: var(--primary);
    font-weight: 500;
}

/* Price Box - TL / USD / EUR */
.gtech-price-box {
    background: var(--card);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
}

.gtech-price-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.gtech-price-row:last-of-type {
    border-bottom: none;
}

.gtech-price-row > span:first-child {
    color: var(--text-light);
    font-size: 13px;
}

.gtech-price-row.total {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 2px solid var(--primary);
}

.gtech-price-row.total > span:first-child {
    font-weight: 700;
    color: var(--text);
}

.gtech-price-values {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.price-tl {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

.price-usd, .price-eur {
    font-size: 12px;
    color: var(--text-light);
}

.gtech-price-row.total .price-tl {
    font-size: 22px;
    color: var(--success);
}

.gtech-rate-info {
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px dashed var(--border);
    font-size: 11px;
    color: var(--text-light);
    text-align: center;
}

/* Quantity */
.gtech-qty-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.gtech-qty-row label {
    font-weight: 500;
}

.gtech-qty-control {
    display: flex;
    align-items: center;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.gtech-qty-control button {
    width: 36px;
    height: 36px;
    border: none;
    background: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--primary);
}

.gtech-qty-control button:hover {
    background: var(--primary-light);
}

.gtech-qty-control input {
    width: 50px;
    height: 36px;
    border: none;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
}

/* Add Button */
.gtech-btn-add {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.gtech-btn-add:hover {
    background: var(--primary-dark);
}

/* Right Panel */
.gtech-right-panel {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    max-height: calc(100vh - 80px);
    -webkit-overflow-scrolling: touch; /* iOS smooth scroll */
    scroll-behavior: smooth;
    will-change: scroll-position;
}

.gtech-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gtech-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

.gtech-step-num {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
}

/* System Cards */
.gtech-system-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.gtech-system-card {
    padding: 16px;
    background: var(--card);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}

.gtech-system-card:hover {
    border-color: var(--primary);
}

.gtech-system-card.active {
    border-color: var(--success);
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

.gtech-system-card img {
    width: 100%;
    height: 80px;
    object-fit: contain;
    margin-bottom: 8px;
}

.gtech-system-card .title {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.gtech-system-card .sub {
    font-size: 12px;
    color: var(--text-light);
}

/* Profile Cards */
.gtech-profile-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.gtech-profile-card {
    padding: 12px;
    background: var(--card);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}

.gtech-profile-card:hover {
    border-color: var(--primary);
}

.gtech-profile-card.active {
    border-color: var(--success);
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

.gtech-profile-card img {
    width: 100%;
    height: 70px;
    object-fit: contain;
    margin-bottom: 8px;
}

.gtech-profile-card .name {
    font-weight: 600;
    font-size: 14px;
}

.gtech-profile-card .uf {
    font-size: 11px;
    color: var(--text-light);
}

/* Type Buttons */
.gtech-type-buttons {
    display: flex;
    gap: 12px;
}

.gtech-type-btn {
    flex: 1;
    padding: 16px 12px;
    background: var(--card);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.gtech-type-btn:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.gtech-type-btn.active {
    border-color: var(--success);
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    color: var(--success);
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.2);
}

.gtech-type-btn svg {
    width: 60px;
    height: 50px;
}

.gtech-type-btn.active svg rect[fill="#e8e8e8"] {
    fill: #d1fae5;
}

.gtech-type-btn.active svg rect[fill="#f0f0f0"] {
    fill: #ecfdf5;
}

.gtech-type-btn span {
    font-weight: 700;
    font-size: 14px;
    color: var(--text);
}

.gtech-type-btn.active span {
    color: var(--success);
}

/* Opening Selects */
.gtech-opening-selects {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.gtech-opening-select label {
    display: block;
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 4px;
}

.gtech-opening-select select,
.gtech-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card);
    font-size: 14px;
    cursor: pointer;
}

/* Color Picker */
.gtech-color-picker {
    display: flex;
    align-items: center;
    gap: 16px;
}

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

.gtech-color-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.gtech-color-btn:hover {
    transform: scale(1.1);
}

.gtech-color-btn.active {
    border-color: var(--success);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.3);
}

.gtech-color-btn.active::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.gtech-color-label {
    font-size: 13px;
    color: var(--text-light);
}

/* Cart Badge */
.gtech-cart-badge {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(21, 101, 192, 0.4);
    z-index: 1000;
    transition: transform 0.2s;
}

.gtech-cart-badge:hover {
    transform: scale(1.1);
}

.gtech-cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 22px;
    height: 22px;
    background: var(--danger);
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* WhatsApp Button */
.gtech-whatsapp-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: transform 0.2s;
    text-decoration: none;
}

.gtech-whatsapp-btn:hover {
    transform: scale(1.1);
}

/* Cart Panel */
.gtech-cart-panel {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    height: 100vh;
    background: var(--card);
    box-shadow: -5px 0 25px rgba(0,0,0,0.15);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
}

.gtech-cart-panel.open {
    right: 0;
}

.gtech-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.gtech-cart-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.gtech-cart-header button {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg);
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
}

.gtech-cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.gtech-cart-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    position: relative;
}

.gtech-cart-item-info {
    flex: 1;
}

.gtech-cart-item-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.gtech-cart-item-details {
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.4;
}

.gtech-cart-item-price {
    font-weight: 600;
    color: var(--primary);
    margin-top: 6px;
}

.gtech-cart-item-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border: none;
    background: var(--danger);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gtech-cart-total {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    background: var(--bg);
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: 16px;
}

.cart-total-row.small {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-light);
    margin-top: 4px;
}

/* Cart Form */
.gtech-cart-form {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
}

.gtech-cart-form h4 {
    margin-bottom: 12px;
    font-size: 15px;
}

.gtech-cart-form input,
.gtech-cart-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    font-size: 14px;
}

.gtech-cart-form button {
    width: 100%;
    padding: 12px;
    background: var(--success);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.gtech-cart-form button:hover {
    background: #16a34a;
}

/* Modal */
.gtech-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.gtech-modal.open {
    display: flex;
}

.gtech-modal-content {
    background: var(--card);
    padding: 40px;
    border-radius: var(--radius);
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.gtech-modal-icon {
    width: 60px;
    height: 60px;
    background: var(--success);
    color: white;
    border-radius: 50%;
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.gtech-modal-content h3 {
    font-size: 24px;
    margin-bottom: 8px;
}

.gtech-modal-content p {
    color: var(--text-light);
    margin-bottom: 20px;
}

.gtech-order-num {
    padding: 12px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
}

.gtech-order-num strong {
    display: block;
    font-size: 20px;
    color: var(--primary);
    margin-top: 4px;
}

.gtech-modal-content button {
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

/* Toast */
.gtech-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1e293b;
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 14px;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 4000;
}

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

/* Responsive */
@media (max-width: 900px) {
    .gtech-main-container {
        grid-template-columns: 1fr;
    }
    
    .gtech-left-panel {
        order: 2;
    }
    
    .gtech-right-panel {
        order: 1;
        max-height: none;
    }
    
    .gtech-profile-cards {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .gtech-cart-panel {
        width: 100%;
        right: -100%;
    }
}

@media (max-width: 600px) {
    .gtech-configurator-wrap {
        padding: 10px;
    }
    
    .gtech-system-cards {
        grid-template-columns: 1fr;
    }
    
    .gtech-profile-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gtech-type-buttons {
        flex-wrap: wrap;
    }
    
    .gtech-type-btn {
        flex: 0 0 calc(50% - 5px);
    }
    
    .gtech-opening-selects {
        grid-template-columns: 1fr;
    }
    
    .gtech-price-values {
        gap: 2px;
    }
    
    .price-tl {
        font-size: 16px;
    }
    
    .gtech-price-row.total .price-tl {
        font-size: 18px;
    }
}
