
/* ======================
   GLOBAL STYLES
====================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

body {
    background: #f5f5f5;
    color: #222;
}

a {
    text-decoration: none;
}

img {
    width: 100%;
    display: block;
}

/* ======================
   NAVBAR
====================== */

.navbar {
    background: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.3rem;
    font-weight: 700;
}

.nav-icons {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-icons i {
    cursor: pointer;
    font-size: 18px;
}

.cart-link,
.wishlist-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #000;
    text-decoration: none;
    width: 28px;
    height: 28px;
}

.cart-link i,
.wishlist-link i {
    color: #000;
    font-size: 18px;
}

.cart-badge,
.wishlist-badge {
    position: absolute;
    top: -6px;
    right: -7px;

    min-width: 18px;
    height: 18px;
    padding: 0 4px;

    background: #e63946;
    color: #fff;

    border-radius: 50%;

    display: flex;
    justify-content: center;
    align-items: center;

    font-size: 11px;
    font-weight: 600;

    line-height: 1;
    z-index: 5;
}

.guest-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.login-btn,
.signup-btn {
    display: inline-block;
    padding: 10px 22px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    transition: 0.3s ease;
    background: #fff;
    color: #111827;
    border: 2px solid #111827;
}

.login-btn:hover,
.signup-btn:hover {
    background: #111827;
    color: #fff;
}

/* ======================
   MOBILE FILTER BUTTON
====================== */

.mobile-filter {
    display: none;
    padding: 15px;
}

.mobile-filter button {
    width: 100%;
    border: none;
    background: #111;
    color: #fff;
    padding: 12px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 15px;
}

/* ======================
   PAGE LAYOUT
====================== */

.products-page {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 25px 5%;
}

.products-content {
    flex: 1;
    min-width: 0;
}

.products-content h2 {
    margin-bottom: 20px;
}

.unavailable-message {
    padding: 12px 20px;
    margin: 15px 0;
    background: #f8d7da;
    color: #842029;
    border: 1px solid #f5c2c7;
    border-radius: 6px;
    text-align: center;
}

/* ======================
   SIDEBAR AND FILTERS
====================== */

.sidebar {
    flex: 0 0 260px;
    width: 260px;
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    height: fit-content;
    border: 1px solid #e5e5e5;
}

.filter-box {
    border-bottom: 1px solid #eee;
    padding: 15px 0;
}

.filter-box:last-child {
    border-bottom: none;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.filter-header h4 {
    font-size: 15px;
}

.filter-header span {
    font-size: 18px;
    font-weight: bold;
}

.filter-content {
    margin-top: 12px;
    display: none;
}

.filter-content.active {
    display: block;
}

.filter-content label {
    display: block;
    margin: 10px 0;
    cursor: pointer;
    font-size: 14px;
}

.filter-content input {
    margin-right: 8px;
    cursor: pointer;
}

/* ======================
   SEARCH AND SORT
====================== */

.controls {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.product-search {
    flex: 1;
    min-width: 200px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.controls button {
    padding: 12px 20px;
    border: none;
    background: #111;
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
}

.clear-btn {
    padding: 12px 20px;
    background: #e5e5e5;
    border-radius: 8px;
    color: #111;
}

.controls select {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}

/* ======================
   BREADCRUMB
====================== */

.breadcrumb {
    margin-bottom: 20px;
    font-size: 14px;
}

.breadcrumb a {
    color: #666;
}

.breadcrumb span {
    margin: 0 5px;
}

/* ======================
   PRODUCT GRID
====================== */

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.product-card {
    position: relative;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #eee;
    transition: 0.3s;
}

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

.product-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.product-link {
    display: block;
    color: inherit;
}

.product-card h4 {
    padding: 12px 12px 5px;
    font-size: 15px;
}

.product-card p {
    padding: 0 12px 15px;
    color: #555;
    font-weight: 600;
}

/* ======================
   WISHLIST BUTTON
====================== */

.wishlist-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: #fff;
    color: #333;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    transition: color 0.2s ease, transform 0.2s ease;
}

.wishlist-btn:hover {
    color: #e63946;
    transform: scale(1.08);
}

.wishlist-btn.active {
    color: #e63946;
}

.wishlist-btn:disabled {
    cursor: wait;
    opacity: 0.6;
}

/* ======================
   PRODUCT OFFER BADGE
====================== */

.offer-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;

    background: #e63946;
    color: #fff;

    padding: 6px 10px;
    border-radius: 5px;

    font-size: 12px;
    font-weight: 700;
}

/* Original price */

.original-price {
    color: #888;
    text-decoration: line-through;
    font-size: 13px;
    margin-right: 6px;
}

/* Offer price */

.offer-price {
    color: #e63946;
    font-weight: 700;
}

/* ======================
   PAGINATION
====================== */

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.pagination a {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    color: #111;
    background: #fff;
}

.pagination a.active {
    background: #111;
    color: #fff;
    border-color: #111;
}


/* ===================================
   FOOTER
=================================== */

footer {
    background: #050505;
    color: #fff;
    padding: 60px 5% 25px;
    width: 100%;
    box-sizing: border-box;
}

.footer-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 1.4fr;
    gap: 40px;
    padding-bottom: 35px;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.footer-col {
    min-width: 0;
}

.footer-col h3,
.footer-col h4 {
    margin-bottom: 20px;
    font-size: 22px;
}

.footer-col h4 {
    font-size: 20px;
}

.footer-col p {
    color: #cfcfcf;
    font-size: 14px;
    line-height: 1.9;
    margin-bottom: 8px;
}

/* Contact input */

.footer-input-box {
    display: flex;
    gap: 10px;
    margin: 18px 0 20px;
    width: 100%;
}

.footer-input-box input {
    flex: 1;
    min-width: 0;
    width: 100%;
    padding: 14px 16px;
    border: none;
    outline: none;
    border-radius: 8px;
    background: #162033;
    color: #fff;
    font-size: 14px;
}

.footer-input-box input::placeholder {
    color: #9aa5b1;
}

.footer-input-box button {
    padding: 0 24px;
    border: none;
    border-radius: 8px;
    background: #22314a;
    color: #fff;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}

/* Social icons */

.social-icons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.social-icons a {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    text-decoration: none;
    transition: .3s;
}

.social-icons a:nth-child(1) {
    background: #1877f2;
}

.social-icons a:nth-child(2) {
    background: #e1306c;
}

.social-icons a:nth-child(3) {
    background: #25d366;
}

.social-icons a:nth-child(4) {
    background: #0a66c2;
}

.social-icons a:hover {
    transform: translateY(-4px);
}

/* Footer bottom */

.footer-bottom {
    padding-top: 22px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-bottom p {
    font-size: 13px;
    color: #cfcfcf;
}

.footer-bottom-info {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.footer-bottom-info span {
    font-size: 13px;
    color: #cfcfcf;
    display: flex;
    align-items: center;
    gap: 8px;
}


/* Footer links */

.footer-col a {
    display: block;
    color: #cfcfcf;
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 12px;
    transition: .3s;
}

.footer-col a:hover,
.footer-bottom-info a:hover {
    color: #fff;
    padding-left: 5px;
}

.footer-tagline {
    color: #fff !important;
    font-weight: 600;
}

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow-wrap: anywhere;
}

.footer-contact p i {
    min-width: 16px;
}

.footer-bottom-info a {
    color: #cfcfcf;
    font-size: 13px;
    text-decoration: none;
}


/* ===================================
   TABLET RESPONSIVE
=================================== */

@media (max-width: 992px) {

    footer {
        padding: 45px 4% 20px;
    }

    .footer-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 35px 30px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 18px;
    }

    .footer-bottom-info {
        gap: 15px 25px;
    }
}

/* ===================================
   MOBILE RESPONSIVE
=================================== */

@media (max-width: 576px) {

    footer {
        padding: 35px 20px 20px;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 28px;
        padding-bottom: 25px;
    }

    .footer-col h3,
    .footer-col h4 {
        font-size: 19px;
        margin-bottom: 14px;
    }

    .footer-col p {
        font-size: 13px;
    }

    .footer-input-box {
        gap: 8px;
    }

    .footer-input-box input {
        padding: 12px 10px;
        font-size: 13px;
    }

    .footer-input-box button {
        padding: 0 16px;
        font-size: 13px;
    }

    .social-icons {
        gap: 10px;
    }

    .social-icons a {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .footer-bottom {
        padding-top: 20px;
        gap: 15px;
    }

    .footer-bottom-info {
        flex-direction: column;
        gap: 12px;
    }

    .footer-bottom-info span {
        font-size: 12px;
        align-items: flex-start;
        line-height: 1.6;
        overflow-wrap: anywhere;
    }

    .footer-bottom p {
        font-size: 12px;
    }
}

/* ===================================
   SMALL MOBILE
=================================== */

@media (max-width: 360px) {

    footer {
        padding-left: 15px;
        padding-right: 15px;
    }

    .footer-input-box button {
        padding: 0 12px;
    }
}

/* ======================
   TABLET
====================== */

@media (max-width: 992px) {
    .products-page {
        gap: 15px;
        padding: 20px 3%;
    }

    .sidebar {
        flex-basis: 220px;
        width: 220px;
    }

    .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 15px;
    }

    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ======================
   MOBILE
====================== */

@media (max-width: 768px) {
    .mobile-filter {
        display: block;
    }

    .products-page {
        display: block;
        padding: 15px;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px;
        max-width: 85vw;
        height: 100vh;
        height: 100dvh;
        overflow-y: auto;
        z-index: 1001;
        border-radius: 0;
        transform: translateX(-105%);
        visibility: hidden;
        transition: transform 0.3s ease, visibility 0.3s ease;
    }

    .sidebar.show {
        transform: translateX(0);
        visibility: visible;
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 15px;
    }

    .controls {
        flex-direction: column;
        align-items: stretch;
    }

    .product-search,
    .controls select,
    .controls button,
    .clear-btn {
        width: 100%;
        min-width: 0;
    }

    .clear-btn {
        text-align: center;
    }

    .navbar {
        padding: 15px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .pagination {
        gap: 8px;
    }

    .pagination a {
        padding: 8px 12px;
        font-size: 14px;
    }
}

/* ======================
   SMALL MOBILE
====================== */

@media (max-width: 500px) {
    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .logo {
        font-size: 1rem;
    }

    .nav-icons {
        gap: 12px;
    }

    .product-card h4 {
        font-size: 13px;
        padding: 10px 8px 5px;
    }

    .product-card p {
        padding: 0 8px 12px;
    }

    .wishlist-btn {
        width: 32px;
        height: 32px;
        top: 8px;
        right: 8px;
    }
}
