/* ========================================
   MODERN HOMEPAGE LAYOUT - PREMIUM UX/UI
   Meniu stânga + Grid inteligent produse
   ======================================== */

/* Container principal homepage */
.modern-homepage-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Layout cu sidebar pentru homepage */
.modern-homepage-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    margin-top: 40px;
}

/* Sidebar meniu categorii - stânga */
.modern-sidebar-menu {
    width: 280px;
    flex-shrink: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    position: sticky;
    top: 100px; /* Sticky position când scrollezi */
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.modern-sidebar-menu::-webkit-scrollbar {
    width: 6px;
}

.modern-sidebar-menu::-webkit-scrollbar-track {
    background: #f0f0f0;
}

.modern-sidebar-menu::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.modern-sidebar-menu::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Header meniu */
.modern-menu-header {
    background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
    color: white;
    padding: 20px;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.modern-menu-header i {
    color: #ffd700;
    font-size: 20px;
}

/* Lista categorii */
.modern-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.modern-menu-list > li {
    border-bottom: 1px solid #f0f0f0;
}

.modern-menu-list > li:last-child {
    border-bottom: none;
}

.modern-menu-list > li > a {
    display: block;
    padding: 15px 20px;
    color: #2c2c2c;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.modern-menu-list > li > a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #ffd700;
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.modern-menu-list > li > a:hover {
    background: #f8f8f8;
    padding-left: 30px;
    color: #ffd700;
}

.modern-menu-list > li > a:hover::before {
    transform: scaleY(1);
}

/* Subcategorii dropdown */
.modern-menu-list .dropdown-menu {
    position: static;
    float: none;
    width: 100%;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: #fafafa;
    display: none;
}

.modern-menu-list .dropdown.open .dropdown-menu {
    display: block;
}

.modern-menu-list .dropdown-menu li {
    border-bottom: 1px solid #f0f0f0;
}

.modern-menu-list .dropdown-menu li:last-child {
    border-bottom: none;
}

.modern-menu-list .dropdown-menu a {
    padding: 12px 20px 12px 40px;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    display: block;
    text-decoration: none;
    transition: all 0.2s ease;
}

.modern-menu-list .dropdown-menu a:hover {
    background: white;
    color: #ffd700;
    padding-left: 50px;
}

/* Dropdown toggle icon */
.modern-menu-list .dropdown > a {
    position: relative;
    padding-right: 40px;
}

.modern-menu-list .dropdown > a::after {
    content: '\f107'; /* FontAwesome chevron-down */
    font-family: 'FontAwesome';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
}

.modern-menu-list .dropdown.open > a::after {
    transform: translateY(-50%) rotate(180deg);
}

/* Content area - produse */
.modern-content-area {
    flex: 1;
    min-width: 0; /* Important pentru flexbox */
}

/* Section produse cu meniu (legacy - păstrat pentru compatibilitate) */
.modern-section-with-menu {
    margin-bottom: 50px;
}

.modern-section-with-menu .modern-section-header {
    text-align: center;
    margin-bottom: 40px;
}

.modern-section-with-menu .modern-section-title {
    font-size: 32px;
    font-weight: 700;
    color: #2c2c2c;
    margin: 0 0 10px 0;
    position: relative;
    display: inline-block;
}

.modern-section-with-menu .modern-section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: #ffd700;
    border-radius: 2px;
}

.modern-section-with-menu .modern-section-subtitle {
    font-size: 15px;
    color: #666;
    margin: 20px 0 0 0;
}

/* ========================================
   HOMEPAGE SECTION - Full Width Layout
   (Meniul e acum în header, nu sidebar)
   ======================================== */
.modern-section-homepage {
    padding: 28px 0 40px;
}

.modern-section-homepage .modern-section-header {
    text-align: center;
    margin-bottom: 28px;
}

.modern-section-homepage .modern-section-title {
    font-size: 28px;
    font-weight: 700;
    color: #2c2c2c;
    margin: 0 0 10px 0;
    position: relative;
    display: inline-block;
}

.modern-section-homepage .modern-section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #ffd700, #ffed4e);
    border-radius: 2px;
}

.modern-section-homepage .modern-section-subtitle {
    font-size: 16px;
    color: #666;
    margin: 20px 0 0 0;
}

/* Grid 3 produse (alături de meniu) */
.modern-products-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Section full-width (fără meniu) */
.modern-section-full {
    background: #f8f8f8;
    padding: 60px 0;
    margin-left: -20px;
    margin-right: -20px;
    width: calc(100% + 40px);
}

.modern-section-full .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.modern-section-full .modern-section-header {
    text-align: center;
    margin-bottom: 50px;
}

.modern-section-full .modern-section-title {
    font-size: 36px;
    font-weight: 700;
    color: #2c2c2c;
    margin: 0 0 15px 0;
    position: relative;
    display: inline-block;
}

.modern-section-full .modern-section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: #ffd700;
    border-radius: 2px;
}

.modern-section-full .modern-section-subtitle {
    font-size: 16px;
    color: #666;
    margin: 25px 0 0 0;
}

/* Grid 4 produse (full-width) */
.modern-products-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, minmax(250px, 1fr));
    gap: 20px;
}

/* SEO Text - mai mic și discret */
.modern-seo-text {
    background: #f8f8f8;
    padding: 30px 0;
    border-top: 1px solid #e0e0e0;
}

.modern-seo-text .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.modern-seo-text .seo-content {
    background: white;
    padding: 25px 30px;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.modern-seo-text h3 {
    font-size: 18px;
    font-weight: 600;
    color: #2c2c2c;
    margin: 0 0 12px 0;
}

.modern-seo-text p {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin: 0;
}

/* ========================================
   RESPONSIVE BREAKPOINTS
   ======================================== */

/* Tablet Large (992px - 1199px) */
@media (max-width: 1199px) {
    .modern-sidebar-menu {
        width: 250px;
    }

    .modern-products-grid-3 {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }

    .modern-products-grid-4 {
        grid-template-columns: repeat(3, minmax(220px, 1fr));
        gap: 18px;
    }

    .modern-section-with-menu .modern-section-title {
        font-size: 28px;
    }

    .modern-section-full .modern-section-title {
        font-size: 32px;
    }
}

/* Tablet (768px - 991px) */
@media (max-width: 991px) {
    .modern-homepage-layout {
        flex-direction: column;
        gap: 30px;
    }

    .modern-sidebar-menu {
        width: 100%;
        position: relative;
        top: 0;
        max-height: none;
    }

    .modern-products-grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .modern-products-grid-4 {
        grid-template-columns: repeat(3, minmax(200px, 1fr));
    }
}

/* Mobile (max 767px) - Focus pe produse */
@media (max-width: 767px) {
    .modern-homepage-wrapper {
        padding: 0 10px;
    }

    .modern-homepage-layout {
        margin-top: 12px;
        gap: 16px;
    }

    .modern-sidebar-menu {
        display: none;
    }

    .modern-products-grid-3,
    .modern-products-grid-4 {
        grid-template-columns: repeat(2, minmax(150px, 1fr));
        gap: 10px;
    }

    /* Homepage section - compact pe mobile */
    .modern-section-homepage {
        padding: 16px 0 24px;
    }

    .modern-section-homepage .modern-section-header {
        margin-bottom: 16px;
    }

    .modern-section-homepage .modern-section-title {
        font-size: 20px;
        margin-bottom: 4px;
    }

    .modern-section-homepage .modern-section-title::after {
        width: 40px;
        height: 2px;
        bottom: -5px;
    }

    .modern-section-homepage .modern-section-subtitle {
        font-size: 13px;
        margin-top: 12px;
    }

    .modern-section-with-menu {
        margin-bottom: 20px;
    }

    .modern-section-with-menu .modern-section-header {
        margin-bottom: 16px;
    }

    .modern-section-with-menu .modern-section-title {
        font-size: 22px;
    }

    .modern-section-full {
        padding: 24px 0;
        margin-left: -10px;
        margin-right: -10px;
        width: calc(100% + 20px);
    }

    .modern-section-full .modern-section-header {
        margin-bottom: 16px;
    }

    .modern-section-full .modern-section-title {
        font-size: 22px;
    }

    .modern-section-full .modern-section-subtitle,
    .modern-section-with-menu .modern-section-subtitle {
        font-size: 13px;
        margin-top: 10px;
    }

    .modern-seo-text {
        padding: 20px 0;
    }

    .modern-seo-text .container {
        padding: 0 10px;
    }

    .modern-seo-text .seo-content {
        padding: 16px;
    }

    .modern-seo-text h3 {
        font-size: 15px;
    }

    .modern-seo-text p {
        font-size: 13px;
    }
}

/* Mobile Small (max 479px) */
@media (max-width: 479px) {
    .modern-homepage-wrapper {
        padding: 0 8px;
    }

    .modern-products-grid-3,
    .modern-products-grid-4 {
        gap: 8px;
    }

    .modern-section-homepage {
        padding: 12px 0 20px;
    }

    .modern-section-homepage .modern-section-header {
        margin-bottom: 12px;
    }

    .modern-section-homepage .modern-section-title {
        font-size: 18px;
    }

    .modern-section-with-menu .modern-section-title {
        font-size: 20px;
    }

    .modern-section-full {
        padding: 20px 0;
    }

    .modern-section-full .modern-section-title {
        font-size: 20px;
    }
}
