/* Advanced Mobile Menu - Frontend Styles */
:root {
    --amm-primary: #1B3A36;
    --amm-secondary: #2a4f49;
    --amm-text: #333333;
    --amm-light: #f8f9fa;
    --amm-dark: #343a40;
    --amm-border: #dee2e6;
    --amm-radius: 8px;
    --amm-shadow: 0 5px 15px rgba(0,0,0,0.1);
    --amm-transition: all 0.3s ease;
    --amm-menu-color: #1B3A36;
    --amm-animation-speed: 300ms;
    --amm-logo-width: 150px;
    --amm-logo-height: 50px;
}

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

/* Mobile Menu Trigger */
.amm-trigger {
    position: fixed;
    z-index: 9998;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--amm-menu-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--amm-shadow);
    transition: var(--amm-transition);
    font-size: 20px;
}

.amm-trigger:hover {
    transform: scale(1.1);
    background: #b14d1f;
}

.amm-trigger.top-left { top: 20px; left: 20px; }
.amm-trigger.top-right { top: 20px; right: 20px; }
.amm-trigger.bottom-left { bottom: 20px; left: 20px; }
.amm-trigger.bottom-right { bottom: 20px; right: 20px; }
.amm-trigger.middle-left { top: 50%; left: 20px; transform: translateY(-50%); }
.amm-trigger.middle-right { top: 50%; right: 20px; transform: translateY(-50%); }

/* Overlay */
.amm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--amm-animation-speed) ease;
}

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

/* Menu Container */
.amm-menu-container {
    position: fixed;
    z-index: 10000;
    background: white;
    overflow-y: auto;
    transition: var(--amm-transition);
    box-shadow: 0 0 30px rgba(0,0,0,0.2);
    max-height: 100vh;
}

/* Different Menu Styles */
.amm-style-slide-left .amm-menu-container {
    top: 0;
    left: -100%;
    width: 85%;
    max-width: 350px;
    height: 100%;
}

.amm-style-slide-left .amm-menu-container.active {
    left: 0;
}

.amm-style-slide-right .amm-menu-container {
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 350px;
    height: 100%;
}

.amm-style-slide-right .amm-menu-container.active {
    right: 0;
}

.amm-style-slide-top .amm-menu-container {
    top: -100%;
    left: 0;
    width: 100%;
    height: auto;
    max-height: 90vh;
}

.amm-style-slide-top .amm-menu-container.active {
    top: 0;
}

.amm-style-fullscreen .amm-menu-container {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: scale(0.8);
    opacity: 0;
    visibility: hidden;
}

.amm-style-fullscreen .amm-menu-container.active {
    transform: scale(1);
    opacity: 1;
    visibility: visible;
}

.amm-style-dropdown .amm-menu-container {
    top: -100%;
    left: 0;
    width: 100%;
    height: auto;
    max-height: 80vh;
    border-radius: 0 0 var(--amm-radius) var(--amm-radius);
}

.amm-style-dropdown .amm-menu-container.active {
    top: 0;
}

/* Menu Header */
.amm-menu-header {
    padding: 15px 20px;
    background: var(--amm-menu-color);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 2;
    min-height: 70px;
}

.amm-logo-container {
    flex: 1;
    display: flex;
    align-items: center;
    min-height: 40px;
}

.amm-logo-container.left {
    justify-content: flex-start;
    text-align: left;
}

.amm-logo-container.center {
    justify-content: center;
    text-align: center;
}

.amm-logo-container.right {
    justify-content: flex-end;
    text-align: right;
}

/* Logo Styles */
.amm-logo-image img {
    max-width: var(--amm-logo-width);
    max-height: var(--amm-logo-height);
    width: auto;
    height: auto;
    display: block;
}

.amm-logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    line-height: 1.2;
}

.amm-logo-text:hover {
    color: rgba(255,255,255,0.9);
}

/* Back Button */
.amm-back-btn {
    display: none;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 16px;
    padding: 8px 12px;
    flex-shrink: 0;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.amm-back-btn:hover {
    background: rgba(255,255,255,0.1);
}

.amm-back-btn.active {
    display: flex;
}

.amm-back-btn i {
    font-size: 14px;
}

/* Close Button */
.amm-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    flex-shrink: 0;
    margin-left: 10px;
}

.amm-close-btn:hover {
    background: rgba(255,255,255,0.1);
}

/* Search Bar */
.amm-search {
    padding: 15px 20px;
    background: var(--amm-light);
    border-bottom: 1px solid var(--amm-border);
}

.amm-search-form {
    display: flex;
    gap: 10px;
}

.amm-search-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid var(--amm-border);
    border-radius: var(--amm-radius);
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.amm-search-input:focus {
    outline: none;
    border-color: var(--amm-primary);
    box-shadow: 0 0 0 2px rgba(27, 58, 54, 0.1);
}

.amm-search-btn {
    background: var(--amm-primary);
    color: white;
    border: none;
    border-radius: var(--amm-radius);
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.3s ease;
    min-width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.amm-search-btn:hover {
    background: #b14d1f;
}

/* Menu Body */
.amm-menu-body {
    padding: 0;
    flex: 1;
    overflow-y: auto;
}

/* Menu Alignment */
.amm-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.amm-menu-list.align-left {
    text-align: left;
}

.amm-menu-list.align-center {
    text-align: center;
}

.amm-menu-list.align-right {
    text-align: right;
}

.amm-menu-list.align-justify {
    text-align: justify;
}

.amm-menu-list.align-center .amm-menu-link,
.amm-menu-list.align-justify .amm-menu-link {
    justify-content: center;
}

.amm-menu-list.align-justify .amm-menu-link {
    padding-left: 20px;
    padding-right: 20px;
}

/* Menu Items */
.amm-menu-item {
    border-bottom: 1px solid var(--amm-border);
}

.amm-menu-item:last-child {
    border-bottom: none;
}

.amm-menu-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    color: var(--amm-text);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: background 0.3s ease, color 0.3s ease;
    text-align: inherit;
    min-height: 56px;
}

.amm-menu-link:hover {
    background: var(--amm-light);
    color: var(--amm-primary);
}

.amm-menu-link.active {
    background: rgba(27, 58, 54, 0.05);
    color: var(--amm-primary);
    font-weight: 600;
}

.amm-submenu-toggle,
.amm-mega-toggle {
    background: none;
    border: none;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--amm-text);
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    margin-left: 10px;
}

.amm-submenu-toggle:hover,
.amm-mega-toggle:hover {
    color: var(--amm-primary);
}

.amm-submenu-toggle.active,
.amm-mega-toggle.active {
    transform: rotate(180deg);
    color: var(--amm-primary);
}

.amm-submenu-toggle i,
.amm-mega-toggle i {
    font-size: 14px;
}

/* Submenu */
.amm-submenu {
    max-height: 0;
    overflow: hidden;
    background: var(--amm-light);
    transition: max-height 0.4s ease;
}

.amm-submenu.active {
    max-height: 500px;
}

.amm-submenu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.amm-submenu-item {
    border-top: 1px solid rgba(0,0,0,0.05);
}

.amm-submenu-link {
    display: block;
    padding: 12px 20px 12px 40px;
    color: var(--amm-text);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    line-height: 1.4;
}

.amm-submenu-link:hover {
    background: rgba(0,0,0,0.05);
    padding-left: 45px;
    color: var(--amm-primary);
}

/* Mega Menu */
.amm-mega-menu {
    display: none;
    padding: 20px;
    background: white;
    border-top: 1px solid var(--amm-border);
}

.amm-mega-menu.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.amm-mega-content {
    display: grid;
    gap: 20px;
}

.amm-mega-columns.columns-2 { grid-template-columns: repeat(2, 1fr); }
.amm-mega-columns.columns-3 { grid-template-columns: repeat(3, 1fr); }
.amm-mega-columns.columns-4 { grid-template-columns: repeat(4, 1fr); }

.amm-mega-column {
    padding: 10px;
}

.amm-mega-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--amm-primary);
    margin: 0 0 10px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--amm-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.amm-mega-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.amm-mega-list-item {
    margin: 6px 0;
}

.amm-mega-list-link {
    display: block;
    padding: 8px 0;
    color: var(--amm-text);
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s ease;
    line-height: 1.4;
}

.amm-mega-list-link:hover {
    color: var(--amm-primary);
    padding-left: 5px;
}

/* Menu Footer */
.amm-menu-footer {
    padding: 20px;
    background: var(--amm-light);
    border-top: 1px solid var(--amm-border);
    margin-top: auto;
}

.amm-contact-info {
    color: var(--amm-text);
    font-size: 14px;
    margin-bottom: 20px;
}

.amm-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 10px 0;
    line-height: 1.5;
}

.amm-contact-item i {
    width: 20px;
    text-align: center;
    color: var(--amm-primary);
    flex-shrink: 0;
    margin-top: 2px;
}

.amm-contact-item a {
    color: var(--amm-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

.amm-contact-item a:hover {
    color: var(--amm-primary);
}

.amm-social-icons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.amm-social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--amm-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--amm-transition);
    font-size: 16px;
}

.amm-social-link:hover {
    background: #b14d1f;
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Cart Icon */
.amm-cart-icon {
    position: relative;
    margin-left: 15px;
}

.amm-cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4757;
    color: white;
    font-size: 11px;
    font-weight: 600;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Search Results */
.amm-search-results {
    list-style: none;
    margin: 0;
    padding: 0;
}

.amm-search-result-item {
    border-bottom: 1px solid var(--amm-border);
}

.amm-search-result-link {
    display: block;
    padding: 15px 20px;
    color: var(--amm-text);
    text-decoration: none;
    transition: background 0.3s ease;
}

.amm-search-result-link:hover {
    background: var(--amm-light);
}

.amm-search-result-link h4 {
    margin: 0 0 5px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--amm-primary);
}

.amm-search-result-link p {
    margin: 0;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.amm-no-results {
    padding: 20px;
    text-align: center;
    color: #666;
}

/* Loading State */
.amm-loading {
    position: relative;
    opacity: 0.7;
    pointer-events: none;
}

.amm-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid var(--amm-border);
    border-top-color: var(--amm-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Styles */
@media (max-width: 768px) {
    .amm-menu-container {
        width: 90% !important;
    }
    
    .amm-trigger {
        width: 50px;
        height: 50px;
        font-size: 18px;
    }
    
    .amm-trigger.bottom-right,
    .amm-trigger.bottom-left {
        bottom: 15px;
    }
    
    .amm-trigger.top-right,
    .amm-trigger.top-left {
        top: 15px;
    }
    
    .amm-menu-header {
        padding: 12px 15px;
        min-height: 60px;
    }
    
    .amm-logo-text {
        font-size: 1.3rem;
    }
    
    .amm-logo-image img {
        max-width: calc(var(--amm-logo-width) * 0.8);
        max-height: calc(var(--amm-logo-height) * 0.8);
    }
    
    .amm-menu-link {
        padding: 14px 15px;
        font-size: 15px;
        min-height: 52px;
    }
    
    .amm-submenu-link {
        padding: 10px 15px 10px 35px;
    }
    
    .amm-mega-menu {
        padding: 15px;
    }
    
    .amm-mega-columns.columns-4,
    .amm-mega-columns.columns-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .amm-menu-container {
        width: 100% !important;
        border-radius: 0;
    }
    
    .amm-style-slide-left .amm-menu-container,
    .amm-style-slide-right .amm-menu-container {
        max-width: 100%;
    }
    
    .amm-trigger {
        width: 45px;
        height: 45px;
        font-size: 16px;
        bottom: 10px;
        right: 10px;
    }
    
    .amm-menu-header {
        padding: 10px 12px;
        min-height: 55px;
    }
    
    .amm-logo-text {
        font-size: 1.2rem;
    }
    
    .amm-logo-image img {
        max-width: calc(var(--amm-logo-width) * 0.7);
        max-height: calc(var(--amm-logo-height) * 0.7);
    }
    
    .amm-back-btn {
        padding: 6px 10px;
        font-size: 14px;
    }
    
    .amm-close-btn {
        width: 36px;
        height: 36px;
        font-size: 1.3rem;
    }
    
    .amm-menu-link {
        padding: 12px 15px;
        font-size: 14px;
        min-height: 48px;
    }
    
    .amm-mega-columns.columns-4,
    .amm-mega-columns.columns-3,
    .amm-mega-columns.columns-2 {
        grid-template-columns: 1fr;
    }
    
    .amm-contact-item {
        font-size: 13px;
    }
    
    .amm-social-link {
        width: 36px;
        height: 36px;
        font-size: 15px;
    }
}

/* Desktop Hide */
@media (min-width: 769px) {
    .amm-trigger,
    .amm-overlay,
    .amm-menu-container {
        display: none !important;
    }
}

/* Print Styles */
@media print {
    .amm-trigger,
    .amm-overlay,
    .amm-menu-container {
        display: none !important;
    }
}
