* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { overflow-x: hidden; width: 100%; max-width: 100%; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: #f4f6f8; color: #202124; line-height: 1.5; }
img { max-width: 100%; height: auto; display: block; }

.nav-categories { background: #ffffff; border-bottom: 1px solid #ebebeb; overflow-x: auto; white-space: nowrap; width: 100%; -webkit-overflow-scrolling: touch; }
.nav-categories-inner { max-width: 1240px; margin: 0 auto; padding: 0 20px; display: flex; gap: 8px; }
.nav-link { display: inline-block; padding: 12px 14px; color: #5f6368; text-decoration: none; font-weight: 700; font-size: 14px; border-bottom: 3px solid transparent; transition: all 0.2s; }
.nav-link:hover, .nav-link.active { color: #e65100; border-bottom-color: #e65100; }

.trend-bar { background: #ffffff; border-bottom: 1px solid #edf0f2; padding: 8px 0; font-size: 12.5px; overflow-x: auto; white-space: nowrap; width: 100%; -webkit-overflow-scrolling: touch; }
.trend-bar-inner { max-width: 1240px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 10px; }
.trend-tag { text-decoration: none; font-weight: 600; padding: 2px 8px; border-radius: 12px; background: #fff3e0; color: #e65100; }
.trend-tag:hover { background: #ffe0b2; }

.portal-layout { max-width: 1240px; margin: 25px auto; padding: 0 20px; display: grid; grid-template-columns: 1fr 340px; gap: 30px; align-items: start; width: 100%; }
.main-promo-feed { min-width: 0; width: 100%; }

.source-badge { font-weight: 800; padding: 2px 8px; border-radius: 12px; color: #fff; font-size: 10.5px; text-transform: uppercase; display: inline-block; }

/* FEATURED PROMO BANNER */
.featured-promo-hero { background: linear-gradient(135deg, #e65100 0%, #ff8f00 100%); border-radius: 16px; padding: 22px; color: #fff; margin-bottom: 30px; display: flex; gap: 20px; align-items: center; box-shadow: 0 4px 16px rgba(230,81,0,0.18); min-width: 0; width: 100%; }
.featured-hero-img { width: 140px; height: 160px; object-fit: cover; border-radius: 10px; border: 2px solid #fff; background: #fff; flex-shrink: 0; }
.featured-hero-title { font-size: 22px; font-weight: 800; color: #ffffff; text-decoration: none; line-height: 1.3; display: block; margin: 8px 0; }
.featured-hero-title:hover { text-decoration: underline; }
.btn-featured-action { display: inline-block; background: #fff; color: #e65100; font-weight: 800; padding: 8px 18px; border-radius: 20px; text-decoration: none; font-size: 13px; margin-top: 10px; transition: background 0.2s; }
.btn-featured-action:hover { background: #fbe9e7; }

/* GRID KATALOGA I SNIŽENJA */
.promo-grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; margin-bottom: 30px; width: 100%; min-width: 0; }
.promo-card { 
    background: #ffffff; 
    border: 1px solid #e2e8f0; 
    border-radius: 14px; 
    overflow: hidden; 
    display: flex; 
    flex-direction: column; 
    transition: transform 0.2s, box-shadow 0.2s; 
    position: relative; 
    min-width: 0; 
    content-visibility: auto;
    contain-intrinsic-size: 260px 300px;
}
.promo-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.06); border-color: #ffb74d; }
.promo-card-thumb-wrap { position: relative; width: 100%; height: 180px; background: #fafafa; overflow: hidden; }
.promo-card-img { width: 100%; height: 100%; object-fit: contain; padding: 10px; transition: transform 0.3s; }
.promo-card:hover .promo-card-img { transform: scale(1.04); }
.badge-discount-float { position: absolute; top: 10px; right: 10px; background: #e65100; color: #fff; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 12px; }
.promo-card-body { padding: 14px; display: flex; flex-direction: column; flex-grow: 1; justify-content: space-between; min-width: 0; }
.promo-card-title { font-size: 14.5px; font-weight: 700; color: #202124; text-decoration: none; line-height: 1.35; margin: 6px 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.promo-card-title:hover { color: #e65100; }
.promo-card-meta { font-size: 11.5px; color: #70757a; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #f1f3f4; padding-top: 8px; margin-top: 8px; }

/* SINGLE VIEW */
.single-promo-box { background: #ffffff; border-radius: 16px; border: 1px solid #e2e8f0; padding: 30px; box-shadow: 0 4px 14px rgba(0,0,0,0.03); min-width: 0; width: 100%; }
.single-promo-title { font-size: 26px; font-weight: 800; color: #202124; margin: 12px 0; line-height: 1.3; word-break: break-word; }
.single-promo-img-wrap { text-align: center; margin: 20px 0; background: #fdfdfd; border: 1px solid #edf0f2; border-radius: 12px; padding: 16px; width: 100%; }
.single-promo-img { max-height: 480px; width: auto; max-width: 100%; display: inline-block; object-fit: contain; }
.single-promo-info-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; background: #fff8f0; border: 1px solid #ffe0b2; border-radius: 12px; padding: 16px; margin: 20px 0; width: 100%; }
.single-promo-desc { font-size: 15.5px; color: #3c4043; line-height: 1.65; margin: 20px 0; word-break: break-word; }
.btn-open-source { display: inline-block; background: #e65100; color: #fff; font-weight: 700; font-size: 15px; padding: 12px 28px; border-radius: 24px; text-decoration: none; transition: background 0.2s; }
.btn-open-source:hover { background: #bf360c; }

/* SOCIAL SHARE BUTTONS */
.social-share-strip { display: flex; align-items: center; gap: 8px; margin-top: 15px; margin-bottom: 20px; flex-wrap: wrap; }
.share-label { font-size: 12.5px; font-weight: 700; color: #5f6368; margin-right: 4px; }
.share-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; color: #fff; text-decoration: none; font-size: 14px; font-weight: bold; transition: opacity 0.2s, transform 0.2s; }
.share-btn:hover { opacity: 0.85; transform: scale(1.08); }
.share-fb { background: #1877f2; }
.share-tw { background: #000000; }
.share-wa { background: #25d366; }
.share-vb { background: #7360f2; }
.share-tg { background: #24a1de; }

/* SIDEBAR */
.sidebar-wrapper { display: flex; flex-direction: column; gap: 24px; position: sticky; top: 80px; width: 100%; min-width: 0; }
.side-card { background: #ffffff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 18px; box-shadow: 0 4px 12px rgba(0,0,0,0.03); width: 100%; min-width: 0; }
.side-card-title { font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid #f1f3f4; display: flex; justify-content: space-between; align-items: center; }

/* DISCOVERY WIDGET ISPOD PONUDE */
.bottom-discovery-box { margin-top: 30px; padding: 20px; background: #fdfdfd; border: 1px solid #e2e8f0; border-radius: 14px; width: 100%; }
.discovery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-top: 14px; width: 100%; }
.discovery-card { background: #ffffff; border: 1px solid #edf0f2; border-radius: 10px; padding: 12px; text-decoration: none; color: inherit; display: flex; flex-direction: column; justify-content: space-between; gap: 6px; transition: transform 0.2s; box-shadow: 0 2px 5px rgba(0,0,0,0.02); min-width: 0; }
.discovery-card:hover { transform: translateY(-2px); border-color: #cbd5e1; }

.pagination-box { display: flex; justify-content: center; align-items: center; gap: 6px; margin: 30px 0; flex-wrap: wrap; }
.pagination-box a { padding: 7px 12px; background: #fff; border: 1px solid #dadce0; border-radius: 8px; color: #e65100; text-decoration: none; font-weight: 700; font-size: 13px; }
.pagination-box a.active { background: #e65100; color: #fff; border-color: #e65100; }

@media (max-width: 1024px) {
    .portal-layout { grid-template-columns: 1fr; }
    .sidebar-wrapper { position: static; }
}

@media (max-width: 768px) {
    .portal-layout { padding: 0 10px; margin: 15px auto; gap: 20px; width: 100%; }
    
    .featured-promo-hero { flex-direction: column !important; text-align: center !important; padding: 16px 12px !important; gap: 12px !important; }
    .featured-hero-img { width: 110px !important; height: 130px !important; }
    .featured-hero-title { font-size: 17px !important; line-height: 1.3 !important; }
    
    .promo-grid-cards { grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
    .promo-card-thumb-wrap { height: 140px !important; }
    .promo-card-img { padding: 6px !important; }
    .promo-card-body { padding: 10px !important; }
    .promo-card-title { font-size: 13px !important; line-height: 1.3 !important; margin: 4px 0 !important; }
    .promo-card-meta { font-size: 10.5px !important; }
    
    .single-promo-box { padding: 16px !important; border-radius: 12px !important; }
    .single-promo-title { font-size: 20px !important; line-height: 1.3 !important; }
    .single-promo-desc { font-size: 14.5px !important; }
    .single-promo-img-wrap { padding: 10px !important; }
    .single-promo-img { max-height: 320px !important; }
    
    .bottom-discovery-box { padding: 14px !important; border-radius: 12px !important; }
    .discovery-grid { display: flex !important; overflow-x: auto !important; -webkit-overflow-scrolling: touch; scrollbar-width: none !important; padding-bottom: 6px !important; gap: 10px !important; }
    .discovery-grid::-webkit-scrollbar { display: none !important; }
    .discovery-card { flex: 0 0 190px !important; width: 190px !important; min-width: 190px !important; }

    .side-card { padding: 14px !important; border-radius: 12px !important; }
}

/* DISCLAIMER I OZNAKA SLIKE SNIŽENJA */
.promo-img-disclaimer-wrap {
    position: relative;
    display: inline-block;
    width: 100%;
}

.promo-img-disclaimer-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.75);
    color: #ffffff;
    padding: 3px 8px;
    font-size: 11px;
    border-radius: 4px;
    pointer-events: none;
}

.promo-source-attribution-bar {
    font-size: 11.5px;
    color: #70757a;
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 0 0 8px 8px;
    border: 1px solid #e0e0e0;
    border-top: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: -6px;
    margin-bottom: 12px;
}