:root {
    --bg-dark: #121212;
    --bg-card: #1e1e1e;
    --primary: #7a0000;
    --primary-hover: #600000;
    --text-main: #ffffff;
    --text-muted: #a1a1aa;
    --border: #27272a;
    --success: #10b981;
    --danger: #ef4444;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
}

/* Utils */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.grid {
    display: grid;
    gap: 20px;
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-low {
    background: #f59e0b;
    color: black;
}

.badge-out {
    background: var(--danger);
    color: white;
}

.badge-ok {
    background: var(--success);
    color: white;
}

/* Product Card (Shared) */
.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.product-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #333;
}

.product-details {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-brand {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 5px 0 10px 0;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border);
    -webkit-transition: .4s;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
}

input:checked+.slider {
    background-color: var(--success);
}

input:focus+.slider {
    box-shadow: 0 0 1px var(--success);
}

input:checked+.slider:before {
    -webkit-transform: translateX(20px);
    -ms-transform: translateX(20px);
    transform: translateX(20px);
}

/* Rounded sliders */
.slider.round {
    border-radius: 20px;
}

.slider.round:before {
    border-radius: 50%;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 15px;
}

.product-actions {
    margin-top: auto;
    display: flex;
    gap: 10px;
}

button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

button:hover {
    background: var(--primary-hover);
}

button:disabled {
    background: var(--border);
    cursor: not-allowed;
    color: var(--text-muted);
}

button.secondary {
    background: transparent;
    border: 1px solid var(--border);
}

button.secondary:hover {
    background: #2d2d2d;
}

/* Shop Navbar */
.shop-nav {
    border-bottom: 1px solid var(--border);
    padding: 20px 0;
    margin-bottom: 40px;
    background: rgba(18, 18, 18, 0.95);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(to right, #4f46e5, #ec4899);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* POS Layout Structure */
.pos-page-grid {
    display: grid;
    grid-template-columns: 1fr 500px;
    /* Increased from 400px to 500px */
    /* Main Content | Sidebar */
    gap: 20px;
    height: calc(100vh - 80px);
    /* Adjust for header/padding */
    /* Adjust for header/padding */
    overflow: hidden;
}

.pos-empty-col {
    border-left: 2px dashed var(--border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.pos-products {
    padding: 20px;
    overflow-y: auto;
}

.pos-sidebar {
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    margin: 20px 0;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 8px;
}

.cart-total {
    border-top: 1px solid var(--border);
    padding-top: 20px;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: right;
    margin-bottom: 20px;
}

.checkout-btn {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
}

/* TC Box Style */
.tc-box {
    width: 100%;
    height: 40px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    background: var(--bg-dark);
    /* Card renginden daha koyu */
    border: 1px solid #52525b;
    /* Daha belirgin gri kenarlık */
    border-radius: 4px;
    color: #ffffff !important;
    /* Beyaz renk - important ile override'ları engelle */
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
    /* İç gölge ile derinlik */
    caret-color: #ffffff;
    /* İmleç rengi de beyaz */
}

.tc-box:focus {
    border-color: var(--primary);
    background: #000;
    outline: none;
    box-shadow: 0 0 0 2px rgba(122, 0, 0, 0.3);
    color: #ffffff !important;
    /* Focus durumunda da beyaz */
}

/* General POS Input High Contrast Style */
.pos-input {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    font-size: 1rem;
    font-weight: 500;
    background: var(--bg-dark);
    border: 1px solid #52525b;
    border-radius: 4px;
    color: var(--text-main);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

.pos-input:focus {
    border-color: var(--primary);
    background: #000;
    outline: none;
    box-shadow: 0 0 0 2px rgba(122, 0, 0, 0.3);
}

/* Icon Button */
.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: color 0.2s;
}

.icon-btn:hover {
    color: var(--text-main);
}

/* POS Optical Section Styles */
.pos-tab-btn {
    flex: 1;
    padding: 8px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.pos-tab-btn.active {
    border-bottom-color: var(--primary);
    color: var(--primary);
    font-weight: bold;
}

.pos-input-small {
    width: 100%;
    border: none;
    background: transparent;
    color: white;
    padding: 5px;
    font-size: 0.9rem;
    outline: none;
    text-align: center;
}

/* Remove arrows from number input */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Enhanced SPH/CYL Input Styles - Refined Red Theme */
.enhanced-input-group {
    display: flex;
    align-items: stretch;
    background: #000000;
    /* Pure black background for value */
    border: 1px solid #3f3f46;
    /* Softer border color */
    border-radius: 6px;
    overflow: hidden;
    height: 40px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.sign-btn {
    width: 22px;
    /* Reduced 25% from 30px */
    border: none;
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    padding: 0;
    line-height: normal;
    transition: background 0.2s;
}

/* Both Signs Red as requested */
.sign-btn.plus,
.sign-btn.minus,
.sign-btn.fixed-minus {
    background: #7f1d1d;
    /* Dark Red */
}

.sign-btn:hover {
    background: #991b1b;
    /* Slightly lighter on hover */
}

.value-input {
    flex: 1;
    border: none;
    background: #000000;
    /* Ensure black */
    color: white;
    font-size: 1.3rem;
    font-weight: 700;
    text-align: center;
    width: 60px;
    /* Min width */
    outline: none;
    font-family: 'Segoe UI', sans-serif;
}

/* Spin Controls Refined */
.spin-controls {
    display: flex;
    flex-direction: column;
    width: 16px;
    /* Reduced 20% from 20px */
    background: #18181b;
    border-left: 1px solid #3f3f46;
}

.spin-btn {
    flex: 1;
    border: none;
    background: transparent;
    color: #a1a1aa;
    cursor: pointer;
    font-size: 0.45rem;
    /* Reduced 20% from 0.54rem */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.1s;
    padding: 0;
    line-height: normal;
}

.spin-btn:hover {
    background: #27272a;
    color: white;
}

.spin-btn:first-child {
    border-bottom: 1px solid #3f3f46;
}

/* Dropdown (Select & Option) Dark Theme Fix */
select {
    background-color: #121212;
    color: #ffffff;
    border: 1px solid #27272a;
    border-radius: 6px;
    padding: 8px 12px;
}

select option {
    background-color: #1e1e1e;
    color: #ffffff;
    padding: 8px 12px;
}

select option:hover,
select option:checked {
    background-color: #7a0000;
    color: #ffffff;
}

select:focus {
    border-color: #7a0000;
    outline: none;
    box-shadow: 0 0 0 2px rgba(122, 0, 0, 0.3);
}

/* Homepage Auto-Scrolling Brand Sliders */
.carousel-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 30px;
}

.product-slider {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 10px;
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.product-slider::-webkit-scrollbar {
    display: none;
}

.product-slider>.product-card {
    min-width: 250px;
    flex: 0 0 auto;
}

/* Carousel Control Buttons */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(18, 18, 18, 0.8);
    color: white;
    border: 1px solid var(--border);
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: background 0.2s, border-color 0.2s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.carousel-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.carousel-btn.left {
    left: 5px;
}

.carousel-btn.right {
    right: 5px;
}

@media (max-width: 768px) {
    .carousel-btn {
        display: none;
        /* Hide arrows on mobile to prefer native touch swiping */
    }
}