:root {
    /* Andezit Premium Dark Palette */
    --bg-color: #0b1120;
    --card-bg: #111827;
    --card-hover-bg: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-color: #6366f1;
    --accent-light: #818cf8;
    --danger-color: #f43f5e;
    --success-color: #10b981;
    --border-color: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(30, 41, 59, 0.7);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-md: 12px;
    --radius-lg: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

html {
    overflow-x: visible;
}

h1,
h2,
h3,
h4,
.logo,
.btn {
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    /* Changed from visible to hidden to prevent scrollbars */
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    /* Use dynamic viewport height for mobile browsers */
}

.main-content {
    flex: 1;
    width: 100%;
    /* Ensure full width within flex container */
}

.container {
    width: 96%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 5px;
}

/* Glassmorphism Navbar */
nav {
    background-color: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    background: linear-gradient(to right, #818CF8, #C084FC);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
}

.nav-links a.active {
    font-weight: 700;
}

/* Categories Dropdown */
.nav-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.8rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(5px);
}

/* Desktop hover only - disable on mobile */
@media (max-width: 768px) {
    .nav-dropdown:hover .dropdown-menu {
        opacity: 0;
        visibility: hidden;
        max-height: 0;
    }
}

.dropdown-menu a {
    display: block !important;
    padding: 0.7rem 1.5rem !important;
    font-size: 0.9rem !important;
    color: var(--text-secondary) !important;
    border-bottom: none !important;
    margin: 0 !important;
    white-space: nowrap;
    font-weight: 500 !important;
}

.dropdown-menu a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--accent-light) !important;
}

.nav-links a i {
    margin-right: 0.5rem;
}

/* Hero Section Style for Headers */
h1 {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    margin-bottom: 0.5rem;
    background: linear-gradient(to bottom right, #FFFFFF, #94A3B8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Product Grid */
/* Category Section Cards (Homepage) */
.category-section-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(124, 58, 237, 0.05));
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(99, 102, 241, 0.1);
    margin-bottom: 4rem;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
    padding-bottom: 1rem;
}

.category-header h2 {
    font-size: 1.75rem;
    color: var(--accent-light);
    /* Default for adv, others might need override or stick to this */
    margin: 0;
}

.category-header p {
    color: var(--text-secondary);
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

/* Responsive Grid Breakpoints */
@media (max-width: 1400px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1100px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.product-card {
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
}

.product-img-wrapper {
    position: relative;
    padding-top: 100%;
    /* 1:1 Aspect Ratio */
    overflow: hidden;
}

.product-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

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

.product-info {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
    color: var(--text-primary);
    min-height: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.price-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-end;
    margin-bottom: 1rem;
    min-height: 2.5rem;
}

.old-price {
    text-decoration: line-through;
    color: var(--text-secondary);
    font-size: 0.85rem;
    opacity: 0.6;
    margin-bottom: 2px;
}

.product-price {
    color: var(--accent-light);
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0;
    text-align: right;
    width: 100%;
}

.product-price.discounted {
    color: var(--danger-color);
}

.product-card-actions {
    margin-top: auto;
    display: flex;
    gap: 0.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--accent-color), #7C3AED);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    gap: 0.5rem;
}

.btn:hover {
    transform: scale(1.02);
    filter: brightness(1.1);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

.btn-block {
    width: 100%;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #E11D48);
}

.btn-vertical {
    flex-direction: column;
    padding: 0.75rem 0.5rem;
    font-size: 12px !important;
    gap: 0.25rem;
}

.btn-vertical i {
    font-size: 1.25rem;
    margin: 0 !important;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Card Utility */
.card {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

/* Empty State Utilities */
.empty-state-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 400px);
    width: 100%;
}

/* Table Enhancements */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

th {
    text-align: left;
    padding: 1rem;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
}

td {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

/* Select2 Premium Theme (Admin Style) */
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    background-color: var(--bg-color) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
    height: auto !important;
    min-height: 50px !important;
    transition: all 0.3s ease !important;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: var(--accent-color) !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1) !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--text-primary) !important;
    line-height: 50px !important;
    padding-left: 1.25rem !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 50px !important;
    right: 10px !important;
}

.select2-dropdown {
    background-color: var(--card-bg) !important;
    border: 1px solid var(--accent-color) !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
    overflow: hidden !important;
    margin-top: 5px !important;
    z-index: 9999 !important;
}

.select2-search--dropdown {
    padding: 12px !important;
}

.select2-search--dropdown .select2-search__field {
    background-color: var(--bg-color) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 6px !important;
    color: var(--text-primary) !important;
    padding: 0.6rem 1rem !important;
}

.select2-results__option {
    padding: 12px 1.5rem !important;
    color: var(--text-secondary) !important;
    transition: all 0.2s ease !important;
}

.select2-results__option--highlighted[aria-selected],
.select2-results__option[aria-selected="true"] {
    background-color: var(--accent-color) !important;
    color: white !important;
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.table-responsive {
    overflow-x: auto;
}

aside .card {
    border: 1px solid rgba(255, 255, 255, 0.05);
}

main .card {
    min-height: 400px;
}

input,
textarea,
.form-control {
    width: 100%;
    padding: 0.8rem 1.2rem;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
    resize: vertical;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-danger {
    background-color: rgba(244, 63, 94, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(244, 63, 94, 0.2);
}

/* Responsive */
@media (max-width: 1024px) {
    h1 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .nav-links {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
}

/* Slider */
.slider-container {
    position: relative;
    width: 100%;
    height: 450px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 3rem;
    border: 1px solid var(--border-color);
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    text-decoration: none;
}

.slide.active {
    opacity: 1;
}

.slide-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-content {
    position: relative;
    z-index: 2;
    text-align: left;
    padding: 3.5rem;
}

.slide-content h2 {
    font-size: 2.25rem;
    color: white;
    margin-bottom: 0.5rem;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
}

/* Slider Navigation Arrows */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
}

.slider-container:hover .slider-arrow {
    opacity: 1;
}

.slider-arrow:hover {
    background: var(--accent-color);
    border-color: var(--accent-light);
    transform: translateY(-50%) scale(1.1);
}

.arrow-prev {
    left: 20px;
}

.arrow-next {
    right: 20px;
}

/* Slider Dots */
.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 8px 15px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Header Search */
.header-search-container {
    position: relative;
    max-width: 350px;
    /* width: 100%; */
    margin: 0 2rem;
}

.header-search-input {
    width: 100%;
    padding: 0.6rem 1rem 0.6rem 2.5rem !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 20px !important;
    font-size: 0.9rem !important;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}

.search-results-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 1005;
    display: none;
    max-height: 450px;
    overflow-y: auto;
    animation: fadeIn 0.2s ease;
}

/* Custom Scrollbar for Search Dropdown */
.search-results-dropdown::-webkit-scrollbar {
    width: 6px;
}

.search-results-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.search-results-dropdown::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

.search-results-dropdown::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: var(--card-hover-bg);
    color: var(--accent-light);
}

.search-result-img {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
}

.search-result-name {
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dot.active {
    background: var(--accent-light);
    transform: scale(1.3);
    box-shadow: 0 0 10px var(--accent-color);
}

/* Header Cart Popup */
.cart-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.cart-wrapper>a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-badge {
    position: absolute;
    top: -10px;
    right: -14px;
    background: var(--danger-color);
    color: white;
    font-size: 0.8rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 800;
    border: 2px solid var(--bg-color);
    line-height: 1;
    padding: 0;
    pointer-events: none;
    display: none;
    /* jQuery will set to 'flex' via .css() */
}

.cart-popup {
    position: absolute;
    top: calc(100% + 1rem);
    right: -10px;
    width: 450px;
    background: #1E293B;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1100;
    padding: 1.25rem;
}

.cart-wrapper:hover .cart-popup {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.cart-popup-items {
    max-height: 350px;
    overflow-y: auto;
    margin-bottom: 1rem;
    padding-right: 5px;
}

.cart-popup-items::-webkit-scrollbar {
    width: 4px;
}

.cart-popup-items::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

.cart-popup-item {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.cart-popup-item:last-child {
    border-bottom: none;
}

.qty-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    padding: 2px 6px;
    border: 1px solid var(--border-color);
}

.qty-btn {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    font-size: 0.75rem;
}

.qty-btn:hover {
    background: var(--accent-color);
    color: white;
}

.cart-popup-footer {
    border-top: 2px solid var(--border-color);
    padding-top: 1rem;
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cart-popup-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}


/* ==========================================
   PAGE SPECIFIC LAYOUTS
   ========================================== */

/* Product Detail */
.product-detail-wrapper {
    display: flex !important;
    gap: 2rem;
    margin-top: 1rem;
    align-items: stretch;
    height: calc(100vh - 140px);
    padding: 0 1rem;
    overflow: hidden;
    width: 100%;
}

.product-detail-col {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
    overflow-y: auto;
}

.product-desc-card {
    margin-bottom: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    padding: 1rem;
    height: calc(55vh - 215px);
    min-height: 150px;
    display: flex;
    flex-direction: column;
}

/* Contact Page */
.contact-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

/* Cart Page */
.cart-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-top: 3rem;
    align-items: start;
}

/* Profile Page */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    margin-top: 2rem;
}

.responsive-table th,
.responsive-table td {
    padding: 1rem;
    text-align: left;
}

.text-right-desktop {
    text-align: right;
}

.desktop-only {
    display: table-header-group;
}

.filter-form {
    display: grid;
    grid-template-columns: 1fr 1fr 1.2fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 2rem;
}


/* Checkout Page */
.checkout-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
    align-items: start;
}

/* ==========================================
   ENHANCED MOBILE RESPONSIVE
   ========================================== */

@media (max-width: 768px) {

    /* Product Detail Mobile */
    .product-detail-wrapper {
        flex-direction: column !important;
        height: auto !important;
        overflow: visible !important;
        padding: 0 !important;
        gap: 1rem !important;
    }

    .product-detail-col {
        height: auto !important;
        overflow-y: visible !important;
    }

    .product-desc-card {
        height: auto !important;
        min-height: auto !important;
    }

    /* Contact Page Mobile */
    .contact-container {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    /* Cart Page Mobile */
    .cart-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .cart-popup-actions {
        grid-template-columns: 1fr;
    }

    /* Cart Item Mobile */
    .cart-item-row {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 1rem !important;
    }

    .cart-item-row>div:first-child {
        width: auto !important;
        height: auto !important;
    }

    .cart-item-row>div:nth-child(2) {
        width: 80px !important;
        height: 80px !important;
    }

    .cart-item-row>div:last-child {
        text-align: left !important;
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: 0.5rem;
    }

    /* Product Modal Mobile */
    .modal-content {
        max-width: 95vw !important;
        width: 100%;
        margin: auto;
    }

    .modal-content img {
        max-width: 100% !important;
        height: auto !important;
        max-height: 80vh !important;
        object-fit: contain !important;
    }

    .modal-arrow {
        width: 40px !important;
        height: 40px !important;
        font-size: 1rem !important;
    }

    .modal-arrow.prev {
        left: 10px !important;
    }

    .modal-arrow.next {
        right: 10px !important;
    }

    .close-modal {
        top: 20px !important;
        right: 20px !important;
        font-size: 2rem !important;
    }

    /* Header Navigation Mobile */

    .nav-content {
        flex-wrap: wrap;
    }

    .logo {
        font-size: 1.4rem;
    }

    .header-search-container {
        order: 3;
        width: 100%;
        margin: 1rem 0 0 0;
    }

    .nav-links {
        flex-wrap: wrap;
        gap: 0.75rem;
        font-size: 0.85rem;
    }

    .nav-links a {
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem;
        background: rgba(255, 255, 255, 0.03);
        border-radius: 8px;
    }

    .nav-links a i {
        margin-right: 0.25rem;
    }

    /* Dropdown menu mobile */
    .dropdown-menu {
        position: fixed;
        left: 50%;
        transform: translateX(-50%) translateY(10px);
        width: 90%;
        max-width: 300px;
    }

    .nav-dropdown:hover .dropdown-menu {
        transform: translateX(-50%) translateY(0);
    }

    /* Cart popup mobile */
    .cart-popup {
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: 0 !important;
        width: calc(100% - 1rem) !important;
        margin: 0 0.5rem !important;
        max-width: none;
        transform: none;
        opacity: 0;
        visibility: hidden;
        display: none;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
        border: 1px solid var(--border-color);
        background: rgba(30, 41, 59, 0.95);
        z-index: 100 !important;
        max-height: 0;
        overflow: hidden;
        transition: all 0.3s ease;
        padding: 0;
        border-radius: var(--radius-lg);
    }

    /* When wrapper has 'active' class (toggled by JS) */
    .cart-wrapper.active .cart-popup {
        opacity: 1;
        visibility: visible;
        display: block;
        max-height: 60vh;
        /* Allow expansion but not too much */
        padding: 1rem;
        overflow-y: auto;
        /* Handle scrolling within the limit */
        margin-top: 0.5rem;
        margin-bottom: 2rem;
        /* Gap at the bottom */
    }

    /* Override hover for mobile - disable hover trigger, rely on click/active */
    .cart-wrapper:hover .cart-popup {
        display: none;
    }

    .cart-wrapper.active:hover .cart-popup {
        display: block;
    }

    .cart-wrapper.active:hover .cart-popup {
        display: block;
    }

    /* Ensure cart items are visible against the dark bg */
    .cart-popup-item {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .cart-popup-item>div:first-child {
        width: 100%;
        display: flex;
        align-items: center;
        gap: 1rem;
    }

    .cart-popup-item>div:last-child {
        width: 100%;
    }

    .cart-popup-item .qty-controls {
        width: 100%;
        justify-content: space-between;
        margin-top: 0.25rem;
    }

    .cart-wrapper .cart-badge {
        position: static;
        transform: none;
        margin-left: 0.5rem;
        background: var(--accent-color);
    }

    /* Slider mobile */
    .slider-container {
        height: 300px;
    }

    .slide-content {
        padding: 2rem 1.5rem;
    }

    .slide-content h2 {
        font-size: 1.5rem;
    }

    .slider-arrow {
        width: 40px;
        height: 40px;
    }

    .arrow-prev {
        left: 10px;
    }

    .arrow-next {
        right: 10px;
    }

    /* Container */
    .container {
        width: 95%;
    }

    /* Cards mobile */
    .card {
        padding: 1.5rem 1rem;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    /* Headings */
    h1 {
        font-size: 1.75rem;
    }

    /* Profile & Modal Mobile Adjustments */
    .profile-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    .profile-grid aside,
    .profile-grid main {
        width: 100% !important;
        min-width: 0 !important;
        overflow-x: hidden !important;
    }

    .responsive-table thead.desktop-only {
        display: none !important;
    }

    .responsive-table,
    .responsive-table tbody,
    .responsive-table tr,
    .responsive-table td {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .responsive-table {
        table-layout: fixed !important;
    }

    .responsive-table tr {
        margin-bottom: 1.5rem;
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        background: rgba(255, 255, 255, 0.02);
        padding: 1rem;
    }

    .responsive-table td {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 0.75rem 0 !important;
        border: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
        text-align: right !important;
    }

    .responsive-table td:last-child {
        border-bottom: none !important;
    }

    .responsive-table td::before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--text-secondary);
        font-size: 0.8rem;
        text-transform: uppercase;
        margin-right: 1rem;
        text-align: left !important;
    }

    .responsive-table td[data-label="Ürün"] {
        flex-direction: column !important;
        align-items: flex-start !important;
        text-align: left !important;
    }

    .responsive-table td[data-label="Ürün"]::before {
        margin-bottom: 0.5rem;
    }

    .text-right-desktop {
        text-align: left !important;
    }

    .modal-footer-row td {
        justify-content: space-between !important;
        padding: 1rem 0 !important;
    }

    .modal .card {
        width: 95% !important;
        padding: 1.5rem !important;
    }

    .modal-body.scrollable {
        max-height: 70vh !important;
        overflow-y: auto !important;
        padding-right: 5px;
    }

    .filter-form {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
        padding-bottom: 1.5rem !important;
        width: 100% !important;
    }

    .checkout-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    /* Wrap all flex elements inside cards to prevent stretch */
    .card div[style*="display: flex"],
    .card form[style*="display: flex"] {
        flex-wrap: wrap !important;
    }

    h2 {
        font-size: 1.5rem;
    }

    /* Product grid already responsive */
    /* Tables - make them scrollable */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: auto !important;
    }

    /* Form groups */
    .form-group {
        margin-bottom: 1.25rem;
    }

    /* Buttons */
    .btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.2rem;
    }

    nav {
        padding: 1rem 0;
    }

    .nav-links {
        gap: 0.5rem;
    }

    .nav-links a {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
    }

    .slider-container {
        height: 220px;
    }

    .slide-content {
        padding: 1.5rem 1rem;
    }

    .slide-content h2 {
        font-size: 1.2rem;
    }

    .product-card-actions {
        flex-direction: column;
    }

    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    h1 {
        font-size: 1.5rem;
    }
}

/* Responsive Text Utilities */
.mobile-text {
    display: none;
}

@media (max-width: 768px) {
    .desktop-text {
        display: none;
    }

    .mobile-text {
        display: inline;
    }
}


/* Mobile Navigation Toggle Button */
.mobile-nav-toggle {
    display: none;
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    z-index: 9999;
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    font-size: 1.2rem;
    width: 50px;
    height: 50px;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .mobile-nav-toggle {
        display: flex !important;
        width: 48px;
        height: 48px;
        align-items: center;
        justify-content: center;
        font-size: 1.3rem;
        box-shadow: 0 4px 12px rgba(99, 102, 241, 0.5);
        border: 1px solid rgba(255, 255, 255, 0.1);
        top: 15px;
        right: 0;
        transform: none;
    }

    .mobile-kategori {
        gap: 0.75rem;
    }

    /* Updated nav styles for mobile */
    nav {
        position: relative;
    }

    /* Stack 2-column layouts */
    .cart-popup-actions {
        grid-template-columns: 1fr;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 320px;
        height: 100vh;
        background: var(--card-bg);
        backdrop-filter: blur(12px);
        flex-direction: column;
        padding: 6rem 2rem 2rem;
        gap: 1rem;
        transition: right 0.3s ease;
        border-left: 1px solid var(--border-color);
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
        z-index: 1999;
        overflow-y: auto;
    }

    .nav-links.active {
        right: 0;
    }

    /* Nav-dropdown container full width for inline dropdown */
    .nav-links .nav-dropdown {
        width: 100%;
        display: flex;
        flex-direction: column;
        position: relative;
        /* For absolute positioning of dropdown */
        gap: 0;
        /* Remove extra gap */
    }

    /* Dropdown menu collapsed by default on mobile */
    .nav-links .nav-dropdown .dropdown-menu {
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: 0 !important;
        width: calc(100% - 1rem) !important;
        margin: 0 0.5rem !important;
        opacity: 0 !important;
        visibility: hidden !important;
        max-height: 0 !important;
        overflow: hidden !important;
        transition: all 0.3s ease !important;
        background: transparent !important;
        transform: none !important;
        box-shadow: none !important;
        z-index: 100 !important;
    }

    /* Show dropdown when nav-dropdown has active class */
    .nav-links .nav-dropdown.active .dropdown-menu {
        opacity: 1 !important;
        visibility: visible !important;
        max-height: 500px !important;
        margin-top: 0.25rem !important;
        padding: 0.75rem !important;
        border-radius: var(--radius-lg) !important;
        background: rgba(30, 41, 59, 0.6) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
    }

    /* Dropdown items spacing with border-radius */
    .nav-links .nav-dropdown .dropdown-menu a {
        padding: 0.6rem 1rem !important;
        margin: 0.15rem 0 !important;
        display: block !important;
        width: 100% !important;
        background: rgba(255, 255, 255, 0.05) !important;
        border-radius: 8px !important;
        transition: background 0.2s ease !important;
    }

    .nav-links .nav-dropdown .dropdown-menu a:hover {
        background: rgba(255, 255, 255, 0.1) !important;
    }

    .nav-links>a {
        width: 100%;
        padding: 0.75rem 1rem;
        background: rgba(255, 255, 255, 0.05);
        border-radius: var(--radius-md);
        display: flex;
        align-items: center;
        gap: 0.75rem;
        justify-content: flex-start;
    }

    /* Dropdown trigger button - arrow on right */
    .nav-links .nav-dropdown>a {
        width: 100%;
        padding: 0.75rem 1rem;
        background: rgba(255, 255, 255, 0.05);
        border-radius: var(--radius-md);
        display: flex;
        align-items: center;
        justify-content: space-between !important;
    }

    .nav-links a i {
        font-size: 1.1rem;
    }

    /* Cart wrapper in mobile nav */
    .cart-wrapper {
        width: 100%;
    }

    .cart-wrapper>a {
        width: 100%;
        padding: 0.75rem 1rem;
        background: rgba(255, 255, 255, 0.05);
        border-radius: var(--radius-md);
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    /* Dropdown in mobile */
    .nav-dropdown {
        width: 100%;
    }

    .nav-dropdown>a {
        width: 100%;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        margin-top: 0.5rem;
        background: rgba(255, 255, 255, 0.03);
    }
}

/* Custom Checkbox Styling */
.custom-checkbox {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 16px !important;
    height: 16px !important;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    background-color: transparent;
    cursor: pointer;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    margin-top: 0;
}

.custom-checkbox:hover {
    border-color: var(--accent-light);
    transform: scale(1.05);
}

.custom-checkbox:checked {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

.custom-checkbox:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: translate(-50%, -60%) rotate(45deg);
    animation: checkmark 0.3s ease;
}

@keyframes checkmark {
    0% {
        transform: translate(-50%, -60%) rotate(45deg) scale(0);
    }

    50% {
        transform: translate(-50%, -60%) rotate(45deg) scale(1.2);
    }

    100% {
        transform: translate(-50%, -60%) rotate(45deg) scale(1);
    }
}

/* Special styling for master checkbox */
.master-checkbox {
    width: 16px;
    height: 16px;
}

/* Quantity Control Buttons */
.qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background-color: transparent;
    color: var(--text-primary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.75rem;
}

.qty-btn:hover:not(:disabled) {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    transform: scale(1.1);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.qty-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.qty-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.qty-btn i {
    pointer-events: none;
}