* {
    box-sizing: border-box;
}

:root {
    --primary: #ff6b00;
    --primary-dark: #e85f00;
    --primary-light: #fff3eb;
    --dark: #111827;
    --text: #374151;
    --muted: #6b7280;
    --border: #e5e7eb;
    --background: #f7f8fa;
    --white: #ffffff;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--dark);
    font-family: Arial, Helvetica, sans-serif;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.home-page {
    width: 100%;
}

/* =========================================
   COMMON
========================================= */

.section-container {
    width: min(1400px, 92%);
    margin: 0 auto;
}

.section-label {
    display: inline-block;
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 25px;
}

.section-heading h2,
.products-header h2 {
    margin: 6px 0 0;
    font-size: 28px;
}

.section-heading a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

/* =========================================
   HERO
========================================= */

.hero-section {
    background:
        radial-gradient(
            circle at 80% 20%,
            rgba(255, 107, 0, 0.15),
            transparent 35%
        ),
        #111827;
    color: white;
    overflow: hidden;
}

.hero-container {
    width: min(1400px, 92%);
    min-height: 500px;
    margin: auto;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 50px;
    padding: 70px 0;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid rgba(255,255,255,.15);
    background: rgba(255,255,255,.07);
    border-radius: 50px;
    font-size: 13px;
}

.hero-badge i {
    color: #ff8b3d;
}

.hero-content h1 {
    max-width: 700px;
    margin: 22px 0 15px;
    font-size: clamp(42px, 5vw, 70px);
    line-height: 1.05;
    letter-spacing: -2px;
}

.hero-content h1 span {
    color: #ff7b21;
}

.hero-content > p {
    max-width: 600px;
    margin: 0 0 30px;
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.7;
}

.hero-search {
    max-width: 650px;
    height: 62px;
    display: flex;
    align-items: center;
    background: white;
    border-radius: 14px;
    padding: 6px;
}

.hero-search i {
    margin-left: 18px;
    color: #9ca3af;
}

.hero-search input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: none;
    outline: none;
    padding: 0 15px;
    color: var(--dark);
}

.hero-search button {
    height: 100%;
    padding: 0 25px;
    border: none;
    border-radius: 10px;
    background: var(--primary);
    color: white;
    font-weight: 600;
}

.hero-search button:hover {
    background: var(--primary-dark);
}

.popular-searches {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    color: #94a3b8;
    font-size: 13px;
}

.popular-searches button {
    border: none;
    background: transparent;
    color: #e2e8f0;
    text-decoration: underline;
}

/* =========================================
   HERO VISUAL
========================================= */

.hero-visual {
    position: relative;
    height: 370px;
}

.hero-circle {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 107, 0, .2);
}

.hero-circle-one {
    width: 330px;
    height: 330px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.hero-circle-two {
    width: 240px;
    height: 240px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.hero-card {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.hero-card-main {
    width: 280px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 20px;
    backdrop-filter: blur(20px);
}

.hero-card-icon {
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    border-radius: 15px;
    font-size: 22px;
}

.hero-card-main strong,
.hero-card-main span {
    display: block;
}

.hero-card-main span {
    margin-top: 5px;
    color: #94a3b8;
    font-size: 13px;
}

.floating-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 18px;
    background: white;
    color: var(--dark);
    border-radius: 15px;
    box-shadow: 0 15px 40px rgba(0,0,0,.25);
}

.floating-card i {
    color: var(--primary);
}

.floating-card strong,
.floating-card span {
    display: block;
}

.floating-card span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.floating-card-top {
    top: 40px;
    right: 10px;
}

.floating-card-bottom {
    bottom: 30px;
    left: 0;
}

/* =========================================
   CATEGORIES
========================================= */

.categories-section {
    padding: 60px 0 30px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 15px;
}

.category-card {
    min-height: 120px;
    border: 1px solid var(--border);
    background: white;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text);
    transition: .25s;
}

.category-card:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0,0,0,.06);
}

.category-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 14px;
    font-size: 20px;
}

/* =========================================
   MARKETPLACE
========================================= */

.marketplace-section {
    padding: 40px 0 70px;
}

.marketplace-layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 30px;
    align-items: start;
}

/* =========================================
   FILTER
========================================= */

.filter-sidebar {
    position: sticky;
    top: 20px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 20px;
}

.filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.filter-header h3 {
    margin: 0;
    display: flex;
    gap: 8px;
    align-items: center;
}

.filter-header h3 i {
    color: var(--primary);
}

.filter-header button {
    border: none;
    background: none;
    color: var(--primary);
    font-size: 13px;
}

.filter-group {
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}

.filter-group:last-child {
    border-bottom: none;
}

.filter-group h4 {
    margin: 0 0 12px;
}

.filter-search {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0 10px;
}

.filter-search i {
    color: #9ca3af;
}

.filter-search input {
    width: 100%;
    height: 42px;
    border: none;
    outline: none;
    padding-left: 8px;
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 7px;
}

.price-inputs input {
    width: 100%;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0 8px;
    outline: none;
}

.apply-filter {
    width: 100%;
    margin-top: 10px;
    height: 40px;
    border: none;
    border-radius: 8px;
    background: var(--primary);
    color: white;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
}

.checkbox-row input {
    accent-color: var(--primary);
}

.filter-group select {
    width: 100%;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 0 10px;
    outline: none;
}

/* =========================================
   PRODUCTS HEADER
========================================= */

.products-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 25px;
}

.products-header p {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.mobile-filter-btn {
    display: none;
}

/* =========================================
   PRODUCT GRID
========================================= */

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.product-card {
    overflow: hidden;
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    transition: .25s;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(0,0,0,.08);
}

.product-image {
    position: relative;
    height: 220px;
    background: #f8fafc;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: .3s;
}

.product-card:hover .product-image img {
    transform: scale(1.04);
}

.product-badge {
    position: absolute;
    left: 10px;
    top: 10px;
    padding: 6px 9px;
    border-radius: 7px;
    background: var(--primary);
    color: white;
    font-size: 11px;
    font-weight: 700;
}

.product-body {
    padding: 16px;
}

.product-brand {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}

.product-name {
    margin: 7px 0;
    min-height: 42px;
    font-size: 15px;
    line-height: 1.4;
    color: var(--dark);
}

.product-price {
    margin: 10px 0;
    font-size: 19px;
    font-weight: 700;
    color: var(--primary);
}

.product-stock {
    color: #16a34a;
    font-size: 12px;
}

.product-actions {
    display: grid;
    grid-template-columns: 1fr 42px;
    gap: 8px;
    margin-top: 14px;
}

.add-cart-btn {
    height: 40px;
    border: none;
    border-radius: 9px;
    background: var(--primary);
    color: white;
    font-weight: 600;
}

.add-cart-btn:hover {
    background: var(--primary-dark);
}

.view-product-btn {
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: white;
    color: var(--text);
}

.view-product-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* =========================================
   STATES
========================================= */

.products-loading,
.products-error,
.products-empty {
    min-height: 350px;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
}

.products-loading.active,
.products-error.active,
.products-empty.active {
    display: flex;
}

.loading-spinner {
    width: 45px;
    height: 45px;
    border: 4px solid #e5e7eb;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.products-loading p,
.products-error p,
.products-empty p {
    color: var(--muted);
}

.state-icon {
    width: 65px;
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 24px;
}

.products-error button,
.products-empty button {
    border: none;
    background: var(--primary);
    color: white;
    padding: 11px 20px;
    border-radius: 9px;
}

/* =========================================
   PAGINATION
========================================= */

.pagination {
    display: none;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 35px;
}

.pagination.active {
    display: flex;
}

.pagination > div {
    display: flex;
    gap: 6px;
}

.pagination-btn,
.page-number {
    width: 38px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: white;
    color: var(--text);
}

.page-number.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* =========================================
   TRUST
========================================= */

.trust-section {
    padding: 30px 0 60px;
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: white;
    border: 1px solid var(--border);
    border-radius: 18px;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 25px;
    border-right: 1px solid var(--border);
}

.trust-item:last-child {
    border-right: none;
}

.trust-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 12px;
}

.trust-item strong,
.trust-item span {
    display: block;
}

.trust-item strong {
    font-size: 14px;
}

.trust-item span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.cart-notification {
    position: fixed;
    right: 25px;
    bottom: 25px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: #111827;
    color: white;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,.2);
    transform: translateY(20px);
    opacity: 0;
    transition: .3s ease;
}

.cart-notification.show {
    transform: translateY(0);
    opacity: 1;
}

.cart-notification i {
    color: #22c55e;
}

/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 1200px) {

    .category-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {

    .hero-container {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        display: none;
    }

    .marketplace-layout {
        grid-template-columns: 1fr;
    }

    .filter-sidebar {
        display: none;
    }

    .filter-sidebar.mobile-open {
        display: block;
        position: static;
    }

    .mobile-filter-btn {
        display: block;
        padding: 10px 15px;
        border: 1px solid var(--border);
        background: white;
        border-radius: 9px;
    }

    .trust-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .trust-item:nth-child(2) {
        border-right: none;
    }
}

@media (max-width: 650px) {

    .hero-container {
        min-height: auto;
        padding: 50px 0;
    }

    .hero-content h1 {
        font-size: 42px;
    }

    .hero-search {
        height: 55px;
    }

    .hero-search button {
        padding: 0 15px;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .product-image {
        height: 170px;
    }

    .product-body {
        padding: 12px;
    }

    .product-name {
        font-size: 14px;
    }

    .product-price {
        font-size: 16px;
    }

    .products-header h2 {
        font-size: 23px;
    }

    .trust-grid {
        grid-template-columns: 1fr;
    }

    .trust-item {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .trust-item:last-child {
        border-bottom: none;
    }
}

@media (max-width: 420px) {

    .product-grid {
        grid-template-columns: 1fr;
    }

    .product-image {
        height: 230px;
    }
}
