/* Additions for catalog, labels, cart/checkout and policy pages */
.policy-page h2 { font-size: 1.35rem; margin-top: 1.75rem; }
.policy-page h3 { font-size: 1.1rem; margin-top: 1.25rem; }
.policy-page p, .policy-page li { line-height: 1.7; }

.catalog-card { border: 1px solid #e3e8ef; border-radius: 12px; overflow: hidden; background: #fff; height: 100%; display: flex; flex-direction: column; }
.catalog-card .catalog-img { background: #f6f9fc; text-align: center; padding: 16px; }
.catalog-card .catalog-img img { max-height: 280px; width: auto; max-width: 100%; object-fit: contain; }
.catalog-card .catalog-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.catalog-card .catalog-price { font-size: 1.6rem; font-weight: 700; color: #0d6efd; margin: 4px 0; }
.catalog-card .catalog-meta { font-size: .9rem; color: #5b6573; }
.catalog-card .catalog-links { font-size: .85rem; margin-top: 10px; }
.catalog-card .catalog-actions { margin-top: auto; padding-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }

.supp-facts { background: #fff; border: 1px solid #e3e8ef; border-radius: 12px; padding: 20px; height: auto; }
.supp-facts-img { max-height: 360px; border: 1px solid #dfe5ec; border-radius: 6px; }
.supp-disclaimer { font-size: .85rem; color: #3b4452; }
.supp-table th, .supp-table td { font-size: .9rem; }
.supp-details dt { font-weight: 700; margin-top: 8px; }
.supp-details dd { margin-bottom: 4px; }

.price-table td, .price-table th { vertical-align: middle; }
.order-summary td, .order-summary th { vertical-align: middle; }
.order-summary .cart-image { max-width: 64px; height: auto; }
.charge-notice { background: #f0f7ff; border-left: 4px solid #0d6efd; padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; }
.consent-box { border: 1px solid #cfd8e3; border-radius: 6px; padding: 12px 14px; margin-bottom: 14px; background: #fff; color: #212529; }
.consent-box label { color: #212529; }
.footer-links li { margin-bottom: 4px; }
.footer-fda { border-top: 1px solid rgba(255,255,255,.25); padding-top: 12px; }
.footer-legal p { color: #fff; }
.empty-cart-box { text-align: center; padding: 48px 16px; }
.btn[disabled], .btn:disabled { opacity: .55; cursor: not-allowed; }
.notice-box { background: #fff8e6; border: 1px solid #f1d38a; border-radius: 6px; padding: 12px 16px; }

/* Footer text stays readable on the blue background */
footer.bg-primary, footer.bg-primary p, footer.bg-primary li, footer.bg-primary a, footer.bg-primary small, footer.bg-primary strong { color: #fff; }
footer.bg-primary a { text-decoration: underline; }

/* ---------- Homepage: Shop by Category + Featured Products ---------- */
.home-categories { padding: 60px 0 40px; }
.home-categories .section-header,
.featured-products-section .section-header { text-align: left; margin-bottom: 24px; }
.home-categories .section-header h2,
.featured-products-section .section-header h2 { font-size: 1.9rem; margin: 0; }

.category-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
}
.category-card {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 6px; min-height: 138px; padding: 18px 12px; text-align: center; text-decoration: none;
    background: linear-gradient(135deg, #e8f0fe 0%, #f3f7ff 100%);
    border: 1px solid #dfe6f3; border-radius: 12px; color: #212529;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.category-card:hover, .category-card:focus-visible {
    transform: translateY(-4px); border-color: #0d6efd; color: #212529;
    box-shadow: 0 10px 24px rgba(13, 110, 253, .14);
}
.category-icon { font-size: 28px; line-height: 1; margin-bottom: 4px; }
.category-name { font-weight: 600; font-size: .95rem; line-height: 1.25; }
.category-count { font-size: .8rem; color: #6b7480; }

.featured-products-section { padding: 30px 0 70px; }
.featured-panel {
    background: #fff; border-radius: 12px; padding: 32px;
    box-shadow: 0 0 30px rgba(0, 0, 0, .08);
}
.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}
.featured-grid .product-item {
    position: relative; display: flex; flex-direction: column;
    background: #fff; border: 1px solid #e6ecf5; border-radius: 12px; overflow: hidden; padding-bottom: 16px;
}
.featured-grid .product-image {
    display: flex; align-items: center; justify-content: center;
    background: #f5f8fe; padding: 14px; aspect-ratio: 1 / 1;
}
.featured-grid .product-image { position: relative; overflow: hidden; }
.featured-grid .product-image img {
    position: absolute; top: 14px; left: 14px;
    width: calc(100% - 28px); height: calc(100% - 28px);
    object-fit: contain; border-radius: 8px;
}
.featured-grid .product-title { font-size: 1rem; font-weight: 500; margin: 14px 16px 4px; }
.featured-grid .product-title a { color: #111; text-decoration: none; }
.featured-grid .product-title a:hover { color: #0d6efd; }
.featured-grid .product-price { margin: 0 16px; font-size: 1.15rem; }
.featured-grid .price-from { font-size: .8rem; font-weight: 500; color: #6b7480; }
.featured-grid .product-actions { display: flex; gap: 8px; margin: 12px 16px 0; }
.btn-action.wishlist-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; }
.btn-action.wishlist-btn.is-on { background: #0d6efd; color: #fff; }
.btn-action.wishlist-btn.is-on svg path { fill: currentColor; }

@media (max-width: 1100px) { .category-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 860px)  { .category-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) {
    .category-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .featured-panel { padding: 20px 16px; }
    .home-categories { padding-top: 40px; }
}
.featured-grid .btn-action { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }

/* Device spec table on product pages */
.device-specs { background: #fff; border: 1px solid #e3e8ef; border-radius: 12px; padding: 8px 20px; }
.spec-table { margin-bottom: 0; }
.spec-table th { width: 32%; font-weight: 700; white-space: nowrap; vertical-align: top; }
.spec-table td { vertical-align: top; }
@media (max-width: 575px) { .spec-table th { white-space: normal; width: 38%; } }

/* ---------- Homepage layout: hero, promo, features, about ---------- */
.hero-section { padding-bottom: 56px; }
.hero-section .hero-content h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 16px; }
.hero-section .hero-content p { max-width: 36em; margin-bottom: 24px; line-height: 1.7; }
.cta-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-hero {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 13px 26px; border-radius: 8px; font-weight: 600; text-decoration: none;
    line-height: 1.2; min-height: 48px; transition: transform .2s ease, box-shadow .2s ease;
}
.btn-hero:hover { transform: translateY(-2px); }
.btn-primary-hero { background: #0d6efd; color: #fff; box-shadow: 0 4px 14px rgba(13, 110, 253, .3); }
.btn-primary-hero:hover { color: #fff; background: #0b5ed7; }
.btn-secondary-hero { background: #fff; color: #0d6efd; border: 1px solid #0d6efd; }
.btn-secondary-hero:hover { background: #f0f7ff; color: #0b5ed7; }
.hero-img { width: 100%; max-height: 440px; object-fit: contain; border-radius: 16px; }

.promo-banner { margin-top: 8px; }

.section-header { text-align: left; margin-bottom: 28px; }
.section-header h2 { margin: 0; }

.features-grid {
    display: grid; gap: 20px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.feature-card {
    display: flex; flex-direction: column; align-items: flex-start;
    height: 100%; padding: 28px 24px; border: 1px solid #e6ecf5; border-radius: 12px;
    box-shadow: 0 5px 20px rgba(5, 27, 59, .04);
}
.feature-icon { font-size: 28px; line-height: 1; margin-bottom: 14px; }
.feature-title { font-size: 1.1rem; margin: 0 0 10px; }
.feature-text { margin: 0; font-size: .95rem; line-height: 1.65; color: #4a5568; }

.about-img { display: block; width: 100%; height: auto; border-radius: 16px; }

@media (max-width: 1100px) { .features-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) {
    .hero-section { padding-bottom: 36px; }
    .hero-section .hero-content { text-align: left; padding-bottom: 8px; }
    .cta-buttons .btn-hero { flex: 1 1 100%; }
    .features-grid { grid-template-columns: 1fr; }
    .feature-card { padding: 22px 20px; }
}

/* Ingredients: equal-height Supplement Facts cards that never overlap the button below */
.supp-col { display: flex; flex-direction: column; }
.supp-col .supp-facts { flex: 1 1 auto; }
.supp-col .supp-facts-img { max-width: 100%; height: auto; }

/* Products filter bar: wraps cleanly, buttons never leave the screen */
.filter-actions .btn { padding: 10px 20px; flex: 1 1 0; white-space: nowrap; }
@media (min-width: 992px) { .filter-actions .btn { flex: 0 1 auto; } }

/* ---------- Footer contact card: aligned rows, no stray dividers ---------- */
footer .contactinfo .row { row-gap: 18px; }
footer .contactinfo .d-flex { align-items: center; min-width: 0; }
footer .contactinfo .d-flex > div { min-width: 0; overflow-wrap: anywhere; }
footer .contactinfo p { margin: 0; }
footer .contactinfo p.small { margin-top: 2px; }
footer .contactinfo i { display: inline-flex; align-items: center; justify-content: center; line-height: 1; flex: 0 0 50px; }
@media (max-width: 767px) {
    footer .contactinfo .border-end { border-right: 0 !important; }
    footer .contactinfo .col-12:not(:last-child) { padding-bottom: 14px; border-bottom: 1px solid #e6ecf5; }
}
@media (min-width: 768px) {
    footer .contactinfo .d-flex { padding: 0 8px; }
}

/* ---------- Product page: buy buttons line up ---------- */
#addForm .btn { margin: 0 8px 8px 0; }
@media (max-width: 575px) {
    #addForm .btn { display: block; width: 100%; margin-right: 0; text-align: center; }
}

/* ---------- Cart: tidy spacing, stacked rows on phones (nothing clipped) ---------- */
.cart-lines + * { margin-top: 0; }
.table-responsive + .d-flex, .table-responsive ~ .d-flex { margin-top: 16px; }
@media (max-width: 575px) {
    .cart-lines thead { display: none; }
    .cart-lines, .cart-lines tbody { display: block; width: 100%; }
    .cart-lines tbody tr {
        display: grid; grid-template-columns: 64px 1fr auto; column-gap: 12px; row-gap: 6px;
        align-items: center; padding: 14px 0; border-bottom: 1px solid #dee2e6;
    }
    .cart-lines tbody td { display: block; padding: 0; border: 0; width: auto !important; }
    .cart-lines tbody td:nth-child(1) { grid-column: 1; grid-row: 1 / span 3; align-self: start; }
    .cart-lines tbody td:nth-child(2) { grid-column: 2 / 4; grid-row: 1; }
    .cart-lines tbody td:nth-child(3) { grid-column: 2; grid-row: 2; }
    .cart-lines tbody td:nth-child(3) input { max-width: 90px; }
    .cart-lines tbody td:nth-child(6) { grid-column: 3; grid-row: 2; text-align: right; }
    .cart-lines tbody td:nth-child(4) { grid-column: 2; grid-row: 3; text-align: left !important; color: #5b6573; }
    .cart-lines tbody td:nth-child(4)::after { content: " each"; }
    .cart-lines tbody td:nth-child(5) { grid-column: 3; grid-row: 3; text-align: right !important; font-weight: 700; }
}

/* ---------- Wide desktop: use the full screen width ---------- */
:root { --page-gutter: clamp(16px, 3vw, 64px); }

@media (min-width: 1200px) {
    /* style.css pins .container at 1140px; let it grow with the screen (up to 1800px) */
    .container { max-width: 1800px; padding-left: var(--page-gutter); padding-right: var(--page-gutter); }
    header .container.p-0 { padding-left: var(--page-gutter) !important; padding-right: var(--page-gutter) !important; }
    header .container.preheader { width: calc(100% - 2 * var(--page-gutter)); max-width: calc(1800px - 2 * var(--page-gutter)); padding-left: 12px; padding-right: 12px; }
    .hero-img { object-position: right center; }
    footer .container.contactinfo { max-width: calc(1800px - 2 * var(--page-gutter)); width: calc(100% - 2 * var(--page-gutter)); }

    .hero-img { max-height: 540px; }
    .about-img { max-height: 640px; object-fit: cover; }
    .featured-grid .product-image { aspect-ratio: 4 / 3; }
    .featured-grid { gap: 28px; }
    .category-grid { gap: 22px; }
    .category-card { min-height: 150px; }
}
@media (min-width: 1600px) {
    .featured-grid .product-image { aspect-ratio: 16 / 10; }
    .category-card { min-height: 168px; }
    .category-icon { font-size: 34px; }
}

/* Policy band on the homepage keeps its centered heading */
.testimonials-section .section-header { text-align: center; }

/* About page body matches the Terms page: full-width column, same heading and text style */
.policy-page.about-page h2 {
    font-family: 'Poppins', sans-serif; font-size: 1rem; font-weight: 700; line-height: 1.7;
    text-transform: uppercase; color: #1e2d3d; margin: 0 0 1rem;
}
.policy-page.about-page p, .policy-page.about-page li { font-size: 1rem; color: #1e2d3d; }
.policy-page.about-page ul { margin-bottom: 1rem; }
