/* ==========================================================
   X3ME FITNESS WEBSITE
   STYLE.CSS — PRODUCTION READY
========================================================== */

/* ==========================================================
   RESET
========================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Poppins', sans-serif;
    background: #0d0d0d;
    color: #ffffff;
    overflow-x: hidden;
    line-height: 1.6;
}
img { width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ==========================================================
   VARIABLES
========================================================== */
:root {
    --background: #6f6e6e;
    --card: #454343;
    --white: #ffffff;
    --light: #d9d9d9;
    --accent: #ffffff;
    --border: #2d2d2d;
    --shadow: 0 20px 40px rgba(0,0,0,.35);
    --radius: 18px;
    --transition: .35s;
}

/* ==========================================================
   GENERAL CONTAINERS
========================================================== */
section { padding: 100px 8%; }
.section-title { text-align: center; margin-bottom: 60px; }
.section-title h2 { font-size: 42px; margin-bottom: 15px; }
.section-title p { color: #bbbbbb; max-width: 650px; margin: auto; }

/* ==========================================================
   BUTTONS
========================================================== */
.primary-btn {
    display: inline-block;
    padding: 16px 38px;
    background: white;
    color: black;
    border-radius: 50px;
    font-weight: 700;
    transition: .3s;
    margin-right: 15px;
}
.primary-btn:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(255,255,255,.15); }
.secondary-btn {
    display: inline-block;
    padding: 16px 38px;
    border: 2px solid white;
    border-radius: 50px;
    transition: .3s;
}
.secondary-btn:hover { background: white; color: black; }

/* ==========================================================
   NAVIGATION
========================================================== */
header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 999;
    background: rgba(13,13,13,.85);
    backdrop-filter: blur(12px);
}
.navbar {
    width: 90%;
    margin: auto;
    height: 90px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
}
.logo a { font-size: 34px; font-weight: 800; letter-spacing: 2px; }
.nav-links { display: flex; gap: 35px; }
.nav-links a { transition: .3s; font-weight: 500; }
.nav-links a:hover { color: #bbbbbb; }
.shop-btn {
    background: white;
    color: black;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 700;
    transition: .3s;
}
.shop-btn:hover { transform: translateY(-4px); }

/* ==========================================================
   HAMBURGER
========================================================== */
.hamburger {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.8rem;
    cursor: pointer;
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* ==========================================================
   HERO SECTION
========================================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}
.hero-image {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(0,0,0,.72), rgba(0,0,0,.72));
}
.hero-content {
    position: relative;
    z-index: 5;
    width: 85%;
    max-width: 700px;
}
.tagline {
    letter-spacing: 5px;
    color: #bbbbbb;
    margin-bottom: 20px;
    text-transform: uppercase;
}
.hero h1 {
    font-size: 72px;
    line-height: 1.05;
    margin-bottom: 25px;
    font-weight: 800;
}
.hero-description {
    font-size: 19px;
    color: #d0d0d0;
    margin-bottom: 45px;
    max-width: 600px;
}
.hero-buttons { display: flex; flex-wrap: wrap; gap: 20px; }

/* ==========================================================
   HERO ANIMATION
========================================================== */
.hero-content { animation: fadeUp 1.2s ease; }
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(60px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================
   IMAGE EFFECT
========================================================== */
.hero-image { transform: scale(1.05); transition: 8s; }
.hero:hover .hero-image { transform: scale(1.1); }

/* ==========================================================
   SECTION SPACING
========================================================== */
.categories, .features, .products, .about, .reviews, .instagram, .cta { background: #0d0d0d; }

/* ==========================================================
   SCROLLBAR
========================================================== */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-thumb { background: #555; border-radius: 20px; }
::-webkit-scrollbar-track { background: #111; }

/* ==========================================================
   FEATURED CATEGORIES
========================================================== */
.category-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 35px; }
.category-card {
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: var(--transition);
    box-shadow: var(--shadow);
}
.category-card:hover { transform: translateY(-12px); border-color: white; }
.category-card img { height: 260px; object-fit: cover; transition: .5s; }
.category-card:hover img { transform: scale(1.08); }
.category-content { padding: 30px; }
.category-content h3 { font-size: 28px; margin-bottom: 15px; }
.category-content p { color: #bbbbbb; margin-bottom: 25px; line-height: 1.8; }
.category-content a { font-weight: 700; color: white; transition: .3s; }
.category-content a:hover { padding-left: 10px; }

/* ==========================================================
   WHY CHOOSE X3ME
========================================================== */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.feature-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 40px 30px;
    text-align: center;
    border: 1px solid var(--border);
    transition: .35s;
}
.feature-card:hover { transform: translateY(-10px); border-color: white; }
.feature-card i { font-size: 50px; margin-bottom: 25px; }
.feature-card h3 { margin-bottom: 15px; font-size: 25px; }
.feature-card p { color: #bdbdbd; line-height: 1.8; }

/* ==========================================================
   PRODUCT CARDS (shared) – smaller cards, 4 per row on desktop
========================================================== */
.product-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); 
    gap: 25px; 
}
.product-card {
    background: var(--card);
    border-radius: 20px;
    overflow: hidden;
    transition: .35s;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}
.product-card:hover { transform: translateY(-12px); border-color: white; }
.product-card img { height: 260px; object-fit: cover; transition: .5s; }
.product-card:hover img { transform: scale(1.05); }
.product-info { padding: 22px; }
.product-info h3 { font-size: 28px; margin-bottom: 12px; }
.product-info p { color: #bdbdbd; margin-bottom: 25px; }
.product-info a {
    display: inline-block;
    background: white;
    color: black;
    padding: 14px 30px;
    border-radius: 40px;
    font-weight: 700;
    transition: .3s;
}
.product-info a:hover { transform: translateY(-4px); }
.product-card { position: relative; }
.product-card::after {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 260px;
    background: linear-gradient(transparent, rgba(0,0,0,.18));
    pointer-events: none;
}
.feature-card i { transition: .35s; }
.feature-card:hover i { transform: scale(1.15) rotate(-8deg); }
.category-card img { filter: brightness(.92); }
.category-card:hover img { filter: brightness(1); }
.product-info a { box-shadow: 0 10px 25px rgba(255,255,255,.08); }
.products .section-title h2, .features .section-title h2, .categories .section-title h2 { font-weight: 800; letter-spacing: 1px; }
.category-card, .feature-card, .product-card { backdrop-filter: blur(18px); }
.category-card, .feature-card, .product-card {
    transition: transform .35s, border .35s, box-shadow .35s;
}
.category-card:hover, .feature-card:hover, .product-card:hover { box-shadow: 0 25px 60px rgba(0,0,0,.45); }
.category-content a, .product-info a { margin-top: 10px; }
.products { padding-top: 110px; }
.features { padding-top: 110px; }
.categories { padding-top: 110px; }

/* ==========================================================
   ABOUT SECTION
========================================================== */
.about { background: #111; }
.about-container { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center; }
.about-image { overflow: hidden; border-radius: 20px; box-shadow: var(--shadow); }
.about-image img { transition: .6s; }
.about-image:hover img { transform: scale(1.08); }
.about-content h2 { font-size: 48px; margin-bottom: 25px; }
.about-content p { color: #c9c9c9; margin-bottom: 25px; line-height: 1.9; font-size: 17px; }
.about-content .primary-btn { margin-top: 15px; }

/* ==========================================================
   REVIEWS
========================================================== */
.review-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.review-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 35px;
    transition: .35s;
    box-shadow: var(--shadow);
}
.review-card:hover { transform: translateY(-10px); border-color: white; }
.review-card p { margin: 25px 0; color: #cfcfcf; line-height: 1.9; font-style: italic; }
.review-card h4 { color: white; font-size: 18px; }
.review-card::before { content: "★★★★★"; display: block; color: #FFD700; font-size: 20px; letter-spacing: 3px; }

/* ==========================================================
   INSTAGRAM SECTION
========================================================== */
.instagram { text-align: center; background: linear-gradient(180deg, #0d0d0d, #181818); }
.instagram h2 { font-size: 48px; margin-bottom: 20px; }
.instagram p { color: #cfcfcf; max-width: 650px; margin: 0 auto 40px; font-size: 18px; }

/* ==========================================================
   CTA SECTION
========================================================== */
.cta { text-align: center; background: white; color: black; }
.cta h2 { font-size: 56px; margin-bottom: 20px; font-weight: 800; }
.cta p { max-width: 650px; margin: auto; margin-bottom: 45px; font-size: 20px; color: #444; }
.cta .primary-btn { background: black; color: white; }
.cta .primary-btn:hover { background: #222; }

/* ==========================================================
   FOOTER
========================================================== */
footer { background: #080808; padding: 80px 8% 30px; }
.footer-container { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 50px; margin-bottom: 50px; }
.footer-container h3 { margin-bottom: 20px; font-size: 24px; }
.footer-container p { color: #bdbdbd; line-height: 1.8; }
.footer-container ul li { margin-bottom: 15px; }
.footer-container ul li a { color: #bdbdbd; transition: .3s; }
.footer-container ul li a:hover { color: white; padding-left: 8px; }
.copyright { border-top: 1px solid #222; padding-top: 25px; text-align: center; color: #888; font-size: 15px; }

/* ==========================================================
   CART SIDEBAR
========================================================== */
.cart-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 999; display: none; }
.cart-overlay.open { display: block; }
.cart-sidebar {
    position: fixed; top: 0; right: -420px; width: 400px; max-width: 90%; height: 100vh;
    background: #111; z-index: 1000; transition: right .3s; display: flex; flex-direction: column;
    border-left: 1px solid #222;
}
.cart-sidebar.open { right: 0; }
.cart-header { display: flex; justify-content: space-between; padding: 20px; border-bottom: 1px solid #222; }
.cart-close { background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; }
.cart-items { flex: 1; overflow-y: auto; padding: 20px; }
.cart-item { display: flex; gap: 15px; margin-bottom: 20px; align-items: center; }
.cart-item img { width: 60px; height: 60px; object-fit: cover; border-radius: 10px; }
.cart-item-info h4 { font-size: 0.95rem; }
.qty-controls { display: flex; align-items: center; gap: 10px; margin-top: 5px; }
.qty-controls button { background: #222; border: none; color: #fff; width: 25px; height: 25px; border-radius: 50%; cursor: pointer; }
.cart-remove { background: none; border: none; color: #ff4444; font-size: 1.2rem; cursor: pointer; }
.cart-footer { padding: 20px; border-top: 1px solid #222; background: #111; position: sticky; bottom: 0; }
.cart-total { font-size: 1.3rem; font-weight: 700; margin-bottom: 15px; }

/* ==========================================================
   CHECKOUT MODAL
========================================================== */
.checkout-modal {
    position: fixed; inset: 0; background: rgba(0,0,0,.85); z-index: 2000;
    display: none; justify-content: center; align-items: center;
}
.checkout-content {
    background: #111; padding: 40px; border-radius: 20px; width: 500px; max-width: 90%;
}
.checkout-content input, .checkout-content textarea, .checkout-content select {
    width: 100%; padding: 15px; margin-bottom: 15px; background: #222; border: none;
    border-radius: 10px; color: #fff; font-family: 'Poppins', sans-serif;
}
.total-line { font-size: 1.4rem; font-weight: 700; margin-bottom: 20px; }

/* ==========================================================
   FILTER BUTTONS (capsule)
========================================================== */
.filter-btn {
    padding: 12px 28px;
    border-radius: 50px;
    border: 2px solid #444;
    background: #fff;
    color: #000;
    font-weight: 600;
    cursor: pointer;
    transition: .3s;
    font-family: 'Poppins', sans-serif;
}
.filter-btn.active,
.filter-btn:hover {
    background: #000;
    color: #fff;
    border-color: #000;
}

/* ==========================================================
   PRODUCT PAGE HEADER – SEARCH & CART
========================================================== */
.search-toggle {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 8px;
}
.search-bar {
    display: flex;
    align-items: center;
    max-width: 0;
    overflow: hidden;
    transition: max-width 0.35s ease, padding 0.35s ease;
    white-space: nowrap;
}
.search-bar.expanded {
    max-width: 250px;
    padding: 0 10px;
}
.search-bar input {
    background: #222;
    border: none;
    color: #fff;
    padding: 8px 12px;
    border-radius: 50px;
    width: 100%;
    font-family: 'Poppins', sans-serif;
}
.search-close {
    background: none;
    border: none;
    color: #aaa;
    font-size: 1rem;
    cursor: pointer;
    margin-left: 5px;
}
.cart-icon-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    background: transparent;
    border: 2px solid #fff;
    color: #fff;
    border-radius: 50px;
    padding: 0 15px;
    cursor: pointer;
}
.cart-icon-btn #cartCount {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4444;
    color: #fff;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================
   TOAST ANIMATION
========================================================== */
@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(20px); }
    10% { opacity: 1; transform: translateY(0); }
    90% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-10px); }
}

/* ==========================================================
   PRODUCT DETAIL MODAL
========================================================== */
.product-detail-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 3000;
    display: none; justify-content: center; align-items: center;
}
.product-detail-modal {
    background: #111; padding: 30px; border-radius: 20px;
    width: 500px; max-width: 90%; max-height: 90vh; overflow-y: auto;
    position: relative;
}
.detail-close {
    position: absolute; top: 10px; right: 15px;
    font-size: 1.5rem; color: #fff; cursor: pointer;
}

/* ==========================================================
   MOBILE HEADER FIX – single row, no wrapping
========================================================== */
@media (max-width: 768px) {
    .navbar {
        flex-wrap: nowrap;
        gap: 10px;
        padding: 0 5%;
        height: 80px;
    }
    .logo a {
        font-size: 22px;
        letter-spacing: 1px;
    }
    .nav-links {
        display: none;
    }
    .nav-links.open {
        display: flex;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: #111;
        flex-direction: column;
        text-align: center;
        padding: 20px 0;
        z-index: 99;
    }
    .header-actions {
        gap: 5px;
    }
    .shop-btn {
        padding: 6px 12px;
        font-size: 12px;
        white-space: nowrap;
    }
    .hamburger {
        display: block;
    }
}

/* ==========================================================
   GENERAL RESPONSIVE ADJUSTMENTS
========================================================== */
@media (max-width: 992px) {
    .navbar { width: 94%; }
    .nav-links { gap: 20px; }
    .hero h1 { font-size: 56px; }
    .hero-description { font-size: 17px; }
    .about-container { grid-template-columns: 1fr; }
    .about-image { order: -1; }
    .footer-container { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    section { padding: 70px 6%; }
    .hero { min-height: 90vh; }
    .hero-content { width: 95%; text-align: center; }
    .hero h1 { font-size: 42px; }
    .hero-description { font-size: 16px; }
    .hero-buttons { justify-content: center; }
    .section-title h2 { font-size: 34px; }
    .section-title p { font-size: 16px; }
    .category-container { grid-template-columns: 1fr; }
    .feature-grid { grid-template-columns: 1fr; }
    .product-grid { grid-template-columns: 1fr; }
    .review-grid { grid-template-columns: 1fr; }
    .instagram h2 { font-size: 36px; }
    .cta h2 { font-size: 40px; }
    .footer-container { grid-template-columns: 1fr; text-align: center; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 34px; }
    .hero-description { font-size: 15px; }
    .primary-btn, .secondary-btn { width: 100%; margin-right: 0; text-align: center; }
    .category-content, .product-info, .review-card { padding: 22px; }
    .about-content h2 { font-size: 34px; }
    .instagram h2 { font-size: 30px; }
    .cta h2 { font-size: 32px; }
    .cart-sidebar { width: 100%; right: -100%; }
}

/* ==========================================================
   UTILITY & FINAL TOUCHES
========================================================== */
img { max-width: 100%; height: auto; }
input, textarea, button { font-family: 'Poppins', sans-serif; }
button, a { -webkit-tap-highlight-color: transparent; }
a, button, img, .category-card, .product-card, .feature-card, .review-card { transition: all .35s ease; }
p { letter-spacing: .2px; }
img { user-select: none; -webkit-user-drag: none; }
a:focus, button:focus { outline: 2px solid white; outline-offset: 4px; }
.fade-in { opacity: 0; transform: translateY(40px); transition: 1s; }
.fade-in.show { opacity: 1; transform: translateY(0); }
.container { width: 90%; max-width: 1280px; margin: auto; }
body { text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }

/* ==========================================================
   END OF STYLE.CSS
========================================================== */