/* ===================================
   PRODUCT CONFIGURATOR SECTION
   =================================== */

#productConfigurator {
    background: #ffffff;
    background: linear-gradient(180deg, #f8faf8 0%, #ffffff 50%, #f8faf8 100%);
    padding: 0;
    position: relative;
    overflow: hidden;
    display: none;
}

#productConfigurator.active {
    display: block;
}

#productConfigurator::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 15% 30%, rgba(45, 143, 95, 0.03) 0%, transparent 40%),
        radial-gradient(circle at 85% 70%, rgba(12, 67, 38, 0.03) 0%, transparent 40%);
    pointer-events: none;
}

#productConfigurator::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%232d8f5f' fill-opacity='0.015'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.4;
    pointer-events: none;
}

.configurator-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* Enhanced Mobile Responsiveness */
@media (max-width: 768px) {
    .configurator-container {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .configurator-container {
        padding: 0 10px;
    }
}

/* Header */
.configurator-header {
    text-align: center;
    margin-bottom: 80px;
    animation: fadeInDown 0.8s ease-out;
}

.configurator-header h2 {
    font-size: 3.5rem;
    font-weight: 400;
    color: #0c4326;
    margin-bottom: 20px;
    letter-spacing: 4px;
    font-family: 'Cormorant Garamond', serif;
    position: relative;
    display: inline-block;
    text-shadow: 0 2px 4px rgba(12, 67, 38, 0.08);
}

.configurator-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #2d8f5f, #0c4326, #2d8f5f, transparent);
    border-radius: 2px;
}

.configurator-header p {
    font-size: 1.15rem;
    color: rgba(12, 67, 38, 0.75);
    max-width: 650px;
    margin: 30px auto 0;
    font-weight: 400;
    letter-spacing: 0.5px;
    line-height: 1.7;
}

/* Step Indicator */
.configurator-steps {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(12, 67, 38, 0.4);
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.step-item.active {
    color: #2d8f5f;
}

.step-number {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(45, 143, 95, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    border: 2px solid rgba(45, 143, 95, 0.2);
    transition: all 0.3s ease;
}

.step-item.active .step-number {
    background: linear-gradient(135deg, #2d8f5f 0%, #0c4326 100%);
    border-color: #2d8f5f;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(45, 143, 95, 0.3);
}

/* Categories Section */
.configurator-section {
    margin-bottom: 80px;
}

.section-title {
    font-size: 2.4rem;
    color: #0c4326;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 400;
    letter-spacing: 3px;
    font-family: 'Matt Complete Family', 'Inter', sans-serif;
    text-shadow: 0 2px 4px rgba(12, 67, 38, 0.08);
    line-height: 1.3;
    transition: all 0.3s ease;
}

.section-subtitle {
    text-align: center;
    color: #6b7280;
    margin-bottom: 40px;
    font-family: 'Matt Variable Roman', 'Inter', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
}

#categoriesGrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto;
}

.category-card {
    background: #ffffff;
    backdrop-filter: blur(20px);
    border: 3px solid rgba(45, 143, 95, 0.2);
    border-radius: 24px;
    padding: 0;
    text-align: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 15px 50px rgba(12, 67, 38, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    min-height: 320px;
    display: flex;
    flex-direction: column;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(12, 67, 38, 0.85) 100%);
    z-index: 1;
    transition: all 0.2s ease;
}

/* Add unique background images for each category */
.category-card[data-category="kitchen"]::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('https://images.unsplash.com/photo-1556911220-bff31c812dba?w=800&q=80') center/cover no-repeat;
    z-index: 0;
    transition: transform 0.25s ease;
}

.category-card[data-category="bedroom"]::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('https://images.unsplash.com/photo-1616594039964-ae9021a400a0?w=800&q=80') center/cover no-repeat;
    z-index: 0;
    transition: transform 0.25s ease;
}

.category-card[data-category="wardrobe"]::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('assets/wardrobe image(2).jpg') center/cover no-repeat;
    z-index: 0;
    transition: transform 0.25s ease;
}

.category-card:hover::after {
    transform: scale(1.08);
}

.category-card:hover::before {
    background: linear-gradient(180deg, rgba(45, 143, 95, 0.2) 0%, rgba(12, 67, 38, 0.95) 100%);
}

.category-card:hover,
.category-card.selected {
    border-color: #2d8f5f;
    transform: translateY(-15px) scale(1.02);
    box-shadow: 
        0 30px 80px rgba(12, 67, 38, 0.25),
        0 0 0 5px rgba(45, 143, 95, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 1);
}

.category-icon-wrapper {
    display: none;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
    padding: 50px 45px 20px;
}

.category-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.4s ease;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.category-icon svg {
    width: 50px;
    height: 50px;
    stroke: #ffffff;
    filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.3));
    transition: all 0.4s ease;
}

.category-card:hover .category-icon {
    transform: scale(1.15);
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

.category-card:hover .category-icon svg {
    transform: scale(1.1);
    filter: drop-shadow(0 6px 25px rgba(0, 0, 0, 0.4));
}

.category-name {
    font-size: 1.9rem;
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 0;
    position: relative;
    z-index: 2;
    letter-spacing: 2px;
    font-family: 'Cormorant Garamond', serif;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    padding: 120px 45px 50px;
}

.category-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(45, 143, 95, 0.98) 0%, rgba(12, 67, 38, 0.98) 100%);
    padding: 22px;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    z-index: 3;
}

.category-card:hover .category-overlay {
    transform: translateY(0);
}

.category-overlay span {
    color: #ffffff;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.category-overlay .arrow-icon {
    width: 24px;
    height: 24px;
    stroke: #ffffff;
    stroke-width: 3;
    animation: slideRight 1s ease-in-out infinite;
}

@keyframes slideRight {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

/* Designs Section */
#designsSection {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

#designsSection.active {
    opacity: 1;
    max-height: 3000px;
    margin-bottom: 60px;
}

#designsGrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 35px;
}

.design-card {
    background: #ffffff;
    border: 2px solid rgba(45, 143, 95, 0.15);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 
        0 8px 30px rgba(12, 67, 38, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.design-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 3px solid transparent;
    border-radius: 16px;
    transition: border-color 0.4s ease;
    pointer-events: none;
}

.design-card:hover::after,
.design-card.selected::after {
    border-color: #2d8f5f;
}

.design-card:hover,
.design-card.selected {
    box-shadow: 
        0 20px 60px rgba(12, 67, 38, 0.15),
        0 0 0 4px rgba(45, 143, 95, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 1);
    transform: translateY(-10px);
    background: linear-gradient(135deg, #ffffff 0%, rgba(45, 143, 95, 0.02) 100%);
}

.design-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
    position: relative;
    background: #f5f5f5;
    border-bottom: 2px solid rgba(45, 143, 95, 0.1);
}

.design-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30%;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.9), transparent);
    pointer-events: none;
}

.design-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.design-card:hover .design-image img {
    transform: scale(1.08);
}

.design-info {
    padding: 35px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(248, 250, 248, 1) 100%);
}

.design-name {
    font-size: 1.5rem;
    color: #0c4326;
    margin-bottom: 14px;
    font-weight: 500;
    letter-spacing: 1px;
    font-family: 'Cormorant Garamond', serif;
}

.design-description {
    font-size: 1rem;
    color: rgba(12, 67, 38, 0.7);
    margin-bottom: 28px;
    line-height: 1.7;
    font-weight: 400;
}

.select-design-btn {
    width: 100%;
    padding: 16px;
    background: transparent;
    border: 2px solid rgba(45, 143, 95, 0.4);
    color: #2d8f5f;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.4s ease;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.select-design-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: linear-gradient(135deg, #2d8f5f 0%, #0c4326 100%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.select-design-btn:hover::before {
    width: 400px;
    height: 400px;
}

.select-design-btn:hover {
    color: #ffffff;
    border-color: #2d8f5f;
    box-shadow: 0 8px 25px rgba(45, 143, 95, 0.3);
}

.select-design-btn span {
    position: relative;
    z-index: 1;
}

.design-card.selected .select-design-btn {
    background: linear-gradient(135deg, #2d8f5f 0%, #0c4326 100%);
    color: #ffffff;
    border-color: #2d8f5f;
    font-weight: 600;
}

/* Colors Section */
#colorsSection {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

#colorsSection.active {
    opacity: 1;
    max-height: 2000px;
    margin-bottom: 40px;
}

.colors-preview-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    align-items: start;
    background: rgba(255, 255, 255, 0.97);
    padding: 50px;
    border-radius: 20px;
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(45, 143, 95, 0.15);
}

/* Color Options */
.colors-selection {
    background: linear-gradient(135deg, rgba(12, 67, 38, 0.03) 0%, rgba(45, 143, 95, 0.05) 100%);
    padding: 40px;
    border-radius: 16px;
    border: 2px solid rgba(45, 143, 95, 0.15);
    box-shadow: 0 8px 30px rgba(12, 67, 38, 0.08);
}

.colors-selection h3 {
    font-size: 1.8rem;
    color: #1a5c3a;
    margin-bottom: 35px;
    font-weight: 500;
    letter-spacing: 1.5px;
    font-family: 'Cormorant Garamond', serif;
    position: relative;
    padding-bottom: 15px;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.colors-selection h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #2d8f5f 0%, #0c4326 100%);
    border-radius: 2px;
}

#colorsGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 30px;
}

.color-option {
    cursor: pointer;
    text-align: center;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    background: #ffffff;
    padding: 15px;
    border-radius: 14px;
    box-shadow: 0 4px 15px rgba(12, 67, 38, 0.08);
}

.color-option:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 35px rgba(12, 67, 38, 0.15);
}

.color-swatch {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    border: 3px solid rgba(45, 143, 95, 0.15);
    margin-bottom: 14px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 8px 25px rgba(12, 67, 38, 0.12),
        inset 0 2px 4px rgba(255, 255, 255, 0.5);
}

.color-swatch .color-sample {
   
    object-fit: cover;
}

.color-option:hover .color-swatch {
    border-color: rgba(45, 143, 95, 0.5);
    box-shadow: 
        0 12px 35px rgba(45, 143, 95, 0.25),
        inset 0 2px 4px rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

.color-option.selected {
    background: linear-gradient(135deg, rgba(45, 143, 95, 0.08) 0%, rgba(12, 67, 38, 0.05) 100%);
}

.color-option.selected .color-swatch {
    border-width: 4px;
    border-color: #2d8f5f;
    box-shadow: 
        0 15px 45px rgba(45, 143, 95, 0.35),
        0 0 0 5px rgba(45, 143, 95, 0.12),
        inset 0 2px 4px rgba(255, 255, 255, 0.5);
}

.color-option.selected::after {
    content: '✓';
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #2d8f5f 0%, #0c4326 100%);
    color: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 
        0 6px 15px rgba(45, 143, 95, 0.4),
        0 0 0 3px rgba(255, 255, 255, 0.9);
    animation: checkmark 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}

@keyframes checkmark {
    0% { 
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    50% { 
        transform: scale(1.3) rotate(10deg);
        opacity: 1;
    }
    100% { 
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.color-name {
    font-size: 0.95rem;
    color: #1a5c3a;
    font-weight: 600;
    letter-spacing: 0.3px;
    line-height: 1.4;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.6);
}

/* Preview Container */
.preview-container {
    background: linear-gradient(135deg, rgba(12, 67, 38, 0.03) 0%, rgba(45, 143, 95, 0.05) 100%);
    padding: 45px;
    border-radius: 16px;
    border: 2px solid rgba(45, 143, 95, 0.15);
    position: sticky;
    top: 100px;
    box-shadow: 0 8px 30px rgba(12, 67, 38, 0.08);
}

.preview-container h3 {
    font-size: 1.8rem;
    color: #1a5c3a;
    margin-bottom: 30px;
    font-weight: 500;
    text-align: center;
    letter-spacing: 1.5px;
    font-family: 'Cormorant Garamond', serif;
    position: relative;
    padding-bottom: 15px;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.preview-container h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #2d8f5f 0%, #0c4326 100%);
    border-radius: 2px;
}

.preview-image-wrapper {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 
        0 20px 60px rgba(12, 67, 38, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    border: 3px solid rgba(45, 143, 95, 0.2);
    background: #f5f5f5;
}

#previewImage,
#previewCanvas {
    width: 100%;
    height: auto;
    display: block;
}

.preview-image-wrapper {
    position: relative;
}

/* Instant crossfade animation */
#previewImage {
    transition: opacity 0.2s ease-in-out;
    position: relative;
    z-index: 1;
}

#previewImage.blend-out {
    opacity: 0;
}

#previewImage.blend-in {
    opacity: 1;
}

#previewCanvas {
    position: absolute;
    top: 0;
    left: 0;
    display: none;
}

.preview-container.color-applied #previewImage {
    opacity: 0;
}

.preview-container.color-applied #previewCanvas {
    display: block;
    opacity: 1;
}

#previewTitle {
    font-size: 1.3rem;
    color: #ffffff;
    margin-top: 20px;
    font-weight: 700;
    text-align: center;
    letter-spacing: 1px;
    padding: 16px 28px;
    background: linear-gradient(135deg, #2d8f5f 0%, #0c4326 100%);
    border-radius: 12px;
    border: 3px solid #2d8f5f;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    box-shadow: 
        0 6px 20px rgba(45, 143, 95, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Selection Summary */
#selectionSummary {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.2s ease;
    margin-top: 40px;
}

#selectionSummary.active {
    opacity: 1;
    max-height: 500px;
}

.summary-content {
    background: linear-gradient(135deg, #ffffff 0%, rgba(45, 143, 95, 0.03) 100%);
    border: 3px solid #2d8f5f;
    border-radius: 16px;
    padding: 45px;
    text-align: center;
    box-shadow: 
        0 15px 50px rgba(12, 67, 38, 0.15),
        0 0 0 4px rgba(45, 143, 95, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 1);
}

.summary-content h4 {
    font-size: 2.2rem;
    color: #0c4326;
    margin-bottom: 30px;
    font-weight: 500;
    letter-spacing: 3px;
    font-family: 'Cormorant Garamond', serif;
    text-shadow: 0 2px 4px rgba(12, 67, 38, 0.08);
}

.summary-content p {
    font-size: 1.1rem;
    color: rgba(12, 67, 38, 0.85);
    margin-bottom: 14px;
    font-weight: 400;
    line-height: 1.6;
}

.summary-content strong {
    color: #2d8f5f;
    font-weight: 600;
}

.summary-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    padding: 16px 45px;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.btn-primary::before,
.btn-secondary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.2s ease, height 0.2s ease;
}

.btn-primary:hover::before,
.btn-secondary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, #2d8f5f 0%, #0c4326 100%);
    color: #ffffff;
    border: 2px solid #2d8f5f;
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(45, 143, 95, 0.35);
    background: linear-gradient(135deg, #3aa76f 0%, #0f5231 100%);
}

.btn-secondary {
    background: transparent;
    border: 2px solid rgba(45, 143, 95, 0.5);
    color: #2d8f5f;
}

.btn-secondary:hover {
    background: rgba(45, 143, 95, 0.08);
    border-color: #2d8f5f;
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(45, 143, 95, 0.2);
}

.btn-primary span,
.btn-secondary span {
    position: relative;
    z-index: 1;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .colors-preview-wrapper {
        grid-template-columns: 1fr;
    }

    .preview-container {
        position: static;
        order: -1;
    }

    #colorsGrid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .configurator-container {
        padding: 0 25px;
    }

    .section-title {
        font-size: 2.2rem;
        letter-spacing: 2.5px;
    }

    .catalog-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 25px;
    }
}

@media (max-width: 768px) {
    #productConfigurator {
        padding: 60px 0;
    }

    .configurator-header h2 {
        font-size: 2.2rem;
        letter-spacing: 1.5px;
        line-height: 1.2;
        margin-bottom: 15px;
    }

    .configurator-header p {
        font-size: 1.05rem;
        line-height: 1.6;
        max-width: 90%;
        margin: 0 auto;
    }

    .configurator-steps {
        gap: 12px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .step-item {
        font-size: 0.9rem;
        padding: 8px 12px;
        border-radius: 20px;
        background: rgba(255, 255, 255, 0.8);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .step-number {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    #categoriesGrid {
        grid-template-columns: 1fr;
        max-width: 400px;
        gap: 20px;
    }

    .category-card {
        padding: 40px 25px;
        border-radius: 16px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .category-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 32px rgba(45, 143, 95, 0.15);
    }

    #designsGrid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    #colorsGrid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 15px;
    }

    .summary-actions {
        flex-direction: column;
        gap: 15px;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        padding: 16px 24px;
        font-size: 1rem;
        border-radius: 12px;
        transition: all 0.3s ease;
    }

    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(45, 143, 95, 0.3);
    }

    .section-title {
        font-size: 1.9rem;
        letter-spacing: 2px;
        margin-bottom: 25px;
    }

    .catalog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 30px;
    }

    .catalog-card-luxury {
        padding: 30px 20px;
        border-radius: 16px;
        background: linear-gradient(135deg, #ffffff 0%, #f8faf8 100%);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .catalog-card-luxury:hover {
        transform: translateY(-6px);
        box-shadow: 0 16px 48px rgba(45, 143, 95, 0.12);
    }
}

@media (max-width: 480px) {
    #productConfigurator {
        padding: 40px 0;
    }

    .configurator-header {
        margin-bottom: 50px;
    }

    .configurator-header h2 {
        font-size: 1.8rem;
        letter-spacing: 1px;
        line-height: 1.3;
        margin-bottom: 12px;
    }

    .configurator-header p {
        font-size: 0.95rem;
        line-height: 1.5;
        padding: 0 10px;
    }

    .configurator-container {
        padding: 0 15px;
    }

    .category-card {
        padding: 35px 20px;
        border-radius: 14px;
    }

    .category-icon {
        width: 55px;
        height: 55px;
        margin-bottom: 15px;
    }

    .category-name {
        font-size: 1.3rem;
        letter-spacing: 0.5px;
        line-height: 1.3;
    }

    .section-title {
        font-size: 1.6rem;
        letter-spacing: 1.5px;
        margin-bottom: 20px;
        line-height: 1.3;
    }

    .section-subtitle {
        font-size: 0.9rem;
        line-height: 1.5;
        margin-bottom: 25px;
    }

    .design-name {
        font-size: 1.1rem;
        line-height: 1.3;
    }

    .colors-selection,
    .preview-container {
        padding: 20px;
        border-radius: 14px;
    }

    #colorsGrid {
        grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
        gap: 12px;
    }

    .btn-primary,
    .btn-secondary {
        padding: 14px 20px;
        font-size: 0.95rem;
        border-radius: 10px;
        font-weight: 500;
    }

    .catalog-card-luxury {
        padding: 25px 18px;
        border-radius: 14px;
        margin-bottom: 15px;
    }

    .catalog-card-luxury h4 {
        font-size: 1.2rem;
        line-height: 1.3;
        margin-bottom: 8px;
    }

    .catalog-card-luxury p {
        font-size: 0.85rem;
        line-height: 1.4;
        margin-bottom: 18px;
    }

    .catalog-card-luxury .btn-primary {
        padding: 12px 18px;
        font-size: 0.9rem;
        width: 100%;
        border-radius: 8px;
    }

    .step-item {
        font-size: 0.8rem;
        padding: 6px 10px;
        margin: 2px;
    }

    .step-number {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
}
