/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    color: #1a1a1a;
    background-color: #fff;
    line-height: 1.5;
}

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

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-top {
    padding: 15px 0;
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-left,
.nav-right {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-link {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    transition: color 0.2s;
}

.nav-link:hover {
    color: #ff6900;
}

.logo {
    cursor: pointer;
    transition: opacity 0.2s;
}

.logo:hover {
    opacity: 0.8;
}

.logo svg {
    display: block;
}

.logo-img {
    height: 40px;
    display: block;
    object-fit: contain;
}

.icon-btn {
    font-size: 20px;
    padding: 5px;
    transition: transform 0.2s;
}

.icon-btn:hover {
    transform: scale(1.1);
}

/* Header Bottom */
.header-bottom {
    background: #fff;
    padding: 12px 0;
    border-top: 1px solid #e5e5e5;
}

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

.category-nav {
    display: flex;
    gap: 25px;
    align-items: center;
    flex: 1;
}

.category-link {
    font-size: 13px;
    font-weight: 500;
    color: #1a1a1a;
    white-space: nowrap;
    transition: color 0.2s;
}

.category-link:hover,
.category-link.active {
    color: #ff6900;
}

.category-link.sale {
    color: #ff6900;
    font-weight: 700;
}

.search-bar {
    display: flex;
    align-items: center;
    background: #f4f4f4;
    border-radius: 4px;
    padding: 8px 12px;
    min-width: 200px;
}

.search-input {
    border: none;
    background: none;
    outline: none;
    font-size: 14px;
    width: 100%;
}

.search-btn {
    font-size: 16px;
}

/* Breadcrumb */
.breadcrumb {
    padding: 20px 0;
    font-size: 14px;
    color: #767676;
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb a {
    color: #767676;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: #1a1a1a;
}

.separator {
    color: #d0d0d0;
}

/* Content Wrapper */
.content-wrapper {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 40px;
    padding-bottom: 60px;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 150px;
    height: fit-content;
}

.sidebar-section {
    margin-bottom: 30px;
}

.sidebar-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
}

.category-list {
    list-style: none;
}

.category-item {
    margin-bottom: 10px;
}

.category-item a {
    font-size: 14px;
    color: #1a1a1a;
    display: block;
    padding: 4px 0;
    transition: color 0.2s;
}

.category-item a:hover,
.category-item.active a {
    color: #ff6900;
    font-weight: 600;
}

/* Main Content */
.main-content {
    width: 100%;
}

.page-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 25px;
}

/* Filters Bar */
.filters-bar,
.filters-bar-second {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 16px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
    color: #1a1a1a;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-btn:hover {
    border-color: #1a1a1a;
}

.filter-btn.all-filters {
    font-weight: 600;
}

.arrow {
    font-size: 10px;
    color: #767676;
}

/* Product Count */
.product-count {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 20px 0;
    font-size: 14px;
    color: #767676;
}

.info-btn {
    font-size: 16px;
    color: #767676;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px 20px;
    margin-top: 25px;
}

/* Product Card */
.product-card {
    background: #fff;
    cursor: pointer;
    transition: transform 0.2s;
}

.product-card:hover {
    transform: translateY(-2px);
}

.product-image-wrapper {
    position: relative;
    background: #f4f4f4;
    margin-bottom: 12px;
    overflow: hidden;
    border-radius: 4px;
    aspect-ratio: 3/4;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wishlist-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 14px;
    background: transparent;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s;
    filter: grayscale(100%) brightness(0);
    opacity: 0.4;
}

.wishlist-btn:hover {
    opacity: 0.7;
}

.tryon-btn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(32, 32, 32, 1);
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    border: none;
    cursor: pointer;
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.tryon-btn img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    filter: invert(1) brightness(2);
}

.tryon-btn:hover {
    background: #1a1a1a;
}

.tryon-btn:hover img {
    filter: invert(1) brightness(2);
}

.tryon-btn:active {
    transform: none;
}

.tryon-btn.hidden {
    display: none;
}

.tryon-btn.fade-in {
    animation: fadeInButton 0.5s ease-in forwards;
}

/* First try-on button with notification indicator */
.tryon-btn-first {
    cursor: url('point-sm.png') 0 0, pointer;
    padding-right: 31px;
}

.tryon-notification-indicator {
    position: absolute;
    right: 7px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
}

.tryon-notification-indicator .notification-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background-color: #00cc00;
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(0, 204, 0, 1), 0 0 6px rgba(0, 204, 0, 0.8);
    animation: pulse 2s ease-in-out infinite;
    z-index: 3;
}

.tryon-notification-indicator .notification-wave {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border: 2px solid #00cc00;
    border-radius: 50%;
    opacity: 0;
    animation: wave 2s ease-out infinite;
}

.tryon-notification-indicator .notification-wave:nth-child(2) {
    animation-delay: 0s;
}

.tryon-notification-indicator .notification-wave:nth-child(3) {
    animation-delay: 0.7s;
}

.tryon-notification-indicator .notification-wave:nth-child(4) {
    animation-delay: 1.4s;
}

@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.8;
    }
}

@keyframes wave {
    0% {
        width: 8px;
        height: 8px;
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        width: 24px;
        height: 24px;
        opacity: 0;
    }
}

/* Product Info */
.product-info {
    padding: 0 4px;
}

.product-brand {
    font-size: 14px;
    color: #767676;
    margin-bottom: 4px;
}

.product-name {
    font-size: 15px;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 8px;
    line-height: 1.3;
}

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

.stars {
    color: #ff6900;
    font-size: 14px;
    letter-spacing: 1px;
}

.rating-count {
    font-size: 13px;
    color: #767676;
}

.product-price {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px 10px;
    }

    .category-nav {
        overflow-x: auto;
        scrollbar-width: none;
    }

    .category-nav::-webkit-scrollbar {
        display: none;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }

    .page-title {
        font-size: 24px;
    }

    .filters-bar,
    .filters-bar-second {
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: none;
    }

    .filters-bar::-webkit-scrollbar,
    .filters-bar-second::-webkit-scrollbar {
        display: none;
    }
}

/* Page overlay for dimming effect */
.page-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0);
    backdrop-filter: blur(0px);
    pointer-events: none;
    z-index: 9999;
    transition: background-color 0.5s ease-in-out, backdrop-filter 0.5s ease-in-out;
}

.page-overlay.active {
    background-color: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
}

.page-overlay.fade-out {
    background-color: rgba(255, 255, 255, 0);
    backdrop-filter: blur(0px);
}

.page-overlay.black {
    background-color: rgba(0, 0, 0, 1);
    backdrop-filter: none;
    transition: background-color 0.3s ease-in-out;
    z-index: 99999;
}

/* Button fade-in animation */
@keyframes fadeInButton {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}
