/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    background: transparent;
    font-weight: 400;
    margin: 0;
    padding: 0;
    height: 100%;
    overflow-x: hidden;
}

/* Fix for iframe embedding - prevent multiple scrollbars */
body {
    position: relative;
    width: 100%;
    max-width: 100vw;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.5);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
    min-height: auto;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 25px;
    padding: 25px 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: #333;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.5px;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.8;
    font-weight: 400;
}

/* Main Content Layout */
.main-content {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 25px;
    margin-top: 20px;
    align-items: start;
}

/* Fabric Gallery */
.fabric-gallery {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: auto;
}

.fabric-gallery h2 {
    margin-bottom: 20px;
    color: #000;
    font-size: 1.5rem;
    border-bottom: 2px solid #000;
    padding-bottom: 10px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

/* Collection Tabs */
.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.category-btn {
    padding: 8px 16px;
    border: 1px solid rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    color: #000;
    font-family: 'Poppins', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-btn:hover {
    border-color: #000;
    color: #000;
    background: rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.category-btn.active {
    background: #000;
    border-color: #000;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.collection-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 8px 16px;
    border: 1px solid rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    color: #000;
    font-family: 'Poppins', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tab-btn:hover {
    border-color: #000;
    color: #000;
    background: rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.tab-btn.active {
    background: #000;
    border-color: #000;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Fabrics Grid */
.fabrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    overflow: visible;
    padding-right: 5px;
    min-height: 0; /* Important for scrolling in flex containers */
}

.fabrics-grid.is-scrollable {
    max-height: 520px;
    overflow-y: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding-right: 10px;
}

.fabric-item {
    position: relative;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

.fabric-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    border-color: #000;
}

.fabric-item.selected {
    border-color: #000;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
}

.fabric-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.fabric-item:hover img {
    transform: scale(1.05);
}

.fabric-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 8px 6px 6px;
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    font-family: 'Poppins', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.fabric-item.selected .fabric-overlay {
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    color: white;
}

.fabric-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fabric-item:hover .fabric-actions {
    opacity: 1;
}

.view-full-btn {
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: #e8e8e8;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.view-full-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    color: white;
    transform: scale(1.1);
}

/* Order Form */
.order-form-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 20px;
}

/* On mobile, remove sticky positioning - let page handle scrolling */
@media (max-width: 768px) {
    .order-form-container {
        position: relative !important;
        top: 0 !important;
        flex-shrink: 0; /* Prevent form from shrinking */
        min-height: auto;
    }
    
    .fabric-gallery {
        position: relative !important;
        max-height: none !important;
        min-height: 0;
        overflow: visible !important;
        display: flex !important;
        flex-direction: column !important;
        flex-shrink: 0; /* Prevent gallery from shrinking */
    }
    
    .fabrics-grid {
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important; /* Smooth scrolling on iOS */
        scroll-behavior: smooth;
        flex: 1 1 auto !important;
        min-height: 0 !important; /* Critical for flex scrolling */
        position: relative !important;
        /* Ensure scrollbar is always visible when content overflows */
        scrollbar-width: thin;
    }
    
    /* Ensure scrollbar is visible on mobile */
    .fabrics-grid::-webkit-scrollbar {
        width: 8px;
        display: block !important;
    }
    
    .fabrics-grid::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.3);
        border-radius: 4px;
    }
    
    .main-content {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px;
        align-items: stretch;
    }
    
    .container {
        padding-bottom: 20px;
        display: flex;
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .fabrics-grid.is-scrollable {
        max-height: 65vh !important;
    }
}

.order-form-container h2 {
    margin-bottom: 20px;
    color: #000;
    font-size: 1.5rem;
    border-bottom: 2px solid #000;
    padding-bottom: 10px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

.form-group {
    margin-bottom: 15px;
}

.login-form .form-group label {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
}

.login-form .form-group input {
    font-family: 'Poppins', sans-serif;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #000;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    color: #000;
    font-family: 'Poppins', sans-serif;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #000;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.2);
}

.form-group input[readonly] {
    background-color: rgba(0, 0, 0, 0.1);
    color: #000;
    cursor: not-allowed;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #000;
    opacity: 1;
}

.submit-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #000 0%, #333 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Poppins', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    background: linear-gradient(135deg, #333 0%, #000 100%);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.image-modal-content {
    max-width: 800px;
}

.image-container {
    text-align: center;
    padding: 20px;
}

.image-container img {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.image-info {
    padding: 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.image-info h4 {
    color: #000;
    font-size: 1.5rem;
    margin-bottom: 10px;
    font-family: 'Poppins', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.image-info p {
    color: #333;
    font-size: 1rem;
    opacity: 0.8;
}

/* Order Confirmation Modal */
.confirmation-content {
    text-align: center;
    padding: 20px;
}

.success-icon {
    font-size: 4rem;
    color: #28a745;
    margin-bottom: 20px;
}

.confirmation-content h4 {
    color: #000;
    font-size: 1.5rem;
    margin-bottom: 15px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

.confirmation-content p {
    color: #333;
    font-size: 1rem;
    margin-bottom: 15px;
}

.order-details {
    background: rgba(0, 0, 0, 0.05);
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.order-details p {
    margin-bottom: 8px;
    font-family: 'Poppins', sans-serif;
}

.payment-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid #e0e0e0;
}

.payment-info h4 {
    color: #333;
    margin-bottom: 15px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

.payment-info ul {
    margin: 10px 0;
    padding-left: 20px;
}

.payment-info li {
    margin-bottom: 5px;
    color: #333;
    font-family: 'Poppins', sans-serif;
}

.payment-info p {
    margin-bottom: 10px;
    color: #333;
    font-family: 'Poppins', sans-serif;
}

.payment-info a {
    font-weight: 600;
    text-decoration: none;
}

.payment-info a:hover {
    text-decoration: underline;
}

.confirmation-actions {
    margin-top: 25px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, #000 0%, #333 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    background: linear-gradient(135deg, #333 0%, #000 100%);
}

/* Cart Button */
.cart-button {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #000 0%, #333 100%);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 12px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
}

.cart-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.cart-count {
    background: #ff4757;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 5px;
}

/* Cart Items */
.cart-items {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

.cart-item-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
}

.cart-item-details h4 {
    color: #000;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 5px;
    font-family: 'Poppins', sans-serif;
}

.cart-item-details p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 3px;
    font-family: 'Poppins', sans-serif;
}

.cart-item-price {
    color: #000 !important;
    font-weight: 600 !important;
    font-size: 1.1rem !important;
}

.cart-item-actions {
    display: flex;
    align-items: center;
}

.remove-item-btn {
    background: #ff4757;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.remove-item-btn:hover {
    background: #ff3742;
    transform: scale(1.1);
}

/* Add to Cart Success Animation */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px 15px 0 0;
}

.modal-header h3 {
    margin: 0;
    color: #000;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

.close {
    color: #666;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #000;
}

.modal-body {
    padding: 25px;
}

.modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

/* Order Summary */
.order-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 5px 0;
    border-bottom: 1px solid #e0e0e0;
}

.summary-row:last-child {
    border-bottom: none;
    font-weight: 600;
    font-size: 1.1rem;
    color: #2c3e50;
}

/* Loading Spinner */
.loading-spinner {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    color: white;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Order Confirmation Page */
.confirmation-page {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.confirmation-header {
    text-align: center;
    margin-bottom: 40px;
}

.success-icon {
    font-size: 4rem;
    color: #27ae60;
    margin-bottom: 20px;
}

.confirmation-header h1 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 2.5rem;
}

.order-details {
    margin-bottom: 40px;
}

.order-details h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.order-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.info-row:last-child {
    border-bottom: none;
}

.label {
    font-weight: 600;
    color: #2c3e50;
}

.value {
    color: #666;
}

.status-pending { color: #f39c12; }
.status-confirmed { color: #3498db; }
.status-shipped { color: #9b59b6; }
.status-delivered { color: #27ae60; }
.status-cancelled { color: #e74c3c; }

.payment-info {
    margin-bottom: 40px;
}

.payment-info h3 {
    color: #2c3e50;
    margin-bottom: 20px;
}

.payment-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.payment-method {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.payment-method:hover {
    border-color: #3498db;
    transform: translateY(-2px);
}

.payment-method i {
    font-size: 2rem;
    color: #3498db;
    margin-bottom: 15px;
}

.payment-method h4 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.next-steps {
    margin-bottom: 40px;
}

.next-steps h3 {
    color: #2c3e50;
    margin-bottom: 20px;
}

.next-steps ol {
    padding-left: 20px;
}

.next-steps li {
    margin-bottom: 10px;
    color: #666;
}

.contact-info {
    margin-bottom: 40px;
    text-align: center;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Admin Styles */
.admin-login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-form {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 400px;
    font-family: 'Poppins', sans-serif;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header i {
    font-size: 3rem;
    color: #3498db;
    margin-bottom: 15px;
}

.login-header h1 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

.alert {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
}

.login-footer a {
    color: #3498db;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
}

.admin-container {
    min-height: 100vh;
    background: #f8f9fa;
}

.admin-header {
    background: white;
    padding: 20px 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.admin-header h1 {
    color: #2c3e50;
    margin: 0;
}

.admin-actions {
    display: flex;
    gap: 15px;
}

.admin-content {
    padding: 0 30px 30px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    font-size: 2.5rem;
    color: #3498db;
}

.stat-info h3 {
    font-size: 2rem;
    color: #2c3e50;
    margin: 0;
}

.stat-info p {
    color: #666;
    margin: 5px 0 0;
}

.orders-section {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.orders-section h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.orders-table-container {
    overflow-x: auto;
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.orders-table th,
.orders-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.orders-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.orders-table tr:hover {
    background-color: #f8f9fa;
}

.status-select {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
}

.order-id {
    font-family: monospace;
    font-size: 0.9rem;
}

/* Button Styles */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover {
    background: #138496;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.8rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .order-form-container {
        position: static;
    }
    
    .fabrics-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .admin-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .admin-actions {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .payment-methods {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
}

/* Admin Navigation and Sorting */
.admin-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    background: white;
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
}

.nav-link {
    padding: 10px 20px;
    text-decoration: none;
    color: #333;
    border-radius: 8px;
    transition: all 0.3s;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    background: white;
    border: 1px solid #ddd;
}

.nav-link:hover {
    background: #f8f9fa;
    border-color: #333;
    color: #333;
    transform: translateY(-1px);
}

.nav-link.active {
    background: #333;
    color: white;
    border-color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.search-and-sort {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
    align-items: center;
}

.search-section {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 160px;
    width: 100%;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 500px;
}

.search-box i {
    position: absolute;
    left: 15px;
    color: #666;
    font-size: 1.1rem;
    z-index: 1;
}

.search-box input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    color: #333;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #333;
    box-shadow: 0 0 0 2px rgba(51, 51, 51, 0.2);
    background: white;
}

.search-box input::placeholder {
    color: #999;
}

.sort-controls {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
    height: 160px;
    width: 100%;
}

.sort-controls h3 {
    margin-bottom: 15px;
    color: #333;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
}

.sort-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    width: 100%;
}

.sort-btn {
    padding: 4px 6px;
    text-decoration: none;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.3s;
    font-size: 0.7rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    background: white;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sort-btn:hover {
    background: #f8f9fa;
    border-color: #333;
    color: #333;
    transform: translateY(-1px);
}

.sort-btn.active {
    background: #333;
    color: white;
    border-color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Admin Panel Light Mode with Black Theme */
.admin-container {
    background: #f8f9fa;
    color: #333;
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
}

.admin-header {
    background: white;
    color: #333;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    border: 1px solid #e0e0e0;
}

.admin-brand h1 {
    color: #333;
    margin: 0;
    font-size: 2.2rem;
    font-weight: 700;
}

.admin-welcome {
    color: #666;
    margin: 5px 0 0 0;
    font-size: 1.1rem;
    font-weight: 500;
}

.admin-content {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
    transition: transform 0.3s ease;
}

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

.stat-icon {
    font-size: 2.5rem;
    color: #333;
}

.stat-info h3 {
    color: #333;
    font-size: 2rem;
    margin: 0;
    font-weight: 700;
}

.stat-info p {
    color: #666;
    margin: 5px 0 0 0;
    font-size: 1.1rem;
    font-weight: 500;
}

.orders-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
}

.orders-section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.8rem;
    font-weight: 600;
}

.orders-table-container {
    overflow-x: auto;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    table-layout: fixed;
}

.orders-table th {
    background: #333;
    color: white;
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Column width constraints */
.orders-table th:nth-child(1), .orders-table td:nth-child(1) { width: 8%; } /* Order ID */
.orders-table th:nth-child(2), .orders-table td:nth-child(2) { width: 15%; } /* Customer */
.orders-table th:nth-child(3), .orders-table td:nth-child(3) { width: 10%; } /* Fabric */
.orders-table th:nth-child(4), .orders-table td:nth-child(4) { width: 12%; } /* Dimensions */
.orders-table th:nth-child(5), .orders-table td:nth-child(5) { width: 8%; } /* Panels */
.orders-table th:nth-child(6), .orders-table td:nth-child(6) { width: 8%; } /* Lining */
.orders-table th:nth-child(7), .orders-table td:nth-child(7) { width: 8%; } /* Belts */
.orders-table th:nth-child(8), .orders-table td:nth-child(8) { width: 10%; } /* Price */
.orders-table th:nth-child(9), .orders-table td:nth-child(9) { width: 8%; } /* Status */
.orders-table th:nth-child(10), .orders-table td:nth-child(10) { width: 10%; } /* Date */
.orders-table th:nth-child(11), .orders-table td:nth-child(11) { width: 8%; } /* Actions */

.orders-table td {
    padding: 12px 8px;
    border-bottom: 1px solid #e0e0e0;
    color: #333;
    font-size: 0.8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
    word-wrap: break-word;
}

.orders-table tr:hover {
    background: #f8f9fa;
}

.status-select {
    background: white;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 4px 6px;
    font-size: 0.75rem;
    width: 100%;
    min-width: 80px;
    white-space: nowrap;
    overflow: visible;
}

.btn {
    background: #333;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    background: #555;
}

.btn-secondary {
    background: #6c757d;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #dc3545;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.btn-danger:hover {
    background: #c82333;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.btn-info {
    background: #17a2b8;
    box-shadow: 0 2px 8px rgba(23, 162, 184, 0.3);
}

.btn-info:hover {
    background: #138496;
}

@media (max-width: 768px) {
    .search-and-sort {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .sort-buttons {
        grid-template-columns: 1fr;
        gap: 4px;
    }
    
    .sort-btn {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .fabrics-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
    
    .fabric-item img {
        height: 80px;
    }
    
    .search-and-sort {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* Quotation Management Styles */
.quotations-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
}

.quotations-section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.8rem;
    font-weight: 600;
}

.quotations-table-container {
    overflow-x: auto;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.quotations-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
}

.quotations-table th {
    background: #333;
    color: white;
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quotations-table td {
    padding: 15px 12px;
    border-bottom: 1px solid #e0e0e0;
    color: #333;
    font-size: 0.9rem;
}

.quotations-table tr:hover {
    background: #f8f9fa;
}

.quotation-id {
    font-family: monospace;
    font-size: 0.9rem;
}

/* Quotation Form Styles */
.quotation-form-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
}

.quotation-form-section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.8rem;
    font-weight: 600;
}

.quotation-form {
    max-width: 800px;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-family: 'Poppins', sans-serif;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}


/* Pricing Management Styles */
.pricing-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
}

.pricing-section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.8rem;
    font-weight: 600;
}

.pricing-form-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid #e0e0e0;
}

.pricing-form-section h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3rem;
    font-weight: 600;
}

.pricing-form {
    max-width: 600px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.checkbox-group label {
    margin: 0;
    font-weight: 500;
    color: #333;
}

.pricing-table-section {
    margin-top: 25px;
}

.pricing-table-section h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3rem;
    font-weight: 600;
}

.pricing-table-container {
    overflow-x: auto;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.pricing-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
}

.pricing-table th {
    background: #333;
    color: white;
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pricing-table td {
    padding: 15px 12px;
    border-bottom: 1px solid #e0e0e0;
    color: #333;
    font-size: 0.9rem;
}

.pricing-table tr:hover {
    background: #f8f9fa;
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: #333;
    color: white;
}

.badge-secondary {
    background: #6c757d;
    color: white;
}

/* Order Details Modal Styles */
.order-details-content {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.order-details-content h3 {
    color: #333;
    margin-bottom: 20px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1.5rem;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.detail-item strong {
    color: #333;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-item span {
    color: #666;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    width: fit-content;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-confirmed {
    background: #d1ecf1;
    color: #0c5460;
}

.status-shipped {
    background: #d4edda;
    color: #155724;
}

.status-delivered {
    background: #d1ecf1;
    color: #0c5460;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

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

/* Enhanced Price Breakdown Styles */
.price-breakdown {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-top: 10px;
}

.price-breakdown-content h4 {
    color: #495057;
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 8px;
}

.breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f1f3f4;
}

.breakdown-row:last-child {
    border-bottom: none;
}

.breakdown-row.total {
    background: #e3f2fd;
    padding: 12px;
    margin: 10px -12px -12px -12px;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 700;
    color: #1976d2;
}

.breakdown-row span:first-child {
    color: #6c757d;
    font-weight: 500;
}

.breakdown-row span:last-child {
    color: #212529;
    font-weight: 600;
}

.price-breakdown-content hr {
    border: none;
    height: 2px;
    background: #dee2e6;
    margin: 15px 0;
}

/* Cart Fabric Math Details */
.fabric-math-details {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 12px;
    margin: 10px 0;
    font-size: 13px;
    line-height: 1.4;
}

.fabric-math-details p {
    margin: 4px 0;
    color: #495057;
}

.fabric-math-details p strong {
    color: #212529;
    font-weight: 600;
}

/* Quotation Details Modal Styles */
.quotation-details-content {
    max-width: 100%;
    overflow-x: auto;
}

.quotation-details-content h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.5rem;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.quotation-details-content h4 {
    color: #34495e;
    margin: 20px 0 15px 0;
    font-size: 1.2rem;
    border-bottom: 1px solid #bdc3c7;
    padding-bottom: 8px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    word-break: break-word;
}

.detail-item strong {
    color: #2c3e50;
    font-weight: 600;
    min-width: 120px;
    margin-right: 10px;
}

.detail-item span {
    color: #495057;
    text-align: right;
    flex: 1;
}

.fabric-calculations {
    background: #e8f4f8;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    border: 1px solid #bee5eb;
}

.calculation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.calc-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: white;
    border-radius: 6px;
    border: 1px solid #d1ecf1;
}

.calc-item strong {
    color: #0c5460;
    font-weight: 600;
}

.calc-item span {
    color: #0c5460;
    font-weight: 500;
}

.price-breakdown {
    background: #f0f8f0;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    border: 1px solid #c3e6cb;
}

.price-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
    margin-top: 15px;
}

.price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: white;
    border-radius: 6px;
    border: 1px solid #d4edda;
}

.price-item strong {
    color: #155724;
    font-weight: 600;
    flex: 1;
    margin-right: 10px;
}

.price-item span {
    color: #155724;
    font-weight: 600;
    font-size: 1.1rem;
}

.price-item.total-price {
    background: #d4edda;
    border: 2px solid #28a745;
    font-size: 1.2rem;
    font-weight: 700;
}

.price-item.total-price strong {
    color: #0c5460;
}

.price-item.total-price span {
    color: #0c5460;
    font-size: 1.3rem;
}

.quotation-meta {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    border: 1px solid #dee2e6;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-draft {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-sent {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.status-accepted {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-rejected {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .calculation-grid {
        grid-template-columns: 1fr;
    }
    
    .price-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .detail-item span {
        text-align: left;
    }
    
    .calc-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .price-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* Quotations Table Styles */
.customer-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.customer-name {
    font-weight: 600;
    color: #2c3e50;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.customer-contact {
    font-size: 0.85rem;
    color: #6c757d;
}

.customer-address {
    font-size: 0.8rem;
    color: #6c757d;
    font-style: italic;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.customer-info {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.dimensions {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dimension-detail {
    font-size: 0.85rem;
    color: #6c757d;
}

.panel-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: center;
}

.panel-count {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1rem;
}

.splits-info {
    font-size: 0.85rem;
    color: #6c757d;
}

.feature-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    min-width: 50px;
}

.feature-yes {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.feature-no {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.price-cell {
    font-weight: 600;
    color: #2c3e50;
    text-align: right;
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: visible;
}

.quotations-table {
    font-size: 0.9rem;
}

.quotations-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    padding: 12px 8px;
    text-align: center;
    border-bottom: 2px solid #dee2e6;
}

.quotations-table td {
    padding: 10px 8px;
    vertical-align: middle;
    border-bottom: 1px solid #dee2e6;
}

.quotations-table tbody tr:hover {
    background: #f8f9fa;
}

.quotations-table-container {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Responsive table adjustments */
@media (max-width: 1200px) {
    .quotations-table {
        font-size: 0.8rem;
    }
    
    .quotations-table th,
    .quotations-table td {
        padding: 8px 6px;
    }
}

@media (max-width: 768px) {
    .quotations-table {
        font-size: 0.75rem;
    }
    
    .customer-contact {
        display: none;
    }
    
    .dimension-detail {
        display: none;
    }
    
    .splits-info {
        display: none;
    }
}

/* Enhanced Order Details Modal Styles */
.curtain-pricing-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    border-left: 4px solid #28a745;
}

.curtain-pricing-section h4 {
    color: #28a745;
    margin-bottom: 15px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.customer-section {
    background: #e3f2fd;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    border-left: 4px solid #2196f3;
}

.customer-section h4 {
    color: #2196f3;
    margin-bottom: 15px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-breakdown {
    background: white;
    border-radius: 6px;
    padding: 15px;
    margin-top: 10px;
    border: 1px solid #dee2e6;
}

.breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #f1f3f4;
}

.breakdown-row:last-child {
    border-bottom: none;
}

.total-row {
    font-weight: bold;
    font-size: 1.1rem;
    color: #495057;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 2px solid #28a745;
}

.price-display {
    font-weight: bold;
    color: #28a745;
    font-size: 1.1rem;
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background-color: #d4edda;
    color: #155724;
}

.badge-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.badge-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* Order Details Modal Styles */
.order-details-content {
    padding: 0;
}

.order-details-content h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.detail-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.detail-item strong {
    color: #495057;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-item span {
    color: #212529;
    font-size: 1rem;
    font-weight: 500;
    word-break: break-word;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-completed {
    background-color: #d4edda;
    color: #155724;
}

.status-cancelled {
    background-color: #f8d7da;
    color: #721c24;
}

.curtain-pricing-section,
.customer-section {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
}

.curtain-pricing-section h4,
.customer-section h4 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 8px;
}

.price-breakdown {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 15px;
    margin-top: 10px;
}

.breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f1f3f4;
    text-align: left;
}

.breakdown-row:last-child {
    border-bottom: none;
    font-weight: 600;
    font-size: 1.1rem;
    color: #495057;
}

.total-row {
    background: #e9ecef;
    margin: 10px -15px -15px -15px;
    padding: 15px;
    border-radius: 0 0 6px 6px;
    font-weight: 700;
    font-size: 1.2rem;
    color: #212529;
}

.price-display {
    font-weight: 600;
    color: #28a745;
}

.modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    justify-content: center;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.btn-print {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-print:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.btn-close {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-close:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* Responsive design for order details modal */
@media (max-width: 768px) {
    .detail-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .curtain-pricing-section,
    .customer-section {
        padding: 15px;
    }
    
    .breakdown-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .breakdown-row span:last-child {
        align-self: flex-end;
    }
    
    .modal-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-print,
    .btn-close {
        width: 100%;
        justify-content: center;
    }
}

/* ========================================
   COMPREHENSIVE MOBILE RESPONSIVENESS
   ======================================== */

/* Mobile First - Base styles for mobile */
@media (max-width: 768px) {
    /* Fix for iframe - prevent body scroll */
    html, body {
        height: auto;
        min-height: 100%;
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Container and Layout */
    .container {
        padding: 10px;
        max-width: 100%;
        width: 100%;
        overflow-x: hidden;
    }
    
    .main-content {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0;
        width: 100%;
        overflow-x: hidden;
    }
    
    /* Header */
    .header {
        padding: 15px 10px;
        margin-bottom: 15px;
    }
    
    .header h1 {
        font-size: 1.8rem;
        margin-bottom: 5px;
    }
    
    .header p {
        font-size: 0.9rem;
    }
    
    /* Fabric Gallery */
    .fabric-gallery {
        margin-bottom: 20px;
        position: relative;
        max-height: none;
    }
    
    .fabric-gallery h2 {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }
    
    .collection-tabs {
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 15px;
    }
    
    .tab-btn {
        padding: 8px 12px;
        font-size: 0.85rem;
        min-width: auto;
    }
    
    .fabrics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .fabric-item {
        padding: 10px;
    }
    
    .fabric-item h3 {
        font-size: 0.9rem;
    }
    
    .fabric-item p {
        font-size: 0.8rem;
    }
    
    .fabric-price {
        font-size: 0.9rem;
    }
    
    /* Order Form */
    .order-form-container {
        padding: 15px;
        position: relative !important;
        top: 0 !important;
    }
    
    .order-form-container h2 {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .form-group label {
        font-size: 0.9rem;
        margin-bottom: 5px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px;
        font-size: 0.9rem;
    }
    
    /* Curtain Pricing Section */
    #curtainPricing {
        padding: 15px;
        margin: 15px 0;
    }
    
    .price-breakdown {
        padding: 10px;
        font-size: 0.85rem;
    }
    
    .breakdown-row {
        padding: 5px 0;
        font-size: 0.8rem;
    }
    
    .breakdown-row.total {
        font-size: 0.9rem;
    }
    
    /* Buttons */
    .submit-btn,
    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
        width: 100%;
        margin-bottom: 10px;
    }
    
    .cart-button {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    /* Modals */
    .modal-content {
        width: 95%;
        margin: 10% auto;
        max-height: 90vh;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-header h3 {
        font-size: 1.2rem;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .close {
        font-size: 24px;
    }
    
    /* Cart Items */
    .cart-item {
        padding: 10px;
        margin-bottom: 10px;
    }
    
    .cart-item h4 {
        font-size: 0.9rem;
    }
    
    .cart-item p {
        font-size: 0.8rem;
    }
    
    .cart-item-actions {
        flex-direction: column;
        gap: 5px;
    }
    
    .cart-item-actions button {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    /* Order Summary */
    .order-summary {
        padding: 15px;
    }
    
    .order-summary h3 {
        font-size: 1.1rem;
    }
    
    .order-summary p {
        font-size: 0.9rem;
    }
    
    /* Confirmation Modal */
    .confirmation-content {
        text-align: center;
    }
    
    .success-icon {
        font-size: 3rem;
        margin-bottom: 15px;
    }
    
    .confirmation-content h4 {
        font-size: 1.3rem;
        margin-bottom: 10px;
    }
    
    .confirmation-content p {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    .confirmation-actions {
        margin-top: 20px;
    }
    
    /* Loading Spinner */
    .loading-spinner {
        padding: 20px;
    }
    
    .spinner {
        width: 40px;
        height: 40px;
    }
    
    .loading-spinner p {
        font-size: 0.9rem;
    }
}

/* Extra Small Mobile Devices */
@media (max-width: 480px) {
    .container {
        padding: 5px;
    }
    
    .header {
        padding: 10px 5px;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .header p {
        font-size: 0.8rem;
    }
    
    .fabrics-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .fabric-item {
        padding: 8px;
    }
    
    .fabric-item h3 {
        font-size: 0.85rem;
    }
    
    .fabric-item p {
        font-size: 0.75rem;
    }
    
    .order-form-container {
        padding: 10px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 8px;
        font-size: 0.85rem;
    }
    
    .modal-content {
        width: 98%;
        margin: 5% auto;
    }
    
    .modal-header {
        padding: 10px;
    }
    
    .modal-body {
        padding: 10px;
    }
    
    .tab-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    .collection-tabs {
        gap: 5px;
    }
    
    .price-breakdown {
        font-size: 0.8rem;
    }
    
    .breakdown-row {
        font-size: 0.75rem;
    }
}

/* Admin Panel Mobile Responsiveness */
@media (max-width: 768px) {
    /* Admin Dashboard */
    .admin-dashboard {
        padding: 10px;
    }
    
    .admin-header {
        padding: 15px 10px;
        margin-bottom: 15px;
    }
    
    .admin-header h1 {
        font-size: 1.5rem;
    }
    
    .admin-nav {
        flex-direction: column;
        gap: 10px;
    }
    
    .admin-nav a {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    /* Tables */
    .orders-table,
    .quotations-table {
        font-size: 0.75rem;
        overflow-x: auto;
    }
    
    .orders-table th,
    .orders-table td,
    .quotations-table th,
    .quotations-table td {
        padding: 8px 4px;
        white-space: nowrap;
    }
    
    .customer-contact {
        font-size: 0.7rem;
    }
    
    .status-badge {
        font-size: 0.7rem;
        padding: 2px 6px;
    }
    
    .btn-sm {
        padding: 4px 8px;
        font-size: 0.7rem;
    }
    
    /* Search and Sort */
    .search-and-sort {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .search-box,
    .sort-select {
        padding: 8px;
        font-size: 0.85rem;
    }
    
    /* Admin Login */
    .admin-login-container {
        padding: 20px 10px;
    }
    
    .login-form {
        padding: 20px;
    }
    
    .login-header h1 {
        font-size: 1.5rem;
    }
    
    .login-header p {
        font-size: 0.9rem;
    }
    
    .form-group input {
        padding: 12px;
        font-size: 0.9rem;
    }
    
    .btn-primary {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    /* Order Details Modal */
    .order-details-content h3 {
        font-size: 1.3rem;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .detail-item {
        padding: 10px;
    }
    
    .detail-item strong {
        font-size: 0.8rem;
    }
    
    .detail-item span {
        font-size: 0.9rem;
    }
    
    .curtain-pricing-section,
    .customer-section {
        padding: 15px;
    }
    
    .curtain-pricing-section h4,
    .customer-section h4 {
        font-size: 1rem;
    }
    
    .price-breakdown {
        padding: 10px;
    }
    
    .breakdown-row {
        font-size: 0.8rem;
    }
    
    .modal-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-print,
    .btn-close {
        width: 100%;
        padding: 12px;
    }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .modal-content {
        max-height: 95vh;
        overflow-y: auto;
    }
    
    .fabrics-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .main-content {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
}

/* Tablet Responsiveness */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 15px;
    }
    
    .main-content {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    
    .fabrics-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .modal-content {
        width: 85%;
    }
    
    .orders-table,
    .quotations-table {
        font-size: 0.8rem;
    }
}

/* Large Desktop Optimizations */
@media (min-width: 1200px) {
    .container {
        max-width: 1400px;
    }
    
    .main-content {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    
    .fabrics-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ========================================
   CART SUCCESS MESSAGE ANIMATIONS
   ======================================== */

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes fadeOutScale {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
}

/* Iframe Support - Enhanced scrolling and overflow handling */
html, body {
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* Smooth scrolling for all elements */
* {
    scroll-behavior: smooth;
}

/* Better iframe container support */
.admin-container {
    overflow-x: hidden;
    min-height: 100vh;
}

/* Enhanced scrollbar for iframe */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Prevent horizontal scroll issues in iframe */
.orders-table-container,
.pricing-table-container,
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
