/* Dutchie Category Menu Styles */

.dutchie-category-menu {
    width: 100%;
    font-family: inherit;
    position: relative;
    margin: 0 auto;
}

/* Dropdown Select Styles */
.dutchie-category-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background-color: #fff;
    font-size: 16px;
    line-height: 1.4;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.dutchie-category-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.2);
}

.dutchie-category-select:hover {
    border-color: #667eea;
}

/* CSS-Only Horizontal Navigation */
.dutchie-category-menu nav {
    margin: 0;
    background-color: #E64A19; /* Default orange color - customizable via Elementor */
}

.dutchie-category-list {
    padding: 0;
    margin: 0;
    list-style: none;
    position: relative;
}

.dutchie-category-item {
    display: inline-block;
    background-color: inherit; /* Inherits from nav background */
    position: relative;
}

.dutchie-category-link {
    display: block;
    padding: 0 20px;
    color: #FFF;
    font-size: 18px;
    line-height: 60px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.dutchie-category-link:hover {
    background-color: #000000;
    color: #FFF;
}

/* Dropdown indicator */
.dutchie-category-item > .dutchie-category-link:after {
    content: ' +';
}

.dutchie-category-item > .dutchie-category-link:only-child:after {
    content: '';
}

/* Hide Dropdowns by Default */
.dutchie-subcategory-list {
    display: none;
    position: absolute;
    top: 60px; /* the height of the main nav */
    left: 0;
    z-index: 1000;
    padding: 0;
    margin: 0;
    list-style: none;
}

/* Display Dropdowns on Hover */
.dutchie-category-item:hover > .dutchie-subcategory-list {
    display: inherit;
}

/* First Tier Dropdown */
.dutchie-subcategory-list .dutchie-category-item {
    width: 200px;
    float: none;
    display: list-item;
    position: relative;
    background-color: inherit;
}

.dutchie-subcategory-list .dutchie-category-link {
    line-height: 50px;
    font-size: 16px;
    padding: 0 15px;
}

/* Second, Third and more Tiers */
.dutchie-subcategory-list .dutchie-subcategory-list {
    top: 0;
    left: 200px;
}

.dutchie-subcategory-list .dutchie-subcategory-list .dutchie-category-item {
    width: 180px;
}

/* Products Container */
.dutchie-products-container {
    margin-top: 24px;
}

/* Loading and Error States */
.dutchie-loading {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
    font-size: 16px;
}

.dutchie-loading::after {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 10px;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.dutchie-error {
    text-align: center;
    padding: 20px;
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: 8px;
    font-size: 14px;
}

.dutchie-error a {
    color: #dc2626;
    text-decoration: underline;
}

.dutchie-error a:hover {
    color: #b91c1c;
}

/* Embedded Shop Styles */
.dutchie-embedded-shop {
    width: 100%;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.dutchie-shop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e5e7eb;
}

.dutchie-shop-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.dutchie-open-full {
    padding: 8px 16px;
    background-color: #667eea;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.dutchie-open-full:hover {
    background-color: #5a67d8;
    color: #fff;
}

.dutchie-shop-iframe {
    width: 100%;
    height: 600px;
    min-height: 400px;
    border: none;
    display: block;
}

/* Color Theme Variations */
.dutchie-category-menu[data-theme="orange"] nav,
.dutchie-category-menu[data-theme="orange"] .dutchie-category-item {
    background-color: #E64A19;
}

.dutchie-category-menu[data-theme="blue"] nav,
.dutchie-category-menu[data-theme="blue"] .dutchie-category-item {
    background-color: #1976D2;
}

.dutchie-category-menu[data-theme="green"] nav,
.dutchie-category-menu[data-theme="green"] .dutchie-category-item {
    background-color: #388E3C;
}

.dutchie-category-menu[data-theme="purple"] nav,
.dutchie-category-menu[data-theme="purple"] .dutchie-category-item {
    background-color: #7B1FA2;
}

.dutchie-category-menu[data-theme="red"] nav,
.dutchie-category-menu[data-theme="red"] .dutchie-category-item {
    background-color: #D32F2F;
}

.dutchie-category-menu[data-theme="dark"] nav,
.dutchie-category-menu[data-theme="dark"] .dutchie-category-item {
    background-color: #212121;
}

.dutchie-category-menu[data-theme="teal"] nav,
.dutchie-category-menu[data-theme="teal"] .dutchie-category-item {
    background-color: #00796B;
}

/* Grid Style Variations */
.dutchie-category-menu[data-style="grid"] {
    background: transparent;
}

.dutchie-category-menu[data-style="grid"] .dutchie-category-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    background: transparent;
}

.dutchie-category-menu[data-style="grid"] .dutchie-category-item {
    background: #E64A19;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: block;
}

.dutchie-category-menu[data-style="grid"] .dutchie-category-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.dutchie-category-menu[data-style="grid"] .dutchie-category-link {
    text-align: center;
    padding: 20px 16px;
}

.dutchie-category-menu[data-style="grid"] .dutchie-subcategory-list {
    position: static;
    display: block;
    top: auto;
    left: auto;
    background: rgba(0, 0, 0, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.dutchie-category-menu[data-style="grid"] .dutchie-subcategory-list .dutchie-category-item {
    width: 100%;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .dutchie-category-list {
        flex-direction: column;
    }
    
    .dutchie-category-item {
        display: block;
        width: 100%;
    }
    
    .dutchie-category-link {
        line-height: 50px;
        font-size: 16px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .dutchie-subcategory-list {
        position: static;
        display: none;
        top: auto;
        background: rgba(0, 0, 0, 0.2);
    }
    
    .dutchie-category-item:hover > .dutchie-subcategory-list {
        display: block;
    }
    
    .dutchie-subcategory-list .dutchie-category-item {
        width: 100%;
    }
    
    .dutchie-subcategory-list .dutchie-subcategory-list {
        left: 0;
        top: auto;
        background: rgba(0, 0, 0, 0.3);
    }
    
    .dutchie-shop-iframe {
        height: 500px;
    }
    
    .dutchie-shop-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .dutchie-category-menu[data-style="grid"] .dutchie-category-list {
        grid-template-columns: 1fr;
    }
    
    .dutchie-shop-iframe {
        height: 400px;
    }
    
    .dutchie-category-link {
        line-height: 45px;
        font-size: 14px;
        padding: 0 15px;
    }
}

/* Custom Scrollbar for Product Container */
.dutchie-products-container {
    max-height: 80vh;
    overflow-y: auto;
}

.dutchie-products-container::-webkit-scrollbar {
    width: 8px;
}

.dutchie-products-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.dutchie-products-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.dutchie-products-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Animation for embedded shop appearing */
.dutchie-embedded-shop {
    animation: fadeInUp 0.4s ease-out;
}

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