/* =============================================================
   BlocksToCash — Frontend Styles
   Version: 1.0.0
   ============================================================= */

/* ---------------------------------------------------------------
   PRODUCT CARD
   --------------------------------------------------------------- */

.btc-product-card {
    position: relative;
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 20px;
    margin: 20px 0;
    overflow: hidden;
}

/* Badge — top LEFT (z-index above overlay) */
.btc-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #ffffff;
    background: #2980b9;
    z-index: 3;
}

/* Badge colors by predefined type */
.btc-badge-notre-selection  { background: #27ae60; }
.btc-badge-meilleur-prix    { background: #e67e22; }
.btc-badge-top-qualite      { background: #2980b9; }

/* Legacy badge classes kept for backwards compatibility */
.btc-badge-selection,
.btc-badge-meilleur-choix,
.btc-badge-top-choix,
.btc-badge-recommande     { background: #f39c12; color: #fff; }

.btc-badge-prix,
.btc-badge-moins-cher,
.btc-badge-prix-bas       { background: #e74c3c; color: #fff; }

.btc-badge-premium,
.btc-badge-haut-de-gamme  { background: #8e44ad; color: #fff; }

.btc-badge-nouveau,
.btc-badge-new            { background: #27ae60; color: #fff; }

/* Clickable card overlay — covers entire card, z-index below content */
.btc-card-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: 10px;
    cursor: pointer;
}

/* Inner layout — sits above overlay */
.btc-product-inner {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    position: relative;
    z-index: 2;
}

/* Image area */
.btc-product-image {
    flex-shrink: 0;
}

.btc-product-image img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

/* Content area */
.btc-product-content {
    flex: 1;
    min-width: 0;
}

.btc-product-title {
    font-size: 1.1em;
    font-weight: 700;
    margin: 0 0 6px 0;
    color: #222;
    line-height: 1.4;
}

.btc-product-price {
    color: #e74c3c;
    font-size: 1.3em;
    font-weight: 700;
    margin-bottom: 10px;
}

/* Features list */
.btc-features {
    list-style: none;
    padding: 0;
    margin: 8px 0;
}

.btc-features li {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin: 4px 0;
    font-size: 0.92em;
    color: #444;
    line-height: 1.4;
}

/* Price verified notice */
.btc-price-verified {
    font-size: 0.72em;
    color: #999;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
    line-height: 1.5;
}

.btc-price-verified a {
    color: #999;
    text-decoration: none;
}

.btc-price-verified a:hover {
    text-decoration: underline;
}

/* ---------------------------------------------------------------
   BUTTONS
   --------------------------------------------------------------- */

.btc-btn {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95em;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease;
    border: none;
    line-height: 1.4;
    white-space: nowrap;
    color: #ffffff;
}

.btc-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

.btc-btn:active {
    transform: translateY(0);
}

/* Green */
.btc-btn-green {
    background-color: #27ae60;
    color: #ffffff;
}

.btc-btn-green:hover {
    background-color: #219a52;
    color: #ffffff;
}

/* Red */
.btc-btn-red {
    background-color: #e74c3c;
    color: #ffffff;
}

.btc-btn-red:hover {
    background-color: #c0392b;
    color: #ffffff;
}

/* Blue */
.btc-btn-blue {
    background-color: #2980b9;
    color: #ffffff;
}

.btc-btn-blue:hover {
    background-color: #2471a3;
    color: #ffffff;
}

/* Grey (secondary / review link) */
.btc-btn-grey {
    background-color: #6b7280;
    color: #ffffff;
}

.btc-btn-grey:hover {
    background-color: #4b5563;
    color: #ffffff;
}

/* Orange */
.btc-btn-orange {
    background-color: #e67e22;
    color: #ffffff;
}

.btc-btn-orange:hover {
    background-color: #ca6f1e;
    color: #ffffff;
}

/* Size variants */
.btc-btn-sm {
    padding: 6px 12px;
    font-size: 0.85em;
}

.btc-btn-large {
    padding: 14px 28px;
    font-size: 1.1em;
}

/* Product buttons row */
.btc-product-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
    align-items: center;
}

/* Full-width CTA */
.btc-cta-btn.btc-btn-full {
    display: block;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
}

/* Check / Cross icons */
.btc-check {
    color: #27ae60;
    font-weight: 700;
    flex-shrink: 0;
}

.btc-cross {
    color: #e74c3c;
    font-weight: 700;
    flex-shrink: 0;
}

/* ---------------------------------------------------------------
   COMPARISON TABLE
   --------------------------------------------------------------- */

.btc-comparison-table {
    margin: 20px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.btc-table-caption {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
    font-style: italic;
}

.btc-comparison-table table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
    font-size: 0.95em;
    min-width: 400px;
}

.btc-comparison-table thead tr {
    background: linear-gradient(135deg, #27ae60, #1a8a4a);
    color: #ffffff;
}

.btc-comparison-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 700;
    font-size: 0.9em;
    letter-spacing: 0.03em;
    color: #ffffff;
}

.btc-comparison-table tbody tr {
    background: #ffffff;
    transition: background-color 0.15s ease;
}

.btc-comparison-table tbody tr:hover {
    background: #f5faf7;
}

.btc-comparison-table td {
    padding: 10px 16px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.btc-comparison-table tbody tr:last-child td {
    border-bottom: none;
}

.btc-rank {
    display: inline-flex;
    width: 32px;
    height: 32px;
    background: #27ae60;
    color: #ffffff;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9em;
    flex-shrink: 0;
}

.btc-price {
    color: #e74c3c;
    font-weight: 700;
}

.btc-product-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btc-product-cell img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

/* Affiliate disclaimer */
.btc-disclaimer {
    font-size: 0.78em;
    color: #aaa;
    margin-top: 10px;
    font-style: italic;
}

/* ---------------------------------------------------------------
   PROS / CONS
   --------------------------------------------------------------- */

.btc-pros-cons {
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    background: #ffffff;
}

.btc-pros-cons-title {
    font-size: 1.1em;
    font-weight: 700;
    margin: 0 0 16px 0;
    color: #222;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.btc-pros-cons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.btc-pros,
.btc-cons {
    border-radius: 6px;
    padding: 16px;
}

.btc-pros {
    background: #f0fdf4;
    border-left: 4px solid #27ae60;
}

.btc-cons {
    background: #fff5f5;
    border-left: 4px solid #e74c3c;
}

.btc-pros-header {
    color: #27ae60;
    font-size: 0.95em;
    font-weight: 700;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.btc-cons-header {
    color: #e74c3c;
    font-size: 0.95em;
    font-weight: 700;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.btc-pros ul,
.btc-cons ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.btc-pros li,
.btc-cons li {
    display: flex;
    gap: 8px;
    margin: 5px 0;
    align-items: flex-start;
    font-size: 0.92em;
    color: #444;
    line-height: 1.5;
}

/* ---------------------------------------------------------------
   CTA BUTTON WRAPPER
   --------------------------------------------------------------- */

.btc-cta-wrapper {
    margin: 16px 0;
}

.btc-align-left {
    text-align: left;
}

.btc-align-center {
    text-align: center;
}

.btc-align-right {
    text-align: right;
}

.btc-cta-btn {
    display: inline-block;
}

/* ---------------------------------------------------------------
   LICENSE BANNER
   --------------------------------------------------------------- */

.btc-license-banner {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.8em;
    margin-top: 8px;
    display: block;
    width: 100%;
    box-sizing: border-box;
}

.btc-license-banner a {
    color: #533f03;
    font-weight: 700;
    text-decoration: underline;
}

.btc-license-banner a:hover {
    color: #000;
}

/* ---------------------------------------------------------------
   MOBILE RESPONSIVE
   --------------------------------------------------------------- */

@media (max-width: 600px) {

    .btc-product-inner {
        flex-direction: column;
        gap: 14px;
    }

    .btc-product-image img {
        width: 100%;
        height: auto;
        max-height: 220px;
    }

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

    .btc-pros-cons-grid {
        grid-template-columns: 1fr;
    }

    .btc-product-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .btc-product-buttons .btc-btn {
        text-align: center;
        width: 100%;
        box-sizing: border-box;
    }

    .btc-badge {
        position: static;
        display: inline-block;
        margin-bottom: 10px;
    }

    .btc-product-card {
        padding: 14px;
    }

    .btc-comparison-table table {
        font-size: 0.85em;
    }

    .btc-comparison-table th,
    .btc-comparison-table td {
        padding: 8px 10px;
    }
}
