@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ==========================================================================
   1. Variables
   ========================================================================== */

:root {
    --red:           #dc3545;
    --red-dark:      #c82333;
    --red-rgb:       220, 53, 69;
    --yellow:        #ffc107;
    --yellow-dark:   #e0a800;
    --dark:          #111;
    --dark-rgb:      17, 17, 17;
    --white:         #fff;
    --black:         #000;
    --light:         #f8f9fa;
    --gray:          #555;
    --border:        #eee;
    --faq-bg:        #fff5f5;
    --whatsapp:      #25D366;
    --whatsapp-dark: #1da851;
    --nav-bg:        #ca0815;
    --shadow-sm:     0 4px 15px rgba(0,0,0,0.06);
    --shadow-md:     0 12px 24px rgba(var(--red-rgb),0.2);
}

/* ==========================================================================
   1b. Promo Bar
   ========================================================================== */

.promo-bar {
    background-color: #f5f5f5;
    border-bottom: 1px solid #e5e5e5;
    color: var(--red);
    font-size: 0.85rem;
    letter-spacing: 0.02em;
}

/* ==========================================================================
   2. Base & Typography
   ========================================================================== */

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-weight: 400;
    line-height: 1.65;
    background: var(--white);
    color: #222;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.display-5 {
    font-size: 3.2rem !important;
    font-weight: 900 !important;
    letter-spacing: -1px;
}

.display-4 {
    font-size: 4rem !important;
    font-weight: 900 !important;
    letter-spacing: -1.2px;
}

.fs-2 { font-size: 2.5rem !important; }
.fs-3 { font-size: 1.75rem !important; }
.fs-4 { font-size: 1.5rem !important; }
.fs-5 { font-size: 1.25rem !important; }
.text-muted { color: #777 !important; }
.z-2 { z-index: 2; }
.pb-10 { padding-bottom: 10rem !important; }

section.py-6.bg-white {
    padding-bottom: 10rem !important;
}

ul.fs-5 {
    list-style: none;
    padding-left: 0;
}

ul.fs-5 li {
    margin-bottom: 1.5rem;
    padding-left: 1.8rem;
    position: relative;
}

ul.fs-5 li::before {
    content: "•";
    color: var(--yellow);
    position: absolute;
    left: 0;
    font-size: 1.4rem;
    line-height: 1.6;
}

ul.list-unstyled li::before {
    content: none;
}

/* ==========================================================================
   2b. Form element resets (no rounding)
   ========================================================================== */

input,
select,
textarea,
.form-control,
.form-select,
.input-group > *,
.btn {
    border-radius: 0 !important;
}

/* ==========================================================================
   3. Buttons
   ========================================================================== */

.btn-primary {
    background-color: var(--red);
    border-color: var(--red);
    color: var(--white);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--red-dark);
    border-color: var(--red-dark);
    color: var(--white);
}

.btn-outline-primary {
    color: var(--red);
    border-color: var(--red);
}

.btn-outline-primary:hover {
    background-color: var(--red);
    color: var(--white);
    border-color: var(--red);
}

.btn-hero {
    background: var(--yellow) !important;
    color: var(--black) !important;
    font-weight: 700;
    border: none;
    padding: 1.1rem 3rem;
    font-size: 1.3rem;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(255,193,7,0.3);
}

.btn-hero:hover {
    background: var(--yellow-dark) !important;
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(255,193,7,0.4);
}

.btn-red {
    background: var(--red) !important;
    color: var(--white) !important;
    font-weight: 700;
    border: none;
    padding: 1.1rem 3rem;
    font-size: 1.3rem;
    transition: all 0.3s ease;
}

.btn-red:hover {
    background: var(--red-dark) !important;
    transform: translateY(-4px);
}

.btn-yellow {
    background: var(--yellow) !important;
    color: var(--black) !important;
    font-weight: 700;
    padding: 1rem 2.5rem;
}

.btn-coral {
    background: #ff675b !important;
    color: #fff !important;
    font-weight: 700;
    border: none !important;
    border-radius: 5px !important;
    box-shadow: 0 5px 0 #cc3f34 !important;
    padding: 0.75rem 2rem;
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.btn-coral:hover {
    background: #ff4b3c !important;
    color: #fff !important;
    box-shadow: 0 3px 0 #cc3f34 !important;
    transform: translateY(2px);
}

/* ==========================================================================
   4. Navigation
   ========================================================================== */

.navbar-main {
    background-color: var(--nav-bg) !important;
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
}

.navbar-main .nav-link {
    color: var(--white) !important;
    font-weight: 600 !important;
    padding: 0.45rem 1.25rem !important;
}

.navbar-main .nav-link:hover,
.navbar-main .dropdown-toggle:hover {
    color: var(--white) !important;
    background: rgba(0,0,0,0.2) !important;
    border-radius: 6px;
}

.navbar-main .dropdown-menu {
    border: none;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-radius: 8px;
}

.navbar-main .dropdown-item:hover {
    background: var(--light);
    color: var(--red);
}

.offcanvas.bg-white {
    background: var(--white) !important;
}

.offcanvas .offcanvas-title {
    color: var(--black);
    font-weight: 700;
    font-size: 1.5rem;
}

.offcanvas .list-unstyled a {
    font-size: 1.2rem;
    padding: 1rem 0;
    display: block;
    border-bottom: 1px solid var(--border);
}

.offcanvas .list-unstyled a:last-child {
    border-bottom: none;
}

.top-header {
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.search-form .btn {
    background: var(--red);
    border: none;
}

.badge.bg-danger {
    background: var(--red) !important;
}

.js-cart-count {
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
}

/* ==========================================================================
   5. Hero
   ========================================================================== */

.hero {
    min-height: 85vh;
    background: url('/themes/clerkenwell/images/hero-bg.jpg') no-repeat center center / cover fixed;
    padding: 8rem 0;
}

@supports (-webkit-touch-callout: none) {
    /* iOS Safari: fixed attachment causes glitches */
    .hero {
        background-attachment: scroll;
    }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.75) 100%);
}

.hero-dark-overlay {
    background: rgba(0, 0, 0, 0.60);
    z-index: 1;
}

.text-shadow {
    text-shadow: 0 4px 15px rgba(0,0,0,0.8);
}

.opacity-90 {
    opacity: 0.9;
}

/* ==========================================================================
   5b. Breadcrumb
   ========================================================================== */

nav[aria-label="breadcrumb"] {
    background-color: #f5f5f5 !important;
    border-bottom: 1px solid #e8e8e8;
    padding-top: 0.6rem !important;
    padding-bottom: 0.6rem !important;
}

.breadcrumb {
    font-size: 0.85rem;
    margin-bottom: 0;
    padding: 0;
    background: transparent;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    color: #999;
}

.breadcrumb-item a {
    color: var(--dark);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: var(--nav-bg);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: #999;
}

/* ==========================================================================
   6. Category Blocks
   ========================================================================== */

.category-block {
    transition: all 0.35s ease;
}

.category-block .category-img {
    height: 340px;
    background-size: cover;
    background-position: center;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    transition: all 0.4s ease;
}

.category-img-inject { background-image: url('/themes/clerkenwell/images/inject.jpg'); }
.category-img-oral   { background-image: url('/themes/clerkenwell/images/oral.jpg'); }
.category-img-hgh    { background-image: url('/themes/clerkenwell/images/hgh.jpg'); }

.category-block:hover .category-img {
    transform: scale(1.07);
    box-shadow: 0 20px 50px rgba(0,0,0,0.18);
}

/* ==========================================================================
   7. Promo Banners
   ========================================================================== */

.promo-banner {
    display: block;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.promo-banner img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

.promo-banner:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.18);
    transform: translateY(-2px);
}

/* ==========================================================================
   8. Weight-Loss Banner
   ========================================================================== */

.banner-weight-loss {
    min-height: 65vh;
    background: var(--dark);
    padding: 10rem 0;
}

.banner-weight-loss::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(var(--dark-rgb),0.6), rgba(var(--red-rgb),0.35));
}

/* ==========================================================================
   8. Article Thumbnails
   ========================================================================== */

.article-thumb {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

/* ==========================================================================
   9. Product Card
   ========================================================================== */

.product-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.25s, box-shadow 0.25s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.product-img-wrap {
    position: relative;
    overflow: hidden;
}

.product-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    object-fit: contain;
    background: var(--light);
    padding: 15px;
    display: block;
    transition: transform 0.3s ease;
}

.product-card:hover .product-img {
    transform: scale(1.04);
}

.product-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 70px 10px 12px;
    background: linear-gradient(transparent, rgba(255,255,255,0.98) 40%);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.product-card:hover .product-actions {
    opacity: 1;
    transform: translateY(0);
}

.product-actions {
    text-align: center;
}

.product-actions .btn {
    background: var(--red) !important;
    color: #fff !important;
    border-color: var(--red) !important;
    font-weight: 600;
    width: auto !important;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.product-oos-label {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(30,30,30,0.72);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 3px 8px;
    border-radius: 3px;
    z-index: 5;
}

.product-caption {
    padding: 12px 12px 14px;
    text-align: center;
}

.product-caption h6 {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 4px;
}

.price {
    color: var(--red);
    font-weight: 700;
    font-size: 1.25rem;
}

.old-price {
    text-decoration: line-through;
    color: #999;
    font-size: 1rem;
    margin-left: 8px;
}

.stars {
    color: var(--yellow);
    font-size: 1rem;
}

.sale-badge {
    background: var(--red);
    color: var(--white);
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 4px;
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
}

/* ==========================================================================
   9. Product Gallery
   ========================================================================== */

.product-gallery .main-image {
    height: 450px;
    overflow: hidden;
    background: var(--light);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.product-gallery .main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.thumb {
    width: 100px;
    height: 100px;
    object-fit: contain;
    background: var(--light);
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 5px;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.2s;
}

.thumb.active,
.thumb:hover {
    opacity: 1;
    border-color: var(--red) !important;
    box-shadow: 0 0 0 3px rgba(var(--red-rgb),0.2);
}

/* ==========================================================================
   10. Catalog / Sidebar
   ========================================================================== */

.filter-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    background: var(--white);
}

.filter-title {
    background: var(--light);
    padding: 12px 18px;
    margin: 0;
    font-size: 1.1rem;
    cursor: pointer;
    font-weight: 600;
}

.filter-content {
    padding: 15px 18px;
}

.filter-link-item {
    padding: 6px 0;
    font-size: 0.95rem;
}

.filter-link-item.parent {
    font-weight: 600;
    margin-bottom: 4px;
}

.filter-link-item.child {
    font-weight: normal;
    color: var(--gray);
}

.filter-link-item a {
    color: inherit;
    display: block;
    transition: color 0.2s;
}

.filter-link-item a:hover,
.filter-link-item a.active {
    color: var(--red);
    text-decoration: underline;
}

.category-description {
    font-size: 1.1rem;
    color: var(--gray);
    line-height: 1.7;
}

/* ==========================================================================
   11. Pagination
   ========================================================================== */

.pagination {
    margin: 2.5rem 0 1.5rem !important;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

.page-item {
    margin: 0 !important;
}

.page-link,
.page-item.disabled .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1;
    border-radius: 10px;
    transition: all 0.18s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.page-link:hover {
    color: var(--red);
    border-color: var(--red);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--red-rgb),0.15);
}

.page-item.active .page-link {
    background-color: var(--red);
    border-color: var(--red);
    color: var(--white);
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(var(--red-rgb),0.3);
}

.page-item.disabled .page-link {
    color: #adb5bd;
    cursor: not-allowed;
    opacity: 0.75;
    box-shadow: none;
    transform: none;
}

/* ==========================================================================
   12. Cart
   ========================================================================== */

.cart-item {
    border-bottom: 1px solid var(--border);
    padding: 20px 0;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    background: var(--light);
    border-radius: 6px;
    flex-shrink: 0;
    padding: 4px;
}

.qty-input {
    width: 140px;
}

.qty-number {
    font-weight: bold;
    font-size: 1.1rem;
}

.cart-summary {
    position: static;
}

@media (min-width: 992px) {
    .cart-summary.sticky-top {
        position: sticky;
        top: 20px;
    }
}

/* ==========================================================================
   13. Checkout
   ========================================================================== */

.checkout-sticky {
    position: static;
}

@media (min-width: 992px) {
    .checkout-sticky {
        position: sticky;
        top: 20px;
    }
}

.checkout-item-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 1px solid var(--border);
}

.checkout-page .form-control,
.checkout-page .form-select {
    border-color: #e9ecef;
    transition: all 0.2s ease;
}

.checkout-page .form-control:focus,
.checkout-page .form-select:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(var(--red-rgb),0.08);
}

.checkout-page .card {
    box-shadow: none !important;
    border: none !important;
}

.checkout-page .alert-info {
    background: #fff8f8;
    border: none;
    border-left: 3px solid var(--red);
    color: var(--gray);
    font-size: 0.85rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
}

/* ==========================================================================
   14. Mini-cart
   ========================================================================== */

.mini-cart {
    display: none;
    position: absolute;
    top: 130%;
    right: 0;
    z-index: 1050;
    width: 320px;
    background: var(--white);
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    padding: 15px;
}

.mini-cart.show {
    display: block;
}

.mini-cart-item-img {
    width: 120px;
    height: 120px;
    object-fit: cover;
}

@media (max-width: 576px) {
    .mini-cart {
        width: 90vw;
        right: -10px;
    }
}

/* ==========================================================================
   15. Contact Page
   ========================================================================== */

.contact-card-header {
    background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
}

.contact-card-header h1 {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
}

.text-brand-dark { color: var(--dark); }

/* ==========================================================================
   16. FAQ Page
   ========================================================================== */

.faq-header {
    background: var(--faq-bg);
    padding: 60px 0 40px;
    text-align: center;
}

.faq-item .accordion-button {
    font-weight: 600;
    padding: 1.25rem 1.5rem;
    background: var(--white);
}

.faq-item .accordion-button:not(.collapsed) {
    background: var(--faq-bg);
    color: var(--red-dark);
    box-shadow: none;
}

.faq-item .accordion-body {
    padding: 1.5rem;
    background: #f9f9f9;
}

/* ==========================================================================
   17. Order Confirmation
   ========================================================================== */

.order-summary-header {
    background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
    color: var(--white) !important;
    font-weight: 700;
    padding: 1rem 1.5rem;
    border-radius: 10px 10px 0 0;
}

/* ==========================================================================
   18. Account Pages
   ========================================================================== */

.order-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.order-header {
    background: var(--light);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.order-body {
    padding: 1.5rem;
}

.order-item-img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    background: var(--light);
    border-radius: 6px;
}

.status-badge {
    font-size: 0.9rem;
    padding: 0.5em 1em;
}

/* ==========================================================================
   19. Toast Notifications
   ========================================================================== */

.toast {
    min-width: 280px;
    max-width: 400px;
    z-index: 1055;
    border-radius: 8px;
}

.toast.bg-danger {
    background-color: var(--red) !important;
}

/* ==========================================================================
   20. Error Page
   ========================================================================== */

.error-page {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
}

.error-code {
    font-size: 8rem;
    font-weight: 900;
    line-height: 1;
    color: var(--red);
    margin: 0;
}

.error-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 1rem 0 1.5rem;
}

/* ==========================================================================
   21. Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .hero {
        min-height: 70vh;
        padding: 4rem 0;
        background-attachment: scroll;
    }

    .banner-weight-loss {
        min-height: auto;
        padding: 4rem 0;
    }

    .display-3 {
        font-size: 2rem !important;
    }

    .display-4 {
        font-size: 1.8rem !important;
    }

    .display-5 {
        font-size: 1.5rem !important;
    }

    .checkout-page .card-body {
        padding: 1.5rem !important;
    }
}

@media (max-width: 576px) {
    .hero {
        min-height: 60vh;
        padding: 3rem 0;
    }

    .promo-bar small {
        font-size: 0.75rem;
    }

    .pagination {
        gap: 4px;
        margin: 1.5rem 0 1rem !important;
    }

    .page-link,
    .page-item.disabled .page-link {
        min-width: 34px;
        height: 34px;
        font-size: 0.9rem;
        padding: 0 8px;
    }

    .category-block .category-img {
        height: 200px;
    }

    .product-caption h6 {
        font-size: 0.85rem;
    }

    .promo-banner img {
        height: 120px;
    }
}

/* ==========================================================================
   22. Accessibility
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .product-card:hover,
    .category-block:hover .category-img,
    .btn-hero:hover,
    .btn-red:hover {
        transform: none;
    }
}

.whatsapp-header-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    opacity: 0.92;
}
.whatsapp-header-link:hover {
    color: var(--white);
    opacity: 1;
}
