/* ================================================================
   Buggy Paradise Amazon – Frontend Styles
   ================================================================ */

/* ---- Base ---- */
.bpa-product-box,
.bpa-bestseller {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    box-sizing: border-box;
}
.bpa-product-box *,
.bpa-bestseller * {
    box-sizing: border-box;
}

/* ================================================================
   PRODUCT BOX
   ================================================================ */

.bpa-product-box {
    display: flex;
    flex-direction: column;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    max-width: 360px;
    margin: 1.5rem auto;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    transition: box-shadow .2s;
}
.bpa-product-box:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.1);
}

/* Image */
.bpa-product-box__img {
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}
.bpa-product-box__img img {
    max-width: 100%;
    max-height: 220px;
    object-fit: contain;
    display: block;
}

/* Body */
.bpa-product-box__body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: .6rem;
    flex: 1;
}

/* Badge */
.bpa-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 3px 10px;
    border-radius: 20px;
    background: #fef3c7;
    color: #92400e;
    width: fit-content;
}

/* Title */
.bpa-product-box__title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
    color: #111827;
}
.bpa-product-box__title a {
    color: inherit;
    text-decoration: none;
}
.bpa-product-box__title a:hover {
    color: #1d9e75;
}

/* Stars */
.bpa-stars { font-size: 15px; color: #f59e0b; }
.bpa-star--empty { color: #d1d5db; }
.bpa-reviews { font-size: 12px; color: #6b7280; margin-left: 4px; }
.bpa-product-box__rating { display: flex; align-items: center; gap: 2px; }

/* Features */
.bpa-product-box__features {
    margin: 0;
    padding: 0 0 0 1.1rem;
    font-size: 13px;
    color: #374151;
    line-height: 1.6;
    list-style: disc;
}

/* Footer */
.bpa-product-box__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-top: auto;
    padding-top: .75rem;
    border-top: 1px solid #f3f4f6;
}

/* Price */
.bpa-price-wrap { display: flex; flex-direction: column; }
.bpa-price {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
}
.bpa-old-price {
    font-size: 13px;
    color: #9ca3af;
    text-decoration: line-through;
}
.bpa-price-na { font-size: 13px; color: #6b7280; }

/* Button */
.bpa-btn {
    display: inline-block;
    background: #1d9e75;
    color: #fff !important;
    font-size: 13px;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background .15s;
}
.bpa-btn:hover { background: #166d54; }
.bpa-btn--sm { font-size: 12px; padding: 7px 14px; }

/* Disclaimer */
.bpa-disclaimer {
    font-size: 10px;
    color: #9ca3af;
    margin: .25rem 0 0;
    line-height: 1.4;
}

/* Error (admin only) */
.bpa-error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    padding: .75rem 1rem;
    border-radius: 8px;
    font-size: 13px;
}

/* ================================================================
   BESTSELLER LIST
   ================================================================ */

.bpa-bestseller {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    margin: 1.5rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.bpa-bestseller__title {
    font-size: 17px;
    font-weight: 700;
    margin: 0;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f3f4f6;
    color: #111827;
}

.bpa-bestseller__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bpa-bestseller__item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: .9rem 1.25rem;
    border-bottom: 1px solid #f9fafb;
    transition: background .15s;
}
.bpa-bestseller__item:last-of-type { border-bottom: none; }
.bpa-bestseller__item:hover { background: #f9fafb; }

/* Rank */
.bpa-bestseller__rank {
    font-size: 15px;
    font-weight: 700;
    min-width: 28px;
    text-align: center;
    color: #6b7280;
}
.bpa-bestseller__item:nth-child(1) .bpa-bestseller__rank { color: #f59e0b; }
.bpa-bestseller__item:nth-child(2) .bpa-bestseller__rank { color: #9ca3af; }
.bpa-bestseller__item:nth-child(3) .bpa-bestseller__rank { color: #b45309; }

/* Image */
.bpa-bestseller__img-wrap {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
    border-radius: 8px;
    overflow: hidden;
}
.bpa-bestseller__img-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Info */
.bpa-bestseller__info {
    flex: 1;
    min-width: 0;
}
.bpa-bestseller__name {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    text-decoration: none;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bpa-bestseller__name:hover { color: #1d9e75; }
.bpa-bestseller__rating {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-top: 3px;
}

/* Right side */
.bpa-bestseller__right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}
.bpa-bestseller__right .bpa-price {
    font-size: 15px;
    font-weight: 700;
}

/* Disclaimer inside bestseller */
.bpa-bestseller .bpa-disclaimer {
    padding: .5rem 1.25rem .75rem;
    display: block;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */

@media (max-width: 480px) {
    .bpa-product-box { max-width: 100%; }

    .bpa-bestseller__item { flex-wrap: wrap; }
    .bpa-bestseller__right { flex-direction: row; align-items: center; width: 100%; justify-content: space-between; }
    .bpa-bestseller__img-wrap { width: 44px; height: 44px; }
    .bpa-bestseller__name { white-space: normal; }

    .bpa-product-box__footer { flex-direction: column; align-items: stretch; }
    .bpa-btn { text-align: center; }
}
