/* Afisare completa titlu produse in listing */
.product-title,
.product-card .product-title {
    white-space: normal !important;  /* permite mai multe linii */
    overflow: visible !important;     /* nu taie textul */
    text-overflow: clip !important;   /* elimină punctele de la final */
    line-height: 1.2em;               /* ajustează înălțimea liniei */
    max-height: none !important;      /* elimină limitarea înălțimii */
}/* Asigură afișarea corectă a prețurilor și descrierilor */
.product-card .product-price,
.product-card .product-description {
    white-space: normal !important;
    overflow: visible !important;
}

/* Header ramane fixat la scroll pe mobil/tableta (sub 992px), la fel ca pe desktop */
@media (max-width: 991px) {
    header.header {
        position: sticky;
        top: 32px;
        z-index: 1030;
        transition: transform 0.25s ease;
    }
    /* Ascuns cand se da scroll in jos; revine la scroll in sus (clasa comutata din JS in footer) */
    header.header.header--hidden {
        transform: translateY(-150%);
    }
}

/* Grid categorii pe homepage: pe desktop grid pe mai multe coloane, pe mobil o categorie pe rand */
.homepage-categories {
    margin: 20px 0 32px;
}

.homepage-hero {
    overflow: hidden;
    aspect-ratio: 1377 / 551;
    margin: 24px 0 0;
}
.homepage-hero__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center bottom;
}
@media (max-width: 767px) {
    .homepage-hero {
        margin-top: 14px;
    }
}
.homepage-categories__grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 22px;
}
.homepage-categories__item {
    position: relative;
    display: block;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    text-decoration: none;
    flex: 0 0 calc((100% - 3 * 22px) / 4);
    max-width: calc((100% - 3 * 22px) / 4);
}
@media (max-width: 1399px) and (min-width: 992px) {
    .homepage-categories__item {
        flex-basis: calc((100% - 2 * 22px) / 3);
        max-width: calc((100% - 2 * 22px) / 3);
    }
}
@media (max-width: 991px) {
    .homepage-categories__item {
        flex-basis: calc((100% - 22px) / 2);
        max-width: calc((100% - 22px) / 2);
    }
}
.homepage-categories__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}
.homepage-categories__item--square-image {
    background: #064c4c;
}
.homepage-categories__item--square-image .homepage-categories__image {
    object-fit: contain;
}
.homepage-categories__item:hover .homepage-categories__image {
    transform: scale(1.05);
}
.homepage-categories__name {
    position: absolute;
    z-index: 2;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 18px 22px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0.45) 55%, rgba(0,0,0,0));
    color: #fff;
    font-weight: 700;
    font-size: 19px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    line-height: 1.3;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}
.homepage-categories__name::before {
    content: '';
    display: block;
    width: 32px;
    height: 3px;
    background: #fff;
    margin-bottom: 8px;
    border-radius: 2px;
    opacity: 0.9;
}
.homepage-categories__item--garden-image .homepage-categories__name {
    display: none;
}
/* Reduce spatiul gol dintre titlul de sus si sectiunea de categorii, pe mobil */
@media (max-width: 767px) {
    .site-index main > section:not(.widget-inline-menu) {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }
    .site-index main > section:not(:last-child) {
        margin-bottom: 0.75rem;
    }
    .homepage-categories__name {
        padding: 14px 16px;
        font-size: 16px;
    }
    .homepage-categories__item--garden-image .homepage-categories__name {
        display: block;
    }
    .homepage-categories__grid {
        gap: 16px;
    }
    .homepage-categories__item {
        aspect-ratio: 21 / 9;
        flex-basis: 100%;
        max-width: 100%;
    }
    .homepage-categories__item--square-image {
        aspect-ratio: 4 / 3;
    }
    /* Sectiunea de titlu (Selema - magazin online...) mai atractiva pe mobil */
    .site-index main > .homepage-hero + section.widget-content {
        background: linear-gradient(135deg, #fff6e2 0%, #ffffff 100%) !important;
        border-radius: 14px !important;
        padding: 26px 20px !important;
        text-align: center !important;
        box-shadow: 0 4px 14px rgba(0,0,0,0.07) !important;
    }
    .site-index main > .homepage-hero + section.widget-content::before {
        content: '' !important;
        display: block !important;
        width: 46px !important;
        height: 4px !important;
        background: linear-gradient(90deg, #e2231a, #f7a600) !important;
        margin: 0 auto 14px !important;
        border-radius: 3px !important;
    }
    .site-index main > .homepage-hero + section.widget-content .widget-content__content h1 {
        font-size: 25px !important;
        font-weight: 600 !important;
        line-height: 1.3 !important;
        color: #333333 !important;
        margin: 0 !important;
    }
}

/* Buton "Acasa" in meniul mobil */
.mobile-menu__home-item {
    padding: 10px 16px !important;
}
.mobile-menu__home-button {
    display: block;
    text-align: center;
    background: #ffc107;
    color: #1a1a1a !important;
    font-weight: 700;
    border-radius: 8px;
    padding: 10px 14px;
    text-decoration: none;
}
.mobile-menu__menu-item > a,
.mobile-menu__menu-item > span {
    display: flex;
    align-items: center;
    gap: 10px;
}
.mobile-menu__image.header__menu-item-icon {
    flex: 0 0 22px;
    width: 22px !important;
    height: 22px !important;
    max-width: 22px !important;
    max-height: 22px !important;
    color: #f7a600;
}

/* Logo-ul si bara de cautare din bara de sus (header-top): ascunse implicit, vizibile doar pe homepage (desktop) */
.header-top__logo {
    display: none;
}
.header-top__search {
    display: none;
}

/* Header putin mai generos pe desktop: text/iconite mai mari in bara de sus */
@media (min-width: 992px) {
    .header-top,
    .header-top__item,
    .header-top__action {
        font-size: 15px !important;
    }
    .header-top .icon {
        width: 20px !important;
        height: 20px !important;
    }
    /* Corecteaza alinierea coloanei laterale cu bara de sus, marita mai sus */
    header.header {
        top: 84px !important;
    }
}

/* Bara de sus mai lata/inalta, cu logo-ul Selema in stanga, o bara de cautare lata
   si centrata, iar telefonul langa celelalte actiuni din dreapta. Valabil pe toate paginile. */
@media (min-width: 992px) {
    .header-top__wrapper {
        display: flex !important;
        align-items: center !important;
        min-height: 84px !important;
        max-width: none !important;
        width: 100% !important;
        padding: 0 40px !important;
    }
    .header-top {
        height: 84px !important;
    }
    .header-top__group--left-side {
        display: none !important;
    }
    .header-top__logo {
        display: flex !important;
        align-items: center !important;
        flex: 0 0 auto !important;
        margin: 0 !important;
        text-decoration: none !important;
    }
    .header-top__logo-image {
        height: 56px !important;
        width: auto !important;
    }
    .header-top__search {
        display: block !important;
        flex: 1 1 auto !important;
        max-width: 640px !important;
        margin: 0 auto !important;
        padding: 0 32px !important;
    }
    .search-inline__form {
        display: flex !important;
        width: 100% !important;
    }
    .search-inline__wrapper {
        flex: 1 1 auto !important;
    }
    .search-inline__input {
        width: 100% !important;
        height: 44px !important;
        border-radius: 22px 0 0 22px !important;
        border: 1px solid #ddd !important;
        padding: 0 18px !important;
    }
    .search-inline__button {
        height: 44px !important;
        padding: 0 20px !important;
        background: #ffc107 !important;
        color: #1a1a1a !important;
        border-radius: 0 22px 22px 0 !important;
    }
    .search-inline__button svg {
        fill: #1a1a1a !important;
        color: #1a1a1a !important;
    }
    .header-top__group--right-side {
        flex: 0 0 auto !important;
    }
    /* Bara mica de cautare (icon + drawer) nu mai e necesara, avem deja bara lata */
    .header-top__action--search {
        display: none !important;
    }
    /* Logo-ul din coloana verticala nu mai e necesar, e deja in bara de sus */
    #header_logo {
        display: none !important;
    }
}

/* Meniul vertical de categorii (paginile de categorie/produs): stil mai modern */
@media (min-width: 992px) {
    .header__menu-list {
        padding: 4px 0 !important;
    }
    .header__menu-item {
        border-bottom: 1px solid #f0f0f0;
    }
    .header__menu-item > a {
        display: flex !important;
        align-items: center;
        gap: 10px;
        padding: 12px 4px !important;
        font-size: 15px;
        font-weight: 500;
        color: #333;
        transition: color 0.2s ease, padding-left 0.2s ease;
    }
    .header__menu-item > a:hover {
        color: #e2231a;
        padding-left: 8px;
    }
    .header__menu-item-icon {
        flex: 0 0 auto;
        width: 18px;
        height: 18px;
        color: #f7a600;
    }
}

/* Buton de restrangere/extindere a meniului de categorii (sidebar), doar pe desktop,
   pe paginile care nu sunt homepage (pe homepage sidebar-ul e ascuns oricum) */
.header__sidebar-toggle {
    display: none;
}
@media (min-width: 992px) {
    header.header {
        transition: width 0.25s ease;
    }
    .header__sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 20px;
        left: 306px;
        width: 28px;
        height: 28px;
        padding: 0;
        border-radius: 50%;
        background: #fff;
        border: 1px solid #ddd;
        box-shadow: 0 1px 4px rgba(0,0,0,0.15);
        cursor: pointer;
        z-index: 20;
        transition: left 0.25s ease;
    }
    .header__sidebar-toggle svg {
        width: 16px;
        height: 16px;
        color: #333;
        transition: transform 0.25s ease;
    }
    html.sidebar-collapsed header.header {
        width: 0 !important;
        overflow: visible !important;
    }
    html.sidebar-collapsed .header__sidebar-toggle {
        left: 6px;
    }
    html.sidebar-collapsed .header__sidebar-toggle svg {
        transform: rotate(180deg);
    }
    html.sidebar-collapsed header.header #header_wrapper,
    html.sidebar-collapsed header.header #header_menu,
    html.sidebar-collapsed header.header #header_menu_wide {
        display: none !important;
    }
    html.sidebar-collapsed main.main {
        padding-left: 0 !important;
    }
}

/* Pe homepage (desktop): scoatem de tot coloana verticala din stanga (logo + categorii),
   logo-ul se muta in bara de sus (header-top), langa telefon/cont/lupa/favorite/cos.
   Continutul principal recupereaza toata latimea. */
@media (min-width: 992px) {
    .site-index header.header {
        display: none !important;
    }
    .site-index main.main {
        padding-left: 0 !important;
    }

    /* Sectiunea de titlu (Selema - magazin online...) mai atractiva si pe desktop */
    .site-index main > .homepage-hero + section.widget-content {
        background: linear-gradient(135deg, #fff6e2 0%, #ffffff 100%) !important;
        border-radius: 18px !important;
        padding: 48px 56px !important;
        text-align: center !important;
        box-shadow: 0 6px 24px rgba(0,0,0,0.08) !important;
        margin-top: 24px !important;
        margin-bottom: 24px !important;
    }
    .site-index main > .homepage-hero + section.widget-content::before {
        content: '' !important;
        display: block !important;
        width: 64px !important;
        height: 5px !important;
        background: linear-gradient(90deg, #e2231a, #f7a600) !important;
        margin: 0 auto 20px !important;
        border-radius: 3px !important;
    }
    .site-index main > .homepage-hero + section.widget-content .widget-content__content h1 {
        font-size: 34px !important;
        font-weight: 700 !important;
        line-height: 1.35 !important;
        color: #333333 !important;
        margin: 0 !important;
    }
}

/* Footer: titluri de coloana mai clare, link-uri cu hover, categorii pe 2 coloane,
   sigle de plata/incredere mai mici si aranjate ordonat */
.footer-about-us__heading,
.footer__menu-title,
.newsletter__heading {
    font-size: 13px !important;
    font-weight: 700 !important;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: #ffc107 !important;
    padding-bottom: 10px;
    margin-bottom: 14px !important;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer__menu-list a {
    transition: color 0.2s ease;
}
.footer__menu-list a:hover {
    color: #ffc107;
}
.footer__menu-list li {
    margin-bottom: 4px;
}
@media (min-width: 768px) {
    #main.footer__menu-list {
        column-count: 2;
        column-gap: 24px;
    }
    #main.footer__menu-list li {
        break-inside: avoid;
    }
}
.footer__badges {
    align-items: center !important;
    gap: 16px 20px !important;
}
.footer__badge img {
    max-width: 130px !important;
    width: auto !important;
    height: auto !important;
    max-height: 32px !important;
}

/* Brand band under the home hero */
.site-index main > .homepage-hero + section.widget-content {
    position: relative !important;
    overflow: hidden !important;
    width: calc(100% - 48px) !important;
    max-width: 1600px !important;
    box-sizing: border-box !important;
    margin: 0 auto !important;
    padding: 36px 24px !important;
    border: 0 !important;
    border: 1px solid #ddd6cd !important;
    border-top: 2px solid #cf8b54 !important;
    border-radius: 6px !important;
    background: linear-gradient(118deg, rgba(213, 131, 77, 0.1) 0%, rgba(255, 255, 255, 0) 44%, rgba(36, 125, 119, 0.11) 100%), linear-gradient(108deg, #eee1d3 0%, #e3e8e2 52%, #d8e4df 100%) !important;
    box-shadow: 0 5px 15px rgba(39, 60, 56, 0.08) !important;
    text-align: center !important;
}
.site-index main > .homepage-hero + section.widget-content::before {
    width: 58px !important;
    height: 4px !important;
    margin: 0 auto 16px !important;
    border-radius: 2px !important;
    background: linear-gradient(90deg, #cf8b54 0%, #bd9a70 48%, #659b94 100%) !important;
}
.site-index main > .homepage-hero + section.widget-content .widget-content__content h1 {
    margin: 0 !important;
    color: #376560 !important;
    font-size: 32px !important;
    font-weight: 650 !important;
    line-height: 1.3 !important;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
}
@media (max-width: 767px) {
    .site-index main > .homepage-hero + section.widget-content {
        width: calc(100% - 20px) !important;
        padding: 22px 18px !important;
    }
    .site-index main > .homepage-hero + section.widget-content::before {
        margin-bottom: 12px !important;
    }
    .site-index main > .homepage-hero + section.widget-content .widget-content__content h1 {
        font-size: 22px !important;
        line-height: 1.35 !important;
    }
}
