/* ====================================================================
   Kamagra Srbija - Glavni stylesheet
   Brand: Kamagra Srbija (od 2011)
   Palette: Medical Green Trust
   ==================================================================== */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #16a085;
  --primary-dark: #117a65;
  --primary-light: #1abc9c;
  --dark: #2c3e50;
  --gray: #5d6d7e;
  --light-gray: #ecf0f1;
  --bg: #ffffff;
  --bg-soft: #f8fafb;
  --border: #e1e8ed;
  --cta: #16a085;
  --cta-hover: #117a65;
  --text: #2c3e50;
  --muted: #7f8c8d;
  --shadow: 0 2px 8px rgba(44, 62, 80, 0.06);
  --shadow-lg: 0 8px 24px rgba(44, 62, 80, 0.1);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ====================== HEADER ====================== */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.brand {
  font-family: 'Open Sans', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -0.5px;
  text-decoration: none;
}
.brand span { color: var(--primary); font-weight: 300; }

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 32px;
}
.main-nav a {
  color: var(--dark);
  font-weight: 600;
  font-size: 15px;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}
.main-nav a:hover, .main-nav a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.cart-link {
  background: var(--primary);
  color: white !important;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.cart-link:hover { background: var(--primary-dark); }

.hamburger { display: none; background: none; border: none; cursor: pointer; }

/* ====================== HERO ====================== */
.hero {
  position: relative;
  overflow: hidden;
  padding: 100px 24px 90px;
  text-align: center;
  background:
    radial-gradient(ellipse 70% 55% at 75% 25%, rgba(16, 185, 129, 0.22) 0%, transparent 60%),
    radial-gradient(ellipse 80% 60% at 20% 80%, rgba(45, 212, 191, 0.20) 0%, transparent 65%),
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(167, 243, 208, 0.30) 0%, transparent 70%),
    linear-gradient(135deg, #f0fdf4 0%, #d1fae5 35%, #a7f3d0 70%, #6ee7b7 100%);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.55;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'><defs><pattern id='p' width='40' height='40' patternUnits='userSpaceOnUse'><circle cx='20' cy='20' r='1.5' fill='%23047857' fill-opacity='0.18'/><circle cx='0' cy='0' r='1' fill='%23047857' fill-opacity='0.12'/><circle cx='40' cy='40' r='1' fill='%23047857' fill-opacity='0.12'/></pattern></defs><rect width='200' height='200' fill='url(%23p)'/></svg>");
  background-size: 80px 80px;
}
.hero::after {
  content: "";
  position: absolute;
  top: -120px; right: -120px;
  width: 480px; height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(110, 231, 183, 0.45) 0%, transparent 70%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}
.hero > * { position: relative; z-index: 1; }
.hero .container::before {
  content: "";
  position: absolute;
  bottom: -150px; left: -150px;
  width: 420px; height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(52, 211, 153, 0.40) 0%, transparent 70%);
  filter: blur(70px);
  pointer-events: none;
  z-index: -1;
}
.hero h1 {
  font-size: 48px;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 18px;
  letter-spacing: -1px;
  line-height: 1.15;
}
.hero h1 .accent { color: var(--primary); }
.hero .subtitle {
  font-size: 20px;
  color: var(--gray);
  max-width: 720px;
  margin: 0 auto 36px;
}
.hero .cta-group {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:hover {
  background: var(--primary-dark);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}
.btn-secondary {
  background: white;
  color: var(--dark);
  border: 2px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.btn-dark {
  background: var(--dark);
  color: white;
}
.btn-dark:hover { background: #1a252f; color: white; }

/* ====================== TRUST BAR ====================== */
.trust-bar {
  background: var(--dark);
  color: white;
  padding: 16px 24px;
}
.trust-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
}
.trust-item .icon {
  width: 24px;
  height: 24px;
  fill: var(--primary-light);
}

/* ====================== PRODUCTS GRID ====================== */
.section { padding: 80px 24px; }
.section-soft { background: var(--bg-soft); }

.section-title {
  text-align: center;
  font-size: 36px;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}
.section-subtitle {
  text-align: center;
  color: var(--muted);
  font-size: 17px;
  max-width: 640px;
  margin: 0 auto 50px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: 1240px;
  margin: 0 auto;
}

.product-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.product-card .product-img {
  background: var(--bg-soft);
  padding: 30px;
  text-align: center;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-card .product-img img { max-height: 180px; width: auto; }

.product-card .product-body {
  padding: 24px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}
.product-card h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 8px;
}
.product-card .product-desc {
  color: var(--gray);
  font-size: 14px;
  margin-bottom: 20px;
  flex-grow: 1;
}
.product-card .product-price {
  font-size: 26px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 16px;
}
.product-card .product-price .currency {
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
}

/* ====================== WHY SECTION ====================== */
.why-section {
  background: var(--bg-soft);
  padding: 80px 24px;
}
.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  max-width: 1100px;
  margin: 0 auto;
  align-items: center;
}
.why-grid h2 {
  font-size: 36px;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}
.why-grid p { color: var(--gray); margin-bottom: 24px; }
.why-list { list-style: none; padding: 0; }
.why-list li {
  padding: 14px 0 14px 36px;
  position: relative;
  color: var(--text);
  font-size: 15px;
  border-bottom: 1px solid var(--border);
}
.why-list li:last-child { border-bottom: none; }
.why-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 12px;
  width: 24px;
  height: 24px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  text-align: center;
  font-weight: 700;
  line-height: 24px;
  font-size: 14px;
}

/* ====================== INFO BANNER ====================== */
.info-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 60px 24px;
  text-align: center;
}
.info-banner h2 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 14px;
}
.info-banner p {
  font-size: 18px;
  max-width: 700px;
  margin: 0 auto 28px;
  opacity: 0.95;
}
.info-banner .btn-dark { background: var(--dark); }
.info-banner .btn-dark:hover { background: #1a252f; }

/* ====================== FAQ ====================== */
.faq-section { padding: 80px 24px; }
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}
.faq-question {
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question::after {
  content: "+";
  font-size: 24px;
  color: var(--primary);
  font-weight: 400;
  transition: transform 0.2s;
}
details[open] .faq-question::after { transform: rotate(45deg); }
.faq-answer {
  color: var(--gray);
  margin-top: 14px;
  line-height: 1.7;
}

/* ====================== FOOTER ====================== */
.site-footer {
  background: var(--dark);
  color: var(--light-gray);
  padding: 60px 24px 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto 40px;
}
.footer-brand {
  font-size: 24px;
  font-weight: 700;
  color: white;
  margin-bottom: 12px;
}
.footer-brand span { color: var(--primary-light); font-weight: 300; }
.site-footer h4 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: white;
  margin-bottom: 16px;
}
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 8px; }
.site-footer a {
  color: var(--light-gray);
  font-size: 14px;
  opacity: 0.85;
  transition: opacity 0.2s;
}
.site-footer a:hover { opacity: 1; color: var(--primary-light); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 13px;
  opacity: 0.7;
}

/* ====================== PRODUCT DETAIL GRID ====================== */
.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.product-image-box {
  background: var(--bg-soft);
  padding: 40px;
  text-align: center;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}
.product-image-box img {
  max-width: 100%;
  max-height: 400px;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
}
.product-placeholder { font-size: 140px; }

/* MOBILE: image on top, full width, then info stacked under */
@media (max-width: 760px) {
  .product-grid {
    grid-template-columns: 1fr !important;
    gap: 18px;
  }
  .product-image-box {
    padding: 18px !important;
    min-height: 280px;
  }
  .product-image-box img { max-height: 280px; }
  .product-detail h1 { font-size: 22px !important; margin: 8px 0 10px !important; line-height: 1.25; }
  .product-detail .lead { font-size: 14.5px; margin-bottom: 14px !important; line-height: 1.55; }
  /* Quantity dropdown box — tighter on mobile, no inner heavy padding */
  .product-detail [for="qty-select"] { font-size: 14px !important; }
  .product-detail #qty-select { padding: 11px !important; font-size: 15px !important; }
  .product-detail #qty-total-price { font-size: 22px !important; }
  /* Add-to-cart button — sticky-like prominence */
  .product-detail button.btn-primary {
    padding: 15px !important;
    font-size: 15px !important;
    letter-spacing: 0.3px;
  }
}

/* ====================== TYPOGRAPHY ====================== */
.content-page { padding: 60px 24px; max-width: 800px; margin: 0 auto; }
.content-page h1 {
  font-size: 38px;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}
.content-page h2 {
  font-size: 26px;
  font-weight: 700;
  color: var(--dark);
  margin-top: 36px;
  margin-bottom: 14px;
}
.content-page h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--dark);
  margin-top: 28px;
  margin-bottom: 10px;
}
.content-page p { margin-bottom: 16px; color: var(--text); }
.content-page ul, .content-page ol { margin-left: 24px; margin-bottom: 16px; }
.content-page li { margin-bottom: 6px; }
.content-page a { font-weight: 600; }

.lead {
  font-size: 18px;
  color: var(--gray);
  margin-bottom: 30px;
  line-height: 1.7;
}

/* ====================== BREADCRUMBS ====================== */
.breadcrumbs {
  padding: 16px 24px;
  background: var(--bg-soft);
  font-size: 13px;
  color: var(--muted);
}
.breadcrumbs .container { display: flex; gap: 6px; align-items: center; }
.breadcrumbs a { color: var(--gray); }
.breadcrumbs .sep { color: var(--border); }

/* ====================== RESPONSIVE ====================== */
@media (max-width: 900px) {
  .why-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .hero h1 { font-size: 36px; }
  .hero .subtitle { font-size: 17px; }
  .section-title { font-size: 28px; }
}

@media (max-width: 640px) {
  .main-nav { display: none; }
  .hamburger { display: block; }
  .hero { padding: 50px 20px; }
  .hero h1 { font-size: 28px; }
  .section { padding: 50px 20px; }
  .footer-grid { grid-template-columns: 1fr; }
  .brand { font-size: 22px; }
  .trust-bar-inner { flex-direction: column; }
  /* Generic content pages */
  .content-page { padding: 30px 16px; }
  .content-page h1 { font-size: 26px; margin-bottom: 14px; }
  .content-page h2 { font-size: 20px; margin-top: 24px; }
  .content-page h3 { font-size: 17px; margin-top: 20px; }
  .lead { font-size: 15px; }
  /* Product detail page mobile sizing */
  .product-detail h1, .product-detail-info h1 { font-size: 24px !important; line-height: 1.25; margin-bottom: 12px !important; }
  .product-detail h2 { font-size: 20px !important; margin-top: 24px !important; }
  .product-detail h3 { font-size: 17px !important; }
  .product-detail p, .product-detail li { font-size: 14.5px; line-height: 1.6; }
  .product-detail table { font-size: 13px; }
  .product-detail-info { padding: 16px !important; }
  .product-detail-info .lead, .product-detail-info p { font-size: 14.5px; }
  /* Long descriptions tighter on mobile */
  .product-long-desc h2 { font-size: 19px !important; margin-top: 22px !important; }
  .product-long-desc h3 { font-size: 16px !important; }
  .product-long-desc p { font-size: 14.5px; line-height: 1.6; }
  .product-long-desc table { font-size: 12.5px; display: block; overflow-x: auto; }
  /* Cart table responsive - smaller padding + scroll */
  #cart-table { font-size: 13px; }
  #cart-table th, #cart-table td { padding: 8px 4px !important; }
  #cart-table th:nth-child(3), #cart-table td:nth-child(3) { display: none; }  /* hide Cena (kept Ukupno) */
  /* Generic large H1 on inline-styled product pages */
  main h1, section h1 { font-size: 24px !important; line-height: 1.25; }
}

@media (max-width: 480px) {
  .content-page h1 { font-size: 22px; }
  .hero h1 { font-size: 24px; }
  main h1, section h1 { font-size: 22px !important; }
  /* Cart even more compact */
  #cart-table th, #cart-table td { padding: 6px 3px !important; font-size: 12.5px; }
}

/* ====================== MOBILE NAV OVERLAY ====================== */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: white;
  z-index: 200;
  padding: 80px 24px 24px;
}
.mobile-nav.open { display: block; }
.mobile-nav ul { list-style: none; }
.mobile-nav li { padding: 16px 0; border-bottom: 1px solid var(--border); }
.mobile-nav a { color: var(--dark); font-size: 18px; font-weight: 600; }
.mobile-nav .close-btn {
  position: absolute; top: 24px; right: 24px;
  background: none; border: none; font-size: 32px; cursor: pointer; color: var(--dark);
}

@media (max-width: 1024px) { .products-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 20px; } }
@media (max-width: 760px)  { .products-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 16px; } }
@media (max-width: 480px)  { .products-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 12px; } }
