/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #FF1E1E;
    --text-color: #333;
    --bg-light: #ffffff;
    --bg-card: #f8f9fa;
    --border-color: #e0e0e0;
    --secondary-color: #00FFFF;
    --gray-text: #666;
    --nav-bg: rgba(255, 255, 255, 0.85);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.08);
}

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

html,
body {
    overflow-x: hidden;
    width: 100%;
}

body {
    background-color: #ffffff;
    color: var(--text-color);
    padding-bottom: 90px;
    /* Space for mobile nav */
}

/* Header Styles */
header {
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    background: white;
    position: sticky;
    top: 0;
    z-index: 1001;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-icon {
    width: 28px;
    height: 28px;
    background-color: var(--primary-color);
    border-radius: 50%;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    box-shadow: 0 2px 4px rgba(255, 30, 30, 0.3);
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand {
    font-weight: 800;
    color: var(--primary-color);
    font-size: 15px;
    letter-spacing: 0.5px;
}

.sub-brand {
    font-size: 10px;
    color: #111;
    font-weight: 700;
    letter-spacing: 2px;
}

nav {
    display: flex;
    gap: 30px;
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 14px;
    transition: color 0.3s;
}

nav a.active {
    color: var(--primary-color);
    font-weight: 600;
}

.search-bar {
    position: relative;
    width: 320px;
}

.search-bar input {
    width: 100%;
    padding: 10px 65px 10px 15px;
    border-radius: 8px;
    border: 1px solid #eee;
    background: #f8f9fa;
    font-size: 13px;
    transition: all 0.3s;
}

.search-bar input:focus {
    background: #fff;
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 30, 30, 0.1);
}

.search-bar .search-icons {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-bar i {
    color: #999;
    font-size: 14px;
}

.header-icons {
    display: flex;
    align-items: center;
    gap: 24px;
}

.header-icons a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 20px;
    transition: color 0.3s;
}

.header-icons a:hover {
    color: var(--primary-color);
}

.profile-circle {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, var(--primary-color), #D00000);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 2px 6px rgba(255, 30, 30, 0.2);
}

/* Mobile Filter Toggle Button */
.mobile-filter-toggle {
    display: none;
    margin-bottom: 25px;
    width: 100%;
}

.mobile-filter-toggle button {
    width: 100%;
    padding: 15px 20px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    font-weight: 700;
    color: #111;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-filter-toggle button .btn-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-filter-toggle button:active {
    transform: scale(0.98);
    background: #f9f9f9;
}

.mobile-filter-toggle i {
    color: var(--primary-color);
    font-size: 16px;
}

.mobile-filter-toggle .fa-chevron-right {
    color: #ccc;
    font-size: 12px;
}

/* Shop Layout */
.shop-container {
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 2rem;
}

.shop-content {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
}

/* Mobile Search Bar Style */
.mobile-search {
    display: none;
    margin-bottom: 25px;
    width: 100%;
}

/* Mobile Search Bar Style */
.mobile-search {
    display: none;
    margin-bottom: 25px;
    width: 100%;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: #fdfdfd;
    border: 1px solid #f0f0f0;
    border-radius: 20px;
    padding: 14px 22px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.search-wrapper .search-icons {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-wrapper:focus-within {
    background: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(255, 30, 30, 0.08);
    transform: translateY(-2px);
}

.search-wrapper i {
    color: #aaa;
    font-size: 16px;
}

.search-wrapper input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0 15px;
    font-size: 14px;
    font-weight: 500;
    color: #111;
    outline: none;
}

.search-bar .clear-search,
.search-wrapper .clear-search {
    font-size: 15px;
    color: #ccc;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.search-bar .clear-search.active,
.search-wrapper .clear-search.active {
    opacity: 1;
    visibility: visible;
}

.search-bar .clear-search:hover,
.search-wrapper .clear-search:hover {
    color: var(--primary-color);
}


/* Sidebar Styles */
.filter-sidebar {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    height: fit-content;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 100px;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.filter-section h3 {
    font-size: 20px;
    font-weight: 700;
    color: #111;
}

.close-filter {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 5px;
}

.filter-group {
    margin-bottom: 30px;
}

.filter-group h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 18px;
    color: #333;
}

.checkbox-container {
    display: block;
    position: relative;
    padding-left: 34px;
    margin-bottom: 15px;
    cursor: pointer;
    font-size: 14px;
    color: var(--gray-text);
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #fff;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    transition: all 0.2s;
}

.checkbox-container:hover input~.checkmark {
    border-color: var(--primary-color);
}

.checkbox-container input:checked~.checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked~.checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Radio Button Styling */
.checkmark.radio {
    border-radius: 50%;
}

.checkbox-container input:checked~.checkmark.radio:after {
    left: 5px;
    top: 5px;
    width: 8px;
    height: 8px;
    background: white;
    border: none;
    border-radius: 50%;
    transform: none;
}

.btn-apply-filter {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary-color), #D00000);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-apply-filter:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 30, 30, 0.3);
}

/* Product List Styles */
.product-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.product-item {
    background: #fff;
    border-radius: 16px;
    display: grid;
    grid-template-columns: 240px 1fr;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.product-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}

.product-image {
    position: relative;   /* ADD THIS */
    padding: 30px;
    background: #fbfbfb;
    display: flex;
    justify-content: center;
    align-items: center;
    border-right: 1px solid var(--border-color);
}
.product-image img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    transition: transform 0.5s;
}

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

.product-details {
    padding: 30px 40px;
    display: flex;
    flex-direction: column;
}

.product-details h3 {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 8px;
    /* Reduced from 15px to make room for rating */
    line-height: 1.4;
    color: #111;
}

.product-rating {
    margin-bottom: 12px;
}

.rating-badge {
    background-color: #388e3c;
    /* A solid green as seen in image */
    color: white;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.rating-badge i {
    font-size: 11px;
}

.product-color,
.product-meta {
    font-size: 14px;
    color: var(--gray-text);
    margin-bottom: 25px;
}

.product-meta p {
    margin-bottom: 6px;
}

.product-price-row {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: auto;
}

.current-price {
    font-size: 24px;
    font-weight: 800;
    color: #111;
}

.discount {
    background: rgba(255, 30, 30, 0.1);
    color: var(--primary-color);
    font-weight: 700;
    font-size: 13px;
    padding: 4px 10px;
    border-radius: 6px;
}

.old-price {
    color: #999;
    text-decoration: line-through;
    font-size: 15px;
}

/* Pagination */
.extra-padding {
    padding: 40px 0;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 40px;
}

.page-btn {
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1.5px solid #eee;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    transition: all 0.3s;
}

.page-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.page-btn.active {
    background-color: #002B45;
    color: white;
    border-color: #002B45;
    box-shadow: 0 4px 10px rgba(0, 43, 69, 0.2);
}

/* Mobile Bottom Navbar (CRITICAL FIX) */
.mobile-bottom-nav {
    display: none !important;
    /* Hidden by default */
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--nav-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-top: 1px solid var(--border-color);
    justify-content: space-around;
    padding: 12px 0;
    z-index: 9999;
    /* Ensure it stays on top */
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

.mobile-bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #777;
    gap: 5px;
    flex: 1;
}

.mobile-bottom-nav .nav-item i {
    font-size: 22px;
    transition: transform 0.2s;
}

.mobile-bottom-nav .nav-item span {
    font-size: 10px;
    font-weight: 600;
}

.mobile-bottom-nav .nav-item.active {
    color: var(--primary-color);
}

.mobile-bottom-nav .nav-item.active i {
    transform: translateY(-2px);
}

/* Responsive Styles */
@media (max-width: 1100px) {
    .shop-content {
        grid-template-columns: 240px 1fr;
        gap: 30px;
    }
}

@media (max-width: 992px) {

    .header-icons,
    nav,
    .search-bar {
        display: none !important;
    }

    .shop-content {
        grid-template-columns: 1fr;
    }

    .shop-container {
        margin: 15px auto;
        padding: 0 1.5rem;
    }

    .mobile-search {
        display: block;
    }

    .mobile-filter-toggle {
        display: block;
    }

    /* Off-canvas sidebar strictly for mobile/tablet */
    .filter-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 85%;
        max-width: 340px;
        height: 100vh;
        z-index: 10000;
        background: white;
        border-radius: 0 24px 24px 0;
        box-shadow: 20px 0 50px rgba(0, 0, 0, 0.1);
        transition: left 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
        padding: 40px 30px;
        overflow-y: auto;
        border: none;
    }

    .filter-sidebar.active {
        left: 0;
    }

    .filter-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        z-index: 9999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s ease;
    }

    .filter-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .close-filter {
        display: block;
        transition: transform 0.3s;
    }

    .close-filter:hover {
        transform: rotate(90deg);
        color: var(--primary-color);
    }

    .mobile-bottom-nav {
        display: flex !important;
    }
}

@media (max-width: 600px) {
    .product-item {
        grid-template-columns: 1fr;
    }

    .product-image {
        padding: 40px;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .product-details {
        padding: 24px;
    }

    .product-details h3 {
        font-size: 17px;
    }

    .current-price {
        font-size: 22px;
    }
}





/* Wishlist button on shop product cards */
.wishlist-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 15px;
    color: #aaa;
    transition: color 0.25s, transform 0.2s, box-shadow 0.2s;
    z-index: 2;
}

.wishlist-btn:hover {
    color: #FF1E1E;
    transform: scale(1.12);
    box-shadow: 0 4px 14px rgba(255, 30, 30, 0.18);
}

.wishlist-btn.active {
    color: #FF1E1E;
}
.wishlist-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    opacity: 1;
    visibility: visible;
}





/* Base Toast Style */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 6px;
    color: #fff;
    font-weight: 500;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 9999;

    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

/* Show Animation */
.toast.show {
    opacity: 1;
    transform: translateX(0);
}

/* Success */
.toast-success {
    background-color: #28a745;
}

/* Error */
.toast-error {
    background-color: #dc3545;
}
.toast {
    min-width: 250px;
    max-width: 350px;
}









/* Pagination */
.pagination {
    margin-top: auto;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 40px;
}

.page-num,
.page-arrow {
    width: 38px;
    height: 38px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: none;
    background-color: #F4F7FE;
    color: #2B3674;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.page-num:hover,
.page-arrow:hover {
    background-color: #e8ecf5;
}

.page-num.active {
    background-color: var(--pagination-active);
    color: var(--white);
}









.out-of-stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #ff1e1e;
    color: white;
    font-size: 14px;
    font-weight: 700;
    padding: 8px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
    width: 130px;
}


.breadcrumb {
    display: flex;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.breadcrumb a {
    text-decoration: none;
    color: inherit;
}












.cart-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background-color: var(--primary-color, #FF0000);
    color: white;
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid white;
}
