/* Basic Reset and Box Sizing */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    /*font-family: Arial, sans-serif;
    background-color: #f4f4f4;*/
}

/* Header and Navigation */
.header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 0;
    position: fixed;
    width: 100vw;
    z-index: 9997;
    height: 90px;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /*max-width: 1100px;*/
    margin: 0 auto;
    padding: 0 1em;
    height: fit-content;
    position: relative;
    max-width: 1400px;
}

li.cart-menu{
	position: relative;
}

li.cart-menu a{
	display: inline-block;
}

div.quick-cart{
	position: absolute;
	top: 100%;
	right: 0;
	width: 400px;
	flex-direction: column;
    justify-content: space-between;
	display: none;
	
	max-height: 600px;
    border: 1px solid var(--primary-color);
    z-index: 9999;
    padding: 1em;
    background: #fff;
    border-radius: 5px;
    color: #000;
    font-size: 0.8rem;
    line-height: normal;
    z-index: 9999;
}

div.quick-cart div.cart-items {
    overflow-y: auto;
}

div.quick-cart a.button{
	color: #fff;
}

div.quick-cart a.button:hover{
	background: var(--primary-color-alt);
}

li.cart-menu:hover div.quick-cart,
div.quick-cart.force-visible{
	display: flex;
}

.cart-icon{
	/*position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 400px;*/
    width: 40px;
    height: 40px;
    /*margin-left: 30px;*/
    position: relative;
}
.cart-icon svg path{
	fill: #fff!important;
}

span.cart-amount {
	position: absolute;
    top: -10px;
    left: 0;
    width: 100%;
    text-align: center;
}

.cart-totals {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    padding: 10px 0 0 0;
    align-items: center;
}

.cart-totals.hidden,
.cart-empty.hidden{
	display: none;
}

form.cart-items {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.cart-item {
    display: grid;
    grid-template-rows: auto auto;
    gap: 0.3em;
    align-items: center;
    border-bottom: 1px solid #ddd;
}

.cart-item .remove span {
    width: 15px;
    height: 15px;
    display: block;
    background-image: url(../images/close.png);
    background-size: 10px;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
}

.cart-item .kolicina input {
    width: 60px;
    text-align: center;
}

.cart-item  .iznos {
    text-align: right;
}

.quick-cart .product-image {
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    height: 100%;
}

.cart-item > div:first-child {
    display: grid;
    grid-template-columns: 20px auto;
}

.quick-cart .cart-item span.naziv {
    font-weight: bold;
}

.cart-item > div:last-child {
    display: grid;
    grid-template-columns: 20px 100px 70px auto auto;
    align-items: center;
    height: 50px;
}

.nav-logo {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    flex-direction: row;
    align-items: center;
}

.nav-logo img{
	height: 55px;
	width: auto;
}

/* Navigation Links */
.nav-links {
    list-style: none;
    display: flex;
    /*gap: 1.5rem;*/
    align-items: center;
}



.nav-links .shop-link{
	display: none;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 1em;
    transition: color 0.3s ease;
    padding: 0.5em;
    border-radius: 3px;
    margin-right: 5px;
    transition: all 0.2s;
}

.nav-links > li > a:hover,
.nav-links > li >a.active{
	background: #333;
}



.nav-links .cart-menu > a:hover,
.nav-links > li.cart-menu > a{
	background: unset;
}

.nav-link:hover {
    color: #ddd;
}

a.nalog,
a.ponuda,
a.omiljeno {
    background: transparent !important;
    margin-right: 0;
    padding: 0;
}

.nav-links svg{
	fill: #fff;
    width: 40px;
    height: 40px;
    transition: all 0.2s;
}

.nav-links .omiljeno svg path{
	stroke: #fff;
    transition: all 0.2s;
}

.cart-icon:hover svg path,
a.nalog:hover svg,
a.ponuda:hover svg{
	fill: var(--primary-color-alt)!important;
}

a.omiljeno:hover svg path{
	stroke: var(--primary-color-alt)!important;
}

.cart-icon:hover,
.cart-icon:hover{
	color: var(--primary-color-alt);
}

.cart-item a,
.cart-empty a{
	color: var(--primary-color-alt);
}

.cart-item a:hover,
.cart-empty a:hover{
	color: var(--primary-color);
} 

/* Hamburger Menu */
.hamburger {
    display: none; /* Hidden by default on desktop */
    cursor: pointer;
}

.hamburger .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: white;
    transition: all 0.3s ease-in-out;
}

@media (max-width: 1230px) {
	.nav-logo{
		flex-direction: column;
	}
	
	.search-box{
		margin-left: 0;
	    margin-top: 10px;
	}
}

/* Mobile Responsiveness */
@media (max-width: 950px) {
    .nav-links {
        position: fixed;
        top: 85px; /* Adjust based on header height */
        left: 100%; /* Off-screen by default */
        width: 100%;
        height: calc(100vh - 70px);
        background-color: var(--primary-color);
        flex-direction: column;
        align-items: center;
        /*padding-top: 2rem;*/
        transition: left 0.3s ease-in-out;
        z-index: 9999;
        /*font-size: 1.5em;*/
        justify-content: center;
        gap: 1.5em;
    }
    
    .nav-links .shop-link{
    	display: initial;
    }
    
    .nav-links a{
    	font-size: 1.5em;
    }
    
    .nav-links a:hover {
    	background: unset;
    	padding: unset;
    	color: #333;
	}

    .nav-links.active {
        left: 0; /* Slide in when active */
    }

    .nav-links li {
        opacity: 0;
        transform: translateY(-20px);
        transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out;
    }

    .nav-links.active li {
        opacity: 1;
        transform: translateY(0);
    }
    
    .nav-links li { transition-delay: 0.1s; }
    /*.nav-links li:nth-child(2) { transition-delay: 0.2s; }
    .nav-links li:nth-child(3) { transition-delay: 0.3s; }
    .nav-links li:nth-child(4) { transition-delay: 0.4s; }
    .nav-links li:nth-child(5) { transition-delay: 0.5s; }*/

    .nav-link {
        font-size: 1.5rem;
    }

    .hamburger {
        display: block;
    }

    /* Hamburger Animation (for when active) */
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .cart-icon{
    	margin-left: 0;
	    /*width: 60px;
	    height: 60px;*/
    }
    
    span.cart-amount{
    	font-size: 1.2rem;
    }

  li.mobile-hidden {
    display: none!important;
  }

  header li.mobile-visible {
    display: initial;
  }
  
  header li.mobile-visible ul{
  	list-style: none;
    display: flex;
    gap: 5vw;
  }
  
  header li.mobile-visible ul li.cart-menu a{
  	padding: 0;
  	margin: 0;
  }
  
   header li.mobile-visible a svg,
   header li.mobile-visible .cart-icon{
   	width: 60px;
   	height: 60px;
   }
}

@media (max-width: 780px) {
	.nav-links{
		top: 80px;
	}
	
	.nav-logo{
		position: relative;
		padding-bottom: 1.5em;
	}
	
	.search-box{
		position: absolute;
	    bottom: 0;
    	width: calc(100vw - 1.5em);
    	left: 0;
	}
	
	.hamburger{
		/*transform: translateY(-1em);*/
		top: 1rem;
        position: absolute;
        right: 1.5em;
	}
}

@media (max-width: 550px) {	
	
  
  header li.mobile-visible ul{
    gap: 3vw;
  }
  
  header li.mobile-visible ul li.cart-menu a{
  	padding: 0;
  	margin: 0;
  }
  
   header li.mobile-visible a svg,
   header li.mobile-visible .cart-icon{
   	width: 45px;
   	height: 45px;
   }
}
