/* Block Editor Styles */
.page-editor {
    width: 100%;
}

.editor-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.tab-button {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    transition: all 0.3s ease;
}

.tab-button.active {
    color: var(--blue);
    border-bottom-color: var(--blue);
}

.tab-button:hover {
    color: var(--blue);
}

/* Block Editor Container */
.block-editor-container {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    background: #fafafa;
}

.blocks-list {
    min-height: 200px;
}

.block-wrapper {
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: white;
    position: relative;
}

.block-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
    font-size: 12px;
    color: #666;
}

/* Nested blocks use a quieter toolbar so their hierarchy remains visible. */
.section-block-item {
    margin-top: 12px;
    border: 1px solid #d8d8d8;
    border-left: 3px solid var(--blue);
    border-radius: 4px;
    background: #fff;
    overflow: hidden;
}

.section-block-item .block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 40px;
    padding: 7px 10px;
    background: #f7f8fa;
    border-bottom: 1px solid #e2e2e2;
    color: #555;
}

.section-block-item .block-content {
    padding: 10px;
}

.section-block-item .block-actions {
    gap: 4px;
}

.base-block-controls {
    padding-bottom: 10px;
}

.block-type {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
}

.block-actions {
    display: flex;
    gap: 5px;
}

.btn-move-block {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 2px;
    color: #666;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.btn-move-block:hover {
    background: #e0e0e0;
}

.btn-move-block.btn-delete:hover {
    background: #ffebee;
    color: #d32f2f;
}

/* Block Editor Content */
.block-editor {
    padding: 15px;
}

.block-controls label {
    position: static;
    top: auto;
    left: auto;
    font-size: 12px;
    color: #666;
    padding: 0;
    margin: 0;
}

.block-controls select {
    width: auto;
    padding: 4px 8px;
    font-size: 12px;
    border: 1px solid #ddd;
}

.btn-remove-block {
    background: #ff4757;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    font-size: 14px;
    margin-left: auto;
}

.btn-remove-block:hover {
    background: #ff3838;
}

/* Title Block */
.title-block-editor .title-input {
    width: 100%;
    font-size: 18px;
    font-weight: 600;
    border: none;
    border-bottom: 2px solid #ddd;
    padding: 10px 0;
    background: transparent;
}

.title-input:focus {
    outline: none;
    border-bottom-color: var(--blue);
}

.block-preview {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.block-preview .page-title {
    margin: 0;
    color: #333;
}

/* Add Block Section */
.add-block-section {
    margin-top: 20px;
    text-align: center;
}

.add-buttons-container {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
}

.btn-show-blocks {
    padding: 12px 24px;
    background: var(--blue);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.btn-show-blocks:hover {
    background: #041a4f;
}

.block-selector {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    text-align: left;
}

.block-selector h4 {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: #333;
}

.block-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.btn-add-block {
    padding: 8px 16px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    color: #333;
}

.btn-add-block:hover {
    background: var(--blue);
    color: white;
}

.btn-cancel {
    padding: 6px 12px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.btn-cancel:hover {
    background: #545b62;
}

/* Page Preview */
.page-preview {
    padding: 20px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.preview-content {
    margin-top: 20px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 4px;
    min-height: 200px;
}

/* Action buttons */
.btn-preview,
.btn-edit,
.btn-delete {
    text-decoration: none;
    font-size: 16px;
    cursor: pointer;
}

.btn-preview:hover,
.btn-edit:hover,
.btn-delete:hover {
    opacity: 0.7;
}

/* Edit with Preview Layout */
.block-edit-with-preview {
    display: flex;
    flex-direction: column;
    gap: 2px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    background: #e9ecef;
    border: 1px solid #dee2e6;
}

.block-edit-section {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 24px;
    position: relative;
}

.block-edit-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
}

.block-preview-section {
    padding: 24px;
    position: relative;
}

.block-preview-section::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
}

.edit-section-title,
.preview-section-title {
    margin: 0 0 20px 0;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
}

.edit-section-title {
    color: #475569;
}

.preview-section-title {
    color: #6b7280;
}

.preview-container {
    min-height: 120px;
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
    border: 2px dashed #d1d5db;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.preview-container::before {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    opacity: 0.6;
}

/* Enhanced form styling for edit section */
.block-edit-section .form-group {
    margin-bottom: 18px;
}

.block-edit-section label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    display: block;
    font-size: 13px;
    letter-spacing: 0.3px;
}

.block-edit-section input,
.block-edit-section select,
.block-edit-section textarea {
    border: 2px solid #e5e7eb;
    /* border-radius: 8px; */
    /* padding: 12px 14px; */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    font-size: 14px;
    font-family: inherit;
}

.block-edit-section input:hover,
.block-edit-section select:hover,
.block-edit-section textarea:hover {
    border-color: #d1d5db;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .block-edit-with-preview {
        gap: 2px;
    }
}

@media (max-width: 768px) {
    .block-edit-section,
    .block-preview-section {
        padding: 20px;
    }
    
    .edit-section-title,
    .preview-section-title {
        font-size: 11px;
        margin-bottom: 16px;
    }
    
    .preview-container {
        min-height: 100px;
        padding: 16px;
    }
}

/* Color Picker Styling */
.color-picker-container {
    display: flex;
    gap: 8px;
    align-items: center;
}

.color-picker {
    width: 50px;
    height: 36px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    background: none;
    padding: 0;
}

.color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

.color-input {
    flex: 1;
    min-width: 0;
}

/* Color Picker Styling */
.color-picker-container {
    display: flex;
    gap: 8px;
    align-items: center;
}

.color-picker {
    width: 50px;
    height: 36px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    background: none;
    padding: 0;
}

.color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

.color-input {
    flex: 1;
    min-width: 0;
}
/* Text Alignment Buttons */
.alignment-buttons {
    /* display: flex;
    gap: 4px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    overflow: hidden; */
}

.align-btn {
    background: #ffffff;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-right: 1px solid #e5e7eb;
    font-size: 16px;
    color: #6b7280;
}

.align-btn:last-child {
    border-right: none;
}

.align-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

.align-btn.active {
    background: #3b82f6;
    color: #ffffff;
}

.align-btn.active:hover {
    background: #2563eb;
}

/* Color Clear Button */
.color-clear-btn {
    background: #ef4444;
    border: none;
    border-radius: 4px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    margin-left: 8px;
}

.color-clear-btn:hover {
    background: #dc2626;
    transform: scale(1.05);
}

/* Responsive Controls */
.responsive-controls-section {
    width: 100%;
    padding-top: 16px;
    margin-top: 16px;
}

.responsive-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.responsive-toggle label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 600;
    color: #374151;
}

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

.responsive-add-btn {
    background: #10b981;
    border: none;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
}

.responsive-add-btn:hover {
    background: #059669;
    transform: scale(1.05);
}

.responsive-breakpoint {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    width: auto;
}

.responsive-header {
    display: flex;
    align-items: end;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.responsive-header .control-group {
    flex: 1;
    min-width: 120px;
}

.responsive-remove-btn {
    background: #ef4444;
    border: none;
    border-radius: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    flex-shrink: 0;
}

.responsive-remove-btn:hover {
    background: #dc2626;
    transform: scale(1.05);
}

.responsive-controls {
    display: flex;
    align-items: end;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.responsive-controls .control-group {
    flex: 1;
    min-width: 150px;
}

/* Builder Block Styles */
.builder-block-editor .columns-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.add-column-btn {
    background: var(--blue);
    border: none;
    border-radius: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
}

.add-column-btn:hover {
    background: #0066cc;
    transform: scale(1.05);
}

.columns-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.column-editor {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 16px;
    background: #f9f9f9;
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.column-number {
    font-weight: 500;
    color: #333;
}

.remove-column-btn {
    background: #ef4444;
    border: none;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
}

.remove-column-btn:hover {
    background: #dc2626;
    transform: scale(1.05);
}

.responsive-grid-controls {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.grid-control-group {
    flex: 1;
    min-width: 150px;
}

.grid-control-group label {
    font-size: 10px;
    font-weight: 500;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.grid-control-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    font-size: 14px;
    cursor: pointer;
}

.grid-control-group select:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 2px rgba(26, 144, 255, 0.2);
}

.column-preview {
    background: #e8f4ff;
    padding: 8px 12px;
    border-radius: 4px;
    border-left: 3px solid var(--blue);
}

.column-preview strong {
    color: #333;
    font-size: 12px;
}

.column-preview code {
    background: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    color: var(--blue);
    font-size: 12px;
    margin-left: 8px;
}

.grid-preview {
    margin-top: 20px;
    padding: 16px;
    background: #f5f5f5;
    border-radius: 6px;
    border: 2px dashed #ccc;
}

.grid-preview h4 {
    margin: 0 0 16px 0;
    color: #333;
    font-size: 14px;
    font-weight: 500;
}

.grid-preview .row {
    margin: 0;
}

.column-placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    text-align: center;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.column-placeholder small {
    opacity: 0.8;
    font-size: 11px;
    margin-top: 4px;
    font-family: 'Courier New', monospace;
}

.column-content {
    background: #e3f2fd;
    padding: 16px;
    border-radius: 4px;
    border-left: 4px solid var(--blue);
    text-align: center;
    color: #333;
    font-weight: 500;
}

/* Base Editor Styles */
.base-editor {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: white;
    overflow: hidden;
}

.editor-header {
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.editor-tabs {
    display: flex;
    margin: 0;
    border-bottom: 1px solid #e0e0e0;
}

.editor-tab {
    padding: 12px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.editor-tab.active {
    color: var(--blue);
    border-bottom-color: var(--blue);
    background: white;
}

.editor-tab:hover {
    color: var(--blue);
    background: #f0f0f0;
}

.editor-toolbar {
    padding: 8px 16px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: end;
}

.toolbar-group {
    display: flex;
    gap: 4px;
    border-right: 1px solid #e0e0e0;
    padding-right: 16px;
}

.toolbar-group:last-child {
    border-right: none;
    padding-right: 0;
}

.toolbar-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
    transition: all 0.2s ease;
}

.toolbar-btn:hover {
    background: #f0f0f0;
    border-color: #ccc;
    color: #333;
}

.toolbar-btn.active {
    background: var(--blue);
    border-color: var(--blue);
    color: white;
}

.editor-content {
    position: relative;
}

.visual-editor-container {
    display: flex;
    position: relative;
}

.visual-editor {
    flex: 1;
    padding: 20px;
    outline: none;
    line-height: 1.6;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    color: #333;
}

.visual-editor:empty::before {
    content: attr(placeholder);
    color: #999;
    pointer-events: none;
}

.visual-editor p {
    margin: 0 0 16px 0;
}

.visual-editor h1,
.visual-editor h2,
.visual-editor h3,
.visual-editor h4,
.visual-editor h5,
.visual-editor h6 {
    margin: 20px 0 12px 0;
    line-height: 1.3;
}

.visual-editor h1 { font-size: 2.2em; }
.visual-editor h2 { font-size: 1.8em; }
.visual-editor h3 { font-size: 1.5em; }
.visual-editor h4 { font-size: 1.3em; }
.visual-editor h5 { font-size: 1.1em; }
.visual-editor h6 { font-size: 1em; }

.style-panel {
    width: 300px;
    border-left: 1px solid #e0e0e0;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    max-height: 500px;
    overflow-y: auto;
}

.style-panel-header {
    padding: 16px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
}

.style-panel-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.close-panel-btn {
    width: 24px;
    height: 24px;
    border: none;
    background: none;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
    transition: all 0.2s ease;
}

.close-panel-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.style-controls {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.style-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.style-group label {
    font-size: 12px;
    font-weight: 500;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.style-group select,
.style-group input[type="text"] {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    font-size: 14px;
    cursor: pointer;
}

.style-group input[type="text"] {
    cursor: text;
}

.style-group select:focus,
.style-group input[type="text"]:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 2px rgba(26, 144, 255, 0.2);
}

.html-editor-container {
    display: flex;
    flex-direction: column;
}

.html-editor {
    flex: 1;
    min-height: 300px;
    padding: 20px;
    border: none;
    outline: none;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    background: #f8f9fa;
}

.html-actions {
    padding: 16px;
    border-top: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.sync-btn {
    padding: 8px 16px;
    background: var(--blue);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s ease;
}

.sync-btn:hover {
    background: #0066cc;
}

/* Enhanced Editor Controls */
.editor-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    border-left: 1px solid #e0e0e0;
    flex-wrap: wrap;
}

.editor-controls .control-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-right: 12px;
}
.editor-controls .control-group:not(:last-child) {
        border-right: 1px solid #e0e0e0;
}

.editor-controls .control-group label {
    font-size: 10px;
    font-weight: 500;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.editor-controls .control-group select,
.editor-controls .control-group .size-input {
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    background: white;
    font-size: 12px;
    cursor: pointer;
}

.editor-controls .control-group .size-input {
    width: 80px;
    cursor: text;
}

.editor-controls .control-group select:focus,
.editor-controls .control-group .size-input:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 1px rgba(26, 144, 255, 0.3);
}

.alignment-buttons {
    display: flex;
    gap: 2px;
    margin-top: 4px;
}

.editor-controls .align-btn {
    width: 24px;
    height: 24px;
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
    transition: all 0.2s ease;
    font-size: 12px;
}

.editor-controls .align-btn:hover {
    background: #f0f0f0;
    border-color: #ccc;
}

.editor-controls .align-btn.active {
    background: var(--blue);
    border-color: var(--blue);
    color: white;
}

.editor-controls .color-picker-container {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.editor-controls .color-picker {
    width: 32px;
    height: 24px;
    border: 1px solid #ddd;
    border-radius: 3px;
    cursor: pointer;
}

.editor-controls .color-clear-btn {
    width: 20px;
    height: 20px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
    font-size: 10px;
}

.editor-controls .color-clear-btn:hover {
    background: #f0f0f0;
}

/* Visual Editor placeholder styling */
.visual-editor:empty::before {
    content: attr(data-placeholder);
    color: #999;
    pointer-events: none;
    font-style: italic;
}

/* Better focus styling for visual editor */
.visual-editor:focus {
    outline: none;
}

/* Selected element highlighting */
.visual-editor p:focus,
.visual-editor h1:focus,
.visual-editor h2:focus,
.visual-editor h3:focus,
.visual-editor h4:focus,
.visual-editor h5:focus,
.visual-editor h6:focus {
    outline: 1px solid var(--blue);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Builder Block Enhanced Styles */
.column-content-editor {
    margin-top: 16px;
}

.column-content-editor label {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 500;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.column-preview-content {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    min-height: 60px;
    font-size: 14px;
    line-height: 1.5;
}

.column-preview-content p {
    margin: 0 0 8px 0;
}

.column-preview-content p:last-child {
    margin-bottom: 0;
}

.column-preview-content h1,
.column-preview-content h2,
.column-preview-content h3,
.column-preview-content h4,
.column-preview-content h5,
.column-preview-content h6 {
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.column-final-content {
    padding: 16px;
    min-height: 60px;
    line-height: 1.6;
}

.column-final-content p {
    margin: 0 0 12px 0;
}

.column-final-content p:last-child {
    margin-bottom: 0;
}

.column-final-content h1,
.column-final-content h2,
.column-final-content h3,
.column-final-content h4,
.column-final-content h5,
.column-final-content h6 {
    margin: 0 0 12px 0;
    line-height: 1.3;
}

/* Update column editor to accommodate the new editor */
.column-editor {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 16px;
    background: #f9f9f9;
    margin-bottom: 20px;
}

/* Make grid preview more compact */
.grid-preview {
    margin-top: 20px;
    padding: 16px;
    background: #f5f5f5;
    border-radius: 6px;
    border: 2px dashed #ccc;
}

.grid-preview h4 {
    margin: 0 0 12px 0;
    color: #333;
    font-size: 14px;
    font-weight: 500;
}

.grid-preview .row {
    margin: 0;
}

/* ==========================================================================
   Products Block
   ========================================================================== */

.products-block__heading {
    margin: 0 0 24px 0;
    font-size: 28px;
    font-weight: 700;
}

/* ========================================================================
   Image Block
   ======================================================================== */

.image-block-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.image-block__preview,
.image-block__image {
    display: block;
    max-width: 100%;
    height: auto;
    margin-top: 16px;
}

.products-grid-message {
    padding: 32px 16px;
    text-align: center;
    color: #777;
}

/* Product Card */
.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.product-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.product-card__image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
    padding: 16px;
}

.product-card__image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Placeholder shown when a product has no image */
.product-card__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #c4c4c4;
}

.product-card__placeholder svg {
    width: 48px;
    height: 48px;
}

.product-card__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 14px 16px 18px;
    gap: 10px;
}

.product-card__title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    color: #222;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7em;
}

.product-card__price {
    margin-top: auto;
}

.product-card__price-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--blue, #0a4fa3);
}

.product-card__price-pair {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
}

.product-card__price-wholesale {
    color: #737b85;
    font-size: 18px;
}

.product-card__price-retail {
    color: var(--blue, #0a4fa3);
    font-size: 18px;
    font-weight: 700;
}

.product-card__login-link {
    font-size: 13px;
    font-weight: 500;
    color: var(--blue, #0a4fa3);
    text-decoration: none;
}

button.product-card__login-link,
button.product-single__login-link,
button.partner-hero-block__price-link {
    padding: 0;
    border: 0;
    background: transparent;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}

.product-card__login-link:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Product Card Loading Skeleton
   ========================================================================== */

.product-card--loading {
    pointer-events: none;
}

.product-card__skeleton {
    background: #eceff1;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

.product-card__skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.6) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: product-skeleton-shimmer 1.4s ease-in-out infinite;
}

.product-card__image.product-card__skeleton {
    border-radius: 0;
}

.product-card__title-skeleton {
    height: 14px;
    width: 100%;
}

.product-card__title-skeleton--short {
    width: 60%;
}

.product-card__price-skeleton {
    height: 20px;
    width: 40%;
    margin-top: 6px;
}

@keyframes product-skeleton-shimmer {
    100% {
        transform: translateX(100%);
    }
}

/* Make the product card title a link */
.product-card__title-link {
    color: inherit;
    text-decoration: none;
}

.product-card__title-link:hover {
    color: var(--blue, #0a4fa3);
}

/* ==========================================================================
   Category Slider Block
   ========================================================================== */

.category-slider-block {
    overflow: hidden;
}

.category-slider-block__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.category-slider-block__heading {
    max-width: 720px;
    margin: 0;
    font-size: clamp(2rem, 4vw, 4.5rem);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -0.02em;
}

.category-slider-block__track {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-behavior: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.category-slider-block__track::-webkit-scrollbar {
    display: none;
}

.category-slider-card {
    flex: 0 0 calc((100% - 72px) / 4);
    min-width: 0;
    color: inherit;
    text-decoration: none;
    scroll-snap-align: start;
}

.category-slider-card__image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #eceae5;
    color: #9a968d;
}

.category-slider-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.category-slider-card:hover .category-slider-card__image img {
    transform: scale(1.035);
}

.category-slider-card__image svg {
    width: 42px;
    height: 42px;
    stroke-width: 1.2;
}

.category-slider-card__footer {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding-top: 18px;
}

.category-slider-card__footer h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 400;
    line-height: 1.15;
}

.category-slider-block__controls {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-top: 42px;
}

.category-slider-block__arrows {
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
}

.category-slider-block__arrows button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 2px solid #384b91;
    border-radius: 50%;
    background: transparent;
    color: #384b91;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.category-slider-block__arrows button:hover {
    background: #384b91;
    color: #fff;
}

.category-slider-block__arrows svg {
    width: 17px;
    height: 17px;
}

.category-slider-block__progress {
    flex: 1 1 auto;
    height: 2px;
    overflow: hidden;
    background: #d4d0c8;
}

.category-slider-block__progress span {
    display: block;
    width: 100%;
    height: 100%;
    transform-origin: left center;
    background: #384b91;
    transition: transform 0.25s ease;
}

.category-slider-block__status {
    padding: 48px 0;
    color: #77736b;
}

@media (max-width: 900px) {
    .category-slider-card {
        flex-basis: calc((100% - 24px) / 2);
    }
}

@media (max-width: 600px) {
    .category-slider-block__heading {
        font-size: 2.3rem;
    }

    .category-slider-card {
        flex-basis: 82%;
    }

    .category-slider-card__footer {
        display: block;
    }

    .category-slider-card__footer h3 {
        margin-bottom: 8px;
    }

    .category-slider-block__controls {
        gap: 20px;
        margin-top: 28px;
    }
}

/* ==========================================================================
   Single Product Page
   ========================================================================== */

.product-single {
    padding: 24px 0 48px;
}

.product-single__breadcrumbs ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 24px 0;
    padding: 0;
    list-style: none;
    font-size: 13px;
    color: #777;
}

.product-single__breadcrumbs a {
    color: var(--blue, #0a4fa3);
    text-decoration: none;
}

/* Trust strip block */
.trust-strip-block {
    border-block: 1px solid #dce3df;
    background: #eef2ef;
}

.trust-strip-block__list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
    padding: 0;
    list-style: none;
}

.trust-strip-block__item {
    display: flex;
    min-width: 0;
    min-height: 76px;
    align-items: center;
    gap: 12px;
    padding: 14px clamp(18px, 4vw, 46px);
    border-right: 1px solid #dce3df;
}

.trust-strip-block__item:last-child {
    border-right: 0;
}

.trust-strip-block__marker {
    display: grid;
    flex: 0 0 34px;
    width: 34px;
    aspect-ratio: 1;
    place-items: center;
    overflow: hidden;
    border: 1px solid #b9ccc3;
    border-radius: 50%;
    color: #4e766b;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.trust-strip-block__copy {
    min-width: 0;
}

.trust-strip-block__copy strong,
.trust-strip-block__copy small {
    display: block;
}

.trust-strip-block__copy strong {
    font-size: 13px;
    line-height: 1.4;
}

.trust-strip-block__copy small {
    margin-top: 3px;
    color: #6e7b84;
    font-size: 11px;
    line-height: 1.45;
}

.trust-strip-block-editor__items {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.trust-strip-block-editor__item {
    min-width: 0;
    padding: 12px;
    border: 1px solid #dce3df;
    border-radius: 4px;
}

.trust-strip-block-editor__item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.trust-strip-block-editor__remove,
.trust-strip-block-editor__add {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 7px 10px;
    border: 1px solid #cbd6d1;
    border-radius: 4px;
    background: #fff;
    color: #314e7c;
    cursor: pointer;
}

.trust-strip-block-editor__remove {
    width: 36px;
    padding: 7px;
    color: #a94442;
}

.trust-strip-block-editor__add {
    margin-top: 12px;
}

/* Partner hero block */
body:has(.public-page .partner-hero-block) #wrapper {
    padding-top: 77px;
}

.public-page .section:has(> .partner-hero-block) {
    padding-top: 0 !important;
}

.partner-hero-block {
    position: relative;
    z-index: 2;
    display: flex;
    min-height: min(608px, calc(100svh - 154px));
    align-items: center;
    overflow: visible;
    padding: clamp(48px, 8vw, 100px) max(24px, calc((100vw - 1240px) / 2));
    background: #17283b;
    color: #fff;
    isolation: isolate;
}

.partner-hero-block__image,
.partner-hero-block__shade {
    position: absolute;
    z-index: -1;
    inset: 0;
    width: 100%;
    height: 100%;
}

.partner-hero-block__image {
    object-fit: cover;
    object-position: center 42%;
}

.partner-hero-block__shade {
    background: linear-gradient(90deg, rgba(17, 35, 53, .94) 0%, rgba(17, 35, 53, .78) 43%, rgba(17, 35, 53, .12) 100%);
}

.partner-hero-block__content {
    width: min(690px, calc(100% - 48px));
    margin-left: max(24px, calc((100vw - 1240px) / 2));
}

.partner-hero-block__eyebrow {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 20px;
    color: #d5e7df;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
}

.partner-hero-block__eyebrow::before {
    width: 26px;
    height: 1px;
    flex: 0 0 26px;
    background: currentColor;
    content: '';
}

.partner-hero-block__content h1 {
    max-width: 640px;
    margin: 0;
    color: #fff;
    font-size: clamp(50px, 7vw, 84px);
    font-weight: 600;
    line-height: .98;
}

.partner-hero-block__description {
    max-width: 560px;
    margin: 20px 0 25px;
    color: #edf2f1;
    font-size: 16px;
    line-height: 1.65;
}

.partner-hero-block__search {
    position: relative;
    display: flex;
    width: min(100%, 590px);
    box-sizing: border-box;
    min-height: 58px;
    align-items: center;
    gap: 12px;
    padding: 6px 7px 6px 17px;
    border: 1px solid #cbd6d1;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(0, 0, 0, .18);
}

.partner-hero-block__search-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    clip-path: inset(50%);
}

.partner-hero-block__search input {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    border: 0;
    outline: 0;
    background: transparent;
    color: #17283b;
    font-size: 14px;
}

.partner-hero-block__search input::placeholder {
    color: #7a8789;
    opacity: 1;
}

.partner-hero-block__search button {
    flex: 0 0 auto;
    min-height: 43px;
    padding: 0 16px;
    border: 0;
    border-radius: 3px;
    background: #314e7c;
    color: #fff;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
}

.partner-hero-block__search button:active {
    transform: scale(.97);
}

.partner-hero-block__search button:focus-visible,
.partner-hero-block__search input:focus-visible,
.partner-hero-block__price-note a:focus-visible,
.partner-hero-block__catalogue-link:focus-visible,
.partner-hero-block__suggestions a:focus-visible {
    outline: 2px solid #ff9f43;
    outline-offset: 3px;
}

.partner-hero-block__suggestions {
    position: absolute;
    z-index: 2;
    top: calc(100% + 5px);
    right: 0;
    left: 0;
    max-height: 240px;
    overflow-y: auto;
    margin: 0;
    padding: 5px;
    border: 1px solid #dce3df;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(23, 40, 59, .18);
    list-style: none;
}

.partner-hero-block__suggestions a {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    border-radius: 2px;
    color: #17283b;
    font-size: 13px;
}

.partner-hero-block__suggestions a:hover {
    background: #eef2ef;
}

.partner-hero-block__suggestions a span {
    font-weight: 600;
}

.partner-hero-block__suggestions a small {
    color: #6e7b84;
    font-size: 11px;
}

.partner-hero-block__suggestions a.partner-hero-block__more {
    display: block;
    border-top: 1px solid #e4e9e6;
    color: #314e7c;
    font-weight: 700;
}

.partner-hero-block__no-results {
    padding: 10px 12px;
    color: #6e7b84;
    font-size: 13px;
}

.partner-hero-block__price-note {
    margin: 13px 0 0;
    color: #e0e8e5;
    font-size: 12px;
    line-height: 1.6;
}

.partner-hero-block a.partner-hero-block__price-link,
.partner-hero-block button.partner-hero-block__price-link {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.partner-hero-block a.partner-hero-block__catalogue-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: 22px;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.partner-hero-block__catalogue-link span {
    font-size: 18px;
}

.partner-hero-block-editor__media {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.partner-hero-block-editor__fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.partner-hero-block-editor__fields label {
    display: grid;
    min-width: 0;
    gap: 5px;
    color: #405064;
    font-size: 12px;
    font-weight: 600;
}

.partner-hero-block-editor__fields input,
.partner-hero-block-editor__fields textarea {
    width: 100%;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid #cbd6d1;
    border-radius: 3px;
    background: #fff;
    color: #17283b;
    font: inherit;
    font-weight: 400;
}

.partner-hero-block-editor__fields textarea {
    resize: vertical;
}

.partner-hero-block-editor__wide {
    grid-column: 1 / -1;
}

@media (prefers-reduced-transparency: reduce) {
    .partner-hero-block__shade {
        background: rgba(17, 35, 53, .82);
    }
}

@media (max-width: 900px) {
    .partner-hero-block {
        min-height: min(640px, calc(100svh - 144px));
        padding-top: 64px;
    }

    .partner-hero-block__content h1 {
        font-size: clamp(48px, 8vw, 70px);
    }
}

@media (max-width: 680px) {
    body:has(.public-page .partner-hero-block) #wrapper {
        padding-top: 61px;
    }

    .partner-hero-block {
        min-height: 0;
        padding: 56px 20px 44px;
    }

    .partner-hero-block__content {
        width: calc(100% - 40px);
        margin-left: 20px;
    }

    .partner-hero-block__image {
        object-position: 42% center;
    }

    .partner-hero-block__shade {
        background: linear-gradient(90deg, rgba(17, 35, 53, .9), rgba(17, 35, 53, .62));
    }

    .partner-hero-block__content h1 {
        font-size: clamp(44px, 12vw, 58px);
    }

    .partner-hero-block__description {
        font-size: 14px;
    }

    .partner-hero-block__search {
        gap: 8px;
        padding-left: 12px;
    }

    .partner-hero-block__search input {
        font-size: 12px;
    }

    .partner-hero-block__search button {
        min-height: 40px;
        padding-inline: 11px;
        font-size: 11px;
    }

    .partner-hero-block-editor__fields {
        grid-template-columns: 1fr;
    }

    .partner-hero-block-editor__wide {
        grid-column: auto;
    }
}

@media (max-width: 680px) {
    .trust-strip-block__list {
        grid-template-columns: 1fr;
    }

    .trust-strip-block__item {
        min-height: 65px;
        padding-inline: 20px;
        border-right: 0;
        border-bottom: 1px solid #dce3df;
    }

    .trust-strip-block__item:last-child {
        border-bottom: 0;
    }
}

.product-single__breadcrumbs a:hover {
    text-decoration: underline;
}

.product-single__breadcrumb-sep {
    color: #bbb;
}

.product-single__breadcrumb-current {
    color: #222;
    font-weight: 500;
}

.product-single__main {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.product-single__media,
.product-single__info {
    flex: 1 1 0;
    min-width: 0;
}

.product-single__media {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
    border: 1px solid #eaeaea;
    border-radius: 10px;
    padding: 24px;
}

.product-single__image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.product-single__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c4c4c4;
}

.product-single__placeholder svg {
    width: 72px;
    height: 72px;
}

.product-single__info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.product-single__title {
    margin: 0;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.3;
    color: #384b7e;
}

.product-single__price-value {
    font-size: 26px;
    font-weight: 700;
    color: var(--blue, #0a4fa3);
}

.product-single__price-comparison {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 12px;
}

.product-single__original-price {
    color: var(--lightgray);
    font-size: 26px;
    font-weight: 500;
}

.product-single__login-link {
    font-size: 15px;
    font-weight: 500;
    color: var(--blue, #0a4fa3);
    text-decoration: none;
}

.product-single__login-link:hover {
    text-decoration: underline;
}

.product-single__cart-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

.product-single__cart-controls label {
    font-size: 14px;
    font-weight: 600;
    color: #555;
}

.product-single__cart-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.product-single__cart-actions input {
    width: 72px;
    height: 44px;
    box-sizing: border-box;
    padding: 0 10px;
    border: 1px solid #d7d7d7;
    border-radius: 6px;
    text-align: center;
    font: inherit;
}

.product-single__add-button,
.cart-page__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border: 0;
    border-radius: 6px;
    background: var(--blue, #0a4fa3);
    color: #fff;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.product-single__add-button {
    background: #384b7e;
}

.product-single__add-button:disabled,
.cart-page__button:disabled {
    opacity: .6;
    cursor: wait;
}

.cart-page {
    padding-top: 32px;
    padding-bottom: 64px;
}

.cart-page__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.cart-page__heading {
    margin: 12px 0 0;
    font-size: 32px;
    color: #384b7e;
    font-weight: 600;
}

.cart-page__button {
    background: #384b7e;
    color: #fff;
}

.cart-page a.cart-page__button,
.cart-page a.cart-page__button:visited {
    color: #fff;
}

.cart-page__clear,
.cart-item__remove {
    border: 0;
    background: transparent;
    color: #9b2c2c;
    cursor: pointer;
    font: inherit;
}

.cart-page__empty {
    padding: 48px 24px;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    text-align: center;
}

.cart-page__empty p {
    margin: 0 0 20px;
    color: #555;
}

.cart-page__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 32px;
    align-items: start;
}

.cart-page__items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cart-item {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr) auto auto auto;
    gap: 16px;
    align-items: center;
    padding: 16px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
}

.cart-item__image {
    width: 76px;
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
    color: #bdbdbd;
}

.cart-item__image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.cart-item__details {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.cart-item__name {
    color: #222;
    font-weight: 600;
    text-decoration: none;
}

.cart-page .cart-item__name,
.cart-page .cart-item__name:visited,
.cart-page .cart-item__name:hover,
.cart-page .cart-item__name:active {
    color: #222;
}

.cart-item__code,
.cart-item__unit-price {
    color: #707070;
    font-size: 13px;
}

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

.cart-item__quantity button {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d7d7d7;
    border-radius: 5px;
    background: #fff;
    cursor: pointer;
}

.cart-item__total {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    min-width: 92px;
    text-align: right;
}

.cart-item__total-vat {
    color: #707070;
    font-size: 12px;
}

.cart-item__total strong {
    white-space: nowrap;
}

.cart-page__summary {
    padding: 22px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
}

.cart-page__summary h2 {
    margin: 0 0 22px;
    font-size: 20px;
}

.cart-page__summary-breakdown {
    display: grid;
    gap: 12px;
    padding-bottom: 18px;
    border-bottom: 1px solid #e8e8e8;
}

.cart-page__summary-breakdown > div,
.cart-page__summary-total {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.cart-page__summary-total {
    margin-top: 16px;
    font-weight: 700;
}

.cart-page__summary p {
    margin: 18px 0;
    color: #666;
    font-size: 13px;
    line-height: 1.5;
}

.cart-page__button--wide {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.checkout-page {
    padding-top: 32px;
    padding-bottom: 64px;
}

.customer-orders-page {
    padding-top: 32px;
    padding-bottom: 64px;
}

.customer-orders-page__heading {
    margin: 14px 0 28px;
    font-size: 32px;
    color: #384b7e;
    font-weight: 600;
}

.customer-orders-page__empty {
    padding: 48px 24px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    text-align: center;
}

.checkout-page__heading {
    margin: 14px 0 28px;
    font-size: 32px;
    color: #384b7e;
    font-weight: 600;
}

.checkout-page__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 32px;
    align-items: start;
}

.checkout-page__form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.checkout-page__section,
.checkout-page__summary,
.checkout-page__message {
    padding: 22px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
}

.checkout-page__section h2,
.checkout-page__summary h2 {
    margin: 0 0 20px;
    font-size: 20px;
    color: #222;
}

.checkout-page__fields {
    display: grid;
    gap: 16px;
    margin-bottom: 16px;
}

.checkout-page__fields--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.checkout-page__fields--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.checkout-page__section label {
    position: static;
    top: auto;
    left: auto;
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 0;
    margin: 0;
    color: #555;
    font-size: 14px;
    font-weight: 600;
}

.checkout-page__section input,
.checkout-page__section select,
.checkout-page__section textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 12px;
    border: 1px solid #d7d7d7;
    border-radius: 5px;
    background: #fff;
    color: #222;
    font: inherit;
    font-weight: 400;
}

.checkout-page__section select {
    height: 44px;
    line-height: 1.2;
    padding-top: 0;
    padding-bottom: 0;
}

.checkout-page__summary {
    position: sticky;
    top: 90px;
}

.checkout-page__line,
.checkout-page__grand-total {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #e8e8e8;
    color: #555;
    font-size: 14px;
}

.checkout-page__line span {
    min-width: 0;
}

.checkout-page__grand-total {
    margin: 8px 0 20px;
    border-bottom: 0;
    color: #222;
    font-size: 18px;
}

.checkout-page__alert,
.checkout-page__message {
    margin-bottom: 20px;
}

@media (max-width: 800px) {
    .checkout-page__layout,
    .checkout-page__fields--two,
    .checkout-page__fields--three {
        grid-template-columns: 1fr;
    }

    .checkout-page__summary {
        position: static;
    }
}

@media (max-width: 800px) {
    .product-single__main,
    .cart-page__layout {
        grid-template-columns: 1fr;
        display: grid;
    }

    .cart-item {
        grid-template-columns: 64px minmax(0, 1fr) auto;
    }

    .cart-item__image {
        width: 64px;
        height: 64px;
    }

    .cart-item__quantity,
    .cart-item__total,
    .cart-item__remove {
        grid-column: 2 / -1;
    }

    .cart-item__total {
        text-align: left;
        align-items: flex-start;
    }
}

.product-single__meta {
    margin: 0;
    padding: 20px 0 0;
    list-style: none;
    border-top: 1px solid #eaeaea;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.product-single__meta li {
    display: flex;
    gap: 8px;
    font-size: 14px;
    color: #444;
}

.product-single__meta-label {
    font-weight: 600;
    color: #666;
}

.product-single__availability.is-available {
    color: #2e7d32;
    font-weight: 600;
}

.product-single__availability.is-exhausted {
    color: #c62828;
    font-weight: 600;
}

@media (max-width: 768px) {
    .product-single__main {
        flex-direction: column;
        gap: 24px;
    }

    .product-single__title {
        font-size: 22px;
    }
}

/* ==========================================================================
   Product Categories Page
   ========================================================================== */

.categories-page {
    padding: 24px 0 48px;
}

.categories-page__heading {
    margin: 0 0 24px 0;
    font-size: 28px;
    font-weight: 600;
    color: #384b7e;
}

.search-results-page {
    padding-top: 24px;
    padding-bottom: 56px;
}

.search-results__query {
    margin: -12px 0 28px;
    color: #626b75;
}

.search-results__section {
    margin-top: 32px;
}

.search-results__section h2 {
    margin: 0 0 16px;
    color: #29364a;
    font-size: 20px;
    font-weight: 600;
}

.search-results__categories {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
    gap: 12px;
}

.search-results__category,
.search-results__category:visited {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
    padding: 12px;
    border: 1px solid #e5e8eb;
    border-radius: 5px;
    background: #fff;
    color: #222;
}

.search-results__category:hover {
    border-color: var(--blue);
}

.search-results__category img,
.search-results__category-icon {
    display: grid;
    flex: 0 0 54px;
    width: 54px;
    height: 54px;
    place-items: center;
    background: #f4f5f6;
    color: #858c94;
    object-fit: contain;
}

.search-results__category-icon svg {
    width: 22px;
    height: 22px;
}

.search-results__category > span:last-child {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 5px;
}

.search-results__category strong {
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-results__category small,
.search-results__product-code {
    color: #737b85;
    font-size: 11px;
}

.search-results__load-more {
    display: flex;
    justify-content: center;
    margin-top: 28px;
}

@media (max-width: 600px) {
    .search-results__section {
        margin-top: 24px;
    }

    .search-results__categories {
        grid-template-columns: 1fr;
    }
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    height: 100%;
    padding: 18px;
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
    border-color: var(--blue, #0a4fa3);
}

.category-card__image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f0f5fb;
    color: var(--blue, #0a4fa3);
}

.category-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-card__image svg {
    width: 42px;
    height: 42px;
}

.category-card__body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding-top: 16px;
}

.category-card__title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    color: #222;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.category-card__count {
    font-size: 13px;
    color: #777;
}

/* Category card loading skeleton */
.category-card--loading {
    pointer-events: none;
}

.category-card__skeleton {
    background: #eceff1;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

.category-card__skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.6) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: product-skeleton-shimmer 1.4s ease-in-out infinite;
}

.category-card__image.category-card__skeleton {
    background: #eceff1;
}

.category-card__title-skeleton {
    height: 14px;
    width: 70%;
}

/* Category products (products-by-category) page */
.category-products-page {
    padding: 24px 0 48px;
}

.category-products-page__heading {
    color: #384b7e;
}

.category-products-page__load-more {
    display: flex;
    justify-content: center;
    margin-top: 32px;
}
