/* ============================================================
   Amazon Affiliate Pro — Front-end Styles
   ============================================================ */

/* ---- Product Card ---------------------------------------- */
.aap-product-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e2e2e2;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    transition: box-shadow .2s ease, transform .2s ease;
    font-family: inherit;
}
.aap-product-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,.12);
    transform: translateY(-2px);
}

.aap-product-image {
    background: #f7f7f7;
    text-align: center;
    padding: 16px;
}
.aap-product-image img {
    max-height: 200px;
    max-width: 100%;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}
.aap-product-image a { display: block; }

.aap-product-info {
    padding: 16px 18px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.aap-product-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 10px;
    color: #111;
}
.aap-product-title a {
    color: inherit;
    text-decoration: none;
}
.aap-product-title a:hover { color: #c7511f; }

.aap-product-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    font-size: 13px;
}
.aap-stars { display: inline-flex; gap: 1px; }
.aap-star.full  { color: #FF9900; }
.aap-star.half  { color: #FF9900; }
.aap-star.empty { color: #ccc; }
.aap-review-count { color: #007185; font-size: 12px; }

.aap-product-price {
    font-size: 20px;
    font-weight: 700;
    color: #B12704;
    margin-bottom: 10px;
}

.aap-product-features {
    font-size: 13px;
    color: #444;
    margin-bottom: 14px;
    line-height: 1.5;
    flex: 1;
}
.aap-product-features ul {
    padding-left: 18px;
    margin: 0;
}
.aap-product-features li { margin-bottom: 4px; }

/* ---- Buttons --------------------------------------------- */
.aap-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background-color: #FF9900;
    color: #111 !important;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 700;
    padding: 10px 18px;
    border-radius: 20px;
    text-align: center;
    transition: filter .15s ease, transform .15s ease;
    cursor: pointer;
    border: none;
    line-height: 1.2;
    white-space: nowrap;
}
.aap-btn:hover {
    filter: brightness(1.08);
    transform: scale(1.02);
    text-decoration: none !important;
}
.aap-btn-sm {
    font-size: 12px;
    padding: 7px 14px;
    border-radius: 14px;
}
.aap-amazon-icon { font-family: sans-serif; }

/* ---- Disclaimer ------------------------------------------ */
.aap-disclaimer {
    font-size: 10px;
    color: #999;
    margin: 8px 0 0;
    line-height: 1.3;
}

/* ---- Grid ------------------------------------------------ */
.aap-grid {
    display: grid;
    gap: 20px;
    margin: 24px 0;
}
.aap-grid-cols-1 { grid-template-columns: 1fr; }
.aap-grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.aap-grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.aap-grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
    .aap-grid-cols-3,
    .aap-grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .aap-grid-cols-2,
    .aap-grid-cols-3,
    .aap-grid-cols-4 { grid-template-columns: 1fr; }
}

/* ---- Comparison Table ------------------------------------ */
.aap-compare-wrap {
    overflow-x: auto;
    margin: 24px 0;
}
.aap-compare-table {
    border-collapse: collapse;
    width: 100%;
    min-width: 480px;
    font-size: 14px;
    line-height: 1.45;
}
.aap-compare-table th,
.aap-compare-table td {
    border: 1px solid #e0e0e0;
    padding: 10px 14px;
    text-align: left;
    vertical-align: top;
}
.aap-compare-table thead tr {
    background: #232f3e;
    color: #fff;
}
.aap-compare-table thead th { font-weight: 600; }
.aap-compare-feature-col { width: 130px; }

.aap-compare-product-col {
    text-align: center;
}
.aap-compare-product-col img {
    max-height: 80px;
    max-width: 100%;
    object-fit: contain;
    display: block;
    margin: 0 auto 6px;
}
.aap-compare-product-col span {
    font-size: 12px;
    line-height: 1.3;
    display: block;
}

.aap-compare-table tbody tr:nth-child(even) { background: #f9f9f9; }
.aap-compare-table tbody th {
    background: #f2f2f2;
    font-weight: 600;
    color: #333;
    font-size: 13px;
}

.aap-compare-cta-row td { text-align: center; padding: 14px; }

/* ---- Admin error (visible only to admins) --------------- */
.aap-error {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 10px 14px;
    font-size: 14px;
    margin: 10px 0;
    border-radius: 0 4px 4px 0;
}
