/* SPO Frontend CSS */

/* =====================
   MATERIJALI TAB
   ===================== */
.spo-tab-materials {}

/* Intro text shown at top of each SPO tab */
.spo-tab-intro {
    margin: 0 0 18px 0;
    padding: 12px 16px;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 8px;
    font-size: 14px;
    color: #444;
}

/* Optional per-image texts (materials tab) */
.spo-mat-text {
    font-size: 13px;
    color: #444;
    line-height: 1.45;
    margin: 10px 0;
}
.spo-mat-text-top { margin-top: 0; }
.spo-mat-text-bottom { margin-bottom: 0; }

.spo-materials-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 24px;
}

.spo-material-item {}

.spo-material-item-header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.spo-material-item-title {
    font-size: 15px;
    font-weight: 700;
    color: #222;
}

.spo-material-item-price {
    font-size: 14px;
    color: #555;
}

.spo-material-thumb {
    display: inline-block;
}

.spo-material-thumb a {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    border: 2px solid #e5e5e5;
    transition: border-color 0.2s;
    text-decoration: none !important;
}

.spo-material-thumb a:hover {
    border-color: #333;
}

.spo-material-thumb img {
    width: 100%;
    display: block;
    transition: transform 0.3s ease;
}

.spo-material-thumb a:hover img {
    transform: scale(1.03);
}

.spo-thumb-hover {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    font-size: 22px;
}

.spo-material-thumb a:hover .spo-thumb-hover {
    opacity: 1;
}

.spo-materials-note {
    background: #f9f9f9;
    border-left: 3px solid #ddd;
    padding: 12px 16px;
    border-radius: 0 4px 4px 0;
    font-size: 14px;
    color: #555;
    margin-top: 8px;
}

/* =====================
   LIGHTBOX
   ===================== */
.spo-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
}

.spo-lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.spo-lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.88);
    cursor: pointer;
}

.spo-lightbox-inner {
    position: relative;
    z-index: 1;
    max-width: 90vw;
    max-height: 90vh;
    text-align: center;
}

.spo-lightbox-inner img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
    display: block;
}

.spo-lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    opacity: 0.8;
    transition: opacity 0.2s;
}
.spo-lightbox-close:hover { opacity: 1; }

.spo-lightbox-caption {
    color: #ccc;
    font-size: 13px;
    margin-top: 10px;
    text-align: center;
}

/* =====================
   DIMENZIJE TAB
   ===================== */
.spo-dims-frontend-table {
    width: 100%;
    border-collapse: collapse;
    max-width: 500px;
}

.spo-dims-frontend-table tr {
    border-bottom: 1px solid #eee;
}

.spo-dims-frontend-table td {
    padding: 10px 16px;
    font-size: 14px;
}

.spo-dim-name {
    font-weight: 600;
    color: #333;
    width: 50%;
}

.spo-dim-value {
    color: #555;
}

.spo-dim-unit {
    color: #888;
    font-size: 12px;
    margin-left: 3px;
}

/* =====================
   CENOVNIK TAB
   ===================== */
.spo-tab-price table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.spo-tab-price table th,
.spo-tab-price table td {
    padding: 10px 14px;
    border: 1px solid #e5e5e5;
    text-align: left;
}

.spo-tab-price table th {
    background: #f5f5f5;
    font-weight: 600;
}

.spo-tab-price table tr:nth-child(even) td {
    background: #fafafa;
}

/* =====================
   OPIS TAB
   ===================== */
.spo-tab-description {
    font-size: 14px;
    line-height: 1.7;
    color: #444;
    max-width: 760px;
}

/* =====================
   LIST LAYOUT
   ===================== */
.spo-list-layout {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.spo-list-section {
    border-bottom: 1px solid #eee;
    padding: 32px 0;
}

.spo-list-section:first-child { padding-top: 0; }
.spo-list-section:last-child { border-bottom: none; padding-bottom: 0; }

.spo-list-section-title {
    font-size: 18px;
    font-weight: 700;
    color: #222;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #222;
    display: inline-block;
}

.spo-list-section-body {}
