/**
 * MetaAffinity Woo Smart Menu - Frontend Styles
 * Version: 2.0 - New Professional Animated Menu
 */

/* Ensure box-sizing for all menu elements */
.mawsm-popup-wrapper *,
.mawsm-popup-wrapper *::before,
.mawsm-popup-wrapper *::after {
    box-sizing: border-box;
}

/* Lazy Loading Images with Blur-Up Effect */
.mawsm-lazy-image {
    filter: blur(10px);
    transition: filter 0.4s ease-out;
}

.mawsm-lazy-image.mawsm-loaded {
    filter: blur(0);
}

.mawsm-lazy-image[src*="data:image"] {
    background: linear-gradient(to bottom, #f0f0f0 0%, #e0e0e0 100%);
}

/* Skeleton Loading Screens */
.mawsm-skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 0%,
        #e8e8e8 20%,
        #f0f0f0 40%,
        #f0f0f0 100%
    );
    background-size: 200% 100%;
    animation: mawsmSkeletonLoading 1.5s ease-in-out infinite;
    border-radius: 4px;
}

@keyframes mawsmSkeletonLoading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.mawsm-skeleton-container {
    padding: 20px;
}

/* Skeleton Product Grid */
.mawsm-skeleton-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    padding: 20px;
}

.mawsm-skeleton-product-item {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mawsm-skeleton-product-image {
    width: 100%;
    height: 220px;
    border-radius: 8px;
}

.mawsm-skeleton-product-title {
    width: 80%;
    height: 20px;
}

.mawsm-skeleton-product-sku {
    width: 50%;
    height: 14px;
}

.mawsm-skeleton-product-price {
    width: 40%;
    height: 18px;
}

/* Skeleton Category List */
.mawsm-skeleton-category-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
}

.mawsm-skeleton-category-item {
    display: flex;
    gap: 15px;
    align-items: center;
}

.mawsm-skeleton-category-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    flex-shrink: 0;
}

.mawsm-skeleton-category-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mawsm-skeleton-category-title {
    width: 60%;
    height: 18px;
}

.mawsm-skeleton-category-desc {
    width: 90%;
    height: 14px;
}

.mawsm-skeleton-category-count {
    width: 30%;
    height: 12px;
}

/* Skeleton Two-Column Layout */
.mawsm-skeleton-two-column {
    display: grid;
    grid-template-columns: 260px minmax(500px, 1fr);
    gap: 40px;
    padding: 20px;
}

/* Popup Wrapper */
.mawsm-popup-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.mawsm-popup-wrapper.mawsm-hidden {
    display: none;
}

/* Overlay */
.mawsm-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: opacity 0.3s ease;
    opacity: 1;
}

.mawsm-popup-wrapper.mawsm-fade-in .mawsm-overlay {
    animation: overlayFadeIn 0.3s ease forwards;
}

.mawsm-popup-wrapper.mawsm-fade-out .mawsm-overlay {
    animation: overlayFadeOut 0.3s ease forwards;
}

@keyframes overlayFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes overlayFadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Popup Content Wrapper */
.mawsm-popup-content-wrapper {
    position: relative;
    z-index: 10;
    max-width: 90%;
    max-height: 90vh;
    overflow: visible;
}

.mawsm-popup-content-wrapper.product-view {
    max-width: 70%;
    width: 70%;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    max-height: 100vh;
}

/* Submenu Container */
.mawsm-submenu-container {
    background-color: #ffffff;
    border-radius: 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow-x: hidden;
    overflow-y: auto;
    min-width: 400px;
    max-width: 900px;
    max-height: 90vh;
    opacity: 0;
    transform: translateY(-50px);
}

.product-view .mawsm-submenu-container {
    border-radius: 0;
    max-width: none;
    width: 100%;
    height: 100vh;
    max-height: 100vh;
    transform: translateX(-100%);
    min-width: auto;
    box-shadow: 5px 0 30px rgba(0, 0, 0, 0.3);
}

/* Product View Header Enhancement */
.product-view .mawsm-submenu-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 25px 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.product-view .mawsm-submenu-title {
    font-size: 24px;
}

/* Animation Classes - Dynamic based on data-animation attribute */
/* Default: Slide Down */
.mawsm-popup-wrapper.mawsm-fade-in .mawsm-submenu-container,
.mawsm-popup-wrapper.mawsm-fade-in[data-animation="slide-down"] .mawsm-submenu-container {
    animation: slideDown 0.5s ease-out forwards;
}

.mawsm-popup-wrapper.mawsm-fade-out .mawsm-submenu-container,
.mawsm-popup-wrapper.mawsm-fade-out[data-animation="slide-down"] .mawsm-submenu-container {
    animation: slideUp 0.3s ease-in forwards;
}

/* Fade Animation */
.mawsm-popup-wrapper.mawsm-fade-in[data-animation="fade"] .mawsm-submenu-container {
    animation: fadeIn 0.4s ease-out forwards;
}

.mawsm-popup-wrapper.mawsm-fade-out[data-animation="fade"] .mawsm-submenu-container {
    animation: fadeOut 0.3s ease-in forwards;
}

/* Slide Up Animation */
.mawsm-popup-wrapper.mawsm-fade-in[data-animation="slide-up"] .mawsm-submenu-container {
    animation: slideUpIn 0.5s ease-out forwards;
}

.mawsm-popup-wrapper.mawsm-fade-out[data-animation="slide-up"] .mawsm-submenu-container {
    animation: slideUpOut 0.3s ease-in forwards;
}

/* Zoom Animation */
.mawsm-popup-wrapper.mawsm-fade-in[data-animation="zoom"] .mawsm-submenu-container {
    animation: zoomIn 0.4s ease-out forwards;
}

.mawsm-popup-wrapper.mawsm-fade-out[data-animation="zoom"] .mawsm-submenu-container {
    animation: zoomOut 0.3s ease-in forwards;
}

/* Product View - Always slides from left */
.mawsm-popup-wrapper.mawsm-fade-in.product-view .mawsm-submenu-container {
    animation-name: slideFromLeft !important;
    animation-duration: 0.4s !important;
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1) !important;
    animation-fill-mode: forwards;
}

.mawsm-popup-wrapper.mawsm-fade-out.product-view .mawsm-submenu-container {
    animation-name: slideToLeft !important;
    animation-duration: 0.3s !important;
    animation-timing-function: ease !important;
    animation-fill-mode: forwards;
}

/* Animation Types */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-50px);
    }
}

@keyframes slideFromLeft {
    0% {
        opacity: 0;
        transform: translateX(-100%);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideToLeft {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-100%);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes slideUpIn {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUpOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(50px);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes zoomOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.8);
    }
}

/* Submenu Header */
.mawsm-submenu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e5e5e5;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 0;
}

.mawsm-submenu-title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
}

.mawsm-submenu-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    font-size: 28px;
    line-height: 1;
    padding: 5px 12px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.mawsm-submenu-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Product Quick View Popup */
.mawsm-quick-view-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999999;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    animation: mawsmQuickViewOverlayFadeIn 0.4s ease-out;
}

.mawsm-quick-view-overlay.active {
    display: flex;
}

.mawsm-quick-view-overlay.closing {
    animation: mawsmQuickViewOverlayFadeOut 0.2s ease-out 0.35s forwards;
}

.mawsm-quick-view-overlay.closing .mawsm-quick-view-modal {
    animation: mawsmQuickViewCloseModal 0.5s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}

.mawsm-quick-view-overlay.closing .mawsm-quick-view-image {
    animation: mawsmQuickViewCloseImage 0.5s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}

@keyframes mawsmQuickViewOverlayFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(5px);
    }
}

@keyframes mawsmQuickViewOverlayFadeOut {
    from {
        opacity: 1;
        backdrop-filter: blur(5px);
    }
    to {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
}

@keyframes mawsmQuickViewCloseModal {
    0% {
        clip-path: inset(0 0 0 0);
        opacity: 1;
    }
    100% {
        clip-path: inset(0 0 0 100%);
        opacity: 1;
    }
}

@keyframes mawsmQuickViewCloseImage {
    0% {
        clip-path: inset(0 0 0 0);
        opacity: 1;
    }
    100% {
        clip-path: inset(0 0 0 100%);
        opacity: 1;
    }
}

.mawsm-quick-view-modal {
    background: #ffffff;
    border-radius: 0;
    max-width: 1200px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: mawsmQuickViewClipReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 15px;
    display: flex;
    flex-direction: column;
}

@keyframes mawsmQuickViewClipReveal {
    0% {
        clip-path: inset(0 100% 0 0);
        opacity: 1;
    }
    100% {
        clip-path: inset(0 0 0 0);
        opacity: 1;
    }
}

.mawsm-quick-view-close {
    position: sticky;
    top: 15px;
    right: 15px;
    margin-left: auto;
    margin-bottom: -50px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: #ffffff;
    font-size: 28px;
    width: 45px;
    height: 45px;
    border-radius: 0;
    cursor: pointer;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    opacity: 0;
    animation: mawsmQuickViewCloseAppear 0.4s ease 1s forwards;
}

@keyframes mawsmQuickViewCloseAppear {
    from {
        opacity: 0;
        transform: scale(0) rotate(-180deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.mawsm-quick-view-close:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.mawsm-quick-view-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px;
}

.mawsm-quick-view-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 0;
}

.mawsm-quick-view-image {
    width: 100%;
    height: auto;
    border-radius: 0;
    object-fit: cover;
    animation: mawsmQuickViewImageClipZoom 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
    transform-origin: center;
}

@keyframes mawsmQuickViewImageClipZoom {
    0% {
        clip-path: inset(0 100% 0 0);
        transform: scale(0.6);
        opacity: 1;
    }
    100% {
        clip-path: inset(0 0 0 0);
        transform: scale(1);
        opacity: 1;
    }
}

.mawsm-quick-view-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #e74c3c;
    color: #ffffff;
    padding: 5px 15px;
    border-radius: 0;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    opacity: 0;
    animation: mawsmQuickViewBadgePulse 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.8s forwards;
}

@keyframes mawsmQuickViewBadgePulse {
    0% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.mawsm-quick-view-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mawsm-quick-view-title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin: 0;
    line-height: 1.3;
    opacity: 0;
    animation: mawsmQuickViewSlideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards;
}

.mawsm-quick-view-price {
    font-size: 32px;
    font-weight: 700;
    color: #667eea;
    opacity: 0;
    animation: mawsmQuickViewSlideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards;
}

.mawsm-quick-view-price del {
    font-size: 20px;
    color: #999;
    margin-right: 10px;
}

.mawsm-quick-view-description {
    color: #666;
    line-height: 1.6;
    font-size: 15px;
    opacity: 0;
    animation: mawsmQuickViewSlideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.7s forwards;
}

.mawsm-quick-view-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 0;
    opacity: 0;
    animation: mawsmQuickViewSlideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.8s forwards;
}

@keyframes mawsmQuickViewSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mawsm-quick-view-meta-item {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.mawsm-quick-view-meta-label {
    color: #999;
}

.mawsm-quick-view-meta-value {
    color: #333;
    font-weight: 600;
}

.mawsm-quick-view-actions {
    display: flex;
    gap: 15px;
    margin-top: 5px;
    opacity: 0;
    animation: mawsmQuickViewSlideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.9s forwards;
}

.mawsm-quick-view-btn {
    flex: 1;
    padding: 15px 30px;
    border: none;
    border-radius: 0;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.mawsm-quick-view-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.mawsm-quick-view-btn:hover::before {
    width: 300px;
    height: 300px;
}

.mawsm-quick-view-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    position: relative;
    z-index: 1;
}

.mawsm-quick-view-btn-primary span,
.mawsm-quick-view-btn-secondary span {
    position: relative;
    z-index: 2;
}

.mawsm-quick-view-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.mawsm-quick-view-btn-secondary {
    background: #ffffff;
    color: #667eea;
    border: 2px solid #667eea;
    position: relative;
    z-index: 1;
}

.mawsm-quick-view-btn-secondary:hover {
    background: #667eea;
    color: #ffffff;
}

/* Quick View Add to Cart Button States */
.mawsm-quick-view-btn-primary.loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.mawsm-quick-view-btn-primary.loading span::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 8px;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
}

.mawsm-quick-view-btn-primary.added {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    pointer-events: none;
}

.mawsm-quick-view-btn-primary.added span::before {
    content: '\2713 ';
    margin-right: 5px;
    font-weight: bold;
}

.mawsm-quick-view-loading {
    text-align: center;
    padding: 60px 40px;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .mawsm-quick-view-content {
        grid-template-columns: 1fr;
        padding: 30px 20px;
        gap: 30px;
    }

    .mawsm-quick-view-title {
        font-size: 22px;
    }

    .mawsm-quick-view-price {
        font-size: 26px;
    }

    .mawsm-cart-success-message {
        flex-direction: column;
        gap: 10px;
        padding: 12px 15px;
        font-size: 13px;
        right: 0;
    }

    .mawsm-success-content {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .mawsm-view-cart-btn {
        width: 100%;
        padding: 10px 20px;
        font-size: 14px;
    }

    .mawsm-quick-view-close {
        position: absolute;
    }
}

/* Submenu Content */
.mawsm-submenu-content {
    padding: 25px;
    max-height: calc(90vh - 140px);
    overflow-x: hidden;
    overflow-y: auto;
}

.product-view .mawsm-submenu-content {
    padding: 30px;
    max-height: calc(100vh - 80px);
    height: calc(100vh - 80px);
}

/* Two-Column Layout for Subcategory Expansion */
.mawsm-submenu-content.mawsm-two-column {
    display: grid;
    grid-template-columns: 260px minmax(min(500px, 60%), 1fr);
    gap: 40px;
    padding: 25px;
    align-items: start;
    overflow-x: hidden;
    max-width: 100%;
}

.mawsm-submenu-container.mawsm-expanded-view {
    max-width: min(90vw, 1600px);
    width: 90vw;
    min-width: auto;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* For larger screens, set a comfortable minimum */
@media screen and (min-width: 1400px) {
    .mawsm-submenu-container.mawsm-expanded-view {
        min-width: 1200px;
    }
}

/* Subcategory Column Styling in Two-Column Mode */
.mawsm-submenu-content.mawsm-two-column .mawsm-submenu-categories {
    display: flex !important;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    max-height: calc(90vh - 200px);
    padding-right: 8px;
}

/* Override grid layout for subcategory items in two-column mode */
.mawsm-submenu-content.mawsm-two-column .mawsm-submenu-categories .mawsm-submenu-item {
    width: 100% !important;
}

/* Ensure products column doesn't inherit subcategory flex layout */
.mawsm-submenu-content.mawsm-two-column .mawsm-submenu-products-column {
    display: block !important;
}

/* Products grid must use grid layout, not flex */
.mawsm-submenu-content.mawsm-two-column .mawsm-products-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
}

/* Subcategory items should be much smaller in two-column mode */
.mawsm-submenu-content.mawsm-two-column .mawsm-submenu-categories .mawsm-submenu-link {
    padding: 10px 12px;
    gap: 10px;
}

/* Make sure subcategory link styles don't affect product links */
.mawsm-submenu-content.mawsm-two-column .mawsm-products-grid .mawsm-submenu-link {
    padding: 18px;
}

.mawsm-submenu-content.mawsm-two-column .mawsm-submenu-categories .mawsm-submenu-image {
    width: 50px;
    height: 50px;
}

.mawsm-submenu-content.mawsm-two-column .mawsm-submenu-categories .mawsm-submenu-name {
    font-size: 13px;
}

.mawsm-submenu-content.mawsm-two-column .mawsm-submenu-categories .mawsm-submenu-description {
    font-size: 11px;
    display: none; /* Hide description to save space */
}

.mawsm-submenu-content.mawsm-two-column .mawsm-submenu-categories .mawsm-submenu-count {
    font-size: 10px;
}

/* Active subcategory highlighting */
.mawsm-subcategory-item.active .mawsm-submenu-link {
    background-color: #667eea;
    border-color: #667eea;
    color: #ffffff;
}

.mawsm-subcategory-item.active .mawsm-submenu-name,
.mawsm-subcategory-item.active .mawsm-submenu-description,
.mawsm-subcategory-item.active .mawsm-submenu-count {
    color: #ffffff;
}

/* Products Column */
.mawsm-submenu-products-column {
    overflow-x: hidden;
    overflow-y: auto;
    max-height: calc(90vh - 200px);
    min-height: 400px;
    display: block;
}

.mawsm-submenu-products-column.mawsm-visible {
    animation: slideInRight 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.mawsm-products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e5e5e5;
}

.mawsm-products-header h4 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #333333;
}

/* Product Grid - Force grid layout */
.mawsm-submenu-products-column .mawsm-products-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)) !important;
    gap: 25px !important;
    width: 100% !important;
    max-width: 100%;
    overflow: hidden;
}

.mawsm-products-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)) !important;
    gap: 25px !important;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

/* Product items in two-column mode should be vertical cards */
.mawsm-products-grid .mawsm-two-col-product {
    display: block !important;
    width: auto !important;
    max-width: none !important;
}

.mawsm-products-grid .mawsm-submenu-item {
    width: auto !important;
}

.mawsm-two-col-product .mawsm-submenu-link {
    flex-direction: column !important;
    align-items: center;
    text-align: center;
    padding: 18px;
    height: 100%;
    display: flex !important;
    width: 100%;
}

.mawsm-two-col-product .mawsm-submenu-image {
    width: 100%;
    height: 140px;
    margin-bottom: 15px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.mawsm-two-col-product .mawsm-submenu-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.mawsm-two-col-product .mawsm-submenu-text {
    width: 100%;
    align-items: center;
    flex: 1;
    display: flex !important;
    flex-direction: column;
    justify-content: space-between;
}

.mawsm-two-col-product .mawsm-submenu-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
    line-height: 1.4;
}

.mawsm-two-col-product .mawsm-submenu-price {
    font-size: 18px;
    font-weight: 700;
    color: #667eea;
    margin-top: 5px;
}

.mawsm-two-col-product .mawsm-submenu-sku {
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}

.mawsm-two-col-product .mawsm-submenu-badge {
    margin-top: 10px;
    padding: 4px 12px;
    font-size: 12px;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Submenu Categories/Products Grid (when NOT in two-column mode) */
.mawsm-submenu-categories,
.mawsm-submenu-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

/* Hide products column by default */
.mawsm-submenu-products-column {
    display: none;
}

.product-view .mawsm-submenu-products {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

/* Submenu Item */
.mawsm-submenu-item {
    opacity: 0;
    transform: translateY(20px);
    animation: itemSlideIn 0.5s ease forwards;
}

/* Product Items - Left to Right Animation */
.product-view .mawsm-submenu-item {
    opacity: 0;
    transform: translateX(-40px) scale(0.95);
    animation: itemSlideFromLeft 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-fill-mode: both;
    visibility: visible;
}

/* Animation delays are set dynamically via JavaScript based on actual item count */

@keyframes itemSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes itemSlideFromLeft {
    0% {
        opacity: 0;
        transform: translateX(-40px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* Submenu Link */
.mawsm-submenu-link {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    height: 100%;
}

.mawsm-submenu-link:hover {
    background-color: #f5f5f5;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

/* Submenu Image */
.mawsm-submenu-image {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    overflow: hidden;
    border-radius: 6px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mawsm-submenu-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.mawsm-submenu-link:hover .mawsm-submenu-image img {
    transform: scale(1.1);
}

/* Submenu Text */
.mawsm-submenu-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

/* Center text when counts are hidden */
.mawsm-hide-counts .mawsm-submenu-text {
    justify-content: center;
}

.mawsm-submenu-name {
    font-size: 16px;
    font-weight: 600;
    color: #333333;
    line-height: 1.4;
}

.mawsm-submenu-description {
    font-size: 13px;
    color: #666666;
    line-height: 1.4;
}

.mawsm-submenu-sku {
    font-size: 12px;
    color: #888888;
    font-weight: 500;
    display: block;
    margin-top: 1px;
}

.mawsm-submenu-price {
    font-size: 15px;
    font-weight: 700;
    color: #667eea;
    margin-top: 3px;
    display: block;
}

.mawsm-submenu-count {
    font-size: 12px;
    color: #999999;
}

/* Submenu Badge */
.mawsm-submenu-badge {
    display: inline-block;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 3px;
    text-transform: uppercase;
}

.mawsm-badge-sale {
    background: #ff6b6b;
    color: #ffffff;
}

/* Submenu Footer */
.mawsm-submenu-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e5e5;
    text-align: center;
}

.mawsm-view-all-link {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.mawsm-view-all-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Empty Message */
.mawsm-empty-message {
    text-align: center;
    padding: 40px 20px;
    color: #666666;
}

.mawsm-empty-message p {
    margin: 0;
    font-size: 16px;
}

/* Trigger Button */
.mawsm-trigger-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.mawsm-trigger-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
}

/* ========================================
   GLOBAL MENU - PROFESSIONAL MODERN DESIGN
   ======================================== */

/* Menu Wrapper */
.mawsm-global-menu {
    position: fixed;
    z-index: 999999;
}

/* Position Left (Default) */
.mawsm-global-menu.mawsm-position-left {
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

.mawsm-global-menu.mawsm-position-left .mawsm-global-menu-toggle {
    border-radius: 0 12px 12px 0;
}

/* Position Right */
.mawsm-global-menu.mawsm-position-right {
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.mawsm-global-menu.mawsm-position-right .mawsm-global-menu-toggle {
    border-radius: 12px 0 0 12px;
}

/* Position Top */
.mawsm-global-menu.mawsm-position-top {
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.mawsm-global-menu.mawsm-position-top .mawsm-global-menu-toggle {
    border-radius: 0 0 12px 12px;
}

/* Toggle Button - Professional Design */
.mawsm-global-menu-toggle {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 16px 18px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.35);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999999;
    overflow: hidden;
}

.mawsm-global-menu-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mawsm-global-menu-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.5);
}

.mawsm-global-menu-toggle:hover::before {
    opacity: 1;
}

.mawsm-global-menu-toggle:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Hamburger Icon - Professional Animation */
.mawsm-hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 28px;
    height: 22px;
    justify-content: center;
}

.mawsm-hamburger span {
    display: block;
    height: 3px;
    background: #ffffff;
    border-radius: 2px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.mawsm-hamburger span:nth-child(1) {
    width: 100%;
}

.mawsm-hamburger span:nth-child(2) {
    width: 85%;
}

.mawsm-hamburger span:nth-child(3) {
    width: 100%;
}

/* Active state - Smooth X animation */
.mawsm-global-menu.active .mawsm-hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mawsm-global-menu.active .mawsm-hamburger span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.mawsm-global-menu.active .mawsm-hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Hover effect on hamburger */
.mawsm-global-menu-toggle:hover .mawsm-hamburger span:nth-child(2) {
    width: 100%;
}

/* Subtle pulse animation for attention */
@keyframes mawsmPulse {
    0%, 100% {
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.35);
    }
    50% {
        box-shadow: 0 6px 30px rgba(102, 126, 234, 0.55);
    }
}

.mawsm-global-menu-toggle {
    animation: mawsmPulse 3s ease-in-out infinite;
}

.mawsm-global-menu-toggle:hover,
.mawsm-global-menu.active .mawsm-global-menu-toggle {
    animation: none;
}

/* Overlay - Independent */
.mawsm-global-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 999998;
}

.mawsm-global-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Sliding Panel - Default (slides from left) */
.mawsm-global-menu-panel {
    position: fixed;
    top: 0;
    height: 100vh;
    background: #ffffff;
    overflow: hidden;
    width: 0;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999999;
}

/* Panel slides from left (default) */
.mawsm-position-left ~ .mawsm-global-menu-panel,
.mawsm-position-top ~ .mawsm-global-menu-panel {
    left: 0;
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.2);
}

/* Panel slides from right */
.mawsm-position-right ~ .mawsm-global-menu-panel {
    right: 0;
    box-shadow: -4px 0 30px rgba(0, 0, 0, 0.2);
}

.mawsm-global-menu-panel.active {
    width: 400px;
}

.mawsm-global-menu-panel.active.expanded {
    width: 800px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mawsm-global-menu-panel.active.expanded.products-view {
    width: 1200px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Panel Header */
.mawsm-global-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-bottom: none;
}

.mawsm-global-menu-header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.mawsm-global-menu-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    font-size: 26px;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mawsm-global-menu-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Panel Content */
.mawsm-global-menu-content {
    display: flex;
    height: calc(100vh - 85px);
    position: relative;
}

/* Left Column - Parent Categories */
.mawsm-parent-categories-column {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 25px 20px;
}

/* Middle Column - Subcategories */
.mawsm-subcategories-column {
    flex: 0;
    width: 0;
    overflow: hidden;
    padding: 0;
    background: #f8f9fa;
    border-left: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.mawsm-global-menu-panel.active.expanded .mawsm-subcategories-column {
    flex: 1;
    width: 50%;
    padding: 25px 20px;
    overflow-y: auto;
    overflow-x: hidden;
}

/* When products are shown, adjust subcategory column width */
.mawsm-global-menu-panel.active.expanded.products-view .mawsm-subcategories-column {
    width: 35%;
    flex: 0 0 35%;
}

/* Right Column - Products */
.mawsm-products-column {
    flex: 0;
    width: 0;
    overflow: hidden;
    padding: 0;
    background: #ffffff;
    border-left: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.mawsm-global-menu-panel.active.expanded.products-view .mawsm-products-column {
    flex: 1;
    width: 40%;
    padding: 25px 20px;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Parent Products Only - No Subcategories */
.mawsm-global-menu-panel.active.parent-products-only {
    width: 1000px;
}

.mawsm-global-menu-panel.active.parent-products-only .mawsm-parent-categories-column {
    flex: 0 0 400px;
    width: 400px;
    min-width: 400px;
}

.mawsm-global-menu-panel.active.parent-products-only .mawsm-subcategories-column {
    display: none !important;
    flex: 0;
    width: 0;
    padding: 0;
}

.mawsm-global-menu-panel.active.parent-products-only .mawsm-products-column {
    flex: 1;
    width: calc(100% - 400px);
    padding: 25px 20px;
    overflow-y: auto;
    overflow-x: hidden;
}

.mawsm-products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 0 25px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.mawsm-products-header-title {
    font-size: 18px;
    font-weight: 700;
    color: #2d3748;
    margin: 0;
}

.mawsm-view-all-products-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.mawsm-view-all-products-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    color: #ffffff;
}

.mawsm-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
    gap: 14px;
}

.mawsm-subcategories-header {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin: 0 0 25px 0;
    padding-bottom: 15px;
    border-bottom: 3px solid #667eea;
}

.mawsm-subcategories-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Parent Category Item */
.mawsm-global-menu-item {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mawsm-global-menu-panel.active .mawsm-global-menu-item {
    opacity: 1;
    transform: translateX(0);
}

/* Staggered Animation */
.mawsm-global-menu-panel.active .mawsm-global-menu-item:nth-child(1) { transition-delay: 0.55s; }
.mawsm-global-menu-panel.active .mawsm-global-menu-item:nth-child(2) { transition-delay: 0.6s; }
.mawsm-global-menu-panel.active .mawsm-global-menu-item:nth-child(3) { transition-delay: 0.65s; }
.mawsm-global-menu-panel.active .mawsm-global-menu-item:nth-child(4) { transition-delay: 0.7s; }
.mawsm-global-menu-panel.active .mawsm-global-menu-item:nth-child(5) { transition-delay: 0.75s; }
.mawsm-global-menu-panel.active .mawsm-global-menu-item:nth-child(6) { transition-delay: 0.8s; }
.mawsm-global-menu-panel.active .mawsm-global-menu-item:nth-child(7) { transition-delay: 0.85s; }
.mawsm-global-menu-panel.active .mawsm-global-menu-item:nth-child(8) { transition-delay: 0.9s; }
.mawsm-global-menu-panel.active .mawsm-global-menu-item:nth-child(9) { transition-delay: 0.95s; }
.mawsm-global-menu-panel.active .mawsm-global-menu-item:nth-child(10) { transition-delay: 1.0s; }

.mawsm-global-menu-item {
    margin-bottom: 12px;
}

/* Parent Category Card */
.mawsm-parent-category {
    background: #ffffff;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mawsm-parent-category:hover {
    border-color: #667eea;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.15);
    transform: translateX(8px);
}

/* Enhanced hover indication for hover mode */
.submenu-on-hover .mawsm-parent-category:hover {
    border-color: #667eea;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
    transform: translateX(10px);
}

.mawsm-global-menu-item.active .mawsm-parent-category {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.mawsm-parent-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    color: #2d3748;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    transition: color 0.3s ease;
}

.mawsm-global-menu-item.active .mawsm-parent-link {
    color: #ffffff;
}

.mawsm-parent-category-name {
    flex: 1;
}

/* Category Images */
.mawsm-category-image {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 15px;
    flex-shrink: 0;
    display: none;
    border: 2px solid #e8e8e8;
    transition: border-color 0.3s ease;
}

.show-images .mawsm-category-image {
    display: block;
}

.mawsm-category-image img,
.mawsm-category-image picture {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mawsm-parent-category:hover .mawsm-category-image {
    border-color: #667eea;
}

.mawsm-global-menu-item.active .mawsm-category-image {
    border-color: rgba(255, 255, 255, 0.5);
}

/* Subcategory images */
.mawsm-subcategory-link {
    display: flex;
    align-items: center;
}

.mawsm-subcategory-link .mawsm-category-image {
    width: 45px;
    height: 45px;
    margin-right: 12px;
}

.mawsm-product-count {
    font-size: 13px;
    font-weight: 600;
    background: rgba(102, 126, 234, 0.12);
    padding: 6px 12px;
    border-radius: 20px;
    color: #667eea;
}

.mawsm-global-menu-item.active .mawsm-product-count {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* Hide old accordion elements */
.mawsm-expand-toggle,
.mawsm-subcategory-list {
    display: none !important;
}

/* Subcategory Items in Right Column */
.mawsm-subcategory-item-new {
    opacity: 0;
    transform: translateX(-25px);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mawsm-global-menu-panel.active.expanded .mawsm-subcategory-item-new {
    opacity: 1;
    transform: translateX(0);
}

/* Staggered Subcategory Animation */
.mawsm-global-menu-panel.active.expanded .mawsm-subcategory-item-new:nth-child(1) { transition-delay: 0.5s; }
.mawsm-global-menu-panel.active.expanded .mawsm-subcategory-item-new:nth-child(2) { transition-delay: 0.55s; }
.mawsm-global-menu-panel.active.expanded .mawsm-subcategory-item-new:nth-child(3) { transition-delay: 0.6s; }
.mawsm-global-menu-panel.active.expanded .mawsm-subcategory-item-new:nth-child(4) { transition-delay: 0.65s; }
.mawsm-global-menu-panel.active.expanded .mawsm-subcategory-item-new:nth-child(5) { transition-delay: 0.7s; }
.mawsm-global-menu-panel.active.expanded .mawsm-subcategory-item-new:nth-child(6) { transition-delay: 0.75s; }
.mawsm-global-menu-panel.active.expanded .mawsm-subcategory-item-new:nth-child(7) { transition-delay: 0.8s; }
.mawsm-global-menu-panel.active.expanded .mawsm-subcategory-item-new:nth-child(8) { transition-delay: 0.85s; }
.mawsm-global-menu-panel.active.expanded .mawsm-subcategory-item-new:nth-child(9) { transition-delay: 0.9s; }
.mawsm-global-menu-panel.active.expanded .mawsm-subcategory-item-new:nth-child(10) { transition-delay: 0.95s; }

.mawsm-subcategory-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    color: #2d3748;
    text-decoration: none;
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 15px;
    font-weight: 500;
    position: relative;
}

.mawsm-subcategory-name {
    font-weight: 600;
}

.mawsm-subcategory-link:hover {
    background: #ffffff;
    border-color: #667eea;
    transform: translateX(8px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.12);
}

.mawsm-subcategory-link .mawsm-product-count {
    margin-left: 0;
}

/* Product Preview Container */
.mawsm-product-preview-container {
    position: absolute;
    right: 50px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 6px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    pointer-events: none;
}

.show-product-preview .mawsm-subcategory-item,
.show-product-preview .mawsm-subcategory-item-new {
    position: relative;
}

.show-product-preview .mawsm-subcategory-item:hover .mawsm-product-preview-container,
.show-product-preview .mawsm-subcategory-item-new:hover .mawsm-product-preview-container {
    opacity: 1;
    visibility: visible;
    right: 55px;
}

.mawsm-preview-product {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #667eea;
    box-shadow: 0 3px 12px rgba(102, 126, 234, 0.2);
    flex-shrink: 0;
    opacity: 0;
    transform: translateX(40px);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding: 4px;
}

.show-product-preview .mawsm-subcategory-item:hover .mawsm-preview-product,
.show-product-preview .mawsm-subcategory-item-new:hover .mawsm-preview-product {
    opacity: 1;
    transform: translateX(0);
}

.show-product-preview .mawsm-subcategory-item:hover .mawsm-preview-product:nth-child(1),
.show-product-preview .mawsm-subcategory-item-new:hover .mawsm-preview-product:nth-child(1) {
    transition-delay: 0s;
}

.show-product-preview .mawsm-subcategory-item:hover .mawsm-preview-product:nth-child(2),
.show-product-preview .mawsm-subcategory-item-new:hover .mawsm-preview-product:nth-child(2) {
    transition-delay: 0.1s;
}

.show-product-preview .mawsm-subcategory-item:hover .mawsm-preview-product:nth-child(3),
.show-product-preview .mawsm-subcategory-item-new:hover .mawsm-preview-product:nth-child(3) {
    transition-delay: 0.2s;
}

.mawsm-subcategory-item:hover .mawsm-preview-product,
.mawsm-subcategory-item-new:hover .mawsm-preview-product {
    border-color: #667eea;
}

.mawsm-preview-product:hover {
    transform: scale(1.3) translateX(0);
    z-index: 100;
    box-shadow: 0 8px 28px rgba(102, 126, 234, 0.5);
    border-color: #667eea;
}

.mawsm-preview-product img,
.mawsm-preview-product picture {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mawsm-preview-product:hover img {
    transform: scale(1.1);
}


/* Product Items in Right Column */
.mawsm-product-item-new {
    opacity: 0;
    transform: translateX(-25px);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mawsm-global-menu-panel.active.expanded.products-view .mawsm-product-item-new {
    opacity: 1;
    transform: translateX(0);
}

/* Staggered Product Animation */
.mawsm-global-menu-panel.active.expanded.products-view .mawsm-product-item-new:nth-child(1) { transition-delay: 0.5s; }
.mawsm-global-menu-panel.active.expanded.products-view .mawsm-product-item-new:nth-child(2) { transition-delay: 0.55s; }
.mawsm-global-menu-panel.active.expanded.products-view .mawsm-product-item-new:nth-child(3) { transition-delay: 0.6s; }
.mawsm-global-menu-panel.active.expanded.products-view .mawsm-product-item-new:nth-child(4) { transition-delay: 0.65s; }
.mawsm-global-menu-panel.active.expanded.products-view .mawsm-product-item-new:nth-child(5) { transition-delay: 0.7s; }
.mawsm-global-menu-panel.active.expanded.products-view .mawsm-product-item-new:nth-child(6) { transition-delay: 0.75s; }
.mawsm-global-menu-panel.active.expanded.products-view .mawsm-product-item-new:nth-child(7) { transition-delay: 0.8s; }
.mawsm-global-menu-panel.active.expanded.products-view .mawsm-product-item-new:nth-child(8) { transition-delay: 0.85s; }
.mawsm-global-menu-panel.active.expanded.products-view .mawsm-product-item-new:nth-child(9) { transition-delay: 0.9s; }
.mawsm-global-menu-panel.active.expanded.products-view .mawsm-product-item-new:nth-child(10) { transition-delay: 0.95s; }

.mawsm-product-card {
    display: flex;
    flex-direction: column;
    padding: 0;
    color: #2d3748;
    text-decoration: none;
    background: #ffffff;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    height: 100%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.mawsm-product-card:hover {
    border-color: #667eea;
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.2);
}

.mawsm-product-image {
    width: 100%;
    height: 140px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 10px;
}

.mawsm-product-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.mawsm-product-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    background: #ffffff;
    text-align: center;
    align-items: center;
}

.mawsm-product-name {
    font-size: 13px;
    font-weight: 600;
    color: #1a202c;
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 34px;
    text-align: center;
    width: 100%;
}

.mawsm-product-sku {
    font-size: 10px;
    color: #a0aec0;
    margin: 0;
    font-weight: 500;
    text-align: center;
}

.mawsm-product-price {
    font-size: 17px;
    font-weight: 700;
    color: #667eea !important;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 4px;
    text-align: center;
}

.mawsm-product-price .amount,
.mawsm-product-price .woocommerce-Price-amount {
    color: #667eea !important;
    font-weight: 800;
}

.mawsm-product-price del {
    font-size: 15px;
    color: #cbd5e0;
    font-weight: 600;
    opacity: 0.7;
}

.mawsm-product-price del .amount {
    color: #cbd5e0 !important;
}

.mawsm-sale-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 800;
    border-radius: 6px;
    text-transform: uppercase;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: #ffffff;
    letter-spacing: 0.8px;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
    z-index: 1;
}

.mawsm-product-badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    margin-top: 8px;
    background: #ff6b6b;
    color: #ffffff;
}

/* Inline Menu */
.mawsm-inline-menu .mawsm-submenu-container {
    opacity: 1;
    transform: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.mawsm-inline-menu .mawsm-submenu-close {
    display: none;
}

/* ========================================
   RESPONSIVE STYLES
   ======================================== */

/* Large Desktop (1400px+): 5-6 columns */
/* Default styles above handle this */

/* Medium Desktop & Large Tablets (1024px - 1400px): 3-4 columns */
@media screen and (max-width: 1400px) {
    .mawsm-submenu-container.mawsm-expanded-view {
        width: 95%;
        min-width: 1000px;
    }

    .mawsm-products-grid,
    .mawsm-submenu-content.mawsm-two-column .mawsm-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
        gap: 20px !important;
    }

    .mawsm-two-col-product .mawsm-submenu-image {
        height: 140px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 10px;
    }

    .mawsm-two-col-product .mawsm-submenu-image img {
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: auto;
        object-fit: contain;
    }
}

/* Tablets (768px - 1024px): 2-3 columns, stacked layout */
@media screen and (max-width: 1024px) {
    .mawsm-submenu-container.mawsm-expanded-view {
        width: 98% !important;
        min-width: auto !important;
    }

    .mawsm-submenu-content.mawsm-two-column {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

    .mawsm-submenu-content.mawsm-two-column .mawsm-submenu-categories {
        max-height: 300px;
        margin-bottom: 20px;
        border-bottom: 2px solid #e5e5e5;
        padding-bottom: 15px;
    }

    .mawsm-products-grid,
    .mawsm-submenu-content.mawsm-two-column .mawsm-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
        gap: 18px !important;
    }

    .mawsm-two-col-product .mawsm-submenu-image {
        height: 120px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 8px;
    }

    .mawsm-two-col-product .mawsm-submenu-image img {
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: auto;
        object-fit: contain;
    }
}

/* Mobile Landscape & Tablets (max 768px): 2 columns */
@media screen and (max-width: 768px) {
    /* Full-Screen Submenu on Mobile */
    .mawsm-submenu-container {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        max-width: 100% !important;
        max-height: 100vh !important;
        min-width: 100% !important;
        border-radius: 0 !important;
        margin: 0 !important;
    }

    .mawsm-submenu-header {
        padding: 20px !important;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 100 !important;
    }

    .mawsm-submenu-title {
        font-size: 20px !important;
        color: #ffffff !important;
        font-weight: 700 !important;
    }

    .mawsm-close-btn {
        width: 36px !important;
        height: 36px !important;
        font-size: 24px !important;
        background: rgba(255, 255, 255, 0.2) !important;
        color: white !important;
        border: none !important;
        border-radius: 50% !important;
    }

    .mawsm-submenu-content {
        padding: 0 !important;
        height: calc(100vh - 80px) !important;
        max-height: calc(100vh - 80px) !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        position: relative !important;
        background: #f8f9fa !important;
    }

    /* When in two-column mode, disable parent scroll and let columns handle it */
    .mawsm-submenu-content.mawsm-two-column {
        overflow: hidden !important;
    }

    /* Category grid - 2 columns - Very compact */
    .mawsm-submenu-categories {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        padding: 10px !important;
        padding-bottom: 50px !important;
        width: 100% !important;
        margin: 0 !important;
        max-height: none !important;
        height: auto !important;
    }

    /* Category & Product items - Compact cards */
    .mawsm-submenu-item {
        display: block !important;
        margin: 0 !important;
    }

    .mawsm-submenu-link {
        display: flex !important;
        flex-direction: column !important;
        text-decoration: none !important;
        background: #fff !important;
        border: none !important;
        border-radius: 8px !important;
        overflow: hidden !important;
        transition: all 0.3s ease !important;
        height: 100% !important;
        box-shadow: 0 2px 6px rgba(0,0,0,0.08) !important;
    }

    .mawsm-submenu-link:hover {
        box-shadow: 0 4px 12px rgba(0,0,0,0.12) !important;
        transform: translateY(-2px) !important;
    }

    /* Images - Very compact for categories */
    .mawsm-submenu-image {
        width: 100% !important;
        height: 55px !important;
        overflow: hidden !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: #f0f0f0 !important;
        position: relative !important;
        flex-shrink: 0 !important;
    }

    .mawsm-submenu-image img {
        max-width: 100% !important;
        max-height: 100% !important;
        width: auto !important;
        height: auto !important;
        object-fit: contain !important;
        display: block !important;
    }

    .mawsm-two-col-product .mawsm-submenu-image {
        height: 80px !important;
    }

    /* Text section - Balanced for categories */
    .mawsm-submenu-text {
        padding: 8px !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 3px !important;
        flex: 1 !important;
        background: #fff !important;
        min-height: 38px !important;
    }

    .mawsm-submenu-name {
        font-size: 12px !important;
        font-weight: 600 !important;
        color: #1a1a1a !important;
        line-height: 1.3 !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        margin: 0 !important;
        min-height: 30px !important;
    }

    .mawsm-submenu-price {
        font-size: 15px !important;
        font-weight: 700 !important;
        color: #667eea !important;
        margin: 0 !important;
    }

    .mawsm-submenu-description,
    .mawsm-submenu-count,
    .mawsm-submenu-sku {
        display: none !important;
    }

    .mawsm-submenu-badge {
        display: none !important;
    }

    /* Force grid for categories - override any inline styles */
    .mawsm-submenu-content:not(.mawsm-two-column) .mawsm-submenu-categories,
    .mawsm-submenu-content.mawsm-two-column .mawsm-submenu-categories {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        max-height: 100% !important;
        height: auto !important;
    }

    /* Slide Navigation for Two-Column Layout - Override parent overflow */
    .mawsm-submenu-content.mawsm-two-column {
        position: relative !important;
        height: calc(100vh - 80px) !important;
        max-height: calc(100vh - 80px) !important;
        overflow: hidden !important;
    }

    .mawsm-submenu-container.mawsm-expanded-view {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
    }

    .mawsm-submenu-categories-column,
    .mawsm-submenu-products-column {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
        background: #f8f9fa !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, visibility 0.3s ease !important;
        padding: 0 !important;
        -webkit-overflow-scrolling: touch !important;
        touch-action: pan-y !important;
    }

    /* Categories column - visible by default */
    .mawsm-submenu-categories-column {
        transform: translateX(0) !important;
        z-index: 1 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        touch-action: pan-y !important;
        pointer-events: auto !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    /* Products column - hidden to the right */
    .mawsm-submenu-products-column {
        transform: translateX(100%) !important;
        z-index: 0 !important;
        display: block !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    /* When products are shown - slide categories left, products in */
    .mawsm-submenu-content.mawsm-two-column.products-active .mawsm-submenu-categories-column {
        transform: translateX(-100%) !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        z-index: 1 !important;
        pointer-events: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }

    .mawsm-submenu-content.mawsm-two-column.products-active .mawsm-submenu-products-column {
        transform: translateX(0) !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        touch-action: pan-y !important;
        z-index: 10 !important;
        pointer-events: auto !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
        max-height: 100% !important;
    }

    /* When navigating back - ensure categories can scroll */
    .mawsm-submenu-content.mawsm-two-column:not(.products-active) .mawsm-submenu-categories-column {
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        z-index: 10 !important;
        pointer-events: auto !important;
        touch-action: pan-y !important;
        transform: translateX(0) !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
    }

    /* Hide products column when not active */
    .mawsm-submenu-content.mawsm-two-column:not(.products-active) .mawsm-submenu-products-column {
        z-index: 0 !important;
        pointer-events: none !important;
        touch-action: none !important;
        transform: translateX(100%) !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }

    .mawsm-submenu-categories-column .mawsm-submenu-categories {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        padding: 10px !important;
        padding-bottom: 50px !important;
        margin: 0 !important;
        border: none !important;
        width: 100% !important;
        max-height: 100% !important;
        height: auto !important;
        overflow: visible !important;
        pointer-events: auto !important;
    }

    /* Ensure category items in slide view maintain proper styling */
    .mawsm-submenu-categories-column .mawsm-submenu-item {
        display: block !important;
        margin: 0 !important;
        width: 100% !important;
    }

    .mawsm-submenu-categories-column .mawsm-submenu-link {
        display: flex !important;
        flex-direction: column !important;
        height: 100% !important;
    }

    .mawsm-submenu-categories-column .mawsm-submenu-image {
        height: 55px !important;
    }

    .mawsm-submenu-categories-column .mawsm-submenu-text {
        padding: 8px !important;
        min-height: 38px !important;
        gap: 3px !important;
    }

    .mawsm-submenu-categories-column .mawsm-submenu-name {
        font-size: 12px !important;
        min-height: 30px !important;
    }

    .mawsm-submenu-products-column .mawsm-products-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        padding: 10px !important;
        padding-bottom: 50px !important;
        margin: 0 !important;
        width: 100% !important;
    }

    /* Back button for submenu products - now using real button element */
    .mawsm-submenu-products-column::before {
        display: none !important;
    }

    /* Products header in slide view */
    .mawsm-submenu-products-column .mawsm-products-header {
        display: none !important;
    }

    /* Product grid - 2 columns - Very compact */
    .mawsm-submenu-products {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        padding: 10px !important;
        padding-bottom: 50px !important;
        width: 100% !important;
    }

    .mawsm-products-grid,
    .mawsm-submenu-content.mawsm-two-column .mawsm-products-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        padding: 10px !important;
        padding-bottom: 50px !important;
        width: 100% !important;
    }

    .mawsm-popup-content-wrapper.product-view {
        max-width: 95% !important;
        width: 95% !important;
    }

    .product-view .mawsm-submenu-products {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Product cards - Match global menu style exactly */
    .mawsm-two-col-product .mawsm-submenu-link {
        display: flex !important;
        flex-direction: column !important;
        padding: 0 !important;
        text-decoration: none !important;
        background: #ffffff !important;
        border: 1px solid #d0d0d0 !important;
        border-radius: 8px !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        overflow: hidden !important;
        height: 100% !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    }

    .mawsm-two-col-product .mawsm-submenu-link:hover {
        border-color: #667eea !important;
        transform: translateY(-2px) !important;
        box-shadow: 0 8px 20px rgba(102, 126, 234, 0.15) !important;
    }

    /* Product images - More compact */
    .mawsm-two-col-product .mawsm-submenu-image {
        width: 100% !important;
        height: 80px !important;
        overflow: hidden !important;
        background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        position: relative !important;
        padding: 6px !important;
        margin: 0 !important;
    }

    .mawsm-two-col-product .mawsm-submenu-image img {
        max-width: 100% !important;
        max-height: 100% !important;
        width: auto !important;
        height: auto !important;
        object-fit: contain !important;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }

    .mawsm-two-col-product .mawsm-submenu-link:hover .mawsm-submenu-image img {
        transform: scale(1.05) !important;
    }

    /* Product text section - More compact */
    .mawsm-two-col-product .mawsm-submenu-text {
        padding: 8px !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 3px !important;
        flex: 1 !important;
        background: #ffffff !important;
        text-align: center !important;
        align-items: center !important;
        min-height: 40px !important;
    }

    .mawsm-two-col-product .mawsm-submenu-name {
        font-size: 12px !important;
        font-weight: 600 !important;
        color: #2d3748 !important;
        line-height: 1.3 !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        margin: 0 !important;
        min-height: 28px !important;
        text-align: center !important;
    }

    .mawsm-two-col-product .mawsm-submenu-price {
        font-size: 15px !important;
        font-weight: 700 !important;
        color: #667eea !important;
        margin: 0 !important;
    }

    .mawsm-two-col-product .mawsm-submenu-sku {
        font-size: 11px !important;
        color: #999 !important;
        margin: 0 !important;
    }

    .mawsm-two-col-product .mawsm-submenu-badge {
        display: none !important;
    }

    /* Global Menu Mobile - Slide Navigation */
    .mawsm-global-menu.mawsm-position-top {
        top: 10px;
    }

    .mawsm-global-menu-toggle {
        padding: 12px 14px;
    }

    /* Category images on mobile */
    .mawsm-category-image {
        width: 45px;
        height: 45px;
        margin-right: 12px;
    }

    .mawsm-subcategory-link .mawsm-category-image {
        width: 40px;
        height: 40px;
        margin-right: 10px;
    }

    /* Full screen mobile panel */
    .mawsm-global-menu-panel.active {
        width: 100%;
        max-width: 100%;
        height: 100vh;
        max-height: 100vh;
        left: 0;
        right: 0;
    }

    .mawsm-global-menu-panel.active.expanded,
    .mawsm-global-menu-panel.active.expanded.products-view,
    .mawsm-global-menu-panel.active.parent-products-only {
        width: 100%;
        max-width: 100%;
    }

    /* Slide-based column layout */
    .mawsm-global-menu-content {
        position: relative;
        flex-direction: row;
        height: calc(100vh - 70px);
        overflow: hidden;
    }

    /* Each column takes full width and slides */
    .mawsm-parent-categories-column,
    .mawsm-subcategories-column,
    .mawsm-products-column {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: #fff;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        transform: translateX(0);
        overflow-y: auto;
        border: none;
        padding: 20px;
    }

    /* Parent categories - always visible initially */
    .mawsm-parent-categories-column {
        transform: translateX(0);
        z-index: 1;
    }

    /* When expanded, parent categories slide out to left */
    .mawsm-global-menu-panel.active.expanded .mawsm-parent-categories-column,
    .mawsm-global-menu-panel.active.parent-products-only .mawsm-parent-categories-column {
        transform: translateX(-100%);
    }

    /* Subcategories - slide in from right */
    .mawsm-subcategories-column {
        transform: translateX(100%);
        z-index: 2;
        padding-top: 35px !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
        padding-bottom: 20px !important;
    }

    .mawsm-global-menu-panel.active.expanded .mawsm-subcategories-column {
        transform: translateX(0);
        width: 100% !important;
        flex: none !important;
    }

    /* When products view, subcategories slide out to left */
    .mawsm-global-menu-panel.active.expanded.products-view .mawsm-subcategories-column {
        transform: translateX(-100%);
        width: 100% !important;
    }

    /* Products - slide in from right */
    .mawsm-products-column {
        transform: translateX(100%);
        z-index: 3;
        padding-top: 35px !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
        padding-bottom: 20px !important;
    }

    .mawsm-global-menu-panel.active.expanded.products-view .mawsm-products-column,
    .mawsm-global-menu-panel.active.parent-products-only .mawsm-products-column {
        transform: translateX(0);
        width: 100% !important;
        flex: none !important;
    }

    /* Mobile back button */
    .mawsm-mobile-back-btn {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        position: absolute !important;
        top: 5px !important;
        left: 15px !important;
        right: auto !important;
        bottom: auto !important;
        padding: 8px 14px !important;
        margin: 0 !important;
        background: #667eea !important;
        background-color: #667eea !important;
        color: white !important;
        border: none !important;
        border-radius: 25px !important;
        font-size: 14px !important;
        font-weight: 600 !important;
        line-height: 1.2 !important;
        cursor: pointer !important;
        z-index: 100 !important;
        box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3) !important;
        transition: all 0.2s ease !important;
        width: auto !important;
        height: auto !important;
        min-width: auto !important;
        min-height: auto !important;
        max-width: none !important;
        max-height: none !important;
        text-transform: none !important;
        letter-spacing: normal !important;
        text-decoration: none !important;
        vertical-align: middle !important;
        white-space: nowrap !important;
    }

    .mawsm-mobile-back-btn:hover {
        background: #5568d3 !important;
        background-color: #5568d3 !important;
        transform: translateX(-2px) !important;
        color: white !important;
    }

    .mawsm-mobile-back-btn:before {
        content: '←' !important;
        font-size: 18px !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Hide back button on desktop */
    @media screen and (min-width: 769px) {
        .mawsm-mobile-back-btn {
            display: none !important;
        }
    }

    /* Product cards on mobile */
    .mawsm-products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }

    .mawsm-product-image {
        height: 140px !important;
        padding: 8px !important;
    }

    .mawsm-product-image img {
        object-fit: contain !important;
        max-width: 100% !important;
        max-height: 100% !important;
    }

    .mawsm-product-card {
        min-width: auto;
    }

    .mawsm-product-name {
        font-size: 13px !important;
        min-height: 32px !important;
        line-height: 1.3;
    }

    .mawsm-product-price {
        font-size: 15px !important;
    }

    /* Subcategories header on mobile */
    .mawsm-subcategories-column .mawsm-subcategories-header {
        font-size: 18px !important;
        font-weight: 700 !important;
        color: #333 !important;
        margin: 18px 0 15px 0 !important;
        padding: 0 0 10px 0 !important;
        border-bottom: 2px solid #667eea !important;
        text-align: left !important;
        position: relative !important;
        top: 0 !important;
        z-index: 1 !important;
    }

    /* Products header on mobile */
    .mawsm-products-column .mawsm-products-header {
        margin: 18px 0 15px 0 !important;
        padding: 0 0 10px 0 !important;
        border-bottom: 2px solid #667eea !important;
        position: relative !important;
        top: 0 !important;
        z-index: 1 !important;
    }

    .mawsm-products-column .mawsm-products-header-title {
        font-size: 18px !important;
        font-weight: 700 !important;
        color: #333 !important;
        margin: 0 !important;
    }

    /* Subcategories grid on mobile */
    .mawsm-subcategories-grid {
        gap: 12px;
    }

    .mawsm-subcategory-item-new {
        margin-bottom: 0;
    }

    .mawsm-subcategory-link {
        padding: 14px 16px;
        font-size: 14px;
    }

    /* Parent category items */
    .mawsm-parent-category {
        margin-bottom: 8px;
    }

    .mawsm-parent-link {
        padding: 16px 18px;
        font-size: 15px;
    }

    .mawsm-parent-category-name {
        font-size: 15px !important;
    }

    .mawsm-product-count {
        font-size: 13px !important;
    }
}

/* Small Mobile (max 480px): 1 column */
@media screen and (max-width: 480px) {
    .mawsm-submenu-link {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 12px;
    }

    .mawsm-submenu-image {
        width: 100%;
        height: 220px !important;
        object-fit: cover;
    }

    /* Keep 2 columns for products on all mobile screens */
    .mawsm-products-grid,
    .mawsm-submenu-content.mawsm-two-column .mawsm-products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    /* Keep 2 columns for categories and products on all mobile screens */
    .mawsm-submenu-products,
    .mawsm-submenu-categories {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Also force 2 columns in categories column */
    .mawsm-submenu-categories-column .mawsm-submenu-categories {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .mawsm-two-col-product .mawsm-submenu-image {
        height: 120px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 8px !important;
    }

    .mawsm-two-col-product .mawsm-submenu-image img {
        max-width: 100% !important;
        max-height: 100% !important;
        width: auto !important;
        height: auto !important;
        object-fit: contain !important;
    }

    .mawsm-submenu-container.mawsm-expanded-view {
        width: 100% !important;
    }

    .mawsm-products-header h4 {
        font-size: 16px;
    }

    /* Global menu - keep 2 columns */
    .mawsm-products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    .mawsm-product-image {
        height: 120px !important;
        padding: 8px !important;
    }

    .mawsm-product-image img {
        object-fit: contain !important;
        max-width: 100% !important;
        max-height: 100% !important;
    }

    .mawsm-product-name {
        font-size: 14px !important;
        min-height: 36px !important;
    }

    .mawsm-product-price {
        font-size: 16px !important;
    }

    .mawsm-category-image {
        width: 50px;
        height: 50px;
    }

    .mawsm-parent-link,
    .mawsm-subcategory-link {
        padding: 18px 20px;
        font-size: 16px;
    }
}

/* Scrollbar Styling */
.mawsm-submenu-content::-webkit-scrollbar,
.mawsm-global-menu-panel::-webkit-scrollbar {
    width: 8px;
}

.mawsm-submenu-content::-webkit-scrollbar-track,
.mawsm-global-menu-panel::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.mawsm-submenu-content::-webkit-scrollbar-thumb,
.mawsm-global-menu-panel::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.mawsm-submenu-content::-webkit-scrollbar-thumb:hover,
.mawsm-global-menu-panel::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Loading State - Professional Loader */
.mawsm-professional-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    min-height: 300px;
}

.mawsm-loader-spinner {
    position: relative;
    width: 80px;
    height: 80px;
    margin-bottom: 24px;
}

.mawsm-loader-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid transparent;
}

.mawsm-loader-ring:nth-child(1) {
    border-top-color: #667eea;
    border-right-color: #667eea;
    animation: mawsmLoaderRotate 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

.mawsm-loader-ring:nth-child(2) {
    border-bottom-color: #764ba2;
    border-left-color: #764ba2;
    animation: mawsmLoaderRotate 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
    animation-delay: -0.75s;
}

.mawsm-loader-ring:nth-child(3) {
    border-top-color: #f093fb;
    border-right-color: #f093fb;
    animation: mawsmLoaderRotate 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
    animation-delay: -0.5s;
    width: 60px;
    height: 60px;
    top: 10px;
    left: 10px;
}

.mawsm-loader-dot {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #667eea;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: mawsmLoaderPulse 1.5s ease-in-out infinite;
}

.mawsm-loader-text {
    font-size: 16px;
    font-weight: 500;
    color: #667eea;
    animation: mawsmLoaderTextFade 1.5s ease-in-out infinite;
}

@keyframes mawsmLoaderRotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes mawsmLoaderPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0.5;
    }
}

@keyframes mawsmLoaderTextFade {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Old loading spinner - keep for quick view */
.mawsm-loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 40px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Cart Success Message in Quick View */
.mawsm-cart-success-message {
    position: absolute;
    top: 0;
    left: 0;
    right: 60px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: #ffffff;
    padding: 14px 20px;
    border-radius: 0;
    font-size: 14px;
    line-height: 1.4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    animation: mawsmSuccessSlideDown 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    box-shadow: 0 4px 16px rgba(40, 167, 69, 0.4);
    z-index: 10;
}

.mawsm-quick-view-content {
    position: relative;
}

.mawsm-success-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.mawsm-success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
    flex-shrink: 0;
}

.mawsm-success-text {
    flex: 1;
}

.mawsm-view-cart-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 18px;
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.mawsm-view-cart-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.mawsm-view-cart-btn:active {
    transform: translateY(0);
}

@keyframes mawsmSuccessSlideDown {
    0% {
        opacity: 0;
        transform: translateY(-30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hide WooCommerce default added to cart messages in quick view */
.mawsm-quick-view-modal .woocommerce-message,
.mawsm-quick-view-modal .woocommerce-notices-wrapper {
    display: none !important;
}

/* Style "View cart" link that appears after add to cart - ONLY in quick view modal */
.mawsm-quick-view-modal .added_to_cart,
.mawsm-quick-view-modal a.added_to_cart {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 15px 30px !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #ffffff !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    border: none !important;
    border-radius: 0 !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3) !important;
    text-transform: none !important;
    position: relative !important;
    overflow: hidden !important;
    flex: 1 !important;
}

.mawsm-quick-view-modal .added_to_cart::before {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 0 !important;
    height: 0 !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.3) !important;
    transform: translate(-50%, -50%) !important;
    transition: width 0.6s ease, height 0.6s ease !important;
}

.mawsm-quick-view-modal .added_to_cart:hover::before {
    width: 300px !important;
    height: 300px !important;
}

.mawsm-quick-view-modal .added_to_cart span {
    position: relative !important;
    z-index: 2 !important;
}

.mawsm-quick-view-modal .added_to_cart:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4) !important;
    color: #ffffff !important;
}

/* Error State */
.mawsm-error {
    padding: 20px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    color: #856404;
    text-align: center;
}

/* ============================================
   PLAIN STYLE (Black Text, No Gradients)
   ============================================ */

/* Apply plain style when this class is present on the global menu wrapper */
.mawsm-global-menu-style-plain .mawsm-global-menu-panel {
    background: #ffffff;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
}

.mawsm-global-menu-style-plain .mawsm-global-menu-header {
    background: #ffffff;
    border-bottom: none;
}

.mawsm-global-menu-style-plain .mawsm-global-menu-header h3 {
    color: #000000;
    font-weight: 700;
}

.mawsm-global-menu-style-plain .mawsm-global-menu-close {
    color: #000000;
    background: #f0f0f0;
}

.mawsm-global-menu-style-plain .mawsm-global-menu-close:hover {
    background: #e0e0e0;
    color: #000000;
}

/* Parent Category Styles */
.mawsm-global-menu-style-plain .mawsm-parent-category {
    background: #ffffff;
    border: 1px solid #e0e0e0;
}

.mawsm-global-menu-style-plain .mawsm-parent-category:hover {
    border-color: #333333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    background: #fafafa;
}

.mawsm-global-menu-style-plain .mawsm-global-menu-item.active .mawsm-parent-category {
    border-color: #333333;
    background: #f5f5f5;
    box-shadow: none;
}

.mawsm-global-menu-style-plain .mawsm-parent-link {
    color: #000000;
}

.mawsm-global-menu-style-plain .mawsm-global-menu-item.active .mawsm-parent-link {
    color: #000000;
}

.mawsm-global-menu-style-plain .mawsm-category-image {
    border-color: #d0d0d0;
}

.mawsm-global-menu-style-plain .mawsm-parent-category:hover .mawsm-category-image {
    border-color: #333333;
}

.mawsm-global-menu-style-plain .mawsm-global-menu-item.active .mawsm-category-image {
    border-color: #333333;
}

.mawsm-global-menu-style-plain .mawsm-product-count {
    background: #e0e0e0;
    color: #333333;
}

.mawsm-global-menu-style-plain .mawsm-global-menu-item.active .mawsm-product-count {
    background: #333333;
    color: #ffffff;
}

/* Subcategories Column */
.mawsm-global-menu-style-plain .mawsm-subcategories-column {
    background: #fafafa;
    border-left: none;
}

.mawsm-global-menu-style-plain .mawsm-subcategories-header {
    color: #000000;
    border-bottom: none;
    padding-bottom: 15px;
}

.mawsm-global-menu-style-plain .mawsm-subcategory-link {
    color: #000000;
    background: #ffffff;
    border: 1px solid #e0e0e0;
}

.mawsm-global-menu-style-plain .mawsm-subcategory-link:hover {
    background: #f5f5f5;
    color: #000000;
    border-color: #333333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Products Column */
.mawsm-global-menu-style-plain .mawsm-products-column {
    background: #ffffff;
    border-left: none;
}

.mawsm-global-menu-style-plain .mawsm-products-header {
    border-bottom: none;
}

.mawsm-global-menu-style-plain .mawsm-products-header-title {
    color: #000000;
}

.mawsm-global-menu-style-plain .mawsm-view-all-products-btn {
    background: #333333;
    color: #ffffff;
}

.mawsm-global-menu-style-plain .mawsm-view-all-products-btn:hover {
    background: #000000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.mawsm-global-menu-style-plain .mawsm-product-card {
    background: #ffffff;
    border: 1px solid #d0d0d0;
}

.mawsm-global-menu-style-plain .mawsm-product-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background: #fafafa;
    border-color: #667eea;
}

.mawsm-global-menu-style-plain .mawsm-product-name {
    color: #000000;
}

.mawsm-global-menu-style-plain .mawsm-product-sku {
    color: #666666;
}

.mawsm-global-menu-style-plain .mawsm-product-price {
    color: #000000;
    font-weight: 700;
}

.mawsm-global-menu-style-plain .mawsm-sale-badge {
    background: #000000;
    color: #ffffff;
}

.mawsm-global-menu-style-plain .mawsm-global-menu-overlay {
    background: rgba(0, 0, 0, 0.5);
}

/* Toggle button for plain style */
.mawsm-global-menu-style-plain .mawsm-global-menu-toggle {
    background: #ffffff;
    border: 2px solid #333333;
}

.mawsm-global-menu-style-plain .mawsm-global-menu-toggle:hover {
    background: #f5f5f5;
}

.mawsm-global-menu-style-plain .mawsm-hamburger span {
    background: #000000;
}

/* ============================================
   ARROW INDICATORS (When Product Counts Hidden)
   ============================================ */

/* Arrow icon for parent categories and subcategories */
.mawsm-category-arrow {
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: inherit;
    margin-left: auto;
    transition: transform 0.3s ease;
}

.mawsm-parent-link:hover .mawsm-category-arrow,
.mawsm-subcategory-link:hover .mawsm-category-arrow {
    transform: translateX(3px);
}

/* Hide counts when hide-counts class is present */
.mawsm-global-menu-container.hide-counts .mawsm-product-count {
    display: none !important;
}

/* Show arrows when show-arrows class is present AND counts are hidden */
.mawsm-global-menu-container.hide-counts.show-arrows .mawsm-category-arrow {
    display: inline-flex !important;
}

/* If only show-arrows is present (counts still showing), keep arrows hidden (counts take priority) */
.mawsm-global-menu-container.show-arrows:not(.hide-counts) .mawsm-category-arrow {
    display: none !important;
}
/* Force cache refresh - v1.0.1 */
/* Cache refresh v1.0.2 */
/* v1.0.3 - Fixed mobile widths */
/* v1.0.4 - Fixed top spacing */
/* v1.0.5 - Removed top space */
/* v1.0.6 - Clean top spacing */
/* v1.0.7 - Minimized top spacing */
/* v1.0.8 - Fixed theme button conflict */
/* v1.0.9 - Fixed header overlap */
/* v1.1.0 - Fixed header spacing and 2-col products */
/* v1.2.0 - Full screen mobile submenu */
/* v1.2.1 - Fixed submenu mobile layout */
/* v1.3.0 - Fixed submenu mobile grid layout */
/* v1.3.1 - Fixed submenu card structure */
/* v1.4.0 - Improved mobile submenu UI */
/* v2.0.0 - Full-screen mobile submenu with slide navigation */
/* v2.1.0 - Fixed submenu grid and full height */
