:root {
    --cm-primary-color: #16212f;
    /* Updated Dark Navy */
    --cm-accent-color: #b99e5e;
    /* Gold */
    --cm-bg-color: #fcfcfc;
    --cm-border-color: #e0e0e0;
    --cm-font-family: 'Gilroy-Light', sans-serif;
    --cm-title-font: 'Gilroy', sans-serif;
    --cm-transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.comfort-match-container {
    font-family: var(--cm-font-family);
    background-color: transparent;
    color: var(--cm-primary-color);
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
    position: relative;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: 12px;
}

.comfort-match-container * {
    box-sizing: border-box;
}

gold {
    color: var(--cm-accent-color);
    font-weight: inherit;
}

/* Typography */
.cm-title {
    font-family: var(--cm-title-font);
    font-size: 55px;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1;
}

.cm-subtitle {
    font-size: 1rem;
    font-weight: 400;
    margin-bottom: 30px;
    color: #666;
}

.cm-accent-text {
    color: var(--cm-accent-color);
}

.cm-primary-text {
    color: var(--cm-primary-color);
}

/* Buttons */
.cm-btn {
    background-color: var(--cm-primary-color);
    color: #fff;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: var(--cm-transition);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cm-btn:hover {
    background-color: #000;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Progress Bar */
.cm-progress {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 40px;
}

.cm-step-indicator {
    max-width: 40px;
    min-width: 40px;
    height: 40px;
    border-radius: 100px;
    background-color: var(--cm-primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
    transition: all 0.3s ease;
    overflow: hidden;
    white-space: nowrap;
    box-sizing: border-box;
}

.cm-step-indicator .step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    min-width: 40px;
    height: 40px;
    font-size: 20px;
    font-weight: 600;
    color: #fff !important;
}

.cm-step-indicator .step-label {
    opacity: 0;
    transition: opacity 0.3s ease;
    font-size: 16px;
    font-weight: 400;
    color: #fff !important;
    padding-right: 15px;
}

.cm-step-indicator:hover {
    max-width: 250px;
}

.cm-step-indicator:hover .step-label {
    opacity: 1;
}

.cm-step-clickable {
    cursor: pointer;
}

.cm-step-clickable:hover {
    background-color: var(--cm-accent-color);
}

.cm-step-indicator.active {
    background-color: var(--cm-accent-color);
    max-width: 250px;
    color: #fff;
}

.cm-step-indicator.active .step-label {
    opacity: 1;
}

.cm-back-btn {
    background: none;
    border: 2px solid var(--cm-primary-color);
    color: var(--cm-primary-color);
    width: 40px;
    height: 40px;
    border-radius: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: var(--cm-transition);
}

.cm-back-btn:hover {
    background-color: var(--cm-primary-color);
    color: white;
}

/* Question Screen */
.cm-answers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.cm-answer-card {
    background: #fff;
    border: 2px solid var(--cm-primary-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: var(--cm-transition);
    transition: all 0.3s ease;
    position: relative;
    text-align: left;
}

.cm-answer-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.cm-answer-card.selected {
    border-color: #b99e5e;
    background: rgba(185, 158, 94, 0.05);
}

.cm-answer-card.selected::after {
    content: "✓";
    position: absolute;
    top: 15px;
    right: 15px;
    background: #b99e5e;
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

.cm-answer-icon {
    font-size: 3rem;
    width: 100px;
    height: 100px;
    background-color: #f9f5ef;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cm-primary-color);
    flex-shrink: 0;
}

.cm-answer-icon img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}

.cm-answer-content {
    display: flex;
    flex-direction: column;
}

.cm-answer-label {
    font-family: var(--cm-font-family);
    font-size: 20px;
    font-weight: bold;
    color: var(--cm-primary-color);
    line-height: 1.1;
}

/* Force Horizontal Product Layout for Results */
.comfort-match-container ul.cm-products-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.comfort-match-container ul.cm-products-list::before,
.comfort-match-container ul.cm-products-list::after {
    display: none !important;
}

.comfort-match-container ul.cm-products-list li.product {
    width: 100% !important;
    margin: 0 !important;
    float: none !important;
    list-style: none !important;
}

/* Ensure the weird black dot on the left of the card is hidden */
.comfort-match-container ul.cm-products-list li.product::before {
    display: none !important;
}

@media (min-width: 768px) {
    .comfort-match-container .custom-product-box .woocommerce-LoopProduct-link {
        display: grid;
        grid-template-columns: 40% 55%;
        grid-template-areas:
            "image content"
            "offers button";
        gap: 30px;
        border: 1px solid #eaeaea;
        border-radius: 8px;
        padding: 25px;
        background: #fff;
        text-decoration: none;
        color: inherit;
    }

    .comfort-match-container .product-section-1 {
        grid-area: image;
    }

    .comfort-match-container .product-section-2 {
        grid-area: content;
    }

    .comfort-match-container .product-section-3 {
        grid-area: offers;
    }

    .comfort-match-container .product-section-4 {
        display: none;
    }

    .comfort-match-container .product-section-5 {
        grid-area: button;
        display: flex;
        justify-content: flex-end;
        align-items: flex-end;
    }

    .comfort-match-container .product-section-1 img {
        width: 100%;
        height: auto;
        border-radius: 8px;
    }

    .comfort-match-container .woocommerce-loop-product__title {
        font-size: 26px !important;
        font-family: var(--cm-title-font) !important;
        font-weight: 800 !important;
        color: #16212f !important;
        margin: 5px 0 15px 0 !important;
    }

    .comfort-match-container .product-desc-services {
        display: flex;
        gap: 30px;
        margin-top: 15px;
    }

    .comfort-match-container .product-short-desc,
    .comfort-match-container .product-services {
        flex: 1;
        font-size: 15px;
        line-height: 1.6;
    }

    .comfort-match-container .product-services h3 {
        font-size: 16px;
        margin-bottom: 10px;
        color: #666;
    }

    /* Custom List Styles */
    .comfort-match-container .product-short-desc ul {
        list-style: disc outside !important;
        padding-left: 18px !important;
        margin: 0 !important;
    }

    .comfort-match-container .product-services ul {
        list-style: none !important;
        padding-left: 0 !important;
        margin: 0 !important;
    }

    .comfort-match-container .product-short-desc ul li,
    .comfort-match-container .product-services ul li {
        position: relative;
        margin-bottom: 8px;
    }

    .comfort-match-container .product-short-desc ul li::before {
        display: none !important;
    }

    .comfort-match-container .product-services ul li {
        padding-left: 22px;
    }

    .comfort-match-container .product-services ul li::before {
        content: "✓";
        position: absolute;
        left: 0;
        top: 0;
        color: #b99e5e;
        font-weight: bold;
    }

    /* Paragraphs inside lists fix */
    .comfort-match-container .product-short-desc ul li p,
    .comfort-match-container .product-services ul li p {
        margin: 0;
        display: inline;
    }

    .comfort-match-container .product-offers {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .comfort-match-container .available-offers {
        display: flex;
        align-items: center;
        border: 1px solid #eaeaea;
        border-radius: 4px;
        padding: 8px 15px;
        background: #fff;
    }

    .comfort-match-container .offer-img {
        width: 30px;
        height: 30px;
        margin-right: 15px;
        flex-shrink: 0;
    }

    .comfort-match-container .offer-img img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .comfort-match-container .offer-name {
        font-size: 14px;
        font-weight: 500;
        color: #333;
    }

    /* Pricing and Button */
    .comfort-match-container .product-price {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        width: 100%;
        min-width: 220px;
    }

    .comfort-match-container .mainPriceStyle {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border: 1px solid #eaeaea;
        border-radius: 4px;
        padding: 8px 12px;
        background: #fff;
    }

    .comfort-match-container .sale-price {
        display: flex;
        flex-direction: column;
        text-align: left;
    }

    .comfort-match-container .sale-price .sale_price {
        font-size: 22px;
        font-weight: 800;
        color: #b99e5e;
        /* Gold color */
        line-height: 1;
    }

    .comfort-match-container .sale-price .sale_price span {
        display: block;
        font-size: 11px;
        font-weight: 600;
        color: #999;
        margin-bottom: 3px;
        text-transform: uppercase;
    }

    .comfort-match-container .regular-save-price {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 4px;
    }

    .comfort-match-container .regular_price {
        color: #666;
        font-size: 12px;
    }

    .comfort-match-container .saved-price .total-save {
        background: #b99e5e;
        color: #fff;
        font-size: 11px;
        padding: 3px 8px;
        border-radius: 3px;
        font-weight: bold;
        text-transform: uppercase;
        display: inline-block;
    }

    .comfort-match-container .visit-product {
        width: 100%;
    }

    .comfort-match-container .visit-product a {
        background: #16212f;
        color: #fff;
        padding: 15px;
        border-radius: 4px;
        text-decoration: none;
        font-weight: bold;
        font-size: 16px;
        display: block;
        width: 100%;
        box-sizing: border-box;
        text-align: center;
        transition: background 0.2s;
    }

    .comfort-match-container .visit-product a:hover {
        background: #b99e5e;
    }
}

.cm-answer-sublabel {
    font-size: 1rem;
    color: var(--cm-primary-color);
    margin-top: 5px;
    line-height: 1.2;
}

/* Video Loader */
.cm-video-wrapper {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.cm-video-wrapper video {
    width: 100%;
    height: auto;
    display: block;
    mix-blend-mode: multiply;
}

/* Animations */
.cm-fade-in {
    animation: cmFadeIn 0.5s ease;
}

@keyframes cmFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Products Grid */
.comfort-match-products {
    margin-top: 40px;
}

.cm-spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border-left-color: var(--cm-accent-color);
    animation: spin 1s linear infinite;
    margin: 40px auto;
}

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

    100% {
        transform: rotate(360deg);
    }
}

@media (min-width: 768px) {
    .comfort-match-container .product-short-desc ul li, .comfort-match-container .product-services ul li {
        position: relative;
        margin-bottom: 0px;
    }
}

.product-short-desc li {
    line-height: 15px;
    padding-bottom: 10px;
}

/* Mobile Typography & Layout Fixes */
@media (max-width: 767px) {
    .comfort-match-container .custom-product-box .woocommerce-LoopProduct-link {
        display: flex;
        flex-direction: column;
        gap: 15px;
        border: 1px solid #eaeaea;
        border-radius: 8px;
        padding: 15px;
        background: #fff;
        text-decoration: none;
        color: inherit;
    }

    .comfort-match-container .product-section-1 img {
        width: 100%;
        height: auto;
        border-radius: 8px;
    }

    .comfort-match-container .woocommerce-loop-product__title {
        font-size: 22px !important;
        font-family: var(--cm-title-font) !important;
        font-weight: 800 !important;
        color: #16212f !important;
        margin: 5px 0 10px 0 !important;
    }

    .comfort-match-container .product-desc-services {
        display: flex;
        flex-direction: column;
        gap: 15px;
        margin-top: 10px;
    }

    .comfort-match-container .product-short-desc,
    .comfort-match-container .product-services {
        font-size: 14px;
        line-height: 1.5;
    }

    .comfort-match-container .product-services h3 {
        font-size: 16px;
        margin-bottom: 10px;
        color: #666;
    }

    /* Custom List Styles */
    .comfort-match-container .product-short-desc ul {
        list-style: disc outside !important;
        padding-left: 18px !important;
        margin: 0 !important;
    }

    .comfort-match-container .product-services ul {
        list-style: none !important;
        padding-left: 0 !important;
        margin: 0 !important;
    }

    .comfort-match-container .product-short-desc ul li,
    .comfort-match-container .product-services ul li {
        position: relative;
        margin-bottom: 8px;
    }

    .comfort-match-container .product-short-desc ul li::before {
        display: none !important;
    }

    .comfort-match-container .product-services ul li {
        padding-left: 22px;
    }

    .comfort-match-container .product-services ul li::before {
        content: "✓";
        position: absolute;
        left: 0;
        top: 0;
        color: #b99e5e;
        font-weight: bold;
    }

    /* Paragraphs inside lists fix */
    .comfort-match-container .product-short-desc ul li p,
    .comfort-match-container .product-services ul li p {
        margin: 0;
        display: inline;
    }

    .comfort-match-container .product-offers {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .comfort-match-container .available-offers {
        display: flex;
        align-items: center;
        border: 1px solid #eaeaea;
        border-radius: 4px;
        padding: 8px 15px;
        background: #fff;
    }

    .comfort-match-container .offer-img {
        width: 30px;
        height: 30px;
        margin-right: 15px;
        flex-shrink: 0;
    }

    .comfort-match-container .offer-img img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .comfort-match-container .offer-name {
        font-size: 14px;
        font-weight: 500;
        color: #333;
    }

    /* Pricing and Button */
    .comfort-match-container .product-price {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        width: 100%;
    }

    .comfort-match-container .mainPriceStyle {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border: 1px solid #eaeaea;
        border-radius: 4px;
        padding: 8px 12px;
        background: #fff;
    }

    .comfort-match-container .sale-price {
        display: flex;
        flex-direction: column;
        text-align: left;
    }

    .comfort-match-container .sale-price .sale_price {
        font-size: 20px;
        font-weight: 800;
        color: #b99e5e;
        line-height: 1;
    }

    .comfort-match-container .sale-price .sale_price span {
        display: block;
        font-size: 11px;
        font-weight: 600;
        color: #999;
        margin-bottom: 3px;
        text-transform: uppercase;
    }

    .comfort-match-container .regular-save-price {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 4px;
    }

    .comfort-match-container .regular_price {
        color: #666;
        font-size: 12px;
    }

    .comfort-match-container .saved-price .total-save {
        background: #b99e5e;
        color: #fff;
        font-size: 11px;
        padding: 3px 8px;
        border-radius: 3px;
        font-weight: bold;
        text-transform: uppercase;
        display: inline-block;
    }

    .comfort-match-container .visit-product {
        width: 100%;
    }

    .comfort-match-container .visit-product a {
        background: #16212f;
        color: #fff;
        padding: 12px;
        border-radius: 4px;
        text-decoration: none;
        font-weight: bold;
        font-size: 15px;
        display: block;
        width: 100%;
        box-sizing: border-box;
        text-align: center;
        transition: background 0.2s;
    }

    .cm-title {
        font-size: 32px;
    }
    
    .cm-btn {
        padding: 12px 24px;
        font-size: 1rem;
    }
    
    .cm-progress {
        gap: 5px;
        flex-wrap: wrap;
    }
    
    .cm-step-indicator {
        max-width: 32px;
        min-width: 32px;
        height: 32px;
    }
    
    .cm-step-indicator .step-num {
        width: 32px;
        min-width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .cm-step-indicator:hover,
    .cm-step-indicator.active {
        max-width: 200px;
    }

    .cm-step-indicator.active .step-label,
    .cm-step-indicator:hover .step-label {
        font-size: 14px;
        padding-right: 10px;
    }

    .cm-answer-card {
        padding: 15px;
        gap: 12px;
    }

    .cm-answer-icon {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }

    .cm-answer-label {
        font-size: 18px;
    }
    
    .cm-answer-sublabel {
        font-size: 14px;
    }
}