.cb-design-selector-wrap {
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 5px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.cb-design-selector-label {
    font-weight: bold;
    margin-left: 10px;
}

.cb-btn {
    background: #222;
    color: #fff;
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.cb-btn:hover {
    background: #000;
}

.cb-selected-design-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.cb-selected-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    overflow: hidden;
}

.cb-selected-info {
    display: flex;
    flex-direction: column;
    margin-left: 10px;
}

.cb-selected-code strong {
    color: #d63638;
}

.cb-change-design {
    background: #2271b1;
}

.cb-change-design:hover {
    background: #135e96;
}

/* Modal Styles */
.cb-modal {
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.cb-modal-overlay {
    position: absolute;
    background: rgba(0,0,0,0.7);
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.cb-modal-content {
    position: relative;
    background: #fff;
    margin: 5vh auto;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
}

.cb-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    background: #fff;
    z-index: 10;
}

.cb-modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.cb-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    color: #555;
}

.cb-modal-body {
    padding: 15px 20px 20px 20px;
    overflow-y: auto;
}

.cb-modal-search {
    margin-bottom: 15px;
}

.cb-modal-search input {
    width: 100%;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #ddd;
    box-sizing: border-box;
}

/* Tab Styles */
.cb-type-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.cb-tab-btn {
    background: #f1f1f1;
    color: #444;
    border: 1px solid #ddd;
    padding: 8px 16px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.cb-tab-btn:hover {
    background: #e1e1e1;
}

.cb-tab-btn.active {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

.cb-modal-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.cb-design-card {
    border: 1px solid #eee;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    background: #fff;
    position: relative;
}

.cb-design-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: #2271b1;
}

.cb-card-image {
    position: relative;
    overflow: hidden;
}

.cb-card-image img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    transition: transform 0.3s;
}

.cb-design-card:hover .cb-card-image img {
    transform: scale(1.05);
}

.cb-card-preview-btn {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    cursor: pointer;
}

.cb-design-card:hover .cb-card-preview-btn {
    opacity: 1;
}

.cb-card-preview-btn span {
    border: 1px solid #fff;
    padding: 5px 15px;
    border-radius: 30px;
    font-size: 13px;
}

.cb-card-info {
    padding: 10px;
    text-align: center;
}

.cb-card-title {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 14px;
}

.cb-card-code {
    display: block;
    font-size: 12px;
    color: #666;
}

.cb-no-designs {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #666;
}

/* Lightbox Styles */
.cb-lightbox {
    position: fixed;
    z-index: 999999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.cb-lightbox-overlay {
    position: absolute;
    background: rgba(0,0,0,0.9);
    width: 100%;
    height: 100%;
}

.cb-lightbox-content {
    position: relative;
    background: #fff;
    margin: 5vh auto;
    width: 80%;
    max-width: 900px;
    max-height: 90vh;
    overflow: auto;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    box-sizing: border-box;
}

.cb-lightbox-close {
    position: absolute;
    top: 10px;
    left: 10px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #333;
    z-index: 5;
}

.cb-lightbox img {
    max-width: 60%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 4px;
}

.cb-lightbox-info {
    flex: 1;
    text-align: right;
}

.cb-lightbox-info h4 {
    margin: 0 0 15px 0;
    font-size: 20px;
}

.cb-lightbox-info p {
    font-size: 16px;
    color: #555;
    margin-bottom: 30px;
}

/* Responsive */
@media (max-width: 1024px) {
    .cb-modal-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .cb-modal-grid { grid-template-columns: repeat(2, 1fr); }
    .cb-modal-content { width: 95%; }
    .cb-lightbox-content { flex-direction: column; width: 90%; }
    .cb-lightbox img { max-width: 100%; }
}