/**
 * Perfect Combination - Frontend Styles
 */

.perfect-combination-wrapper {
    width: 100%;
    padding: 64px 0;
}

.perfect-combination-header {
    margin-bottom: 24px;
}

.perfect-combination-title {
    color: #191818 !important;
    font-family: 'Ciron Classic', serif;
    font-size: 20px;
    font-weight: 650;
    line-height: 28px;
    padding: 0 16px;
}

.perfect-combination-content {
    width: 100%;
}

/* Compact View (Mobile Default) */
.perfect-combination-compact {
    display: block;
}

.compact-products {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
    padding: 0 16px;
}

.compact-product-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 29%;
    border-radius: 8px;
    border: 1px solid #696969;
    background: #FFF;
    box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.12);
    padding: 12px;
    flex-shrink: 0;
}

.compact-product-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: #f9f9f9;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.compact-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 5px;
    mix-blend-mode: multiply;
}

.compact-product-name {
    text-align: start;
    overflow: hidden;
    /* text-overflow: ellipsis; */
    font-family: "Ciron Text", sans-serif;
    font-size: 16px;
    font-weight: 500;
    height: 48px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    word-break: break-all;
}

.product-separator {
    color: #191818;
    margin: 0 5px;
    align-self: center;
    text-align: center;
    font-family: 'Ciron Classic', serif;
    font-size: 24px;
    font-weight: 650;
    line-height: 32px;
}

.toggle-details-link {
    color: #191818 !important;
    text-align: center;
    font-family: 'Ciron Classic', serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 650;
    line-height: 24px;
    text-decoration: none;
    padding: 13px 24px;
    border-radius: 100px !important;
    border: 1px solid #191818;
    max-width: 410px;
    margin: 24px auto 0;
    width: 100%;
}

.toggle-details-link:hover {
    background: #F5E5E2;
    outline: 1px solid #191818;
    border: 1px solid #191818;
}

/* Expanded View (Mobile) */
.perfect-combination-expanded {
    display: none;
}

.perfect-combination-expanded.active {
    display: block;
    padding: 0 16px;
}

.perfect-combination-compact.hidden {
    display: none;
}

.perfect-combination-products {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.perfect-combination-product-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid #696969;
    background: #FFF;
    box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.12);
}

.perfect-combination-product-item.product-deselected {
    border-radius: 8px;
    border: 1px dashed #696969;
    background: #FFF;
    box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.12);
}

.product-select-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
}

.product-checkmark {
    top: 15px;
    right: 15px;
    width: 24px;
    height: 24px;
    background: #fff;
    border: 2px solid #DC233E;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.product-checkmark svg {
    width: 14px;
    height: 14px;
    color: #DC233E;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-select-checkbox:checked + .product-checkmark {
    background: #DC233E;
    border-color: #DC233E;
}

.product-select-checkbox:checked + .product-checkmark svg {
    opacity: 1;
    color: #fff;
}

.product-select-checkbox:disabled + .product-checkmark {
    opacity: 0.5;
    cursor: not-allowed;
}

.perfect-combination-product-item .product-image {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    align-self: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px;
    background: #f9f9f9;
}

.perfect-combination-product-item .product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
    mix-blend-mode: multiply;
}

.perfect-combination-product-item .product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.perfect-combination-product-item .product-brand {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    line-clamp: 1;
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
    color: #494C4F;
}

.perfect-combination-product-item .product-name {
    font-size: 16px;
    margin: 0;
    font-weight: 600;
    line-height: 1.4;
}

.perfect-combination-product-item .product-name a {
    color: #191818;
    font-family: "Ciron Text";
    text-decoration: none;
    transition: color 0.3s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
}

.perfect-combination-product-item .product-description {
    overflow: hidden;
    color: #494C4F;
    text-overflow: ellipsis;
    font-family: "Ciron Text";
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    align-self: stretch;
    margin-bottom: 0;
}

.perfect-combination-product-item .product-price {
    color: #181818 !important;
    font-family: "Ciron Text";
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
    margin-top: 0px;
}

.product-out-of-stock {
    color: #DC233E;
    font-size: 12px;
    font-weight: 600;
    margin-top: 5px;
}

.perfect-combination-actions {
    text-align: center;
    margin-top: 24px;
    padding: 0 16px;
    justify-items: center;
}

.perfect-combination-actions .btn.add-to-cart-btn {
    background: #191818;
    color: #fff;
    border: none;
    padding: 14px 24px;
    font-family: 'Ciron Text', sans-serif;
    font-size: 16px;
    line-height: 24px;
    font-weight: 650;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 410px;
    height: auto;
}

.perfect-combination-actions .btn.add-to-cart-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

@media (min-width: 768px) {
    .perfect-combination-header {
        margin-bottom: 32px;
    }
    
    .perfect-combination-title {
        overflow: hidden;
        text-overflow: ellipsis;
        color: #191818 !important;
        font-family: "Ciron Classic";
        font-size: 36px;
        font-weight: 650;
        line-height: 48px;
        padding: 0 24px;
        margin: 0;
    }

    .perfect-combination-content {
        padding: 0 24px;
    }
    
    .perfect-combination-compact {
        display: none !important;
    }
    
    .perfect-combination-expanded {
        display: block !important;
    }
    
    .perfect-combination-expanded ~ .perfect-combination-actions .toggle-details-link {
        display: none;
    }
    
    .perfect-combination-products {
        flex-direction: row;
        gap: 8px;
        margin-bottom: 30px;
    }
    
    .perfect-combination-product-item {
        flex: 1;
        min-width: 0;
        max-width: none;
        flex-direction: row;
        align-items: stretch;
        padding: 8px;
        position: relative;
        display: flex;
        overflow: visible;
        gap: 12px;
    }
    
    .perfect-combination-product-item.product-deselected {
        border: 1px dashed #696969;
        background: #fff;
    }
    
    .product-checkmark {
        top: 15px;
        right: 15px;
        width: 24px;
        height: 24px;
        border-radius: 6px;
        border: 1px solid #191818;
        background: #fff;
        z-index: 10;
        cursor: pointer;
    }
    
    .product-checkmark svg {
        width: 14px;
        height: 14px;
    }
    
    .perfect-combination-product-item .product-image {
        width: 104px;
        height: 100%;
        background: #fafafa;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0;
        border-radius: 8px 0 0 8px;
        flex-shrink: 0;
    }
    
    .perfect-combination-product-item .product-image img {
        max-width: 104px;
        max-height: 104px;
        object-fit: contain;
        width: auto;
        height: auto;
    }
    
    .product-info {
        display: flex;
        flex-direction: column;
    }
    
    .product-brand {
        font-size: 12px;
        font-weight: 500;
        /* text-transform: uppercase; */
        letter-spacing: 0.5px;
        line-height: 1.4;
        color: #494C4F;
    }
    
    .perfect-combination-product-item .product-name {
        overflow: hidden;
        text-overflow: ellipsis;
        font-family: "Ciron Text";
        font-size: 16px;
        font-weight: 500;
        line-height: 24px;
        margin-bottom: 0;
    }
    
    .perfect-combination-product-item  .product-name a {
        color: #191818 !important;
        text-decoration: none;
        overflow: hidden;
        text-overflow: ellipsis;
        font-family: "Ciron Text";
        font-size: 16px !important;
        font-weight: 500;
        line-height: 24px;
        margin-bottom: 0;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 1;
        line-clamp: 1;
    }
    
    .perfect-combination-product-item .product-description {
        font-size: 14px;
        line-height: 1.5;
        margin-bottom: 0;
    }
    
    .perfect-combination-product-item .product-price {
        color: #181818 !important;
        font-family: "Ciron Text";
        font-size: 16px;
        font-weight: 500;
        line-height: 24px;
        margin-top: 0;
        padding-top: 0;
    }
    
    .perfect-combination-actions {
        text-align: center;
        margin-top: 40px;
        padding: 0;
    }
    
    .perfect-combination-actions .btn.add-to-cart-btn {
        min-width: 455px;
    }
}

@media screen and (max-width: 767px) {
    .perfect-combination-wrapper {
        padding-top: 16px;
        padding-bottom: 16px;
    }

    .perfect-combination-expanded.active ~ .perfect-combination-actions .toggle-details-link[data-action="expand"],
    .perfect-combination-expanded:not(.active) ~ .perfect-combination-actions .toggle-details-link[data-action="collapse"] {
        display: none;
    }

    .perfect-combination-expanded.active ~ .perfect-combination-actions .toggle-details-link[data-action="collapse"],
    .perfect-combination-expanded:not(.active) ~ .perfect-combination-actions .toggle-details-link[data-action="expand"] {
        display: block;
    }
}

@media screen and (max-width: 420px) {
    .compact-product-item {
        padding: 8px;
        width: 29%;
    }

    .compact-product-image {
        width: 100%;
    }

    .product-separator {
        font-size: 20px;
        margin: 0 2px;
    }
}
