/* ============================================================
   MojShop — Glavni CSS
   Font: Syne (display) + DM Sans (body)
   Paleta: tamno-plava + narančasta akcent
   ============================================================ */

:root {
    --primary:    #1a2744;
    --accent:     #f05a28;
    --accent-h:   #d44a1a;
    --light:      #f8f7f4;
    --border:     #e8e5e0;
    --text:       #1a1a2e;
    --muted:      #6b7280;
    --success:    #16a34a;
    --danger:     #dc2626;
    --warning:    #d97706;
    --radius:     10px;
    --shadow:     0 2px 12px rgba(0,0,0,.08);
    --font-head:  'Syne', sans-serif;
    --font-body:  'DM Sans', sans-serif;
    --container:  1260px;
    --header-h:   120px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); color: var(--text); background: var(--light); font-size: 15px; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; font-family: var(--font-body); }

/* ---- Container ---- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header { background: var(--primary); position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 20px rgba(0,0,0,.2); }

.header-inner { display: flex; align-items: center; gap: 20px; padding-top: 14px; padding-bottom: 14px; }

.logo { font-family: var(--font-head); font-size: 24px; font-weight: 700; color: #fff; letter-spacing: -0.5px; }
.logo span { color: var(--accent); }

/* Search */
.search-bar { flex: 1; display: flex; max-width: 520px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15); border-radius: 8px; overflow: hidden; transition: background .2s; }
.search-bar:focus-within { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.3); }
.search-bar input { flex: 1; background: none; border: none; outline: none; color: #fff; padding: 10px 16px; font-size: 14px; font-family: var(--font-body); }
.search-bar input::placeholder { color: rgba(255,255,255,.5); }
.search-bar button { background: var(--accent); border: none; color: #fff; padding: 10px 16px; transition: background .2s; }
.search-bar button:hover { background: var(--accent-h); }

/* Header icons */
.header-actions { display: flex; align-items: center; gap: 4px; }
.header-icon { position: relative; color: rgba(255,255,255,.8); padding: 8px; border-radius: 8px; transition: color .2s, background .2s; display: flex; }
.header-icon:hover { color: #fff; background: rgba(255,255,255,.1); }
.cart-badge { position: absolute; top: 2px; right: 2px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }

/* Nav */
.main-nav { background: rgba(0,0,0,.2); border-top: 1px solid rgba(255,255,255,.08); }
.nav-list { display: flex; gap: 0; }
.nav-item { position: relative; }
.nav-item > a { display: block; color: rgba(255,255,255,.85); padding: 10px 16px; font-size: 13.5px; font-weight: 500; transition: color .2s, background .2s; }
.nav-item > a:hover, .nav-item:hover > a { color: #fff; background: rgba(255,255,255,.08); }
.nav-akcija { color: #fbbf24 !important; }

/* Dropdown */
.dropdown { display: none; position: absolute; top: 100%; left: 0; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); min-width: 200px; box-shadow: var(--shadow); z-index: 200; padding: 6px 0; }
.nav-item:hover .dropdown { display: block; }
.dropdown li a { display: block; padding: 9px 18px; font-size: 13.5px; color: var(--text); transition: background .15s, color .15s; }
.dropdown li a:hover { background: var(--light); color: var(--accent); }

/* ============================================================
   FLASH PORUKE
   ============================================================ */
.flash { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; font-size: 14px; }
.flash-success { background: #dcfce7; color: #166534; border-bottom: 1px solid #bbf7d0; }
.flash-error   { background: #fee2e2; color: #991b1b; border-bottom: 1px solid #fecaca; }
.flash-info    { background: #dbeafe; color: #1e40af; border-bottom: 1px solid #bfdbfe; }
.flash-warning { background: #fef3c7; color: #92400e; border-bottom: 1px solid #fde68a; }
.flash-close   { background: none; border: none; font-size: 20px; line-height: 1; opacity: .6; padding: 0 4px; }
.flash-close:hover { opacity: 1; }

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content { min-height: calc(100vh - var(--header-h) - 300px); }

/* ============================================================
   GUMBI
   ============================================================ */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 22px; border-radius: var(--radius); font-family: var(--font-body); font-size: 14px; font-weight: 500; border: 2px solid transparent; transition: all .2s; }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-h); border-color: var(--accent-h); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--border); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-dark { background: var(--primary); color: #fff; }
.btn-dark:hover { background: #243260; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-full { width: 100%; justify-content: center; }

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 0; font-size: 13px; color: var(--muted); }
.breadcrumb a { color: var(--muted); transition: color .2s; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span::before { content: '/'; margin-right: 6px; }

/* ============================================================
   PRODUCT CARD
   ============================================================ */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }

.product-card { background: #fff; border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; transition: box-shadow .25s, transform .25s; display: flex; flex-direction: column; }
.product-card:hover { box-shadow: 0 8px 32px rgba(0,0,0,.12); transform: translateY(-3px); }

.product-card__img-wrap { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--light); }
.product-card__img-wrap img { width: 100%; height: 100%; object-fit: contain; padding: 12px; transition: transform .3s; }
.product-card:hover .product-card__img-wrap img { transform: scale(1.05); }

.badge-novo    { position: absolute; top: 10px; left: 10px; background: var(--primary); color: #fff; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 5px; }
.badge-akcija  { position: absolute; top: 10px; left: 10px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 5px; }

.product-card__wish { position: absolute; top: 10px; right: 10px; background: #fff; border: 1px solid var(--border); border-radius: 50%; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; color: var(--muted); transition: all .2s; opacity: 0; }
.product-card:hover .product-card__wish { opacity: 1; }
.product-card__wish:hover { color: var(--danger); border-color: var(--danger); }

.product-card__body { padding: 14px 16px; display: flex; flex-direction: column; flex: 1; gap: 6px; }
.product-card__brand { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.product-card__name { font-size: 14px; font-weight: 500; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-card__name a:hover { color: var(--accent); }

.product-card__price { display: flex; align-items: baseline; gap: 8px; margin-top: auto; padding-top: 10px; }
.price-current { font-family: var(--font-head); font-size: 17px; font-weight: 700; color: var(--text); }
.price-old { font-size: 13px; color: var(--muted); text-decoration: line-through; }
.price-akcija { color: var(--danger); }

.product-card__add { padding: 10px 16px 14px; }
.product-card__add .btn { padding: 9px; font-size: 13px; }

/* ============================================================
   STRANICA KATEGORIJE — filteri
   ============================================================ */
.category-layout { display: grid; grid-template-columns: 240px 1fr; gap: 28px; padding: 28px 0; }

.filter-sidebar { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; height: fit-content; position: sticky; top: calc(var(--header-h) + 16px); }
.filter-group { margin-bottom: 22px; padding-bottom: 22px; border-bottom: 1px solid var(--border); }
.filter-group:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.filter-group h4 { font-family: var(--font-head); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin-bottom: 12px; }
.filter-option { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 14px; cursor: pointer; }
.filter-option input[type="checkbox"] { accent-color: var(--accent); width: 16px; height: 16px; }

.sort-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding: 12px 16px; background: #fff; border-radius: var(--radius); border: 1px solid var(--border); font-size: 13.5px; }
.sort-bar select { border: 1px solid var(--border); border-radius: 6px; padding: 6px 10px; font-size: 13.5px; font-family: var(--font-body); outline: none; }

/* ============================================================
   KOŠARICA
   ============================================================ */
.cart-layout { display: grid; grid-template-columns: 1fr 360px; gap: 28px; padding: 28px 0; }
.cart-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.cart-table th { background: var(--light); padding: 14px 18px; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); text-align: left; }
.cart-table td { padding: 16px 18px; border-top: 1px solid var(--border); vertical-align: middle; }
.cart-item-img { width: 64px; height: 64px; object-fit: contain; background: var(--light); border-radius: 8px; padding: 4px; }
.cart-qty { display: flex; align-items: center; gap: 8px; }
.cart-qty button { background: var(--light); border: 1px solid var(--border); border-radius: 6px; width: 30px; height: 30px; font-size: 16px; }
.cart-qty input { width: 44px; text-align: center; border: 1px solid var(--border); border-radius: 6px; padding: 5px; font-size: 14px; font-family: var(--font-body); }

.cart-summary { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; height: fit-content; position: sticky; top: calc(var(--header-h) + 16px); }
.cart-summary h3 { font-family: var(--font-head); font-size: 16px; margin-bottom: 18px; }
.summary-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px; border-bottom: 1px solid var(--border); }
.summary-row:last-of-type { border-bottom: none; }
.summary-total { font-weight: 700; font-size: 17px; }
.coupon-form { display: flex; gap: 8px; margin: 14px 0; }
.coupon-form input { flex: 1; border: 1px solid var(--border); border-radius: var(--radius); padding: 9px 12px; font-size: 14px; font-family: var(--font-body); }

/* ============================================================
   FORME (prijava, registracija, checkout)
   ============================================================ */
.form-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; max-width: 480px; margin: 40px auto; box-shadow: var(--shadow); }
.form-card h2 { font-family: var(--font-head); font-size: 22px; margin-bottom: 24px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13.5px; font-weight: 500; margin-bottom: 6px; color: var(--text); }
.form-group input, .form-group select, .form-group textarea { width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; font-size: 14px; font-family: var(--font-body); color: var(--text); background: var(--light); transition: border-color .2s; outline: none; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--accent); background: #fff; }
.form-group .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-error { color: var(--danger); font-size: 13px; margin-top: 4px; }

/* ============================================================
   PAGINACIJA
   ============================================================ */
.pagination { display: flex; justify-content: center; gap: 6px; padding: 32px 0; }
.pagination a, .pagination span { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 8px; font-size: 14px; border: 1px solid var(--border); background: #fff; transition: all .2s; }
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ============================================================
   STATUS NARUDŽBE
   ============================================================ */
.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.status-pending     { background: #fef3c7; color: #92400e; }
.status-processing  { background: #dbeafe; color: #1e40af; }
.status-shipped     { background: #ede9fe; color: #6d28d9; }
.status-delivered   { background: #dcfce7; color: #166534; }
.status-cancelled   { background: #fee2e2; color: #991b1b; }
.status-refund      { background: #f1f5f9; color: #475569; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--primary); color: rgba(255,255,255,.75); margin-top: 60px; padding-top: 50px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.5fr; gap: 40px; padding-bottom: 40px; }
.footer-logo { font-family: var(--font-head); font-size: 22px; color: #fff; font-weight: 700; margin-bottom: 12px; }
.footer-col p { font-size: 13.5px; line-height: 1.7; margin-bottom: 8px; }
.footer-col h4 { font-family: var(--font-head); font-size: 13px; color: #fff; text-transform: uppercase; letter-spacing: .8px; margin-bottom: 14px; font-weight: 600; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul a { font-size: 13.5px; transition: color .2s; }
.footer-col ul a:hover { color: #fff; }
.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.footer-social a { color: rgba(255,255,255,.6); transition: color .2s; }
.footer-social a:hover { color: #fff; }
.newsletter-form { display: flex; gap: 8px; margin-top: 10px; }
.newsletter-form input { flex: 1; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); border-radius: 8px; padding: 9px 12px; color: #fff; font-size: 13px; outline: none; }
.newsletter-form input::placeholder { color: rgba(255,255,255,.4); }
.newsletter-form button { background: var(--accent); color: #fff; border: none; border-radius: 8px; padding: 9px 14px; font-size: 13px; transition: background .2s; }
.newsletter-form button:hover { background: var(--accent-h); }

.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 18px 0; }
.footer-bottom .container { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.footer-payment { display: flex; gap: 10px; align-items: center; }
.footer-payment img { filter: brightness(0) invert(1); opacity: .6; }

/* ============================================================
   HOMEPAGE HERO
   ============================================================ */
.hero { background: var(--primary); color: #fff; padding: 60px 0; overflow: hidden; position: relative; }
.hero-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.hero h1 { font-family: var(--font-head); font-size: clamp(32px, 4vw, 52px); line-height: 1.15; margin-bottom: 18px; }
.hero h1 span { color: var(--accent); }
.hero p { font-size: 16px; opacity: .8; margin-bottom: 28px; }
.hero-img { border-radius: var(--radius); overflow: hidden; }

.section-title { font-family: var(--font-head); font-size: 24px; font-weight: 700; margin-bottom: 24px; display: flex; justify-content: space-between; align-items: center; }
.section-title a { font-size: 13px; font-weight: 500; color: var(--accent); font-family: var(--font-body); }
.section { padding: 40px 0; }

/* ============================================================
   ADMIN OVERRIDES (minimalnih)
   ============================================================ */
.admin-wrap { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-sidebar { background: var(--primary); color: #fff; padding: 0; }
.admin-content { padding: 32px; background: var(--light); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .category-layout { grid-template-columns: 1fr; }
    .filter-sidebar { position: static; }
    .cart-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .hero-inner { grid-template-columns: 1fr; }
    .hero-img { display: none; }
    .header-inner { flex-wrap: wrap; }
    .search-bar { order: 3; width: 100%; max-width: 100%; }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .form-row { grid-template-columns: 1fr; }
    .admin-wrap { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .product-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .cart-table th:nth-child(3), .cart-table td:nth-child(3) { display: none; }
}
