/* ============================================================
   AfriStore Product Page — Stylesheet
   ------------------------------------------------------------
   Imports shop.css for the shared brand variables (--shop-green,
   --shop-text, --shop-border, etc.) and the base `header` element
   styling, rather than duplicating them. Everything below is
   specific to the individual product/checkout page.
   Used by: product_page.html
   ============================================================ */


html, body {
    max-width: 100%;
    overflow-x: hidden;

}
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shop-shadow-sm);
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.2em;
}
.header-logo img { height: 32px; width: 32px; object-fit: contain; border-radius: 8px; }

.header-links { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.header-btn {
    background: white;
    color: var(--shop-green);
    border: none;
    padding: 9px 16px;
    border-radius: 25px;
    font-size: 0.88em;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
}
.header-btn.cart { background: var(--whatsapp); color: white; }

/* ── BREADCRUMB ── */
.breadcrumb {
    padding: 14px 16px;
    font-size: 0.8em;
    color: var(--shop-muted);
    max-width: 1200px;
    margin: 0 auto;
}
.breadcrumb a { color: var(--shop-green); text-decoration: none; font-weight: 600; }

/* ── PAGE LAYOUT ── */
.product-page {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 36px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 6px 16px 60px;
}
@media (max-width: 768px) {
    .product-page { grid-template-columns: 1fr; gap: 20px; padding: 6px 16px 100px; }
}

/* ── GALLERY ── */
.gallery { display: flex; flex-direction: column; gap: 12px; }
.main-image-wrap { border-radius: 16px; overflow: hidden; background: white; aspect-ratio: 1 / 1; }
.main-image-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.no-main-img {
    width: 100%; aspect-ratio: 1 / 1; background: var(--shop-card-alt);
    display: flex; align-items: center; justify-content: center; font-size: 4em; border-radius: 16px;
}
.thumbnails { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.thumbnails::-webkit-scrollbar { display: none; }
.thumb { flex-shrink: 0; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; cursor: pointer; border: 2px solid transparent; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.active { border-color: var(--shop-green); }

.videos-block { margin-top: 10px; }
.videos-block .variant-label { margin-bottom: 10px; }
.videos-row { display: flex; flex-wrap: wrap; gap: 14px; }
.product-video { width: 160px; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 12px; background: #000; box-shadow: var(--shop-shadow-sm); }

/* ── PRODUCT INFO ── */
.product-info { display: flex; flex-direction: column; }
.info-brand { margin-bottom: 4px; }
.product-brand { color: var(--shop-muted); font-weight: 700; font-size: 0.85em; text-transform: uppercase; letter-spacing: 0.4px; }
.product-name { font-size: 1.4em; font-weight: 800; color: var(--shop-text); margin-bottom: 8px; line-height: 1.3; }

.rating-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.stars { font-size: 1em; }
.rating-text { font-size: 0.85em; color: var(--shop-muted); font-weight: 600; }

.product-price { font-size: 1.6em; font-weight: 800; color: var(--shop-green); margin-bottom: 16px; }
.product-price span { font-size: 0.5em; color: var(--shop-muted); font-weight: 600; }

.description { background: white; border: 1px solid var(--shop-border); border-radius: 12px; padding: 16px 18px; margin-bottom: 14px; font-size: 0.9em; line-height: 1.6; color: var(--shop-text); }
.description-label { font-weight: 700; margin-bottom: 6px; color: var(--shop-text); font-size: 0.85em; text-transform: uppercase; letter-spacing: 0.3px; }

/* ── ORDER DETAILS BOX ── */
.order-details-box { background: white; border: 2px solid var(--shop-green); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.order-details-title { font-weight: 800; font-size: 0.95em; color: var(--shop-green-dark); }
.modal-input { width: 100%; padding: 12px 14px; border: 1px solid var(--shop-border); border-radius: 10px; font-size: 0.95em; font-family: inherit; outline: none; }
.modal-input:focus { border-color: var(--shop-green); }
.modal-input[readonly] { background: var(--shop-bg); color: var(--shop-text); cursor: default; }
.location-hint {
    text-align: center; font-size: 0.85em; font-weight: 700; color: var(--shop-green-dark);
    margin: -2px 0 2px; animation: locationHintBounce 1.4s ease-in-out infinite;
}
.location-hint.hidden { display: none; }
@keyframes locationHintBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(4px); }
}
.location-btn { width: 100%; padding: 12px; border: 2px solid var(--shop-green); background: var(--shop-card-alt); color: var(--shop-green-dark); border-radius: 10px; font-weight: 700; cursor: pointer; font-size: 0.9em; font-family: inherit; }
.delivery-fee-display { font-size: 1.05em; font-weight: 800; color: var(--shop-green-dark); min-height: 22px; }

/* ── DELIVERY / WARRANTY / RETURNS ── */
.info-box-secondary { background: white; border: 2px solid var(--shop-border); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; font-size: 0.9em; }
.info-row { display: flex; align-items: center; gap: 8px; }

/* ── VARIANTS ── */
.variant-section { margin-bottom: 14px; }
.variant-label { font-size: 0.85em; font-weight: 700; color: var(--shop-text); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.3px; }
.variant-hint { font-size: 0.85em; color: var(--shop-muted); margin-bottom: 8px; }
.variant-options { display: flex; flex-wrap: wrap; gap: 8px; }
.variant-btn { padding: 8px 16px; border: 2px solid var(--shop-border); background: white; border-radius: 8px; font-weight: 700; font-size: 0.88em; cursor: pointer; font-family: inherit; color: var(--shop-text); }
.variant-btn.active { border-color: var(--shop-green); background: var(--shop-card-alt); color: var(--shop-green-dark); }

.divider { height: 1px; background: var(--shop-border); margin: 16px 0; }

/* ── SELLER CARD ── */
.seller-card { display: flex; align-items: center; gap: 12px; padding: 14px; background: white; border: 1px solid var(--shop-border); border-radius: 12px; margin-bottom: 14px; }
.seller-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--shop-card-alt); display: flex; align-items: center; justify-content: center; font-size: 1.2em; font-weight: 700; color: var(--shop-green-dark); flex-shrink: 0; }
.seller-details { flex: 1; min-width: 0; }
.seller-link { text-decoration: none; color: inherit; }
.seller-name-text { font-weight: 700; font-size: 0.95em; color: var(--shop-text); }
.seller-location { font-size: 0.8em; color: var(--shop-muted); margin-top: 2px; }
.follow-btn { flex-shrink: 0; padding: 8px 16px; border-radius: 20px; font-size: 0.85em; font-weight: 700; cursor: pointer; font-family: inherit; border: 2px solid var(--shop-green); background: white; color: var(--shop-green-dark); }

/* ── ACTION BUTTONS ── */
.btn-row { display: flex; gap: 10px; margin-bottom: 10px; }
.btn-cart, .btn-order { width: 100%; padding: 14px; border-radius: 12px; font-weight: 800; font-size: 0.95em; cursor: pointer; border: none; font-family: inherit; text-align: center; }
.qty-stepper { display: flex; align-items: center; justify-content: center; gap: 18px; background: var(--shop-card-alt); border: 2px solid var(--shop-green); border-radius: 12px; padding: 10px; }
.qty-btn { width: 32px; height: 32px; border-radius: 50%; border: none; background: var(--shop-green); color: white; font-size: 1.2em; font-weight: 800; cursor: pointer; line-height: 1; display: flex; align-items: center; justify-content: center; }
.qty-value { font-weight: 800; font-size: 1.1em; color: var(--shop-green-dark); min-width: 20px; text-align: center; }
.btn-cart { background: var(--shop-card-alt); color: var(--shop-green-dark); border: 2px solid var(--shop-green); }
.btn-order { background: var(--shop-green); color: white; }
.btn-outline {
    flex: 1; padding: 13px; background: white; border: 2px solid var(--shop-green); color: var(--shop-green-dark);
    border-radius: 12px; font-weight: 700; cursor: pointer; font-size: 0.9em;
    display: flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; font-family: inherit;
}

/* ── REVIEWS ── */
.reviews-section { grid-column: 1 / -1; margin-top: 10px; }
.reviews-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.reviews-header h2 { font-size: 1.2em; font-weight: 800; color: var(--shop-text); }
.avg-badge { background: var(--shop-card-alt); color: var(--shop-green-dark); padding: 6px 14px; border-radius: 20px; font-weight: 800; font-size: 0.9em; }
.reviews-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.review-card { background: white; border: 1px solid var(--shop-border); border-radius: 12px; padding: 16px; }
.review-stars { font-size: 0.9em; margin-bottom: 8px; }
.review-comment { font-size: 0.9em; color: var(--shop-text); line-height: 1.5; margin-bottom: 10px; }
.review-comment-empty { color: var(--shop-muted); font-style: italic; }
.review-meta { font-size: 0.78em; color: var(--shop-muted); }
.no-reviews { text-align: center; padding: 40px 20px; color: var(--shop-muted); background: white; border-radius: 12px; border: 1px solid var(--shop-border); }
.no-reviews-icon { font-size: 2.5em; margin-bottom: 10px; }
.no-reviews-title { font-weight: 700; margin-bottom: 6px; }
.no-reviews-sub { font-size: 0.9em; }

/* ── PAYMENT MODAL ── */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 400; align-items: center; justify-content: center; }
.modal-box { background: white; border-radius: 16px; padding: 28px; width: 340px; max-width: 90%; text-align: center; }
.modal-box h2 { font-size: 1.1em; margin-bottom: 16px; }
.modal-price-badge { background: var(--shop-card-alt); padding: 10px 14px; border-radius: 8px; margin-bottom: 10px; font-weight: 700; color: var(--shop-green-dark); }
.modal-fee-echo { font-size: 0.9em; color: var(--shop-muted); margin-bottom: 16px; }
.modal-btn { width: 100%; border: none; padding: 13px; border-radius: 10px; font-size: 0.95em; font-weight: 700; cursor: pointer; margin-bottom: 10px; color: white; font-family: inherit; }
.modal-btn.mpesa { background: var(--shop-green); }
.modal-btn.mpesa-delivery { background: var(--shop-mpesa-alt); }
.modal-btn.cod { background: var(--shop-orange); }
.modal-btn.whatsapp { background: var(--whatsapp); }
.modal-btn.cancel { background: #eee; color: #333; }

/* ── TOAST ── */
.toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
    background: var(--shop-text); color: white; padding: 14px 24px; border-radius: 12px;
    font-weight: 700; font-size: 0.9em; z-index: 600; box-shadow: var(--shop-shadow-md);
    opacity: 0; pointer-events: none; transition: opacity 0.25s;
}
.toast.show { opacity: 1; }