/* ============================================================
   Design Gallery v2 — Standalone page styles
   Includes: modal, company chips, batch rendering, card polish
   ============================================================ */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: #f0f2f5;
    color: #1f2937;
    line-height: 1.5;
}

/* === Header === */
.gallery-header {
    background: linear-gradient(135deg, #2e5827 0%, #3e6837 100%);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.header-logo .logo {
    height: 36px;
    filter: brightness(0) invert(1);
}

.header-title { flex: 1; }

.header-title h1 {
    color: white;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.header-subtitle {
    color: rgba(255,255,255,0.7);
    font-size: 12px;
}

.back-link {
    color: white;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 16px;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 6px;
    transition: all 0.2s;
    white-space: nowrap;
}

.back-link:hover {
    background: white;
    color: #2e5827;
    border-color: white;
}

.back-link i { margin-right: 4px; }

/* === Search Section === */
.search-section {
    background: white;
    padding: 20px 24px 14px;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 50;
}

.search-container {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.search-bar {
    flex: 1;
    min-width: 280px;
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 14px;
    color: #9ca3af;
    font-size: 15px;
    pointer-events: none;
}

.search-field {
    width: 100%;
    padding: 12px 40px 12px 42px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    color: #1f2937;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fafafa;
}

.search-field:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    background: white;
}

.search-field::placeholder { color: #9ca3af; }

.search-clear {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 13px;
}

.search-clear:hover { background: #f3f4f6; color: #6b7280; }

/* Customer filter */
.search-options { display: flex; align-items: center; }

.customer-filter {
    display: flex;
    align-items: center;
    gap: 6px;
}

.customer-label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
    white-space: nowrap;
}

.customer-label i { margin-right: 2px; }

.customer-field {
    width: 90px;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 13px;
    font-family: 'SF Mono', 'Consolas', monospace;
    text-align: center;
}

.customer-field:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

.btn-customer-load {
    padding: 8px 12px;
    background: #6366f1;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
}

.btn-customer-load:hover { background: #4f46e5; }

/* Tier filter chips */
.filter-chips {
    max-width: 900px;
    margin: 10px auto 0;
    display: flex;
    gap: 6px;
}

.chip {
    padding: 5px 14px;
    border: 1px solid #d1d5db;
    border-radius: 20px;
    background: white;
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.15s;
}

.chip:hover { border-color: #6366f1; color: #6366f1; }

.chip.active {
    background: #6366f1;
    color: white;
    border-color: #6366f1;
}

/* Dynamic company filter chips */
.company-chips {
    max-width: 900px;
    margin: 8px auto 0;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    max-height: 64px;
    overflow-y: auto;
}

.company-chip {
    padding: 3px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
    font-size: 11px;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.company-chip:hover { border-color: #818cf8; color: #4f46e5; background: #eef2ff; }

.company-chip.active {
    background: #818cf8;
    color: white;
    border-color: #818cf8;
}

.company-chip .chip-count {
    font-size: 10px;
    opacity: 0.7;
    margin-left: 2px;
}

/* === Main Content === */
.gallery-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 24px 60px;
}

/* Empty state */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 24px;
    text-align: center;
}

.empty-icon {
    font-size: 56px;
    color: #d1d5db;
    margin-bottom: 20px;
}

.empty-state h2 {
    font-size: 22px;
    color: #374151;
    margin-bottom: 8px;
}

.empty-state p {
    color: #6b7280;
    font-size: 14px;
    max-width: 400px;
}

.empty-hint {
    margin-top: 6px;
    font-size: 13px;
    color: #9ca3af;
}

/* Loading skeletons */
.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    padding: 20px 0;
}

.skeleton-card {
    height: 240px;
    background: linear-gradient(110deg, #e5e7eb 25%, #f3f4f6 37%, #e5e7eb 63%);
    background-size: 200% 100%;
    animation: shimmer 1.4s ease-in-out infinite;
    border-radius: 10px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* No results */
.no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 24px;
    text-align: center;
}

.no-results-icon {
    font-size: 40px;
    color: #d1d5db;
    margin-bottom: 16px;
}

.no-results h3 { color: #6b7280; font-size: 18px; }
.no-results p { color: #9ca3af; font-size: 13px; margin-top: 4px; }

.no-filter-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #9ca3af;
    font-size: 14px;
}

/* Results header */
.results-header {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 14px;
    font-size: 14px;
    color: #6b7280;
}

#results-count {
    font-weight: 700;
    color: #1f2937;
    font-size: 15px;
}

#results-query { font-style: italic; }

.show-all-link {
    color: #6366f1;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    margin-left: 4px;
}

.show-all-link:hover { text-decoration: underline; }

/* === Design Grid === */
.design-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}

/* === Card === */
.design-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.15s;
    position: relative;
}

.design-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

/* Tier accent — left border color for visual scanning */
.design-card[data-tier="Standard"]  { border-left: 3px solid #10b981; }
.design-card[data-tier="Mid"]       { border-left: 3px solid #f59e0b; }
.design-card[data-tier="Large"]     { border-left: 3px solid #ef4444; }
.design-card[data-tier="Full Back"] { border-left: 3px solid #ec4899; }

.card-thumb {
    width: 100%;
    height: 120px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: 1px solid #f1f5f9;
    cursor: zoom-in;
}

.card-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.thumb-placeholder {
    font-size: 36px;
    color: #d1d5db;
}

.card-info {
    padding: 8px 10px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-height: 80px;
}

.card-number {
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 13px;
    font-weight: 700;
    color: #1e40af;
}

.card-company {
    font-size: 11px;
    color: #374151;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.card-cust-id {
    font-size: 10px;
    color: #6b7280;
    font-weight: 500;
    white-space: nowrap;
}

.card-name {
    font-size: 11px;
    color: #64748b;
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: 2px;
}

.card-stitch {
    font-size: 10px;
    color: #94a3b8;
}

.card-detail {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 1px;
}

.card-threads {
    font-size: 10px;
    color: #94a3b8;
    font-style: italic;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 140px;
}

.card-dst {
    font-size: 10px;
    color: #6366f1;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-dst i {
    font-size: 9px;
    margin-right: 2px;
    opacity: 0.7;
}

/* Always-visible copy button on card */
.card-copy-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(255,255,255,0.85);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #9ca3af;
    transition: background 0.15s, color 0.15s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.card-copy-btn:hover {
    background: #6366f1;
    color: white;
}

/* Tier badges */
.tier-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
}

.tier-standard { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.tier-mid { background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; }
.tier-large { background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }
.tier-full-back { background: #fdf2f8; color: #9d174d; border: 1px solid #fbcfe8; }

.placement-tag {
    display: inline-block;
    background: #f1f5f9;
    color: #475569;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border: 1px solid #e2e8f0;
}

/* Sales Rep badges */
.rep-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.rep-taneisha { background: #ede9fe; color: #5b21b6; border: 1px solid #c4b5fd; }
.rep-nika { background: #e0f2fe; color: #075985; border: 1px solid #7dd3fc; }

/* Customer Type badges */
.cust-type-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.cust-type-active { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.cust-type-dead { background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }
.cust-type-inactive { background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; }
.cust-type-prospect { background: #f0f9ff; color: #0369a1; border: 1px solid #bae6fd; }

/* === Show All Bar === */
.show-all-bar {
    text-align: center;
    padding: 20px 0;
}

.btn-show-all {
    padding: 10px 28px;
    background: white;
    border: 2px solid #6366f1;
    border-radius: 8px;
    color: #6366f1;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.btn-show-all:hover {
    background: #6366f1;
    color: white;
}

.btn-show-all i { margin-right: 6px; }

/* === Design Modal (centered overlay) === */
.design-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 90;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}

.design-modal-overlay.active { opacity: 1; pointer-events: auto; }

.design-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 680px;
    max-width: 92vw;
    max-height: 88vh;
    background: white;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    z-index: 100;
    overflow-y: auto;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
}

.design-modal.active {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

.design-modal-close {
    position: sticky;
    top: 12px;
    float: right;
    margin: 12px 12px 0 0;
    width: 32px;
    height: 32px;
    border: none;
    background: #f3f4f6;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #6b7280;
    z-index: 10;
    transition: background 0.15s;
}

.design-modal-close:hover { background: #e5e7eb; color: #374151; }

.design-modal-body { padding: 24px; }

.modal-design-header { margin-bottom: 16px; }

.modal-design-number {
    font-size: 22px;
    font-weight: 700;
    color: #1e40af;
    font-family: 'SF Mono', 'Consolas', monospace;
}

.modal-design-company {
    font-size: 14px;
    color: #374151;
    font-weight: 600;
    margin-top: 2px;
}

.modal-design-name {
    font-size: 13px;
    color: #64748b;
    font-style: italic;
}

.modal-design-image {
    width: 100%;
    height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 16px;
    border: 1px solid #e5e7eb;
}

.modal-design-image img {
    max-width: 100%;
    max-height: 420px;
    object-fit: contain;
    cursor: zoom-in;
}

.modal-no-image i {
    font-size: 64px;
    color: #d1d5db;
}

.btn-share-modal {
    width: 100%;
    padding: 12px;
    background: #2e5827;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 20px;
    transition: background 0.2s;
}

.btn-share-modal:hover { background: #1e3d1a; }
.btn-share-modal i { margin-right: 6px; }

/* Reuse detail-section styles for modal content */
.modal-section {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f3f4f6;
}

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

.modal-section-title {
    font-size: 12px;
    font-weight: 700;
    color: #6366f1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.modal-section-title i { margin-right: 4px; }

.modal-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 4px 0;
    font-size: 13px;
}

.modal-label {
    color: #6b7280;
    font-weight: 500;
    flex-shrink: 0;
    margin-right: 12px;
}

.modal-value {
    color: #1f2937;
    text-align: right;
    word-break: break-word;
}

.modal-threads {
    font-style: italic;
    font-size: 12px;
    line-height: 1.4;
    max-width: 300px;
}

.modal-dst-file {
    padding: 4px 8px;
    font-size: 12px;
    font-family: 'SF Mono', 'Consolas', monospace;
    color: #374151;
    background: #f8fafc;
    border-radius: 4px;
    margin-bottom: 3px;
}

.modal-dst-file i {
    color: #6366f1;
    margin-right: 4px;
    font-size: 11px;
}

.modal-notes {
    font-size: 13px;
    color: #374151;
    line-height: 1.5;
    white-space: pre-wrap;
}

.modal-dst-preview {
    text-align: center;
    padding: 8px 0;
}

.modal-dst-preview img {
    max-width: 180px;
    max-height: 140px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    background: #fafafa;
}

/* === Image Gallery (labeled thumbnails below main image) === */
.modal-image-gallery {
    display: flex;
    gap: 10px;
    justify-content: center;
    padding: 8px 0 4px;
    flex-wrap: wrap;
}

.gallery-thumb {
    cursor: pointer;
    text-align: center;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 4px;
    background: #fafafa;
    transition: border-color 0.2s, box-shadow 0.2s;
    max-width: 120px;
}

.gallery-thumb:hover {
    border-color: #2e5827;
    box-shadow: 0 2px 8px rgba(46, 88, 39, 0.15);
}

.gallery-thumb.active {
    border-color: #2e5827;
    box-shadow: 0 0 0 2px rgba(46, 88, 39, 0.2);
}

.gallery-thumb img {
    width: 100px;
    height: 75px;
    object-fit: contain;
    border-radius: 4px;
    display: block;
    margin: 0 auto;
}

.gallery-label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    color: #6b7280;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.gallery-thumb.active .gallery-label {
    color: #2e5827;
    object-fit: contain;
}

/* === Detail Panel (slide-in, kept as backup) === */
.detail-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 90;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}

.detail-overlay.active { opacity: 1; pointer-events: auto; }

.detail-panel {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    max-width: 90vw;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 24px rgba(0,0,0,0.15);
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
}

.detail-panel.active { right: 0; }

.detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.detail-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: #1e40af;
    font-family: 'SF Mono', 'Consolas', monospace;
}

.detail-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
}

.detail-close:hover { color: #374151; }

.detail-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.detail-image {
    width: 100%;
    max-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
    border: 1px solid #e5e7eb;
}

.detail-image img {
    max-width: 100%;
    max-height: 220px;
    object-fit: contain;
    cursor: zoom-in;
}

.btn-share-detail {
    width: 100%;
    padding: 10px;
    background: #2e5827;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 16px;
    transition: background 0.2s;
}

.btn-share-detail:hover { background: #1e3d1a; }
.btn-share-detail i { margin-right: 6px; }

.detail-section {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f3f4f6;
}

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

.detail-section-title {
    font-size: 12px;
    font-weight: 700;
    color: #6366f1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.detail-section-title i { margin-right: 4px; }

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 4px 0;
    font-size: 13px;
}

.detail-label {
    color: #6b7280;
    font-weight: 500;
    flex-shrink: 0;
    margin-right: 12px;
}

.detail-value {
    color: #1f2937;
    text-align: right;
    word-break: break-word;
}

.detail-threads {
    font-style: italic;
    font-size: 12px;
    line-height: 1.4;
    max-width: 220px;
}

.dst-file-row {
    padding: 4px 8px;
    font-size: 12px;
    font-family: 'SF Mono', 'Consolas', monospace;
    color: #374151;
    background: #f8fafc;
    border-radius: 4px;
    margin-bottom: 3px;
}

.dst-file-row i {
    color: #6366f1;
    margin-right: 4px;
    font-size: 11px;
}

.detail-notes {
    font-size: 13px;
    color: #374151;
    line-height: 1.5;
    white-space: pre-wrap;
}

/* === Gallery Lightbox (full-screen zoom) === */
.gallery-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.gallery-lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.gallery-lightbox img {
    max-width: 92vw;
    max-height: 92vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.4);
}

.gallery-lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    font-size: 22px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    z-index: 501;
}

.gallery-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* === Toast === */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    transform: translateX(120%);
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.toast-success { background: #065f46; color: white; }
.toast-error { background: #991b1b; color: white; }
.toast-warning { background: #92400e; color: white; }
.toast-info { background: #1e40af; color: white; }

/* === Responsive === */
@media (max-width: 640px) {
    .search-container { flex-direction: column; }
    .search-bar { min-width: 100%; }
    .design-grid { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 10px; }
    .gallery-header { flex-wrap: wrap; gap: 8px; }
    .filter-chips { flex-wrap: wrap; }
    .company-chips { max-height: 48px; }

    .design-modal {
        width: 100%;
        max-width: 100vw;
        max-height: 92vh;
        border-radius: 14px 14px 0 0;
        top: auto;
        bottom: 0;
        left: 0;
        transform: translateY(100%);
    }
    .design-modal.active {
        transform: translateY(0);
    }
    .detail-panel { width: 100%; max-width: 100vw; }
}
