
/* Header Modernization */
.main-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 15px 0;
    transition: all 0.3s ease;
    z-index: 1000;
    overflow: visible;
}

.main-header.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 10px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.logo-img {
    height: 70px;
    width: auto;
    transition: height 0.3s ease;
}

.main-header.sticky .logo-img {
    height: 50px;
}

.desktop-navigation {
    display: flex;
    justify-content: center;
    width: 100%;
}

.main-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
    justify-content: center;
}

.desktop-navigation .nav-item {
    position: relative;
    margin: 0 15px;
}

.desktop-navigation .nav-link {
    color: #333;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    padding: 10px 0;
    transition: color 0.3s ease;
    text-decoration: none;
    display: block;
}

.desktop-navigation .nav-link:hover,
.desktop-navigation .nav-item.active > .nav-link {
    color: #8b5e3c; /* Primarna boja za brend - pretpostavljena drvena */
}

/* Dropdown Submenu */
.dropdown-menu {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 250px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: none;
    border-radius: 8px;
    padding: 15px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1001;
    margin-top: 5px;
    pointer-events: none;
    max-height: none !important; /* Ukloni bilo kakav max height na desktopu */
    overflow: visible;
}

.nav-item.has-dropdown:hover .dropdown-menu,
.nav-item.has-dropdown.hover-active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* Hover gap fix */
.nav-item.has-dropdown::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 0;
    width: 100%;
    height: 20px;
    z-index: -1;
}

.dropdown-item {
    display: block;
    padding: 10px 25px;
    color: #444;
    font-size: 0.95rem;
    font-weight: 400;
    transition: all 0.2s ease;
    text-decoration: none;
}

.dropdown-item:hover {
    background-color: #f9f5f2;
    color: #8b5e3c;
    padding-left: 30px;
}

/* Right side icons */
.header-right-icons {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
}

.header-icon-item {
    color: #333;
    font-size: 1.1rem;
    position: relative;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-left: 0; /* Handled by gap */
}

.header-icon-item:hover {
    color: #8b5e3c;
    background-color: #f8f9fa;
    border-radius: 50%;
}

.header-icon-item.phone-icon {
    width: auto;
    padding: 0 10px;
    border-radius: 20px;
}

.header-icon-item.phone-icon:hover {
    background-color: #f8f9fa;
}

.header-icon-item i {
    margin-right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-icon-item.phone-icon i {
    margin-right: 8px;
    width: auto;
}

.header-icon-item.phone-icon span {
    font-size: 0.95rem;
    font-weight: 600;
}

.cart-count-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #8b5e3c;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

/* Header State Management */
.main-header.is-search-open .search-dropdown {
    display: block;
    animation: fadeInDown 0.3s ease;
}

.main-header.is-menu-open .mobile-navigation {
    visibility: visible !important;
}

.main-header.is-menu-open .mobile-navigation .mobile-menu-overlay {
    opacity: 1;
}

.main-header.is-menu-open .mobile-navigation .mobile-menu-wrapper {
    right: 0;
}

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

/* Updated Search Bar */
.header-search {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.search-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 280px;
    background: #fff;
    padding: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border-radius: 8px;
    z-index: 10000;
}

/* Remove old open state if any */
.header-search.open .search-dropdown {
    display: none; /* Replaced by is-search-open on header */
}

.search-dropdown input {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 12px;
    outline: none;
    font-size: 14px;
    transition: border-color 0.3s;
}

.search-dropdown input:focus {
    border-color: #8b5e3c;
}

.search-block {
    position: relative;
}

/* Mobile Adjustments */
@media (max-width: 360px) {
    .logo-img {
        height: 40px;
    }
    .header-icon-item {
        width: 34px;
        height: 34px;
        margin-left: 5px;
    }
    .top-promo-bar {
        font-size: 10px;
    }
}

/* Product Page Improvements */
.section-title {
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 0;
    font-size: 1.75rem;
}

.section-title-underline {
    width: 60px;
    height: 3px;
    background-color: #c99947;
}

.transition-hover {
    transition: all 0.3s ease;
}

.transition-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
}

.how-card {
    border: 1px solid #eee;
}

.how-icon i {
    color: #c99947 !important;
}

/* Product Card Consistency */
.product-article-item article.single-product {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    border: 1px solid transparent;
    position: relative;
}

.product-article-item article.single-product:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border-color: #c99947;
}

.product-article-item .product-img {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    overflow: hidden;
    position: relative;
}

.product-article-item .product-img img {
    max-height: 100%;
}

/* Contact Page Redesign */
.contact-page-wrapper {
    background-color: #f8f9fa;
}

.contact-main-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.section-subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    color: #444;
    position: relative;
    padding-bottom: 10px;
}

.section-subtitle::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 3px;
    background-color: #c99947;
}

.text-center.section-subtitle::after {
    left: 50%;
    transform: translateX(-50%);
}

.contact-method {
    display: flex;
    align-items: flex-start;
}

.contact-icon {
    width: 40px;
    height: 40px;
    background-color: #c99947;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
}

.contact-text label {
    display: block;
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact-text a, .contact-text p {
    font-size: 1.1rem;
    color: #333;
    font-weight: 500;
    margin-bottom: 0;
}

.btn-outline-viber {
    color: #7360f2;
    border-color: #7360f2;
}

.btn-outline-viber:hover {
    background-color: #7360f2;
    color: #fff;
}

.btn-outline-whatsapp {
    color: #25d366;
    border-color: #25d366;
}

.btn-outline-whatsapp:hover {
    background-color: #25d366;
    color: #fff;
}

.contact-form-ux-tip {
    background-color: #fff9e6;
    border-left: 4px solid #c99947;
    padding: 15px;
    border-radius: 0 4px 4px 0;
}

.contact-form-ux-tip p {
    margin-bottom: 0;
    color: #856404;
}

.contact-form .form-group label {
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
}

.contact-form .form-control {
    border-radius: 6px;
    border: 1px solid #ddd;
    padding: 12px 15px;
    transition: border-color 0.3s;
}

.contact-form .form-control:focus {
    border-color: #c99947;
    box-shadow: 0 0 0 0.2rem rgba(201, 153, 71, 0.1);
}

.contact-form .btn-primary {
    background-color: #c99947;
    border-color: #c99947;
    padding: 12px 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.contact-form .btn-primary:hover {
    background-color: #b0863e;
    border-color: #b0863e;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(201, 153, 71, 0.3);
}

.map-container iframe {
    display: block;
}

@media (max-width: 767.98px) {
    .contact-main-title {
        font-size: 2rem;
    }
    
    .contact-info-section {
        text-align: center;
    }
    
    .contact-method {
        flex-direction: column;
        align-items: center;
    }
    
    .contact-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .section-subtitle::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

.product-article-item .product-img img {
    width: auto;
    object-fit: contain;
}

.single-product__title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    min-height: 3rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.single-product__title a {
    color: #333;
    text-decoration: none;
}

.single-product__title a:hover {
    color: #c99947;
}

.product-rating {
    margin-bottom: 10px;
}

.product-action {
    margin-top: auto;
}

.product-action .price {
    margin-bottom: 10px;
    font-weight: 700;
}

.product-action .sale-price {
    font-size: 1.1rem;
    color: #c99947;
}

.product-action .old-price {
    font-size: 0.9rem;
    color: #999;
    text-decoration: line-through;
    margin-right: 8px;
}

.product-add-to-cart .btn {
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 15px;
    background-color: #c99947;
    border-color: #c99947;
    color: #fff;
}

.product-add-to-cart .btn:hover {
    background-color: #b0853b;
    border-color: #b0853b;
    color: #fff;
}

/* Labels/Badges */
.product-labels {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-width: 80%; /* Prevent overlapping with discount/shipping */
}

.product-labels span {
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 4px;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    white-space: nowrap;
}

.label-best-seller { background-color: #e74c3c; }
.label-new { background-color: #2ecc71; }
.label-popular { background-color: #3498db; }

.discount {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #c99947;
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.75rem;
    z-index: 5;
    display: none;
}

.discount.show {
    display: block;
}

@media (max-width: 991px) {
    .main-header {
        padding: 10px 0;
        position: sticky;
        top: 0;
        background: #fff;
        z-index: 1000;
    }
    .main-header.sticky {
        padding: 10px 0;
    }
    .logo-img {
        height: 50px;
    }
    .header-right-icons {
        justify-content: flex-end;
        gap: 10px;
    }
    .header-icon-item {
        width: 40px;
        height: 40px;
        justify-content: center;
        background: #f8f9fa;
        border-radius: 50%;
        margin-left: 0;
        flex-shrink: 0;
        display: flex;
        align-items: center;
    }
    .header-icon-item i {
        margin-right: 0;
        font-size: 1.1rem;
    }
    .cart-count-badge {
        top: -5px;
        right: -5px;
        width: 16px;
        height: 16px;
        font-size: 0.65rem;
    }
    .search-block__content {
        display: none;
    }
    /* Mobile Adjustments for Product Page */
    .section-title {
        font-size: 1.5rem;
    }
    
    .how-card {
        margin-bottom: 15px;
    }
    
    .product-article-item .product-img {
        height: 180px; /* Reduced to give more space for text */
    }
    
    .single-product__title {
        font-size: 0.9rem;
        min-height: 2.7rem;
        line-height: 1.2;
        margin-bottom: 5px;
    }
    
    .product-labels span {
        font-size: 0.65rem;
        padding: 2px 5px;
    }
    .mobile-navigation {
        z-index: 10001; /* Above almost anything */
    }
    .mobile-navigation.active {
        /* Handled globally */
    }
    .mobile-menu {
        list-style: none;
        padding: 0;
        margin: 0;
    }
    .mobile-menu .nav-item {
        border-bottom: 1px solid #eee;
    }
    .mobile-menu .nav-item a {
        display: block;
        padding: 15px 25px;
        color: #333;
        font-weight: 500;
        text-decoration: none;
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 1.05rem;
    }
    .mobile-submenu {
        list-style: none;
        padding: 0;
        margin: 0;
        background: #f9f9f9;
        max-height: 0;
        overflow: hidden;
        transition: all 0.3s ease-in-out;
    }
    .nav-item.open .mobile-submenu {
        max-height: 2000px;
    }
    .mobile-submenu li a {
        padding: 12px 40px;
        font-weight: 400;
        font-size: 0.95rem;
        border-bottom: 1px solid #eee;
    }
    .nav-item.open > a i {
        transform: rotate(180deg);
    }
    .nav-item a i {
        transition: transform 0.3s ease;
        font-size: 1.1rem;
        color: #8b5e3c;
    }
}

body.overflow-hidden {
    overflow: hidden !important;
}

/* Hamburger active state */
.hamburger.active i::before {
    content: "\f00d"; /* font-awesome times/close */
}

/* Mobile Navigation Redesign */
.mobile-navigation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    visibility: hidden;
    transition: all 0.3s ease;
    display: none;
}

@media (max-width: 991px) {
    .mobile-navigation {
        display: block;
    }
}

.mobile-navigation.active {
    visibility: visible !important;
}

.mobile-menu-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-navigation.active .mobile-menu-overlay {
    opacity: 1;
}

.mobile-menu-wrapper {
    position: absolute;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100%;
    background: #fff;
    box-shadow: -5px 0 20px rgba(0,0,0,0.1);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    padding-bottom: 30px;
}

.mobile-navigation.active .mobile-menu-wrapper {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.close-mobile-menu {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #333;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto;
    flex: 1;
}

.mobile-menu .nav-item {
    border-bottom: 1px solid #f9f9f9;
}

.mobile-menu .nav-item a {
    display: block;
    padding: 15px 20px;
    color: #333;
    font-weight: 500;
    text-decoration: none;
    font-size: 1rem;
    transition: background 0.2s ease;
}

.mobile-menu .nav-item.active > a {
    color: #8b5e3c;
    background: #fff9f5;
}

.nav-link-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.submenu-toggle {
    padding: 15px 20px;
    cursor: pointer;
    color: #666;
    transition: transform 0.3s ease;
}

.has-submenu.open .submenu-toggle {
    transform: rotate(180deg);
}

.mobile-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #fcfcfc;
    display: none;
}

.mobile-submenu li a {
    padding-left: 40px;
    font-size: 0.95rem;
    font-weight: 400;
    color: #555;
}

.mobile-phone-link {
    color: #8b5e3c !important;
    font-weight: 600 !important;
}

/* Sticky Header Adjustments */
body.mobile-menu-open {
    overflow: hidden;
}

/* Header Icons Improvements */
.header-right-icons .header-icon-item {
    position: relative;
    color: #333;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-right-icons .header-icon-item:hover {
    color: #8b5e3c;
}

.cart-count-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background: #8b5e3c;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
}

.search-block__icon i {
    font-size: 1.1rem;
}

/* Search block positioning fix is already handled above */

.search-block__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.search-block__icon:hover {
    background: #f8f9fa;
}

@media (max-width: 991px) {
    .logo-img {
        height: 50px;
    }
    .main-header {
        padding: 10px 0;
    }
}
