/* --- Osnovni Stilovi i Paleta Boja --- */
:root {
    --accent-color: #007bff;
    --text-color: #333;
    --background-color: #fff;
    --light-gray: #f8f9fa;
    --border-color: #eee;
}

body {
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    color: var(--text-color);
    background-color: var(--background-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

a {
    text-decoration: none;
    color: var(--accent-color);
}

/* --- Header Stilovi --- */
.main-header {
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-size: 1.5em;
    font-weight: bold;
}
.logo a {
    text-decoration:none;
    color:inherit;
}
.search-bar {
    width: 50%;
}
.search-bar input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

/* --- Navigacija --- */
.main-nav { 
    background-color: #f8f9fa; 
    border-bottom: 1px solid #eee; 
    padding: 10px 0; 
}
.main-nav ul { 
    list-style: none; 
    padding: 0; 
    margin: 0; 
    display: flex; 
    justify-content: center; 
    gap: 20px; 
}
.main-nav a { 
    text-decoration: none; 
    color: var(--text-color); 
    font-weight: bold; 
}
.main-nav a:hover { 
    color: var(--accent-color); 
}

/* --- Hero Baner Stilovi --- */
.hero-section {
    background-image: url('https://via.placeholder.com/1200x400.png?text=Kancelarijski+Materijal');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 100px 20px;
}
.hero-section h1 {
    font-size: 3em;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* --- Stilovi za Dugmiće --- */
.button-primary {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--accent-color);
    color: white !important;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.3s;
}
.button-primary:hover {
    background-color: #0056b3;
}

/* --- Mreža Proizvoda Stilovi --- */
.products-section { padding: 40px 0; }
.section-title { text-align: center; font-size: 2em; margin-bottom: 30px; }
.product-grid { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr);
    gap: 20px; 
}
.product-card { 
    border: 1px solid var(--border-color); 
    border-radius: 8px; 
    text-align: center; 
    padding: 15px; 
    transition: box-shadow 0.3s; 
    display: flex; 
    flex-direction: column; 
    justify-content: space-between; 
}
.product-card:hover { box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.product-card img { 
    max-width: 100%; 
    height: 200px;
    margin-bottom: 15px; 
    object-fit: contain;
}
.product-card h3 { 
    font-size: 1.1em; 
    margin: 0 0 10px 0; 
    flex-grow: 1; 
}
.product-card .price { 
    font-weight: bold; 
    color: var(--accent-color); 
    margin-bottom: 15px; 
}

/* --- Sidebar Stilovi --- */
.page-wrapper { display: flex; flex-wrap: wrap; gap: 30px; margin-top: 20px; }
.sidebar { flex: 1 0 220px; }
.main-content { flex: 3 0 60%; }
.sidebar h3 { margin-top: 0; border-bottom: 2px solid #eee; padding-bottom: 10px; }
.sidebar .category-list { list-style: none; padding: 0; margin: 0; }
.sidebar .category-list a, .sidebar .category-list summary { 
    display: block; 
    padding: 8px 12px; 
    text-decoration: none; 
    color: #333; 
    border-radius: 4px; 
    transition: background-color 0.2s; 
    cursor: pointer;
}
.sidebar .category-list a:hover, .sidebar .category-list summary:hover { background-color: #f0f0f0; }
.sidebar .category-list strong { color: var(--accent-color); }

/* Stilovi za sklopivi meni */
.sidebar details { margin-bottom: 5px; }
.sidebar details summary {
    font-weight: bold;
    position: relative;
}
.sidebar details summary::-webkit-details-marker { display: none; } /* Sakriva default strelicu */
.sidebar details summary::before {
    content: '+';
    position: absolute;
    left: -5px;
    top: 8px;
    font-weight: normal;
}
.sidebar details[open] > summary::before { content: '−'; }
.sidebar .subcategory-list {
    list-style: none;
    padding-left: 25px;
    margin-top: 5px;
}
.sidebar .subcategory-list a {
    font-weight: normal;
}

/* --- Pagination Stilovi --- */
.pagination { padding: 20px 0; text-align: center; }
.pagination a, .pagination span {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 4px;
    border: 1px solid var(--border-color);
    color: var(--accent-color);
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
}
.pagination a:hover { background-color: var(--accent-color); color: white; }
.pagination .active { background-color: var(--accent-color); color: white; border-color: var(--accent-color); }
.pagination .disabled { color: #ccc; pointer-events: none; }

/* Stilovi za redizajn stranice proizvoda */
.product-page-container {
    display: flex;
    gap: 40px; /* Razmak između kolona */
    margin-top: 20px;
}
.product-gallery {
    flex: 1 1 50%; /* Dozvoljava da raste i smanjuje se, osnova 50% */
}
.product-gallery img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid #eee;
}
.product-info {
    flex: 1 1 50%; /* Dozvoljava da raste i smanjuje se, osnova 50% */
}

/* Stilovi za varijacije i galeriju na stranici proizvoda */

.product-gallery .thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.product-gallery .thumbnail-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 4px;
    transition: border-color 0.3s;
}

.product-gallery .thumbnail-image:hover,
.product-gallery .thumbnail-image.active {
    border-color: var(--accent-color);
}

.product-info .variations {
    margin: 20px 0;
}

.product-info .color-swatches {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.product-info .swatch {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #ccc;
    cursor: pointer;
    transition: box-shadow 0.3s;
    padding: 0;
}

.product-info .swatch:hover {
    box-shadow: 0 0 0 2px var(--accent-color);
}

.product-info .swatch.active {
    box-shadow: 0 0 0 2px var(--accent-color);
}

/* Stilovi za tabove */
.product-tabs {
    margin-top: 40px;
    border-top: 1px solid var(--border-color);
}

.tab-buttons {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}

.tab-button {
    padding: 15px 25px;
    cursor: pointer;
    background-color: transparent;
    border: none;
    font-size: 1em;
    font-weight: bold;
    color: #888;
    position: relative;
    transition: color 0.3s;
}

.tab-button:hover {
    color: var(--text-color);
}

.tab-button.active {
    color: var(--text-color);
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--accent-color);
}

.tab-content-container {
    padding: 25px 5px;
}

.tab-content {
    display: none;
    line-height: 1.6;
}

.tab-content.active {
    display: block;
}

/* Stilovi za listu specifikacija */
.specifications-list {
    margin: 0;
    padding: 0;
}

.specifications-list dt {
    font-weight: bold;
    color: var(--text-color);
    width: 30%;
    float: left;
    clear: left;
    padding: 8px 0;
}

.specifications-list dd {
    margin-left: 35%;
    padding: 8px 0;
}