/* ===== Globālie stili ===== */
body {
  font-family: sans-serif;
  margin: 0;
  padding: 0;
  background: #faf6ec;
}

/* ===== Header ===== */
.header {
  background: linear-gradient(to right, #0d5c41, #c0a138);
  padding: 1rem;
  color: white;
}

.header h1 {
  margin: 0;
  font-size: 1.5rem;
}

nav a {
  margin: 0 1rem;
  text-decoration: none;
  color: white;
  font-weight: bold;
}

nav a.active {
  border-bottom: 3px solid red;
}

.balance {
  margin-left: 1rem;
  font-weight: bold;
}

/* ===== Izsoļu kartītes ===== */
.auction-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  transition: transform 0.2s;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.auction-card:hover {
  transform: translateY(-5px);
}

.auction-card img {
  object-fit: cover;
  height: 150px;
  border-bottom: 1px solid #eee;
}

.auction-card .card-body {
  padding: 0.8rem;
}

.auction-card .card-title {
  font-size: 1.05rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.auction-text {
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}

.auction-time {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 0.7rem;
}
/* Padara kartīti klikšķināmu */
.clickable-card {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.clickable-card:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Zaļā poga */
.btn-success {
  background-color: #0d5c41;
  border: none;
  font-weight: bold;
}

.btn-success:hover {
  background-color: #0b4a35;
}

/* ===== Sidebar ===== */
.col-lg-3 h3 {
  color: #0d5c41;
  border-bottom: 2px solid #c0a138;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.col-lg-3 .card {
  border-left: 4px solid orange;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.col-lg-3 .card-body {
  padding: 0.6rem;
}

.col-lg-3 .card-text {
  font-size: 0.9rem;
  font-weight: bold;
  margin-bottom: 0.2rem;
}

/* ===== Formu wrappers (login/register/add-auction) ===== */
.form-wrapper {
  max-width: 400px;
  margin: 2rem auto;
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.form-wrapper form {
  display: flex;
  flex-direction: column;
}

.form-wrapper label {
  margin-top: 1rem;
  font-weight: bold;
}

.form-wrapper input,
.form-wrapper textarea {
  padding: 0.5rem;
  margin-top: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.form-wrapper button {
  margin-top: 1.5rem;
  background: #0d5c41;
  color: white;
  border: none;
  padding: 0.7rem;
  border-radius: 4px;
  cursor: pointer;
}

.form-wrapper button:hover {
  background: #0b4a35;
}

/* ===== Izsoļu ceļveža tipogrāfija ===== */
main.container h2 {
  font-size: 1.6rem;   /* mazāks nekā default h2 */
  margin-bottom: 1rem;
  color: #0d5c41;      /* tumši zaļš tonis */
}

main.container h3 {
  font-size: 1.3rem;
  margin-top: 1.2rem;
  margin-bottom: 0.5rem;
  color: #333;
}

main.container p {
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 0.8rem;
}

main.container li {
  font-size: 1rem;
  margin-bottom: 0.4rem;
}
.footer {
  background: #f5f5f5;
  padding: 20px;
  margin-top: 40px;
  text-align: center;
  border-top: 1px solid #ddd;
}

.footer a {
  margin: 0 10px;
  color: #333;
  text-decoration: none;
  font-weight: 500;
}

.footer a:hover {
  text-decoration: underline;
}

.footer-payments img {
  height: 25px;
  margin: 0 5px;
  vertical-align: middle;
}

.footer-copy {
  margin-top: 10px;
  font-size: 14px;
  color: #555;
}
.custom-upload {
  background-color: #116530;
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-block;
  font-weight: bold;
  margin-bottom: 10px;
}
.custom-upload:hover {
  background-color: #0b4723;
}

.preview-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.preview-container .image-wrapper {
  position: relative;
  display: inline-block;
}

.preview-container img {
  max-width: 150px;
  max-height: 150px;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.delete-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  background: red;
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  width: 24px;
  height: 24px;
  font-size: 14px;
  line-height: 20px;
  text-align: center;
}
/* ===== Sānjoslas kartītes (baneris "Pasteidzies") ===== */
/* ===== Produktu kartītes (baneris "Pasteidzies") ===== */
.product-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #c9a600;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 15px;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  width: 22%;       /* lai 4 kartītes iet vienā rindā */
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.product-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 10px;
}

.product-card h3 {
  font-size: 1.1rem;
  margin: 6px 0;
}

.product-card .price {
  color: #0b6e4f;
  font-weight: bold;
}

.product-card .time-left {
  color: #b30000;
  font-weight: bold;
  margin: 6px 0;
}

.product-card .btn {
  width: 100%;
  padding: 10px;
  font-size: 1rem;
  background: #ffc107;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s ease;
}

.product-card .btn:hover {
  background: #e0a800;
}

.card-grid {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  flex-wrap: wrap;
}


.balance {
  font-weight: bold;
  color: white;
  margin-left: 15px;
}
.header .

/* Fiksēts dropdown izmērs */
#filterCategory,
#filterSubCategory {
  min-width: 220px;   /* vienāds platums */
  max-width: 220px;
  white-space: nowrap; /* nerāda vairākās rindās */
  text-overflow: ellipsis; /* lieko aizvieto ar … */
  overflow: hidden;
}
#filterCategory,
#filterSubCategory {
  min-width: 220px;
  max-width: 220px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
/* Actiona sadaļai */
.product-description {
  border-top: 1px solid #ddd;
  padding-top: 15px;
  font-size: 0.95rem;
  line-height: 1.5;
}
/* =========================================================
   Mobile Enhancements Pack v1 — action.html
   (droši ielīmē faila styles.css BEIGĀS)
   ========================================================= */

/* 1) Elastīgs kartīšu režģis (Ending Soon + Līdzīgie piedāvājumi) */
.card-grid {
  display: grid;
  grid-template-columns: 1fr; /* tālruņi */
  gap: 12px;
}
@media (min-width: 480px) {
  .card-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (min-width: 768px) {
  .card-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (min-width: 1200px) {
  .card-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
}

/* 2) Galerijas sīktēli — horizontāla ritināšana mobilajā */
.thumbs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(72px, 88px);
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}
.thumbs img {
  width: 100%;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(201,162,39,.3);
  scroll-snap-align: start;
}
.thumbs img:focus-visible,
.thumbs img:active {
  outline: 2px solid #0d5c41; /* fokus/taustes atgriezeniskā saite */
}
@media (min-width: 576px){
  .thumbs img { height: 86px; }
}

/* 3) Tabulas “stacked” variants ļoti šauriem ekrāniem (Solījumu vēsture)
   Pievieno klasei table--stack, ja gribi šo uzvedību:
   <table class="table table-sm mb-0 table--stack">…</table> */
@media (max-width: 480px){
  .table--stack thead { display: none; }
  .table--stack tbody tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 10px;
    padding: 10px;
    border: 1px solid rgba(201,162,39,.2);
    border-radius: 10px;
    margin-bottom: 10px;
    background: #fff; /* vari pielāgot, ja tumšs fons */
  }
  .table--stack td {
    border: 0 !important;
    padding: 0 !important;
  }
  .table--stack td:nth-child(1)::before { content: "Laiks"; font-weight:600; display:block; }
  .table--stack td:nth-child(2)::before { content: "Lietotājs"; font-weight:600; display:block; }
  .table--stack td:nth-child(3)::before { content: "Summa"; font-weight:600; display:block; }
  .table--stack td:nth-child(4)::before { content: "Tips"; font-weight:600; display:block; }
}

/* 4) Mobilā apakšējā CTA josla (cena + ātrās darbības)
   HTML pusē pievieno:
   <div class="mobile-cta d-lg-none">
     <div class="mobile-cta__price">Cena: <strong id="mPrice">€49.00</strong></div>
     <button class="btn btn-success" id="mBid">Solīt</button>
     <button class="btn btn-outline-secondary" id="mBuyNow">Pirkt tūlīt</button>
   </div>
*/
.mobile-cta{
  position: fixed;
  left: 0; right: 0; bottom: 0;
  display: flex; gap: 8px; align-items: center; justify-content: space-between;
  padding: 10px;
  background: #fff;
  border-top: 1px solid #eee;
  z-index: 1040;
}
.mobile-cta__price{ font-weight: 700; }
@media (max-width: 991.98px){
  body { padding-bottom: 64px; } /* lai saturs neieiet zem joslas */
}

/* 5) Tipogrāfija ar clamp() (labāka lasāmība visos izmēros) */
h1, .h1 { font-size: clamp(1.25rem, 1rem + 1.2vw, 2rem); }
h2, .h2 { font-size: clamp(1.125rem, 0.95rem + 0.8vw, 1.5rem); }
h3, .h3 { font-size: clamp(1rem, 0.95rem + 0.6vw, 1.25rem); }
p, li, td, th { font-size: clamp(0.95rem, 0.9rem + 0.3vw, 1.05rem); }

/* 6) Pieskārienu mērķi (ērtāki tausti) */
.btn { min-height: 44px; }             /* ieteicamais min. tap laukums */
input, button { touch-action: manipulation; }

/* 7) Attēlu drošāka noklusējuma uzvedība mazā ekrānā */
img { max-width: 100%; height: auto; }

/* Var papildus: mazākas ēnas mobilajam (ja vajag veiktspējai) */
@media (max-width: 576px){
  .shadow, .shadow-sm, .shadow-lg { box-shadow: 0 2px 8px rgba(0,0,0,.08) !important; }
}

/* 8) “Prefers-reduced-motion” pieklājība */
@media (prefers-reduced-motion: reduce){
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
/* Ziņu saite hederī - sazinies ar pārdevēju pircēju */
/* Heders – ziņu ikona */
.header-msg{
  --white: #fff;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;               /* rāmi vari pielāgot */
  height: 32px;
  color: var(--white);        /* SVG kontūra = balta */
  border: 2px solid var(--white);
  border-radius: 10px;
  text-decoration: none;
  transition: transform .15s ease, background-color .2s ease, box-shadow .2s ease;
}
.header-msg svg{
  width: 28px;
  height: 20px;
  stroke: currentColor;       /* manto balto */
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
.header-msg:hover{
  transform: translateY(-1px);
  background-color: rgba(255,255,255,.10);
  box-shadow: 0 2px 10px rgba(0,0,0,.12);
}

/* Neizlasīto skaits */
.msg-badge{
  position: absolute;
  top: -6px;
  right: -6px;
  background: #e11d48;      /* sarkans */
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  line-height: 18px;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  display: grid;
  place-items: center;
}

/* Tooltip "Ziņas" */
.msg-tooltip{
  position: absolute;
  bottom: -34px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,.85);
  color: #fff;
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
}
.header-msg:hover .msg-tooltip{
  opacity: 1;
  transform: translateX(-50%) translateY(2px);
}
/* Header — vienots visās lapās */
.header{
  background: linear-gradient(to right, #0d5c41, #c0a138);
  color:#fff;
  padding: 1rem 0; /* tikai vertikāli, lai nav atšķirību */
}
.header .container{
  min-height: 64px;                     /* fiksēts ritms */
  display:flex; align-items:center; justify-content:space-between;
  gap:16px;
}
.header h1{ margin:0; font-size:1.5rem; line-height:1; }
.header nav{ display:flex; align-items:center; gap:1rem; }
.header nav a{ color:#fff; font-weight:700; text-decoration:none; line-height:1; }
/* === Vienots “Iziet” pogas dizains visās lapās === */
.header nav .logout-btn,
a.logout-btn {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 8px;
  background: #d9534f;         /* tā pati sarkanā, ko lietoji profils.html */
  color: #fff !important;       /* ja .header nav a iestata citu krāsu */
  border: none !important;      /* atslēdz baltās robežas utt. */
  font-weight: 700;
  line-height: 1;
  text-decoration: none !important;
  box-shadow: none !important;
  transition: background .15s ease, transform .15s ease;
}

.header nav .logout-btn:hover,
a.logout-btn:hover,
.header nav .logout-btn:focus,
a.logout-btn:focus {
  background: #c9302c;          /* hover – tumšāks sarkans */
  color: #fff !important;
  text-decoration: none !important;
  transform: translateY(-1px);
}

/* Ja tev ir globāls stils visiem header linkiem (piem., apmales, padding),
   neattiecinām to uz “Iziet” pogu: */
.header nav a:not(.logout-btn) {
  /* te paliek tavi pārējo linku stili */
}

/* Papildu drošībai: ja kur atstājies Bootstrap .btn, noņem tā ietekmi */
a.logout-btn.btn,
a.logout-btn[class*="btn-"] {
  all: unset;
  display: inline-block;
  padding: 8px 14px;
  border-radius: 8px;
  background: #d9534f;
  color: #fff;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}
.fav-badge svg{ width:18px; height:18px; display:block; }
.fav-badge .stroke{
  stroke:#d6002a;
  fill:none;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.fav-badge .fill{ fill:#d6002a; opacity:0; transition:opacity .15s ease; }
.fav-badge.is-active .fill{ opacity:1; }

/* --- Patīkušo izsolu kartīšu izmēra fiksēšana (nekādas loģikas maiņas) --- */
.patikusas-izsoles .card-grid{
  /* vietā, kur tev bija grid: saglabājam sadaļu, bet kartītes taisām stabilas */
  display: flex;          /* drošāk par grid šim gadījumam */
  flex-wrap: wrap;        /* lai krāmējas vairākās rindās */
  gap: 20px;
}

.patikusas-izsoles .product-card{
  flex: 0 0 260px;        /* katras kartītes platums ~260px */
  max-width: 260px;
  min-height: 320px;      /* vienmērīgi augstumi */
}

.patikusas-izsoles .product-card img{
  height: 160px;          /* vienāds attēlu augstums */
  object-fit: cover;      /* lai neizstieptu bildi */
  width: 100%;
}

/* ja kāds cits stils salauza tekstu vertikāli – piespiežam normālu virzienu */
.patikusas-izsoles .product-card,
.patikusas-izsoles .product-card *{
  writing-mode: horizontal-tb;
}
