/* Premium WooCommerce Product Menu Styles */

:root {
    --wpm-bg-color: #ffffff;
    --wpm-text-main: #000000;
    --wpm-text-secondary: #555555;
    --wpm-accent: #000000;
    --wpm-border: #eeeeee;
    --wpm-nav-height: 60px;
    --wpm-transition: all 0.3s ease;
}

.wpm-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    overflow-x: hidden; /* Prevent horizontal scroll */
    box-sizing: border-box;
}

.wpm-container *,
.wpm-container *::before,
.wpm-container *::after {
    box-sizing: border-box;
}

/* Navigation Styles */
.wpm-nav {
    position: sticky;
    top: 0;
    background: white;
    z-index: 1000;
    border-bottom: 1px solid var(--wpm-border);
    margin-bottom: 40px;
    padding: 10px 0;
}

.wpm-nav-inner {
    display: flex;
    gap: 25px;
    overflow-x: auto;
    scrollbar-width: none; /* Hide scrollbar for Firefox */
    white-space: nowrap;
    padding: 5px 0;
}

.wpm-nav-inner::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome/Safari */
}

.wpm-nav-link {
    text-decoration: none;
    color: var(--wpm-text-secondary);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: 8px;
    border-bottom: 2px solid transparent;
    transition: var(--wpm-transition);
}

.wpm-nav-link:hover,
.wpm-nav-link.active {
    color: var(--wpm-text-main);
    border-bottom-color: var(--wpm-accent);
}

/* Section Styles */
.wpm-category-section {
    margin-bottom: 80px;
    scroll-margin-top: calc(var(--wpm-nav-height) + 20px);
}

.wpm-category-title {
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 40px;
    text-transform: uppercase;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

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

/* Product Card */
.wpm-product-card {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    min-width: 0; /* Prevent grid expansion */
}

.wpm-product-image {
    width: 100%;
    max-width: 320px; /* Cap image size for better aesthetics */
    aspect-ratio: 1 / 1;
    overflow: hidden;
    margin: 0 auto 15px auto;
    background: #f9f9f9;
    border-radius: 8px; /* Slightly rounded corners for a premium feel */
}

.wpm-product-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

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

.wpm-product-info {
    display: flex;
    flex-direction: column;
}

.wpm-product-name {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 5px 0;
    text-transform: uppercase;
    color: var(--wpm-text-main);
    overflow-wrap: break-word; /* Prevent layout breakage */
    word-wrap: break-word;
}

.wpm-product-price {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--wpm-text-secondary);
}

.wpm-product-desc {
    font-size: 13px;
    line-height: 1.6;
    color: var(--wpm-text-secondary);
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.wpm-product-desc p {
    margin: 0;
}

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

@media (max-width: 600px) {
    .wpm-category-title {
        font-size: 32px;
    }
    .wpm-products-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .wpm-nav {
        margin-bottom: 20px;
    }
}
