* {
    box-sizing: border-box;
}

body {
    margin: 0 auto;
    font-family: sans-serif;
    max-width: 1400px;
    min-height: 100vh;
}

.hidden {
    display: none !important;
}

.container{
    margin: auto;
    height: 100%;
}

/* ... (skip to fixed layout boundary) ... */

.fixed-layout-boundary {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1400px;
    height: 100%;
    pointer-events: none;
    /* Allow clicks to pass through to content */
    z-index: 3000;
}

.top-banner {
    display: flex;
    justify-content: space-between;
    align-items: stretch; /* Ensure all children take full height */
    background-color: #fff;
    /* Logo area white */
    height: 150px;
}

.banner-left {
    width: 25%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #eee;
}

.banner-logo {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    text-transform: uppercase;
    padding:25%;
    
    /* Placeholder styling until logo is added */
}

.banner-logo img {
    object-fit: cover;
    object-position: center;
    width: 100%;
    height: 100%;
}

.banner-center {
    flex-grow: 1;
    background-color: #1a1a2e;
    /* Dark blue */
    color: white;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.banner-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 5px;
}

.banner-subtitle {
    font-size: 14px;
    font-weight: normal;
}

.banner-right {
    background-color: #1a1a2e;
    /* Match center background */
    height: 100%;
    display: flex;
    align-items: center;
    padding-right: 20px;
}

.logout-btn {
    color: white;
    text-decoration: none;
    font-size: 24px;
    border: 1px solid white;
    border-radius: 4px;
    padding: 5px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

/* Command Selection Section */
.command-selection-container {
    padding: 40px;
    background-color: #fff;
    border: 1px solid #eee;
    margin: 20px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.section-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 30px;
    color: #000;
}

.selection-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex-grow: 1;
}

.form-row {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.search-group {
    flex-grow: 1;
    max-width: 300px;
}

.date-group {
    width: 200px;
}

.form-input {
    width: 100%;
    padding: 10px 10px 10px 35px;
    /* Left padding for icon */
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    color: #4a5568;
    background-color: #f8fafc;
    outline: none;
    font-family: auto;
}

.form-input:focus {
    border-color: #cbd5e0;
    background-color: #fff;
}

select.form-input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 35px; /* Make room for custom arrow */
    cursor: pointer;
}

.date-input {
    padding-right: 35px;
    /* Right padding for icon */
}

.input-icon {
    position: absolute;
    left: 10px;
    display: flex;
    align-items: center;
    pointer-events: none;
    color: #a0aec0;
}

.input-icon-right {
    position: absolute;
    right: 10px;
    display: flex;
    align-items: center;
    pointer-events: none;
    color: #1a202c;
}

.btn-choose {
    background-color: #1a1a2e;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 30px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-choose:hover {
    background-color: #2d2d44;
}

.separator {
    height: 1px;
    background-color: #e2e8f0;
    margin: 10px auto;
    width: 60%;
}

.command-dropdown-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    align-items: center;
}

.test-command-container {
    background-color: #ed8936;
    padding: 8px 12px;
    border-radius: 6px;
    display: flex;
    gap: 10px;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.test-input {
    padding: 6px 10px;
    border-radius: 4px;
    border: none;
    font-size: 13px;
    width: 140px;
    outline: none;
}

.test-btn {
    background-color: #fff;
    color: #ed8936;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.1s;
}

.test-btn:active {
    transform: scale(0.95);
}

.dropdown-group {
    width: 300px;
}

.dropdown-input {
    text-align: left;
    padding-left: 10px;
    /* Reset left padding */
    cursor: pointer;
    appearance: none;
    /* Hide default arrow */
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #f8fafc;
}

.dropdown-input:focus {
    background-color: #fff;
}

/* Command Details Section */
/* Command Details Section */
.command-details-container {
    height: 350px;
    display: flex;
    background-color: #fff;
    border: 1px solid #cbd5e0;
    margin: 0 20px 20px 20px;
    border-radius: 4px;
    overflow: hidden;
    box-sizing: border-box; /* Fix for padding/border affecting width */
    max-width: calc(100% - 40px); /* Ensure it stays within viewport minus margins */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05)
}

.details-left-panel {
    width: 30%;
    padding: 25px;
    display: flex;
    flex-direction: column;
   
    box-sizing: border-box;
    background-color: #1a1a2e;
    color: white;
}

.details-right-panel {
    width: 70%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    padding: 10px;
    box-sizing: border-box;
    position: relative;
}

.details-title {
    font-size: 18px;
    font-weight: bold;
    margin: 0 0 20px 0;
    color: #fff;
    padding-bottom: 10px;
    border-bottom: 2px solid #fff;
}

.details-info-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    flex-grow: 1; /* Take up remaining space */
    align-content: center; /* Center grid content vertically */
    gap: 15px;
    overflow-y: hidden;
}

.detail-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    font-size: 12px;
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 15px;
    color: #fff;
    font-weight: 500;
}

.side-components-block {
    position: absolute;
    right: 20px;
    top: 20px;
    z-index: 100;
    width: 220px;
    padding: 15px;
    border-radius: 8px;
    background-color: #1a1a2e;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeIn 0.3s ease-out;
    pointer-events: none; /* Let clicks pass through to canvas if needed */
}

.side-components-title {
    font-size: 13px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 5px;
}

.side-components-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.side-components-list li {
    font-size: 14px;
    color: #e2e8f0;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.side-components-list li::before {
    content: "•";
    color: #63b3ed;
    font-weight: bold;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

#commandCanvas {
    background-color: #fff;   ;
    border-radius: 4px;
    width: 100%;
    height: 100%;
    
}

/* Product Selection Section */
.product-selection-container {
    padding: 20px 40px;
    background-color: #fff;
    border: 1px solid #cbd5e0;
    margin: 0 20px 20px 20px;
    border-radius: 4px;
    box-sizing: border-box;
    max-width: calc(100% - 40px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05)
}

.product-search {
    margin-bottom: 30px;
    max-width: 100%;
    /* Full width search bar */
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.product-card {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: box-shadow 0.2s, border-color 0.2s;
    background-color: #fff;
}

.product-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e0;
}

.product-card.active {
    border: 2px solid #48bb78; /* Green border */
    background-color: #f0fff4; /* Light green background */
}

.product-image-placeholder {
    width: 100%;
    height: 120px;
    background-color: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.product-info {
    width: 100%;
    text-align: left;
}

.product-name {
    font-size: 14px;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 5px;
}

.product-ref {
    font-size: 12px;
    color: #718096;
    margin-bottom: 5px;
}

.product-price {
    font-size: 13px;
    font-weight: 700;
    color: #1a202c;
    background-color: #f1f5f9;
    padding: 4px 10px;
    border-radius: 9999px;
    display: inline-block;
    width: fit-content;
}

/* Sticky Cart Button */
.sticky-cart-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #1a1a2e;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s, background-color 0.2s;
    z-index: 2147483647;
    /* Max z-index */
    cursor: pointer;
}

@media (min-width: 1460px) {
    .sticky-cart-btn {
        right: auto;
        left: 50%;
        margin-left: 610px;
        /* 700px (half width) - 30px (margin) - 60px (btn width) */
    }
}

.sticky-cart-btn svg {
    pointer-events: none;
}

.sticky-cart-btn:hover {
    transform: scale(1.1);
    background-color: #2d2d44;
}

.sticky-cart-btn.hidden {
    display: none;
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #e53e3e;
    /* Red */
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    border: 2px solid white;
}

.cart-badge.hidden {
    display: none;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    /* Semi-transparent black */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
    display: none;
    opacity: 0;
}

.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    width: 95%;
    max-width: 420px;
    max-height: 95vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

.modal-header {
    width: 100%;
    margin-bottom: 12px;
}

.modal-header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 8px;
}

.modal-title {
    font-size: 16px;
    font-weight: bold;
    color: #1a202c;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.modal-ref {
    font-size: 11px;
    color: #718096;
    flex-shrink: 0;
}

.modal-body-compact {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-image-container {
    width: 100%;
    height: 140px;
    background-color: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.modal-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.modal-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #e2e8f0;
    background-color: white;
    border-radius: 4px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4a5568;
}

.qty-btn:hover {
    background-color: #f7fafc;
}

.qty-input {
    width: 40px;
    height: 32px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    text-align: center;
    font-size: 15px;
    color: #1a202c;
}

.modal-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-input,
.modal-textarea {
    width: 100%;
}

.modal-textarea {
    height: 60px;
    resize: none;
}

.modal-footer {
    width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 15px;
}

.btn-cancel {
    flex: 1;
    padding: 10px;
    border: 1px solid #e2e8f0;
    background-color: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    color: #4a5568;
}

.btn-cancel:hover {
    background-color: #f7fafc;
}

.btn-add-cart {
    flex: 1;
    padding: 10px;
    border: none;
    background-color: #1a1a2e;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.btn-add-cart:hover {
    background-color: #2d2d44;
}

/* Cart Drawer Styles */
#confirmationModal {
    z-index: 3200;
}

#alertModal {
    z-index: 3300;
}

/* Page Loader */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ffffff; /* Opaque white to hide initial load */
    z-index: 5000; /* Top most */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loader-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #e53e3e; /* Brand red */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader-text {
    margin-top: 20px;
    font-size: 1.1rem;
    color: #4a5568;
    font-weight: 500;
}

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

.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    /* Semi-transparent black */
    z-index: 3000;
    /* Below drawer (3100) but above everything else */
    opacity: 1;
    transition: opacity 0.3s ease;
    display: block; /* Ensure it takes layout */
}

.drawer-overlay.hidden {
    display: none;
    opacity: 0;
}
.cart-drawer {
    position: fixed;
    top: 0;
    left: 50%;
    /* Center horizontally */
    width: 100%;
    max-width: 1400px;
    height: 100%;
    background-color: white;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 3100;
    display: flex;
    flex-direction: column;
    padding: 30px;
    box-sizing: border-box;
    overflow-y: auto;

    /* Animation */
    transform: translateX(100vw);
    /* Move completely off-screen to the right */
    transition: transform 0.3s ease, visibility 0.3s ease;
    visibility: hidden;
}

.cart-drawer.open {
    transform: translateX(-50%);
    /* Move back to center */
    visibility: visible;
}

.drawer-header {
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.cart-warning-box {
    margin-top: 20px;
    padding: 15px;
    background-color: #fee2e2; /* Light red/pink */
    border: 1px solid #ef4444; /* Red border */
    border-radius: 8px;
    color: #b91c1c; /* Dark red text */
    font-weight: bold;
    text-align: center;
    font-size: 14px;
    line-height: 1.4;
}

/* Attachments Section */
.attachments-section {
    margin-top: 20px;
}

.attachments-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #111;
}

.attachments-container {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.attachment-add-btn {
    width: 80px;
    height: 80px;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
    flex-shrink: 0;
    padding: 10px;
}

.attachment-add-btn:hover {
    background-color: #f7fafc;
}

.attachments-list {
    flex: 1;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    min-height: 80px;
    display: flex;
    align-items: center;
    padding: 10px;
    gap: 10px;
    overflow-x: auto;
}

.attachment-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 70px;
    text-align: center;
}

.attachment-icon {
    width: 40px;
    height: 50px;
    background-color: #f3f4f6;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    color: #666;
    margin-bottom: 5px;
    position: relative;
}

.attachment-icon.pdf {
    color: #e53e3e;
    border: 1px solid #e53e3e;
    background-color: #fff5f5;
}

.attachment-icon.image {
    color: #d69e2e;
    border: 1px solid #d69e2e;
    background-color: #fffff0;
}

.attachment-name {
    font-size: 11px;
    color: #4a5568;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

/* Comments Section */
.comments-section {
    margin-top: 20px;
}

.comments-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #111;
}

.comments-textarea {
    width: 100%;
    height: 100px;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    padding: 10px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    box-sizing: border-box;
}
.comments-textarea:focus {
    outline: none;
    border-color: #a0aec0;
}

.drawer-footer-action {
    margin-top: 30px;
    padding-bottom: 20px;
}

.btn-send-request {
    width: 100%;
    padding: 15px;
    background-color: #231f3f; /* Dark purple/navy */
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-send-request:hover {
    background-color: #1a1730;
}

.drawer-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.drawer-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.drawer-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #718096;
    padding: 5px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drawer-close-btn:hover {
    background-color: #f7fafc;
    color: #1a202c;
}

.drawer-title {
    font-size: 20px;
    font-weight: bold;
    color: #1a202c;
    margin: 0;
}

.drawer-subtitle {
    font-size: 14px;
    color: #718096;
}

.drawer-items {
    flex-grow: 0;   
    display: flex;
    flex-direction: column;
    gap: 15px;
}



.cart-item-card {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cart-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.cart-item-info {
    display: flex;
    flex-direction: column;
}

.cart-item-name {
    font-weight: bold;
    font-size: 16px;
    color: #1a202c;
}

.cart-item-ref {
    font-size: 12px;
    color: #666;
}

.cart-item-motif,
.cart-item-comment {
    font-size: 12px;
    color: #4a5568;
    margin-top: 4px;
    font-style: italic;
}

.cart-item-delete {
    color: #ef4444;
    cursor: pointer;
    padding: 5px;
}

.cart-item-delete:hover {
    background-color: #fff5f5;
    border-radius: 4px;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-qty-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #e2e8f0;
    background-color: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #4a5568;
}

.cart-qty-input {
    width: 50px;
    height: 30px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
}
/* Animation Utilities */


.no-selection-message {
    text-align: center;
    padding: 20px;
    margin-top: 20px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
}



.message-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #4a5568;
    font-weight: 500;
}

/* Highlight animation for order filter update */
@keyframes highlightPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(236, 201, 75, 0.7); /* Yellow/Gold */
        border-color: #d69e2e;
        background-color: #fffff0; /* Ivory/Yellow tint */
        transform: scale(1.02);
    }
    50% {
        box-shadow: 0 0 20px 0 rgba(236, 201, 75, 0.5);
        border-color: #d69e2e;
        background-color: #feFCBF; /* Lighter yellow */
        transform: scale(1.02);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(236, 201, 75, 0);
        background-color: #f8fafc;
        transform: scale(1);
    }
}

.highlight-update {
    animation: highlightPulse 0.8s ease-in-out;
    border-color: #d69e2e !important;
    z-index: 10; /* Ensure it pops over adjacent elements if scaled */
    position: relative;
}

/* =========================================
   RESPONSIVE DESIGN (Tablet & Mobile)
   ========================================= */

/* Tablet and below (max-width: 1024px) */
@media (max-width: 1024px) {
    .container {
        width: 100%;
        max-width: 100%;
    }
    
    .top-banner {
        height: 200px;
        padding: 10px;
    }

    .banner-title {
        font-size: 18px;
    }

    .command-selection-container,
    .command-details-container,
    .product-selection-container {
        margin: 10px;
        width: auto;
        max-width: none;
    }

    .command-details-container {
        height: auto; /* Allow auto height for stacking */
        min-height: 400px;
    }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
    /* 1. Header Stack */
    .top-banner {
        flex-direction: column;
        height: 150px;
        padding: 15px;
    }

    .banner-left, .banner-center, .banner-right {
        width: 100%;
        border-right: none;
        padding: 10px 0;
        justify-content: center;
    }
    
    .banner-logo {
        padding: 10px;
    }

    /* 2. Selection Form Stack */
    .command-selection-container {
        padding: 20px;
    }

    .form-row {
        flex-direction: column;
        align-items: stretch;
    }

    .input-group,
    .dropdown-group,
    .date-group,
    .search-group {
        width: 100%;
        max-width: none;
    }
    
    .separator {
        width: 100%;
    }

    /* 3. Details Panel Stack */
    .command-details-container {
        flex-direction: column;
        height: auto;
    }

    .details-left-panel {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #4a5568;
        padding: 20px;
        height: auto;
    }
    
    .details-info-container {
        grid-template-columns: 1fr; /* Stack details on very small screens */
    }

    .details-right-panel {
        width: 100%;
        height: 300px; /* Fixed height for canvas/image area on mobile */
        padding: 0;
    }

    /* 4. Product Filters Stack */
    .product-filters-container {
        flex-direction: column;
        align-items: stretch !important; /* Override center alignment */
    }

    .product-filters-container .input-group {
        width: 100% !important;
        margin-bottom: 10px;
    }
    
    .category-group {
        width: 100% !important;
    }

    /* 5. Sticky Cart Adjust */
    .sticky-cart-btn {
        top: auto;
        bottom: 20px;
        right: 20px;
        left: auto; /* Unset generic style if any */
        transform: none;
        z-index: 5000;
    }

    /* 6. Typography Adjustments */
    .section-title {
        font-size: 16px;
        text-align: center;
    }
}

/* Fabric Positions Multi-select */
.modal-positions-container {
    padding: 10px;
    background-color: #f7fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.modal-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 10px;
}

.positions-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.position-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.position-item:hover {
    background-color: #edf2f7;
}

.position-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.position-label {
    font-size: 14px;
    color: #2d3748;
}
