* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f1f5f9;
}

html {
    scroll-behavior: smooth;
}

/* navigation bar */

.nav-bar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #e2e8f0;
    padding: 10px;
    padding-bottom: 40px;
    background-color: #fff;
    z-index: 10000000;
}

.logo {
    padding: 10px 25px;
    margin-left: 40px;
    font-size: 24px;
}

.logo a {
    text-decoration: none;
    color: #4f46e5;
    font-weight: 900;
}


.search-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(460px, 100%);
    padding: 2px 3px;
    border-radius: 999px;
    border: 1px solid #e0e7ff;
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.search-box input {
    flex: 1;
    border: none;
    border-radius: 999px;
    padding: 10px 14px;
    font-size: 16px;
    outline: none;
    color: #64748b;
    background-color: transparent;
}

.search-box button {
    background-color: #4f46e5;
    border: none;
    color: white;
    padding:  20px;
    border-radius: 20px;
    height: 100%;
    cursor: pointer;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.search-box:focus-within {
    border-color: #4f46e5;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.18);
}

.search-box button:hover {
    background-color: #4338ca;
}

.icons {
    display: flex;
    align-items: center;
    margin-right: 40px;
    font-size: 24px;
    padding: 0px 15px;
    margin-top: 10px;
    gap: 18px;
}

.login-icon {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    gap: 5px;
}

.logout-btn {
    display: none;
    align-items: center;
    gap: 6px;
    margin-left: 16px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background-color: transparent;
    color: #4f46e5;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}

.logout-btn i {
    font-size: 14px;
}

.logout-btn:hover {
    background-color: #4f46e5;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.35);
}

.logout-btn:active {
    transform: translateY(1px);
}

.icons a i {
    color: #4f46e5;
    font-size: 25px;
}

.cart-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    margin-left: 12px;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background-color: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: none;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.cart-badge.bump {
    animation: cartBadgePop 0.35s ease;
}

@keyframes cartBadgePop {
    0% {
        transform: scale(0.6);
    }

    60% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.login-icon span {
    font-size: 12px;
}


/* Main Section & Product Card */

.main-section {
    padding: 40px 60px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    min-height: calc(100vh - 100px);
    background-color: #f1f5f9;
    max-width: 1600px;
    margin: 0 auto;
}

.search-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    background-color: #f8fafc;
    border: 1px solid #e0e7ff;
    border-radius: 14px;
    padding: 32px 20px;
    color: #64748b;
}

.search-empty-state h2 {
    color: #0f172a;
    margin-bottom: 8px;
}


.product-card {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.product-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    background-color: #e2e8f0;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

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

.product-info {
    padding: 20px;
}

.product-name {
    font-size: 18px;
    color: #0f172a;
    margin-bottom: 10px;
    font-weight: 600;
    min-height: 48px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-bottom: 12px;
}

.product-rating i {
    color: #f59e0b;
    font-size: 14px;
}

.product-rating .fa-regular {
    color: #e2e8f0;
}

.rating-text {
    margin-left: 8px;
    color: #64748b;
    font-size: 14px;
}

.product-price {
    font-size: 24px;
    color: #4f46e5;
    font-weight: bold;
    margin-bottom: 15px;
}

.product-buttons {
    display: flex;
    gap: 10px;
}

.product-buttons button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.product-buttons button:active {
    transform: scale(0.95);
}

.btn-add-to-cart {
    background-color: #4f46e5;
    color: white;
}

.btn-add-to-cart:hover {
    background-color: #4338ca;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.btn-view {
    background-color: #e2e8f0;
    color: #0f172a;
}

.btn-view:hover {
    background-color: #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}




/* header responsive */

@media (max-width: 768px) {
    .nav-bar {
        padding: 10px 20px;
        padding-bottom: 20px;
    }

    .logo {
        margin-left: 0;
        padding: 10px;
    }

    .search-box {
        width: 300px;
    }

    .icons {
        margin-right: 0;
    }
}

@media (max-width: 480px) {
    .nav-bar {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }

    .search-box {
        width: 100%;
        max-width: 400px;
    }
}







/* main section responsive */
@media (max-width: 768px) {
    .main-section {
        padding: 20px;
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .main-section {
        padding: 15px;
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* Modern homepage #ef4444esign (scoped to index only) */

.home-page {
    font-family: 'Manrope', sans-serif;
    color: #0f172a;
    background:
        radial-gradient(800px 320px at 95% -8%, rgba(44, 133, 255, 0.18), transparent 70%),
        radial-gradient(640px 280px at -6% 12%, rgba(255, 157, 88, 0.2), transparent 68%),
        #e0e7ff;
}

.home-page .header {
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.home-page .nav-bar {
    align-items: center;
    gap: 16px;
    padding: 16px 28px;
    border-bottom: 1px solid #e2e8f0;
    background: rgba(255, 255, 255, 0.9);
}

.home-page .logo {
    margin-left: 0;
    padding: 0;
    font-size: 28px;
    font-family: 'Sora', sans-serif;
}

.home-page .logo a {
    color: #4f46e5;
}

.header-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 0;
}

.header-links a {
    text-decoration: none;
    color: #64748b;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 10px;
    border-radius: 8px;
}

.header-links a:hover {
    background: #e0e7ff;
    color: #4f46e5;
}

.home-page .search-box {
    border: 1px solid #e0e7ff;
    border-radius: 14px;
    border-bottom-width: 1px;
    border-left-width: 1px;
    width: min(460px, 100%);
    background: #fff;
}

.home-page .search-box input {
    color: #64748b;
    font-weight: 500;
}

.home-page .search-box button {
    background: linear-gradient(130deg, #4f46e5, #4f46e5);
}

.home-page .search-box button:hover {
    background: linear-gradient(130deg, #4f46e5, #4f46e5);
}

.home-page .icons {
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

.home-page .login-icon {
    margin-right: 8px;
}

.ux-nav-wrap {
    border-bottom: 1px solid #e0e7ff;
    background: rgba(255, 255, 255, 0.86);
    padding: 10px 28px;
}

.ux-nav {
    width: min(1200px, 100%);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.ux-nav-link {
    text-decoration: none;
    color: #0f172a;
    font-weight: 700;
    font-size: 14px;
    padding: 8px 14px;
    border-radius: 999px;
    white-space: nowrap;
}

.ux-nav-link:hover,
.ux-nav-link.active {
    background: #e0e7ff;
    color: #4f46e5;
}

.hero-section {
    width: min(1320px, 95%);
    margin: 30px auto 18px;
    padding: 26px;
    border-radius: 22px;
    background: linear-gradient(140deg, #f8fafc, #e0e7ff 58%, #e0e7ff);
    border: 1px solid #e0e7ff;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 20px;
}

.hero-kicker {
    color: #f59e0b;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 6px;
}

.hero-copy h1 {
    font-family: 'Sora', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2.4rem);
    line-height: 1.16;
    margin-bottom: 10px;
}

.hero-copy p {
    color: #64748b;
    max-width: 640px;
}

.hero-metrics {
    display: grid;
    gap: 10px;
}

.metric-card {
    border: 1px solid #e0e7ff;
    border-radius: 16px;
    padding: 16px;
    background: #f8fafc;
}

.metric-card strong {
    display: block;
    color: #4f46e5;
    font-size: 22px;
    margin-bottom: 4px;
}

.metric-card span {
    color: #64748b;
}

.products-toolbar {
    width: min(1320px, 95%);
    margin: 18px auto 18px;
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    border-radius: 999px;
    border: 1px solid #e0e7ff;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.category-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.category-chip {
    border: 1px solid #e0e7ff;
    background: #f8fafc;
    color: #64748b;
    border-radius: 999px;
    padding: 8px 14px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.08s ease;
}

.category-chip.active,
.category-chip:hover {
    background: #4f46e5;
    color: #fff;
    border-color: #4f46e5;
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
    transform: translateY(-1px);
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.results-count {
    font-weight: 700;
    color: #64748b;
    font-size: 14px;
}

.sort-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.sort-wrapper select {
    border: 1px solid #e0e7ff;
    border-radius: 8px;
    padding: 8px 10px;
    background: #fff;
    color: #0f172a;
    font-weight: 600;
}

.sort-wrapper select:focus {
    outline: none;
    border-color: #4f46e5;
}

.home-page .main-section {
    width: min(1320px, 95%);
    max-width: none;
    margin: 0 auto 48px;
    padding: 10px 0 0;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
    background: transparent;
}

.home-page .product-card {
    border-radius: 18px;
    border: 1px solid #e0e7ff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.home-page .product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.1);
}

.home-page .product-image {
    height: 220px;
    position: relative;
}

.home-page .product-image::after {
    content: '';
    position: absolute;
    inset: auto 0 0;
    height: 70px;
    background: linear-gradient(to top, rgba(12, 35, 64, 0.26), transparent);
    pointer-events: none;
}

.product-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.product-category-pill {
    font-size: 12px;
    font-weight: 700;
    color: #4f46e5;
    background: #e0e7ff;
    border-radius: 999px;
    padding: 6px 10px;
}

.product-brand {
    color: #64748b;
    font-size: 13px;
    margin-bottom: 10px;
}

.home-page .product-name {
    font-size: 18px;
    line-height: 1.3;
    min-height: 48px;
    margin-bottom: 7px;
}

.home-page .product-rating {
    margin-bottom: 10px;
}

.home-page .product-price {
    font-size: 26px;
    color: #4f46e5;
    margin-bottom: 12px;
}

.home-page .btn-add-to-cart {
    background: linear-gradient(120deg, #4f46e5, #4f46e5);
}

.home-page .btn-add-to-cart:hover {
    background: linear-gradient(120deg, #4f46e5, #4f46e5);
}

.home-page .btn-view {
    background: #f8fafc;
    color: #0f172a;
}

.home-page .btn-view:hover {
    background: #e0e7ff;
}

@media (max-width: 1120px) {
    .home-page .nav-bar {
        flex-wrap: wrap;
        justify-content: center;
    }

    .header-links {
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .hero-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .home-page .nav-bar {
        padding: 12px 14px;
    }

    .home-page .logo {
        font-size: 24px;
    }

    .header-links {
        gap: 4px;
    }

    .header-links a {
        font-size: 12px;
        padding: 7px 8px;
    }

    .ux-nav-wrap {
        padding: 8px 12px;
    }

    .hero-section {
        margin-top: 14px;
        padding: 18px;
    }

    .products-toolbar {
        width: 95%;
    }

    .toolbar-right {
        width: 100%;
        justify-content: space-between;
    }
}