* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --text-color: #333;
    --border-color: #e0e0e0;
    --bg-gray: #f5f5f5;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    font-size: 16px;
}

.btn-loading {
  position: relative;
  pointer-events: none; /* prevent double clicks */
  opacity: 0.8;
}

.btn-loading .spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid #fff;
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
}

.btn-selected {
  background-color: #9ca3af !important; /* Tailwind gray-400 */
  color: #fff !important;
}


@keyframes spin {
  to { transform: rotate(360deg); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Auth Pages */
.auth-page {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

.auth-box {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

.auth-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

.auth-header h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

.auth-form {
    padding: 40px 30px 15px 30px;
}

.auth-footer {
    text-align: center;
    margin: 20px 0;
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

/* Header */
.admin-header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 70px;
}

.header-logo h2 {
    font-size: 24px;
    color: var(--primary-color);
}

.header-logo a {
    text-decoration: none;
    color: inherit;
}

.header-nav {
    display: flex;
    gap: 20px;
    margin-left: 30px;
}

.header-nav .nav-link {
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    transition: all 0.3s;
}

.header-nav .nav-link:hover {
    background: var(--bg-gray);
    color: var(--primary-color);
}

.header-nav .nav-link.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.main-menu {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 0 20px;
}

.main-menu ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

.main-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

.main-menu a:hover {
    color: var(--primary-color);
}

.header-actions {
    display: flex;
    gap: 20px;
    align-items: center;
}

.header-icon {
    position: relative;
    color: var(--text-color);
    font-size: 20px;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
}

.header-icon:hover {
    color: var(--primary-color);
}

.badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    z-index: 5;
    pointer-events: none;
}

.dropdown {
    position: relative;
}

.dropdown-toggle {
    background: none;
    border: none;
    cursor: pointer;
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    min-width: 200px;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
}

.dropdown-item {
    display: block;
    padding: 12px 16px;
    color: var(--text-color);
    text-decoration: none;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: var(--bg-gray);
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 140px);
    padding: 40px 0;
}

.page-header {
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.page-header h1 {
    font-size: 32px;
    color: var(--text-color);
    margin: 0;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

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

@media (max-width: 640px) {
    .container {
        padding: 0 20px;
    }
    
    .main-content {
        padding: 20px 0;
    }
    
    .page-header {
        margin-bottom: 20px;
    }
    
    .page-header h1 {
        font-size: 24px;
    }
    
    .product-grid {
        grid-template-columns: repeat(1, 1fr);
        gap: 20px;
    }
    
    .product-card {
        border-radius: 8px;
    }
    
    .product-card:hover {
        transform: translateY(-2px);
    }
    
    /*.product-card img {
        height: 150px;
        object-fit: cover;
    }
    
    .product-info {
        padding: 8px;
    }
    
    .product-info h3 {
        font-size: 12px;
        line-height: 1.2;
        margin-bottom: 4px;
        white-space: normal;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        max-height: 2.4em;
    }
    
    .product-info .price {
        font-size: 15px;
        margin-bottom: 6px;
        font-weight: 700;
    }
    
    .variant-select {
        padding: 6px 8px;
        font-size: 11px;
        margin-bottom: 6px;
    }
    
    .product-actions {
        flex-direction: column;
        gap: 4px;
        margin-top: 6px;
    }
    */
    /*.product-actions .btn {
        width: 100%;
        padding: 7px 10px;
        font-size: 11px;
        white-space: nowrap;
    }*/
    
    /*.btn i {
        font-size: 10px;
        margin-right: 2px;
    }*/
    
    .page-header .btn {
        font-size: 12px;
        padding: 8px 12px;
    }
}

.product-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.product-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

/* Stock Labels */
.stock-label {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.stock-label.in-stock {
    background-color: #10b981;
    color: white;
}

.stock-label.out-of-stock {
    background-color: #ef4444;
    color: white;
}

.stock-label i {
    font-size: 11px;
}

/* Disabled button styling */
.btn:disabled, .btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
    background: #9ca3af;
}

.product-info {
    padding: 20px;
}

.product-info h3 {
    font-size: 18px;
    margin-bottom: 10px;
    display: inline-block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

.product-info .price {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.product-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}
.variant-select,
.variant-selector-wrapper .variant-selector {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-color: #ffffff;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 10px 35px 10px 14px;
  font-size: 15px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #333;
  width: 100%;
  max-width: 100%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 140 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='30,50 70,90 110,50' stroke='%23666' stroke-width='15' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  line-height: normal;
  cursor: pointer;
  min-height: 42px;
  display: block;
}
.variant-select option.hidden-default {
  display: none;
}
.variant-select:focus,
.variant-selector:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
  outline: none;
}

.variant-select:hover,
.variant-selector:hover {
  border-color: #999;
}

.variant-select option,
.variant-selector option {
  padding: 10px;
  color: #333;
  background-color: #ffffff;
  font-size: 15px;
  line-height: 1.5;
}

.variant-select:disabled,
.variant-selector:disabled {
  background-color: #f0f0f0;
  cursor: not-allowed;
  opacity: 0.6;
}

.variant-select option:disabled {
  color: #999;
  font-style: italic;
  background-color: #f5f5f5;
}

.stock-tooltip {
  display: inline-block;
  margin-left: 8px;
  color: #f59e0b;
  cursor: help;
  font-size: 16px;
}

.stock-tooltip:hover {
  color: #d97706;
}

.variant-selector-wrapper {
  position: relative;
}

.variant-selector-wrapper .stock-tooltip {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

/* Custom Tooltip */
.custom-tooltip {
  position: absolute;
  background-color: #333;
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  white-space: nowrap;
  z-index: 1000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.custom-tooltip.show {
  opacity: 1;
}

.custom-tooltip::after {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 5px solid #333;
}

.variant-select-wrapper,
.variant-selector-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
  margin-bottom: 15px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="color"],
.form-group select,
.form-group textarea,
.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 13px;
}

/* Remember me checkbox styling */
.remember-me {
    display: flex;
    align-items: center;
    margin: 15px 0;
    font-size: 14px;
    color: #555;
}

.remember-me input[type="checkbox"] {
    margin-right: 8px;
    accent-color: #4a90e2; /* Optional: modern blue checkmark */
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.remember-me label {
    display: flex;
    align-items: center;
    cursor: pointer;
}


/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6b7280;
    color: white !important;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-success {
    background: #10b981;
    color: white;
    transition: auto;    
}

#successModal .btn-success{
    margin-top: 15px;
}

.btn-success:hover {
    background: #059669;
}

.btn-info {
    background: #3b82f6;
    color: white;
}

.btn-block {
    width: 100%;
}

.btn-remove {
    background: #ef4444;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
}
.add-to-cart-btn{
    width: 100%;
}
/* Toast Notifications - Modern UI */
.toast-container {
    position: fixed;
    top: 60px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
    pointer-events: none;
}

.toast {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    border-left: 4px solid #10b981;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-icon {
    font-size: 24px;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-message {
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
    line-height: 1.5;
    word-wrap: break-word;
}

.toast-close {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.toast-close:hover {
    background: #f3f4f6;
    color: #6b7280;
}

/* Empty State for Collections */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
    color: #d1d5db;
}

.empty-state p {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #374151;
}

.empty-state small {
    font-size: 14px;
    color: #9ca3af;
    display: block;
    margin-top: 8px;
}

.empty-state.error i {
    color: #ef4444;
}

/* Legacy Alert Support (for backward compatibility) */
.alert {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border-left-color: #ef4444;
}

.alert-success {
    background: #f0fdf4;
    color: #166534;
    border-left-color: #10b981;
}

.alert-warning {
    background: #fffbeb;
    color: #92400e;
    border-left-color: #f59e0b;
}

.alert-info {
    background: #eff6ff;
    color: #1e40af;
    border-left-color: #3b82f6;
}

@media (max-width: 768px) {
    .toast-container {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .toast {
        min-width: 0;
    }
}

/* Cart */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
}

@media (max-width: 968px) {
    .cart-layout {
        display: flex;
        flex-direction: column;
        grid-template-columns: 1fr;
    }
    .cart-items{
        overflow: auto;
        -webkit-overflow-scrolling: touch;
    }
    .cart-table{
        min-width: 100%;
        font-size: 14px;
    }
    
    .cart-table th,
    .cart-table td {
        padding: 10px 8px;
    }
    
    .cart-item-product {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .cart-item-product img {
        width: 50px;
        height: 50px;
    }
    
    table.quote-details-table.cart-table{
        min-width: 100%;
    }
}

@media (max-width: 640px) {
    .cart-table {
        font-size: 12px;
    }
    
    .cart-table th,
    .cart-table td {
        padding: 8px 4px;
    }
    
    /* Stack product info vertically on very small screens */
    .cart-item-product img {
        width: 40px;
        height: 40px;
    }
    
    /* Adjust button sizes for mobile */
    .cart-table .btn {
        padding: 6px 10px;
        font-size: 12px;
    }
}

.cart-table {
    width: 100%;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.cart-table th,
.cart-table td {
    padding: 15px;
    text-align: left;
}

.cart-table th {
    background: var(--bg-gray);
    font-weight: 600;
}

.cart-item-product {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-item-product img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}

.cart-sidebar {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    height: fit-content;
    position: sticky;
    top: 90px;
}

.cart-sidebar h3 {
    margin-bottom: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.summary-row.total {
    font-size: 20px;
    font-weight: bold;
    border-top: 2px solid var(--text-color);
    border-bottom: none;
    margin-top: 10px;
    padding-top: 15px;
}

.empty-cart {
    text-align: center;
    padding: 80px 20px;
}

.empty-cart i {
    font-size: 80px;
    color: #ddd;
    margin-bottom: 20px;
}

.share-link .btn.btn-secondary{
    margin-top: 15px;
}

.share-buttons{
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.share-buttons .btn{
    flex-grow: 1;
}

/* Customer View */
.customer-view {
    background: var(--bg-gray);
}

.customer-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 40px 0;
    text-align: center;
}

.custom-message {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    border-left: 4px solid var(--primary-color);
}

.customer-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
}

@media (max-width: 968px) {
    .customer-layout {
        grid-template-columns: 1fr;
    }
}

.customer-products {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (max-width: 968px) {
    .customer-products {
        grid-template-columns: 1fr;
    }
}

.customer-product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.customer-product-card .product-image {
    cursor: pointer;
    overflow: hidden;
}

.customer-product-card .product-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s;
}

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

.customer-product-card .product-details {
    padding: 20px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
    width: 100%;
}

.qty-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    width: 50px;
    height: 35px;
    border-radius: 4px;
    cursor: pointer;
}

.qty-input {
    width: 100%;
    text-align: center;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.customer-sidebar {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    height: fit-content;
    position: sticky;
    top: 20px;
}

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

.modal.show {
    display: flex;
}

#quoteDetailModal .modal-content{
    padding: 45px 5px !important;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}
.modal-actions{
    display: flex;
    gap: 10px;
}
.modal-close {
    float: right;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
}

.lightbox {
    background: rgba(0,0,0,0.9);
}

.lightbox img {
    max-width: 90%;
    max-height: 90vh;
}

/* Settings */
.settings-form {
    background: white;
    border-radius: 12px;
    padding: 30px;
}

.settings-section {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
}

.settings-section:last-child {
    border-bottom: none;
}

.settings-section h2 {
    margin-bottom: 25px;
    color: var(--primary-color);
}

/* Footer */
.footer {
    background: #1f2937;
    color: white;
    padding: 20px 0;
    text-align: center;
    margin-top: 60px;
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
    color: #999;
}

.load-more-container {
    text-align: center;
    margin: 30px 0;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-color);
    cursor: pointer;
    padding: 0;
}

/* Mobile Sidebar */
.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100%;
    background: white;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 1001;
    transition: left 0.3s ease;
    overflow-y: auto;
}

.mobile-sidebar.active {
    left: 0;
}

.mobile-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.mobile-sidebar-header h3 {
    margin: 0;
    font-size: 20px;
}

.mobile-sidebar-close {
    background: none;
    border: none;
    font-size: 24px;
    color: white;
    cursor: pointer;
    padding: 0;
}

.mobile-menu-items {
    padding: 10px 0;
}

.mobile-menu-list {
    list-style: none;
}

.mobile-menu-item {
    border-bottom: 1px solid var(--border-color);
}

.mobile-menu-item > a {
    display: block;
    padding: 15px 20px;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-menu-header a {
    flex: 1;
    padding: 15px 20px;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
}

.submenu-toggle {
    background: none;
    border: none;
    padding: 15px 20px;
    cursor: pointer;
    color: var(--primary-color);
    font-size: 16px;
}

.mobile-submenu {
    display: none;
    background: var(--bg-gray);
    list-style: none;
}

.mobile-submenu li a {
    display: block;
    padding: 12px 20px 12px 40px;
    color: var(--text-color);
    text-decoration: none;
}

.mobile-submenu li a:hover {
    background: #e0e0e0;
}

/* Desktop Submenu */
.main-menu .has-submenu {
    position: relative;
}

.main-menu .submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-radius: 8px;
    list-style: none;
    padding: 10px 0;
    z-index: 100;
    max-height: 500px;
    overflow: auto;
}

.main-menu .has-submenu:hover .submenu {
    display: block;
}

.main-menu .submenu li {
    margin: 0;
}

.main-menu .submenu a {
    display: block;
    padding: 10px 20px;
    color: var(--text-color);
    white-space: nowrap;
}

.main-menu .submenu a:hover {
    background: var(--bg-gray);
    color: var(--primary-color);
}

/* Lightbox Gallery */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 40px;
    cursor: pointer;
    z-index: 10001;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 30px;
    padding: 20px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.3s;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255,255,255,0.3);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-counter {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 16px;
    background: rgba(0,0,0,0.5);
    padding: 8px 16px;
    border-radius: 20px;
}

.quotes-page-header{
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.quotes-page-header .quotesSearchInput{
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    width: 310px;
}


/* Finalized Quote Display */
.finalized-quote {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 900px;
    margin: 40px auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.finalized-quote h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
}

.finalized-message {
    background: #fffbea;
    border-left: 4px solid #f59e0b;
    padding: 15px;
    margin-bottom: 30px;
    border-radius: 4px;
}

.quote-details-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.quote-details-table th,
.quote-details-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.quote-details-table th {
    background: var(--bg-gray);
    font-weight: 600;
    color: var(--text-color);
}

.quote-details-table tr:hover {
    background: #fafafa;
}

.quote-summary {
    margin-top: 20px;
    padding: 20px;
    background: var(--bg-gray);
    border-radius: 8px;
}

.quote-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.quote-summary-row:last-child {
    border-bottom: none;
    font-weight: bold;
    font-size: 18px;
    color: var(--primary-color);
}

/* Responsive Styles */
@media (max-width: 968px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .main-menu {
        display: none;
    }
    
    .header-nav {
        display: none;
    }
    
    .header-container {
        position: relative;
        padding: 8px;
        min-height: 56px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    #admin-dashboard .header-logo{
        left: 40%;
    }
    .header-logo {
        position: absolute;
        left: 15%;
        transform: translateX(-50%);
        max-width: 80px;
        pointer-events: auto;
    }
    
    .header-logo h2 {
        font-size: 13px;
        white-space: nowrap;
    }
    
    .header-logo img {
        max-height: 40px !important;
        max-width: 80px !important;
    }
    
    .header-actions {
        gap: 0px;
        margin-left: auto;
        z-index: 10;
        display: flex;
        align-items: center;
        flex-shrink: 0;
    }
    
    .header-icon {
        font-size: 18px;
        padding: 0px;
        min-width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .mobile-menu-toggle {
        padding: 8px;
        min-width: 32px;
        height: 32px;
        font-size: 18px;
        background: none;
        border: none;
        color: var(--text-color);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }
    
    .badge {
        width: 16px;
        height: 16px;
        font-size: 9px;
        top: 2px;
        right: 2px;
    }
    
    .dropdown {
        position: relative;
    }
    
    .dropdown-toggle {
        min-width: 32px;
        height: 32px;
    }
    .quotes-page-header{
        justify-content: center;
    }
}

/* Upload Modal Improvements */
.modal-upload {
    max-width: 600px;
}

.modal-upload h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.upload-info {
    margin-bottom: 25px;
}

.info-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.info-box h4 {
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
}

.info-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-box ul li {
    padding: 6px 0;
    padding-left: 20px;
    position: relative;
    font-size: 14px;
}

.info-box ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    font-weight: bold;
    color: #10b981;
}

.file-input {
    width: 100%;
    padding: 12px;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    background: var(--bg-gray);
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-input:hover {
    border-color: var(--primary-color);
    background: #f8f9ff;
}

.help-text {
    display: block;
    margin-top: 8px;
    color: #666;
    font-size: 12px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
}

@media (max-width: 600px) {
    .modal-upload {
        max-width: 95%;
        margin: 20px auto;
    }
    
    .info-box {
        padding: 15px;
    }
    
    .info-box ul li {
        font-size: 13px;
    }
    
    .modal-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .modal-actions .btn {
        width: 100%;
    }
}

/* Customer Variant Selector */
.variant-selector-wrapper {
    margin: 12px 0;
}

.variant-selector-wrapper label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 6px;
}

.variant-selector-wrapper label i {
    color: var(--primary-color);
    margin-right: 4px;
}

.variant-selector {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: white;
    font-size: 14px;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.variant-selector:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

@media (max-width: 768px) {
    .variant-selector-wrapper {
        margin: 10px 0;
    }
    
    .variant-selector {
        padding: 8px 10px;
        font-size: 13px;
    }
}

/* Enhanced Customer Order Summary */
.customer-sidebar {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    position: sticky;
    top: 20px;
}

.customer-sidebar h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.customer-sidebar h3::before {
    content: '📋';
    font-size: 24px;
}

#orderSummary {
    max-height: 400px;
    overflow-y: auto;
    margin: 15px 0;
    padding: 15px;
    background: var(--bg-gray);
    border-radius: 8px;
}

#orderSummary .empty-summary {
    text-align: center;
    color: #999;
    padding: 30px 15px;
    font-style: italic;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    gap: 10px;
}

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

.summary-item-title {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
}

.summary-item-title small {
    display: block;
    color: #666;
    font-weight: 400;
    margin-top: 4px;
}

.summary-item-price {
    font-weight: 600;
    color: var(--primary-color);
    white-space: nowrap;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    margin: 15px 0 10px;
    border-top: 2px solid var(--border-color);
    font-size: 16px;
    font-weight: 600;
}

.summary-total span:first-child {
    color: var(--text-color);
}

.summary-total span:last-child {
    color: var(--primary-color);
    font-size: 18px;
}

.customer-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
}

.customer-info .form-group label {
    color: white;
    font-weight: 500;
    margin-bottom: 8px;
}

.customer-info .form-control {
    background: white;
    border: none;
    padding: 12px 15px;
    border-radius: 8px;
    width: 100%;
    font-size: 14px;
    transition: box-shadow 0.3s ease;
}

.customer-info .form-control:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.3);
}

.customer-info .form-control::placeholder {
    color: #aaa;
}

/* Scrollbar styling for summary */
#orderSummary::-webkit-scrollbar {
    width: 6px;
}

#orderSummary::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

#orderSummary::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

#orderSummary::-webkit-scrollbar-thumb:hover {
    background: #5566d6;
}

/* Mobile responsiveness */
@media (max-width: 968px) {
    .customer-sidebar {
        position: relative;
        top: 0;
        margin-top: 30px;
    }
    
    #orderSummary {
        max-height: 300px;
    }
}
