/* ============================================================
   WC Companion Product — Styles
   ============================================================ */

.wccp-companion-section {
    margin: 2em 0 1em;
    padding-top: 1.5em;
    border-top: 1px solid #e0e0e0;
}

.wccp-heading {
    font-size: 1.1em;
    font-weight: 600;
    margin: 0 0 1em;
    color: #333;
}

/* ---- Card layout ---- */
.wccp-companion-card {
    display: flex;
    gap: 1.25em;
    align-items: flex-start;
    padding: 1em;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background: #fafafa;
    margin-bottom: 1em;
}

.wccp-companion-card:last-child {
    margin-bottom: 0;
}

/* ---- Image ---- */
.wccp-image {
    flex: 0 0 100px;
    width: 100px;
}

.wccp-image img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    display: block;
    border: 1px solid #eee;
}

/* ---- Details column ---- */
.wccp-details {
    flex: 1;
    min-width: 0;
}

.wccp-product-name {
    margin: 0 0 0.5em;
    font-weight: 600;
    font-size: 0.95em;
    line-height: 1.3;
}

.wccp-product-name a {
    color: inherit;
    text-decoration: none;
}

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

/* ---- Variation selectors ---- */
.wccp-variations {
    margin-bottom: 0.75em;
}

.wccp-attr-row {
    display: flex;
    align-items: center;
    gap: 0.75em;
    margin-bottom: 0.5em;
}

.wccp-attr-row label {
    font-size: 0.85em;
    font-weight: 600;
    color: #555;
    white-space: nowrap;
    min-width: 50px;
}

.wccp-attr-row select {
    flex: 1;
    padding: 0.4em 0.6em;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9em;
    background: #fff;
    max-width: 200px;
}

/* ---- Price ---- */
.wccp-price-line {
    margin-bottom: 0.75em;
}

.wccp-price {
    font-weight: 700;
    font-size: 1em;
    color: #111;
}

.wccp-price del {
    color: #999;
    font-weight: 400;
    margin-right: 0.3em;
}

.wccp-price ins {
    text-decoration: none;
    color: #e44;
}

/* ---- Add to order button ---- */
.wccp-actions {
    display: flex;
    align-items: center;
    gap: 0.75em;
}

.wccp-add-btn {
    padding: 0.55em 1.5em !important;
    font-size: 0.9em !important;
    border-radius: 4px !important;
    white-space: nowrap;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.wccp-add-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.wccp-add-btn.wccp-loading {
    pointer-events: none;
    opacity: 0.6;
}

/* ---- Feedback messages ---- */
.wccp-feedback {
    font-size: 0.85em;
    transition: opacity 0.3s ease;
}

.wccp-feedback.wccp-success {
    color: #46a049;
    font-weight: 600;
}

.wccp-feedback.wccp-error {
    color: #cc3333;
    font-weight: 600;
}

/* ---- Info text above card ---- */
.wccp-info-text {
    margin: 0 0 0.5em;
    padding: 0.6em 0.85em;
    background: #fff8e1;
    border-left: 3px solid #f0c020;
    border-radius: 0 4px 4px 0;
    font-size: 0.9em;
    color: #555;
    line-height: 1.4;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .wccp-companion-card {
        flex-direction: column;
        align-items: center !important;
        text-align: center;
    }

    .wccp-image {
        flex: none;
        width: 100px;
        margin: 0 auto;
    }

    .wccp-image img {
        margin: 0 auto;
    }

    .wccp-details {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .wccp-product-name {
        text-align: center;
        width: 100%;
    }

    .wccp-variations {
        width: 100%;
    }

    .wccp-attr-row {
        flex-direction: column;
        align-items: center;
        gap: 0.25em;
    }

    .wccp-attr-row select {
        max-width: 100%;
        width: 100%;
    }

    .wccp-price-line {
        text-align: center;
        width: 100%;
    }

    .wccp-actions {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .wccp-add-btn {
        display: block;
        width: 100%;
        text-align: center;
    }

    .wccp-feedback {
        text-align: center;
    }

    .wccp-info-text {
        text-align: center;
    }
}
