:root { --brand-color: #7d262a; }

* { box-sizing: border-box; }

html, body {
    height: 100%;
}

body {
    background-color: #eee;
    padding: 0;   /* remove top/bottom padding */
    margin: 0;    /* remove margins */
}

/* Main wrapper: full viewport height, flush to top */
.main-wrapper {
    max-width: 600px;
    margin: 0 auto;          /* keep centered on desktop */
    background: #fff;
    height: 100vh;           /* full height */
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
    border-radius: 0;        /* remove rounded top edge */
    overflow: hidden;

    display: flex;
    flex-direction: column;
    min-height: 0;
}

header { flex: 0 0 auto; }

/* Brand helpers */
.bg-brand { background-color: var(--brand-color) !important; color: #fff !important; }
.text-brand { color: var(--brand-color); }
.btn-brand { background-color: var(--brand-color); color: #fff; border: none; }
.btn-brand:hover { background-color: #5e1d20; color: #fff; }

/* Header */
.site-header { padding: 20px 0; }

/* Hide nav tabs */
.hidden-tabs { display: none; }

/* Tab content is the “screen area” */
.tab-content {
    flex: 1 1 auto;
    min-height: 0;
    position: relative;
}

/* Proper hide/show so screens don't stack */
.tab-content > .tab-pane { display: none; height: 100%; }
.tab-content > .tab-pane.active { display: block; }

/* Crossfade between screens (Bootstrap fade) */
.fade { opacity: 0; transition: opacity .28s ease; }
.fade.in { opacity: 1; }

/* Screens with sticky bottom bars */
.screen-pane.active {
    display: flex !important;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.screen-container {
    padding: 20px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.sticky-footer {
    padding: 14px 20px;
    border-top: 1px solid #eee;
    background: #fafafa;
    flex: 0 0 auto;
}

/* Home (scroll container) */
.home-scroll {
    overflow-y: auto;
    height: 100%;
    -webkit-overflow-scrolling: touch;
}

.home-hero {
    background: #fff;
    margin-bottom: 0;
    padding: 32px 18px;
}

.product-grid { padding-bottom: 8px; }
.product-row { border-top: 1px solid #eee; }
.product-col-image { padding: 0; }
.product-col-text { padding: 20px; }
.product-bullets { margin: 10px 0 0; }

/* Payment option icons */
.payment-icon-img {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: block;
}

.icon-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* PayPal hosted button full width */
#paypal-button-container { width: 100%; }
#paypal-button-container iframe {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
}

.btn-card { width: 100%; }

    /* Unaffiliated notice on home */
.unaffiliated-note {
    margin: 16px 0 0;
    padding: 14px 16px;
    background: #f2f2f2;
    color: #666;
    border-top: 1px solid #e6e6e6;
    font-size: 12px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.unaffiliated-note i { margin-top: 2px; }

/* Image crossfade */
.img-xfade {
    width: 100%;
    height: 250px;
    position: relative;
    overflow: hidden;
    background: #ddd;
}
.img-xfade img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@keyframes firstFade {
    0%, 45% { opacity: 1; }
    50%, 95% { opacity: 0; }
    100% { opacity: 1; }
}
@keyframes secondFade {
    0%, 45% { opacity: 0; }
    50%, 95% { opacity: 1; }
    100% { opacity: 0; }
}

.img-xfade .first  { animation: firstFade 8s ease-in-out infinite; }
.img-xfade .second { animation: secondFade 8s ease-in-out infinite; }

.img-xfade[data-delay="0"] .first,
.img-xfade[data-delay="0"] .second { animation-delay: 0s; }
.img-xfade[data-delay="1"] .first,
.img-xfade[data-delay="1"] .second { animation-delay: .25s; }
.img-xfade[data-delay="2"] .first,
.img-xfade[data-delay="2"] .second { animation-delay: .50s; }
.img-xfade[data-delay="3"] .first,
.img-xfade[data-delay="3"] .second { animation-delay: .75s; }

.pay-title { margin: 18px 0 4px; }
.pay-subtitle { margin: 0 auto 25px; font-weight: normal; color: #666; max-width: 80%; }

.qty-title { margin-top: 50px; }
.qty-control { max-width: 220px; margin: 30px auto 10px; }

.amount-summary { margin-top: 40px; }
.total-price-display { font-size: 60px; font-weight: bold; margin: 10px 0; }
.fee-note { margin-top: 26px; }
.btn-block-no-margin { margin: 0; }

/* QR area */
.qr-wrap {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.qr-box {
    padding: 12px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
}
.qr-hint {
    max-width: 360px;
}
