* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
}

/* Side panels */
.side-panel {
    width: 200px;
    background-color: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin: 0 10px;
}

.side-panel h3 {
    color: #6b6b6b;
    font-size: 14px;
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.side-box {
    background-color: #f9f9f9;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #e6e6e6;
    cursor: pointer;
    transition: all 0.2s;
}

.side-box:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

.side-box h4 {
    font-size: 13px;
    margin-bottom: 8px;
    color: #444;
}

.side-box p {
    font-size: 12px;
    color: #666;
}

/* Main content */
.main-content {
    flex: 1;
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

header h1 {
    color: #5a0;
    font-size: 36px;
    letter-spacing: -1px;
    margin-bottom: 10px;
    cursor: pointer;
}

header p {
    color: #777;
    font-size: 14px;
}

/* Novi header layout sa flexbox - POPRAVLJEN */
.header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 10px;
    flex-wrap: wrap;
}

.header-right-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
    flex: 1;
}

/* Admin button */
.admin-button {
    background-color: #333;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.2s;
    flex-shrink: 0;
    white-space: nowrap;
}

.admin-button:hover {
    background-color: #555;
}

/* Post ad button */
.post-ad-button {
    background-color: #5a0;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s;
    white-space: nowrap;
    flex-shrink: 0;
}

.post-ad-button:hover {
    background-color: #490;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(90, 0, 0, 0.2);
}

/* Donation button */
.donation-button {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
    flex-shrink: 0;
    white-space: nowrap;
}

.donation-button:hover {
    background: linear-gradient(45deg, #c0392b, #a93226);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

.donation-button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(231, 76, 60, 0.3);
}

.donation-button.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(231, 76, 60, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0);
    }
}

/* Search section */
.search-section {
    margin-bottom: 30px;
}

.search-box {
    display: flex;
    margin-bottom: 15px;
}

.search-box input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 16px;
}

.search-box button {
    background-color: #5a0;
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 16px;
}

.search-box button:hover {
    background-color: #490;
}

.search-info {
    color: #666;
    font-size: 14px;
    text-align: center;
}

/* Product listing */
.product-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); /* Malo šire kartice */
    gap: 20px;
    margin-bottom: 30px;
}

.product-item {
    background-color: #f9f9f9;
    border: 1px solid #e6e6e6;
    border-radius: 6px;
    padding: 15px;
    padding-top: 35px;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 180px; /* Minimalna visina za celu karticu */
}

.product-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    background-color: #f0f8f0;
}

.product-content {
    display: flex;
    gap: 20px; /* Povećan razmak između slike i teksta */
    margin-top: 5px;
    align-items: flex-start;
    min-height: 120px;
    width: 100%; /* Koristi punu širinu */
}

.product-image-container {
    width: 120px;
    height: 120px;
    min-width: 120px;
    max-width: 120px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 4px;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 5px; /* Dodatni margin desno */
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-image-placeholder {
    color: #888;
    font-size: 14px;
    text-align: center;
    padding: 10px;
    word-break: break-word;
}

.product-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    width: 100%; /* Koristi preostalu širinu */
    max-width: calc(100% - 145px); /* Oduzmi širinu slike + gap */
}

.product-title {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 8px;
    color: #333;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    width: 100%; /* Koristi punu širinu */
}

.product-price {
    color: #5a0;
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 10px;
    word-wrap: break-word; /* Dozvoli lomljenje ako je predugačka */
    overflow-wrap: break-word;
    width: 100%; /* Koristi punu širinu */
}

.product-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 12px;
    line-height: 1.4;
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    word-wrap: break-word;
    overflow-wrap: break-word;
    width: 100%; /* Koristi punu širinu */
}

.product-category {
    display: inline-block;
    background-color: #e9f7e9;
    color: #5a0;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 12px;
    align-self: flex-start;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-date {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 11px;
    color: #888;
    background-color: rgba(255, 255, 255, 0.9); /* Pozadina za bolju čitljivost */
    padding: 3px 8px;
    border-radius: 4px;
    z-index: 1; /* Iznad slike */
}

.product-location {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.no-results {
    text-align: center;
    padding: 40px;
    color: #888;
    grid-column: 1 / -1;
}

/* ==================================================
   EDIT AD BUTTON - Dugme za izmenu oglasa
   ================================================== */

.edit-ad-button {
    background: linear-gradient(135deg, #ff9800 0%, #ff6f00 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.edit-ad-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.edit-ad-button:hover::before {
    left: 100%;
}

.edit-ad-button:hover {
    background: linear-gradient(135deg, #ff6f00 0%, #e65100 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.4);
}

.edit-ad-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
}

/* Footer */
footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #777;
    font-size: 14px;
}

.footer-link {
    color: #5a0;
    text-decoration: none;
    cursor: pointer;
    margin: 0 5px;
}

.footer-link:hover {
    text-decoration: underline;
}

/* Modal overlay */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s;
    overflow-y: auto;
    padding: 20px;
}

.modal {
    background-color: white;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: slideIn 0.3s;
    margin: auto;
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f9f9f9;
    border-radius: 8px 8px 0 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.modal-title {
    font-size: 24px;
    color: #333;
    font-weight: bold;
}

.modal-close {
    font-size: 28px;
    color: #888;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 25px;
    overflow-x: hidden; /* Spreči horizontalno prelazak */
}

.modal-body::after { /* Clearfix */
    content: "";
    display: table;
    clear: both;
}

/* Dodatni clearfix za mobilne */
@media (max-width: 768px) {
    .modal-body {
        padding: 20px;
    }
    
    .modal-body::before {
        content: "";
        display: table;
        clear: both;
    }
}

@media (max-width: 576px) {
    .modal-body {
        padding: 15px;
    }
}

.modal-section {
    margin-bottom: 30px; /* Povećan razmak između sekcija */
    clear: both; /* Očisti float */
}

.modal-section h3 {
    color: #5a0;
    margin-bottom: 15px; /* Povećan razmak ispod naslova */
    font-size: 18px;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px; /* Povećan padding */
    margin-top: 10px; /* Dodatni razmak iznad */
}

.modal-section p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.modal-section ul {
    margin: 15px 0 15px 20px; /* Dodatni razmak */
    line-height: 1.8; /* Veći line-height */
}

.modal-section li {
    margin-bottom: 8px; /* Razmak između list items */
}

/* SUCCESS MESSAGE - POPRAVLJEN DA NE PREKLAPA */
.form-success {
    background-color: #d4edda;
    color: #155724;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
    border: 2px solid #c3e6cb;
    max-height: 70vh;
    overflow-y: auto;
}

.form-success h3 {
    margin-bottom: 15px;
    font-size: 20px;
}

.form-success p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.form-success ul {
    margin: 10px 0 10px 20px;
}

.form-success li {
    margin-bottom: 5px;
}

/* Donation specific styles */
.donation-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.donation-option {
    background-color: #f9f9f9;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}

.donation-option:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    background-color: #fff;
}

.donation-option.paypal {
    border-color: #003087;
}

.donation-option.crypto {
    border-color: #f7931a;
}

.donation-option.bank {
    border-color: #5a0;
}

.donation-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.donation-option h4 {
    color: #333;
    margin-bottom: 10px;
    font-size: 18px;
}

.donation-option p {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.donation-address {
    background-color: #f5f5f5;
    padding: 10px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
    word-break: break-all;
    margin-top: 10px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.donation-address:hover {
    background-color: #e9e9e9;
}

.copy-notice {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

.donation-note {
    background-color: #f0f8ff;
    border-left: 4px solid #2196F3;
    padding: 15px;
    margin-top: 20px;
    border-radius: 4px;
    font-size: 14px;
}

.donation-note p {
    margin-bottom: 10px;
}

.donation-note ul {
    padding-left: 20px;
    margin-bottom: 10px;
}

.donation-note li {
    margin-bottom: 5px;
}

/* Image gallery in modal */
.image-gallery {
    margin-bottom: 25px; /* Povećan razmak ispod galerije */
    width: 100%; /* Puna širina */
    display: block; /* Force block display */
    overflow: hidden; /* Hide overflow */
}

.main-image {
    width: 100%;
    height: 400px; /* Fiksna visina */
    border-radius: 6px;
    margin-bottom: 15px; /* Razmak ispod glavne slike */
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    overflow: hidden; /* Spreči prelazak */
    position: relative;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Cela slika vidljiva */
    background-color: #fff; /* Bela pozadina */
}

.thumbnail-container {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
    margin-bottom: 15px; /* Razmak ispod thumbnails */
}

.thumbnail {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
    flex-shrink: 0; /* Ne dozvoli sužavanje */
}

.thumbnail.active {
    border-color: #5a0;
}

.thumbnail:hover {
    border-color: #5a0;
}

.modal-product-info {
    margin-top: 25px; /* Povećan razmak iznad info sekcije */
    clear: both; /* Očisti float */
    width: 100%;
    display: block; /* Force block display */
    position: relative; /* Ensure proper stacking */
}

/* MOBILE SPECIFIC OVERRIDES */
@media (max-width: 768px) {
    .image-gallery {
        margin-bottom: 35px;
        padding-bottom: 20px; /* Extra padding */
        border-bottom: 1px solid #eee; /* Visual separator */
    }
    
    .modal-product-info {
        margin-top: 35px;
        padding-top: 25px; /* Extra padding */
    }
}

@media (max-width: 576px) {
    .image-gallery {
        margin-bottom: 45px;
        padding-bottom: 30px;
    }
    
    .modal-product-info {
        margin-top: 45px;
        padding-top: 35px;
    }
}

@media (max-width: 480px) {
    .image-gallery {
        margin-bottom: 55px; /* MAXIMUM spacing */
        padding-bottom: 40px;
        border-bottom: 2px solid #eee; /* Stronger separator */
    }
    
    .modal-product-info {
        margin-top: 55px; /* MAXIMUM spacing */
        padding-top: 45px;
    }
}

.modal-price {
    font-size: 28px;
    color: #5a0;
    font-weight: bold;
    margin-bottom: 15px;
    margin-top: 15px; /* Dodatni razmak iznad */
    word-wrap: break-word;
    overflow-wrap: break-word;
    clear: both; /* Ensure it starts on new line */
    display: block; /* Force block display */
}

.modal-category {
    display: inline-block;
    background-color: #e9f7e9;
    color: #5a0;
    font-size: 14px;
    padding: 5px 12px;
    border-radius: 15px;
    margin-bottom: 20px; /* Povećan razmak ispod */
    clear: both; /* Ensure proper flow */
}

/* Contact form styles */
.contact-seller-form {
    background-color: #f9f9f9;
    border-radius: 6px;
    padding: 20px;
    margin-top: 20px;
}

.contact-form-title {
    color: #333;
    margin-bottom: 15px;
    font-size: 18px;
}

.contact-info-note {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f0f0f0;
    border-radius: 4px;
}

/* Form styles */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #444;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: #5a0;
    outline: none;
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

/* Image upload styles */
.image-upload-container {
    margin-bottom: 20px;
}

.image-upload-box {
    border: 2px dashed #ddd;
    border-radius: 6px;
    padding: 20px;
    text-align: center;
    margin-bottom: 15px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.image-upload-box:hover {
    border-color: #5a0;
}

.image-upload-box.dragover {
    border-color: #5a0;
    background-color: #f9fff9;
}

.image-upload-icon {
    font-size: 40px;
    color: #5a0;
    margin-bottom: 10px;
}

.image-upload-text {
    color: #666;
    margin-bottom: 10px;
}

.image-upload-button {
    background-color: #5a0;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.image-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.image-preview-item {
    width: 100px;
    height: 80px;
    position: relative;
    border-radius: 4px;
    overflow: hidden;
}

.image-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(0,0,0,0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-count {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

.social-media-links {
    margin-top: 15px;
}

.social-media-input {
    margin-bottom: 10px;
}

.form-checkbox {
    margin-right: 10px;
}

.form-checkbox-label {
    font-size: 14px;
    color: #666;
}

.form-required {
    color: #e74c3c;
}

.form-error {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

/* CONFIRMATION LINK BOX - POPRAVLJEN */
.confirmation-link-box {
    background-color: #e8f4fd;
    border: 1px solid #b6d9ff;
    border-radius: 6px;
    padding: 15px;
    margin: 15px 0;
    word-break: break-all;
}

.confirmation-link-title {
    font-weight: bold;
    margin-bottom: 10px;
    color: #0066cc;
    font-size: 16px;
}

.confirmation-link {
    color: #0066cc;
    text-decoration: underline;
    cursor: pointer;
    display: block;
    padding: 10px;
    background-color: white;
    border-radius: 4px;
    margin-top: 5px;
    font-size: 13px;
}

.confirmation-note {
    font-size: 14px;
    color: #666;
    margin-top: 10px;
}

/* Contact button */
.modal-contact-button {
    background-color: #5a0;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s;
}

.modal-contact-button:hover {
    background-color: #490;
    transform: translateY(-2px);
}

.modal-contact-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Modal for category */
.modal-category-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.modal-category-item {
    background-color: #f9f9f9;
    border: 1px solid #e6e6e6;
    border-radius: 6px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-category-item:hover {
    background-color: #f0f8f0;
    transform: translateY(-2px);
}

.modal-category-item h4 {
    color: #5a0;
    margin-bottom: 5px;
}

/* Admin panel styles */
.admin-panel {
    background-color: #f9f9f9;
    border-radius: 6px;
    padding: 20px;
    margin-top: 20px;
}

.admin-panel h3 {
    color: #333;
    margin-bottom: 15px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.admin-product-item {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-product-info {
    flex: 1;
    min-width: 250px;
}

.admin-product-title {
    font-weight: bold;
    margin-bottom: 5px;
}

.admin-product-contact {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

.admin-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-button-small {
    background-color: #333;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.admin-button-small:hover {
    background-color: #555;
}

.admin-button-small.delete {
    background-color: #d9534f;
}

.admin-button-small.delete:hover {
    background-color: #c9302c;
}

/* Modal for about */
.modal-about-content {
    line-height: 1.7;
}

/* Confirmation page */
.confirmation-page {
    text-align: center;
    padding: 40px 20px;
}

.confirmation-page h2 {
    color: #5a0;
    margin-bottom: 20px;
}

.confirmation-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.confirmation-button {
    background-color: #5a0;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.2s;
}

.confirmation-button:hover {
    background-color: #490;
}

.confirmation-button.delete {
    background-color: #d9534f;
}

.confirmation-button.delete:hover {
    background-color: #c9302c;
}

/* Animation for modal */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* ==================================================
   DONATION STYLES
   ================================================== */

/* PayPal dugme */
.donation-link-button {
    display: block;
    background: linear-gradient(45deg, #003087, #009cde);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.donation-link-button:hover {
    background: linear-gradient(45deg, #002366, #007bb5);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 48, 135, 0.3);
    text-decoration: none;
    color: white;
}

.donation-note-small {
    font-size: 13px;
    color: #666;
    margin-top: 10px;
    font-style: italic;
}

/* Bank details */
.bank-details {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    text-align: left;
}

.bank-detail-row {
    display: flex;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #dee2e6;
}

.bank-detail-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.bank-label {
    font-weight: bold;
    color: #495057;
    min-width: 100px;
    flex-shrink: 0;
}

.bank-value {
    color: #212529;
    word-break: break-all;
}

/* QR kodovi */
.qr-code-section {
    margin: 20px 0;
    text-align: center;
}

.qr-code-title {
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.qr-code-container {
    display: inline-block;
    padding: 10px;
    background: white;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    margin: 10px auto;
}

.qr-code-note {
    font-size: 13px;
    color: #666;
    margin-top: 8px;
}

/* Copy dugmad */
.copy-address-button {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    width: 100%;
    margin-top: 15px;
    transition: background-color 0.2s;
}

.copy-address-button:hover {
    background-color: #5a6268;
}

/* Kripto sekcija */
.crypto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.crypto-option {
    background-color: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.crypto-option:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: #5a0;
}

.crypto-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 2px solid #f1f1f1;
    padding-bottom: 10px;
}

.crypto-icon {
    font-size: 28px;
    margin-right: 15px;
    font-weight: bold;
}

.crypto-header h4 {
    margin: 0;
    color: #333;
    font-size: 16px;
}

.crypto-qr-section {
    text-align: center;
    margin: 15px 0;
}

.crypto-qr-code {
    display: inline-block;
    margin-bottom: 15px;
    padding: 8px;
    background: white;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.crypto-address-display {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    word-break: break-all;
    color: #495057;
    border: 1px dashed #ced4da;
    margin-top: 10px;
}

.copy-crypto-button {
    background-color: #17a2b8;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    width: 100%;
    margin-top: 10px;
    transition: background-color 0.2s;
}

.copy-crypto-button:hover {
    background-color: #138496;
}

.crypto-copy-notice {
    font-size: 13px;
    color: #5a0;
    margin-top: 8px;
    text-align: center;
    min-height: 20px;
}

/* Responsive design */
@media (max-width: 992px) {
    .container {
        flex-direction: column;
    }
    
    .side-panel {
        width: 100%;
        margin: 0 0 20px 0;
    }
    
    .side-panel.right {
        order: 3;
    }
    
    .modal-product-details {
        flex-direction: column;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .main-image {
        height: 200px;
    }
    
    .header-top {
        flex-direction: column;
        align-items: stretch;
    }
    
    .header-right-buttons {
        flex-direction: column;
        justify-content: stretch;
        margin-top: 10px;
    }
    
    .admin-button, .post-ad-button, .donation-button {
        width: 100%;
        text-align: center;
        margin-bottom: 10px;
        justify-content: center;
    }
    
    .crypto-grid {
        grid-template-columns: 1fr;
    }
    
    .donation-options {
        grid-template-columns: 1fr;
    }
    
    .bank-detail-row {
        flex-direction: column;
    }
    
    .bank-label {
        margin-bottom: 5px;
        min-width: auto;
    }
}

@media (max-width: 768px) {
    .product-content {
        flex-direction: column;
        gap: 15px; /* Razmak između slike i teksta */
    }
    
    .product-image-container {
        width: 100%;
        height: 200px; /* Veća visina na mobilnom */
        max-width: 100%;
        margin-right: 0;
        margin-bottom: 10px; /* Razmak ispod slike */
    }
    
    .product-text {
        width: 100%;
        max-width: 100%;
    }
    
    .product-title {
        font-size: 18px; /* Malo veći font na mobilnom */
    }
    
    .product-price {
        font-size: 20px;
    }
    
    /* MODAL NA TABLETU - KRITIČNO ZA MOBILNI */
    .main-image {
        height: 300px; /* Srednja visina za tablet */
        margin-bottom: 25px; /* Povećan razmak */
    }
    
    .modal-product-info {
        margin-top: 30px; /* Povećan razmak */
        padding-top: 20px; /* Dodatni padding */
    }
    
    .modal-price {
        margin-top: 25px; /* Dodatni razmak iznad */
        margin-bottom: 20px;
    }
    
    .modal-category {
        margin-bottom: 25px; /* Povećan razmak */
    }
    
    .modal-section {
        margin-bottom: 30px; /* Povećan razmak između sekcija */
    }
    
    .image-gallery {
        margin-bottom: 30px; /* Povećan razmak */
    }
    
    .thumbnail-container {
        margin-top: 15px; /* Razmak iznad thumbnails */
        margin-bottom: 20px; /* Razmak ispod thumbnails */
    }
    
    .donation-options {
        grid-template-columns: 1fr;
    }
    
    .donation-button {
        width: 100%;
        padding: 15px;
        font-size: 16px;
        justify-content: center;
    }
    
    .post-ad-button {
        width: 100%;
    }
    
    .header-right-buttons {
        width: 100%;
    }
    
    .admin-product-item {
        flex-direction: column;
        align-items: stretch;
    }
    
    .admin-product-info {
        min-width: 100%;
    }
    
    .admin-actions {
        width: 100%;
        justify-content: stretch;
    }
    
    .admin-actions button {
        flex: 1;
    }
}

@media (max-width: 576px) {
    .modal {
        width: 95%;
        max-height: 90vh;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    /* KRITIČNO ZA MALE TELEFONE */
    .main-image {
        height: 200px; /* Manja visina na malim ekranima */
        margin-bottom: 30px; /* JOŠ VIŠE razmaka */
    }
    
    .image-gallery {
        margin-bottom: 35px; /* Maksimalan razmak */
    }
    
    .thumbnail-container {
        margin-top: 20px;
        margin-bottom: 25px;
    }
    
    .modal-product-info {
        margin-top: 35px; /* JOŠ VIŠE razmaka na mobilnom */
        padding-top: 25px; /* Dodatni padding */
        clear: both; /* Očisti float */
    }
    
    .modal-price {
        font-size: 24px; /* Manji font na mobilnom */
        margin-top: 30px; /* JOŠ VIŠE razmaka */
        margin-bottom: 25px;
        padding-top: 15px; /* Dodatni padding */
    }
    
    .modal-category {
        margin-bottom: 30px; /* Maksimalan razmak */
    }
    
    .modal-section {
        margin-bottom: 35px; /* JOŠ VIŠE razmaka na mobilnom */
        clear: both; /* Očisti float */
    }
    
    .modal-section h3 {
        margin-top: 20px; /* Dodatni razmak iznad */
        margin-bottom: 15px;
        padding-top: 10px; /* Dodatni padding */
    }
    
    /* Osiguraj da opis i detalji ne prelaze preko slike */
    .modal-section p {
        margin-top: 10px;
        margin-bottom: 15px;
    }
    
    .confirmation-actions {
        flex-direction: column;
    }
    
    .confirmation-button {
        width: 100%;
    }
    
    .donation-button {
        font-size: 14px;
        padding: 12px;
    }
    
    .post-ad-button {
        font-size: 14px;
        padding: 12px;
    }
    
    .crypto-option {
        padding: 15px;
    }
    
    .crypto-header {
        flex-direction: column;
        text-align: center;
    }
    
    .crypto-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .header-top {
        gap: 5px;
    }
    
    .admin-button, .post-ad-button, .donation-button {
        font-size: 14px;
        padding: 10px 15px;
    }
    
    .modal-title {
        font-size: 18px;
    }
    
    .form-success {
        padding: 15px;
        font-size: 14px;
    }
    
    .confirmation-link {
        font-size: 11px;
    }
    
    /* MAKSIMALNI RAZMACI ZA NAJSMANJE TELEFONE */
    .main-image {
        height: 180px; /* Još manja visina za male telefone */
        margin-bottom: 40px; /* MAKSIMALAN razmak */
    }
    
    .image-gallery {
        margin-bottom: 45px; /* MAKSIMALAN razmak */
    }
    
    .thumbnail-container {
        margin-top: 25px;
        margin-bottom: 30px;
    }
    
    .modal-product-info {
        margin-top: 45px; /* MAKSIMALAN razmak */
        padding-top: 30px; /* Maksimalan padding */
        clear: both;
        display: block; /* Force block display */
    }
    
    .modal-price {
        font-size: 22px;
        margin-top: 40px; /* MAKSIMALAN razmak */
        margin-bottom: 30px;
        padding-top: 20px;
        clear: both; /* Očisti float */
    }
    
    .modal-category {
        margin-bottom: 35px; /* MAKSIMALAN razmak */
        margin-top: 15px;
    }
    
    .modal-section {
        margin-bottom: 45px; /* MAKSIMALAN razmak */
        clear: both;
        padding-top: 15px; /* Dodatni padding */
    }
    
    .modal-section h3 {
        margin-top: 25px; /* MAKSIMALAN razmak */
        margin-bottom: 20px;
        padding-top: 15px;
        clear: both;
    }
    
    .modal-section p {
        margin-top: 15px;
        margin-bottom: 20px;
    }
    
    /* Force separation from image */
    .modal-section:first-of-type {
        margin-top: 50px; /* Extra space for first section */
    }
}

/* ==================================================
   TRUST RATING SYSTEM - Green/Yellow/Red Flags
   ================================================== */

/* Trust badge on product cards */
.product-trust-badge {
    position: absolute;
    top: 45px;
    right: 12px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
}

.trust-badge-green {
    background: rgba(76, 175, 80, 0.95);
    color: white;
    border: 2px solid #2e7d32;
}

.trust-badge-yellow {
    background: rgba(255, 193, 7, 0.95);
    color: #856404;
    border: 2px solid #f57c00;
}

.trust-badge-red {
    background: rgba(244, 67, 54, 0.95);
    color: white;
    border: 2px solid #c62828;
}

/* Trust badge in admin panel */
.trust-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 700;
}

.trust-green {
    background: #e8f5e9;
    color: #2e7d32;
    border: 2px solid #4CAF50;
}

.trust-yellow {
    background: #fff8e1;
    color: #f57c00;
    border: 2px solid #FFC107;
}

.trust-red {
    background: #ffebee;
    color: #c62828;
    border: 2px solid #f44336;
}

/* Trust rating section in modal */
.trust-rating-section {
    animation: trustFadeIn 0.5s ease-in-out;
}

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

/* Responsive trust badges */
@media (max-width: 768px) {
    .product-trust-badge {
        top: 40px;
        right: 8px;
        padding: 5px 10px;
        font-size: 11px;
    }
    
    .trust-rating-section {
        padding: 15px !important;
    }
    
    .trust-rating-section h3 {
        font-size: 20px !important;
    }
    
    .trust-rating-section ul {
        font-size: 14px !important;
    }
}

.modal-opis {
    white-space: pre-wrap;
    word-wrap: break-word;
    margin-bottom: 15px;
    line-height: 1.6;
}
