/**
 * LaNoira — The Curated Pairing
 * Frontend styles
 * @package Commerce_Elite
 */

/* ============================================
   DESKTOP: full-width section before tabs
   MOBILE: inside summary panel
   ============================================ */

/* Single render for both desktop and mobile */
.ce-curated-pairing {
    display: block;
    width: 100%;
    margin-top: 2rem;
    border-top: 1px solid #1F1F1F;
    padding-top: 2rem;
}

/* Desktop: full-width feel inside summary panel */
@media (min-width: 1025px) {
    .ce-curated-pairing {
        margin-top: 2.5rem;
    }
}

/* Mobile: add breathing room below section */
@media (max-width: 1024px) {
    .ce-curated-pairing {
        margin-bottom: 2rem;
        padding-bottom: 2rem;
        border-bottom: 1px solid #1F1F1F;
    }
}

/* ============================================
   INNER WRAPPER
   ============================================ */

.ce-cp-inner {
    padding: 0;
}

/* ============================================
   HEADER
   ============================================ */

.ce-cp-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.ce-cp-eyebrow {
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #C5A059;
    white-space: nowrap;
}

.ce-cp-line {
    flex: 1;
    height: 1px;
    background: #1F1F1F;
}

/* ============================================
   PRODUCTS ROW
   ============================================ */

.ce-cp-products {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

/* Plus sign between items */
.ce-cp-plus {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 300;
    color: rgba(197, 160, 89, 0.4);
    flex-shrink: 0;
    user-select: none;
}

/* ============================================
   PRODUCT ITEM
   ============================================ */

.ce-cp-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #141414;
    border: 1px solid #1F1F1F;
    padding: 1rem;
    flex: 1;
    min-width: 200px;
    max-width: 280px;
    transition: border-color 0.2s ease;
    position: relative;
}

.ce-cp-item:has(.ce-cp-checkbox:checked) {
    border-color: rgba(197, 160, 89, 0.25);
}

.ce-cp-item--main {
    border-color: rgba(197, 160, 89, 0.2);
}

/* ============================================
   CHECKBOX
   ============================================ */

.ce-cp-checkbox-wrap {
    position: relative;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.ce-cp-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.ce-cp-checkmark {
    display: block;
    width: 18px;
    height: 18px;
    border: 1px solid rgba(197, 160, 89, 0.4);
    background: transparent;
    transition: all 0.2s ease;
    position: relative;
}

.ce-cp-checkbox:checked ~ .ce-cp-checkmark {
    background: #C5A059;
    border-color: #C5A059;
}

.ce-cp-checkbox:checked ~ .ce-cp-checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: 2px solid #0D0D0D;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

.ce-cp-checkbox:disabled ~ .ce-cp-checkmark {
    background: rgba(197, 160, 89, 0.3);
    border-color: rgba(197, 160, 89, 0.3);
    cursor: default;
}

.ce-cp-checkbox:disabled ~ .ce-cp-checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: 2px solid #0D0D0D;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

/* ============================================
   PRODUCT IMAGE
   ============================================ */

.ce-cp-image-link {
    flex-shrink: 0;
    text-decoration: none;
}

.ce-cp-image {
    width: 64px;
    height: 64px;
    overflow: hidden;
    background: #0D0D0D;
    position: relative;
    flex-shrink: 0;
}

.ce-cp-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.ce-cp-item:hover .ce-cp-image img {
    transform: scale(1.05);
}

.ce-cp-main-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(197, 160, 89, 0.85);
    color: #0D0D0D;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-align: center;
    padding: 2px 0;
    font-family: 'Montserrat', sans-serif;
}

/* ============================================
   PRODUCT INFO
   ============================================ */

.ce-cp-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ce-cp-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: #F5F5F5;
    text-decoration: none;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.ce-cp-name:hover {
    color: #C5A059;
}

.ce-cp-price {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    color: #C5A059;
}

.ce-cp-price del {
    color: #666;
    margin-right: 4px;
}

.ce-cp-price ins {
    text-decoration: none;
}

/* ============================================
   FOOTER — TOTAL + CTA
   ============================================ */

.ce-cp-footer {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.ce-cp-total-wrap {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}

.ce-cp-total-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #666;
}

.ce-cp-total-price {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #F5F5F5;
    transition: color 0.2s ease;
}

.ce-cp-add-btn {
    padding: 0.875rem 2.5rem;
    background: transparent;
    border: 1px solid #C5A059;
    color: #C5A059;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease;
    border-radius: 0;
    white-space: nowrap;
}

.ce-cp-add-btn:hover {
    background: #C5A059;
    color: #0D0D0D;
}

.ce-cp-add-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ce-cp-add-btn.loading::after {
    content: '...';
}

/* ============================================
   RESPONSE MESSAGE
   ============================================ */

.ce-cp-message {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    letter-spacing: 0.5px;
    border-left: 2px solid #C5A059;
}

.ce-cp-message.success {
    color: #C5A059;
    background: rgba(197, 160, 89, 0.06);
}

.ce-cp-message.error {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.06);
    border-left-color: #ef4444;
}

/* ============================================
   UNCHECKED ITEM STATE
   ============================================ */

.ce-cp-item.ce-cp-item--unchecked {
    opacity: 0.45;
}

.ce-cp-item.ce-cp-item--unchecked .ce-cp-image img {
    filter: grayscale(60%);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .ce-cp-products {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .ce-cp-plus {
        transform: rotate(90deg);
        text-align: center;
    }

    .ce-cp-item {
        max-width: 100%;
        min-width: 0;
    }

    .ce-cp-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .ce-cp-add-btn {
        width: 100%;
        text-align: center;
    }
}