:root {
    --primary: #ff6a00;
    --dark: #17202a;
    --muted: #6b7280;
    --background: #f5f6f8;
    --white: #ffffff;
    --border: #e5e7eb;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: var(--background);
    color: var(--dark);
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1240px;
    margin: auto;
    padding: 0 18px;
    margin-top: 100px;
}


/* HEADER */

.topbar {
    background: #fff;
    border-bottom: 1px solid var(--border);
}

.topbar-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    gap: 25px;
}

.brand {
    font-size: 24px;
    font-weight: 900;
    min-width: 190px;
}

.brand span span {
    color: var(--primary);
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    background: var(--primary);
    color: white;
    border-radius: 10px;
    margin-right: 6px;
}


/* SEARCH */

.search {
    flex: 1;
    display: flex;
    max-width: 700px;
    border: 2px solid var(--primary);
    border-radius: 8px;
    overflow: hidden;
}

.search input {
    flex: 1;
    border: none;
    outline: none;
    padding: 13px;
    font-size: 14px;
}

.search button {
    border: none;
    background: var(--primary);
    color: white;
    padding: 0 22px;
    font-weight: bold;
}


/* HEADER ACTIONS */

.header-actions {
    display: flex;
    gap: 20px;
    margin-left: auto;
}

.head-action {
    font-weight: bold;
    position: relative;
}

.cart-link b {
    position: absolute;
    top: -12px;
    right: -13px;
    background: var(--primary);
    color: white;
    border-radius: 20px;
    padding: 2px 6px;
    font-size: 10px;
}


/* NAVIGATION */

.nav {
    background: white;
}

.nav-inner {
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 30px;
    font-size: 14px;
    font-weight: bold;
}

.all-categories {
    background: var(--dark);
    color: white;
    padding: 9px 15px;
    border-radius: 5px;
}


/* HERO */

.hero-wrap {
    display: grid;
    grid-template-columns: 245px 1fr;
    gap: 15px;
    margin-top: 120px;
}

.category-menu {
    background: white;
    border-radius: 10px;
    padding: 12px;
}

.category-menu h3 {
    margin: 7px 10px 12px;
}

.category-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 6px;
}

.category-menu a:hover {
    background: #fff2e9;
    color: var(--primary);
}

.category-menu b {
    margin-left: auto;
}


/* SLIDER */

.hero-slider {
    height:60vh;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: #222;
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    background-size: cover;
    background-position: center;
    transition: opacity .5s;
}

.slide.active {
    opacity: 1;
}

.slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            90deg,
            rgba(0,0,0,.65),
            transparent
        );
}

.slide-content {
    position: relative;
    z-index: 2;
    color: white;
    padding: 65px 55px;
    max-width: 600px;
}

.slide-content h1 {
    font-size: 42px;
    margin: 15px 0;
}

.slide-content p {
    line-height: 1.6;
}

.badge {
    display: inline-block;
    background: var(--primary);
    padding: 7px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
}

.btn {
    display: inline-block;
    padding: 12px 20px;
    border: none;
    border-radius: 7px;
    font-weight: bold;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-light {
    background: white;
    color: var(--primary);
}

.slider-arrow {
    position: absolute;
    z-index: 5;
    top: 45%;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: white;
    font-size: 27px;
}

.slider-arrow.prev {
    left: 15px;
}

.slider-arrow.next {
    right: 15px;
}

.dots {
    position: absolute;
    bottom: 15px;
    z-index: 5;
    left: 0;
    right: 0;
    text-align: center;
}

.dots button {
    width: 8px;
    height: 8px;
    border: none;
    border-radius: 50%;
    margin: 4px;
    background: white;
    opacity: .6;
}

.dots button.active {
    width: 22px;
    border-radius: 5px;
    opacity: 1;
}


/* QUICK FEATURES */

.quick-cards {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 12px;
    margin: 18px 0;
}

.quick-cards > div {
    background: white;
    border-radius: 9px;
    padding: 17px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.quick-cards span {
    color: var(--muted);
    font-size: 12px;
}


/* PRODUCTS */

.section {
    margin: 35px 0;
}

.section-head {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 18px;
}

.section-head > div:first-child {
    flex: 1;
}

.section-head h2 {
    margin: 4px 0;
}

.section-head a {
    color: var(--primary);
    font-weight: bold;
}

.eyebrow {
    color: var(--primary);
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 1px;
}

.countdown {
    background: var(--dark);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: bold;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 15px;
}

.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    transition: .2s;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,.08);
}

.product-image {
    height: 220px;
    display: block;
    position: relative;
    background: #fafafa;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sale-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ffe7da;
    color: var(--primary);
    padding: 5px 8px;
    font-size: 11px;
    font-weight: bold;
    z-index: 2;
}

.wishlist {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
    cursor: pointer;
    font-size: 19px;
}

.wishlist.active {
    color: red;
}

.product-info {
    padding: 13px;
}

.rating {
    color: #f59e0b;
    font-size: 12px;
}

.rating span {
    color: #999;
}

.product-name {
    display: block;
    margin: 8px 0;
    line-height: 1.4;
    height: 40px;
    overflow: hidden;
}

.price-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-row strong {
    font-size: 18px;
}

.price-row del {
    color: #999;
    font-size: 12px;
}

.sold {
    color: #888;
    font-size: 11px;
    margin: 6px 0 10px;
}

.add-form {
    margin: 0;
}

.add-cart {
    width: 100%;
    padding: 9px;
    background: white;
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
}

.add-cart:hover {
    background: var(--primary);
    color: white;
}


/* CATEGORY */

.category-grid {
    display: grid;
    grid-template-columns: repeat(6,1fr);
    gap: 14px;
}

.category-card {
    background: white;
    text-align: center;
    border-radius: 10px;
    padding: 22px;
}

.category-icon {
    font-size: 36px;
    margin-bottom: 10px;
}

.category-card span {
    display: block;
    color: #888;
    font-size: 11px;
    margin-top: 5px;
}


/* PROMO */

.promo-strip {
    background:
        linear-gradient(
            110deg,
            #17202a,
            #34495e
        );

    color: white;
    border-radius: 12px;
    padding: 32px 40px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.promo-strip h2 {
    margin: 7px 0;
}


/* FOOTER */

.footer {
    background: #17202a;
    color: #dbe2e8;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding: 45px 18px;
}

.footer h3,
.footer h4 {
    color: white;
}

.footer-grid a {
    display: block;
    color: #aeb8c2;
    margin: 10px 0;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding: 18px;
    text-align: center;
    font-size: 12px;
}

/* =========================================================
   MOBILE MARKETPLACE HEADER
   ========================================================= */

@media (max-width: 768px) {

    .topbar-inner {
        min-height: auto;
        padding-top: 12px;
        padding-bottom: 12px;
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 12px;
    }

    .brand {
        min-width: auto;
        font-size: 20px;
    }

    .brand-mark {
        width: 34px;
        height: 34px;
    }

    .search {
        grid-column: 1 / -1;
        width: 100%;
        max-width: none;
        order: 3;
    }

    .search input {
        min-width: 0;
        padding: 11px;
    }

    .search button {
        padding: 0 14px;
        font-size: 0;
    }

    .search button::after {
        content: "🔍";
        font-size: 16px;
    }

    .header-actions {
        gap: 12px;
    }

    .head-action {
        font-size: 0;
    }

    .head-action:first-child::before {
        content: "👤";
        font-size: 21px;
    }

    .cart-link::before {
        content: "🛒";
        font-size: 21px;
    }

    .cart-link b {
        top: -7px;
        right: -7px;
    }

    .nav {
        overflow-x: auto;
    }

    .nav-inner {
        width: max-content;
        min-height: 44px;
        gap: 18px;
        padding-left: 12px;
        padding-right: 12px;
    }

    .nav-inner a {
        white-space: nowrap;
    }

    .all-categories {
        padding: 7px 11px;
    }

    .hero-wrap {
        grid-template-columns: 1fr;
    }

    .category-menu {
        display: none;
    }

    .hero-slider {
        height: 300px;
    }

    .slide-content {
        padding: 40px 30px;
    }

    .slide-content h1 {
        font-size: 28px;
    }

    .slide-content p {
        font-size: 13px;
    }

    .quick-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 9px;
    }

    .product-image {
        height: 165px;
    }

    .product-info {
        padding: 10px;
    }

    .product-name {
        font-size: 13px;
    }

    .price-row strong {
        font-size: 15px;
    }

    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .category-card {
        padding: 14px 7px;
    }

    .category-icon {
        font-size: 27px;
    }

    .promo-strip {
        padding: 25px 20px;
        display: block;
    }

    .promo-strip .btn {
        margin-top: 15px;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 30px 18px;
    }

}


@media (max-width: 430px) {

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-image {
        height: 145px;
    }

    .quick-cards {
        gap: 7px;
    }

    .quick-cards > div {
        padding: 12px;
        font-size: 12px;
    }

    .section-head h2 {
        font-size: 20px;
    }

    .countdown {
        font-size: 11px;
        padding: 6px;
    }

}

/* =========================================================
   STICKY MARKETPLACE HEADER
   ========================================================= */

/* Keep the whole header above page content */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}


/* Make sure header layers remain visible */
.site-header .topbar {
    background: #fff;
}

.site-header .nav {
    background: #fff;
}


/* Keep dropdowns and menus above content */
.site-header * {
    z-index: 1;
}


/* Search stays visible on desktop */
.site-header .search {
    position: relative;
}


/* Mobile sticky header */
@media (max-width: 768px) {

    .site-header {
        position: sticky;
        top: 0;
        z-index: 1000;
    }

    .topbar-inner {
        padding-top: 8px;
        padding-bottom: 8px;
    }

    /*
       Keep mobile search accessible
       while scrolling
    */

    .search {
        position: relative;
        z-index: 5;
    }

    /*
       Horizontal category navigation
       remains inside the sticky header
    */

    .nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .nav-inner {
        white-space: nowrap;
    }

}


/* Prevent accidental horizontal overflow */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}


/* Fixed topbar */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 2000;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

/* Push page content below fixed topbar */
body {
    padding-top: 70px;
}

/* Navigation scrolls normally */
.nav {
    position: relative;
    z-index: 100;
}

/* Mobile */
@media (max-width: 768px) {
    .topbar {
        position: fixed;
        top: 0;
    }

    body {
        padding-top: 115px;
    }
}