* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: #ffffff;
  color: #2b2b2b;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.page-scale {
  width: 100%;
  transform-origin: top center;
}

.header {
  background-color: #ffffff;
  border-bottom: 3px solid #1f3d33;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.naslov {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.ime {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex-shrink: 0;
}

.ime small {
  display: block;
  font-size: 12px;
  color: #6b6b6b;
  margin-top: 6px;
}

.nav {
  flex: 1 1 auto;
}

.nav ul {
  list-style: none;
  display: flex;
  gap: 25px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.nav a {
  text-decoration: none;
  color: #2b2b2b;
  font-weight: 600;
  position: relative;
  font-size: 15px;
}

.nav a:hover,
.nav a.active {
  color: #c48a2a;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: #c48a2a;
  transition: 0.3s;
}

.nav a:hover::after,
.nav a.active::after {
  width: 100%;
}

.hero {
  min-height: clamp(380px, 60vh, 680px);
  background:
    linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)),
    url("images/horse.jpg") center center / cover no-repeat;
  display: flex;
  align-items: center;
}

.hero-content {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  color: #fff;
  padding: clamp(60px, 8vw, 120px) clamp(20px, 6vw, 80px);
}

.hero h1 {
  max-width: 700px;
  font-size: clamp(32px, 5vw, 48px);
  margin-bottom: 20px;
  line-height: 1.15;
}

.hero p {
  max-width: 620px;
  font-size: clamp(16px, 2.2vw, 18px);
  margin-bottom: 40px;
}

.hero-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.btn {
  padding: 14px 26px;
  text-decoration: none;
  font-weight: 600;
  border-radius: 8px;
  width: auto;
  min-width: 180px;
  text-align: center;
  display: inline-block;
}

.primary {
  background: #ff7a00;
  color: #fff;
  transition: background 0.2s ease, transform 0.2s ease;
}

.primary:hover {
  background: #e36d00;
  transform: translateY(-2px);
}

.top-products {
  padding: 80px 20px;
  background: #f7f7f7;
  text-align: center;
  border-top: 1px solid #e5e5e5;
}

.top-products h2,
.top-products .subtitle,
.shop-controls,
.products-grid {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.shop-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 24px;
  margin-bottom: 28px;
  align-items: end;
  justify-content: flex-start;
}

.shop-control {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 220px;
  flex: 1 1 240px;
}

.shop-control label {
  font-weight: 600;
  font-size: 14px;
  text-align: left;
}

.shop-control select {
  padding: 10px 12px;
  border: 1px solid #d8d8d8;
  border-radius: 8px;
  font-size: 15px;
  background: #fff;
  width: 100%;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 30px;
  margin-bottom: 20px;
}

.product-card {
  background: #fff;
  padding: 25px;
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
}

.product-card img {
  width: 100%;
  max-width: 180px;
  height: 180px;
  object-fit: contain;
  margin: 0 auto 20px;
}

.product-card h3 {
  margin-bottom: 8px;
  font-size: 20px;
}

.desc {
  font-size: 14px;
  color: #666;
  margin-bottom: 12px;
  min-height: 40px;
  line-height: 1.5;
}

.price {
  font-size: 18px;
  font-weight: bold;
  color: #ff7a00;
  margin-bottom: 6px;
}

.price-note,
.modal-price-note {
  margin-top: 6px;
  font-size: 13px;
  color: #666;
}

.product-card button {
  margin-top: auto;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: #ff7a00;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.product-card button:hover {
  background: #e36d00;
}

.cart-wrapper {
  position: relative;
  flex-shrink: 0;
}

.cart-icon {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 1px solid #e5e5e5;
  padding: 12px 18px;
  border-radius: 14px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cart-icon:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.cart-badge {
  background: #ff7a00;
  color: #fff;
  min-width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  padding: 0 6px;
}

.cart-dropdown {
  position: absolute;
  top: 70px;
  right: 0;
  width: 380px;
  max-width: calc(100vw - 24px);
  background: #fff;
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.16);
  border: 1px solid #ececec;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  z-index: 999;
}

.cart-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.cart-dropdown h3 {
  margin-bottom: 15px;
  font-size: 20px;
}

.cart-items {
  max-height: 320px;
  overflow-y: auto;
  padding-right: 5px;
}

.cart-item {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid #f0f0f0;
  animation: fadeSlideIn 0.35s ease;
}

.cart-item-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.cart-item-name {
  font-size: 14px;
  font-weight: 600;
  color: #2b2b2b;
  line-height: 1.4;
}

.cart-item-price {
  font-size: 13px;
  font-weight: 700;
  color: #ff7a00;
  white-space: nowrap;
}

.cart-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f7f7f7;
  padding: 6px 8px;
  border-radius: 12px;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  background: #ffffff;
  color: #2b2b2b;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease, background 0.2s ease;
}

.qty-btn:hover {
  transform: scale(1.06);
  background: #f1f1f1;
}

.qty-value {
  min-width: 20px;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
}

.cart-item-total {
  font-size: 14px;
  font-weight: 700;
  color: #2b2b2b;
  white-space: nowrap;
}

.remove-item {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: #f3f3f3;
  color: #555;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  flex-shrink: 0;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.remove-item:hover {
  background: #ffebe0;
  color: #d94f00;
  transform: scale(1.08);
}

.empty-cart {
  color: #777;
  font-size: 14px;
  padding: 10px 0;
}

.cart-footer {
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px solid #ececec;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checkout-btn {
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: #ff7a00;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.checkout-btn:hover {
  background: #e36d00;
  transform: translateY(-2px);
}

.add-to-cart {
  position: relative;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.add-to-cart:hover {
  transform: translateY(-2px);
}

.add-to-cart.clicked {
  animation: buttonPop 0.35s ease;
}

.add-to-cart::after {
  content: "✔ Dodano";
  position: absolute;
  inset: 0;
  background: #1f9d55;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.add-to-cart.added::after {
  transform: translateY(0);
}

.bump {
  animation: cartBump 0.4s ease;
}

.product-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: 0.25s ease;
  z-index: 2000;
}

.product-modal.open {
  opacity: 1;
  visibility: visible;
}

.product-modal-content {
  position: relative;
  width: 100%;
  max-width: 950px;
  max-height: 90vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 30px;
  padding: 30px;
  transform: translateY(20px) scale(0.96);
  transition: 0.25s ease;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
}

.product-modal.open .product-modal-content {
  transform: translateY(0) scale(1);
}

.modal-image-wrap {
  background: #f8f8f8;
  border-radius: 18px;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-image-wrap img {
  width: 100%;
  max-width: 360px;
  max-height: 420px;
  object-fit: contain;
}

.modal-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.modal-info h2 {
  font-size: 34px;
  margin-bottom: 12px;
  color: #2b2b2b;
  line-height: 1.2;
}

.modal-price {
  font-size: 26px;
  font-weight: 700;
  color: #ff7a00;
  margin-bottom: 20px;
}

.modal-desc {
  font-size: 16px;
  line-height: 1.7;
  color: #555;
  margin-bottom: 25px;
}

.modal-add-btn {
  border: none;
  background: #ff7a00;
  color: #fff;
  padding: 16px 22px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
}

.modal-add-btn:hover {
  background: #e36d00;
  transform: translateY(-2px);
}

.close-modal {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: #f3f3f3;
  font-size: 20px;
  cursor: pointer;
  transition: 0.2s ease;
}

.close-modal:hover {
  background: #ffe8db;
  color: #d94f00;
}

.modal-variants {
  margin: 16px 0;
}

.modal-variants h4 {
  margin-bottom: 10px;
  font-size: 16px;
}

#modal-variant-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.variant-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
}

.variant-option input {
  cursor: pointer;
  flex-shrink: 0;
}

.noga-strani {
  position: relative;
  background: #1f3d33;
  color: #ffffff;
  margin-top: 0;
}

.vsebina-noge {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px 30px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 35px;
}

.stolpec-noge h3,
.stolpec-noge h4 {
  margin-bottom: 16px;
}

.stolpec-noge p,
.stolpec-noge li {
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.7;
  font-size: 15px;
}

.slogan {
  font-weight: 700;
  color: #ffb15c !important;
  margin-bottom: 8px;
}

.povezave-noge {
  list-style: none;
  padding: 0;
  margin: 0;
}

.povezave-noge li {
  margin-bottom: 10px;
}

.povezave-noge a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.povezave-noge a:hover {
  color: #ffb15c;
  padding-left: 4px;
}

.kontakt-vrstica {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ikona {
  display: inline-flex;
  width: 20px;
  justify-content: center;
}

.gumb-na-vrh {
  position: absolute;
  right: 20px;
  top: -22px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #ff7a00;
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: bold;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  transition: background 0.2s ease, transform 0.2s ease;
}

.gumb-na-vrh:hover {
  background: #e36d00;
  transform: translateY(-3px);
}

.spodnji-del-noge {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
  padding: 18px 20px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
}

@keyframes buttonPop {
  0% { transform: scale(1); }
  40% { transform: scale(0.94); }
  100% { transform: scale(1); }
}

@keyframes cartBump {
  0% { transform: scale(1); }
  35% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1500px) {
  .page-scale {
    transform: scale(0.97);
  }
}

@media (max-width: 1350px) {
  .page-scale {
    transform: scale(0.94);
  }

  .hero {
    background-position: center center;
  }
}

@media (max-width: 1200px) {
  .page-scale {
    transform: scale(0.91);
  }

  .hero-content {
    padding: 100px 40px;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

@media (max-width: 1100px) {
  .page-scale {
    transform: scale(1);
  }

  .naslov {
    justify-content: center;
  }

  .nav {
    width: 100%;
  }

  .nav ul {
    justify-content: center;
  }

  .cart-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
  }

  .vsebina-noge {
    grid-template-columns: 1fr 1fr;
  }

  .product-modal-content {
    max-width: 820px;
    gap: 24px;
  }
}

@media (max-width: 900px) {
  .header {
    position: static;
  }

  .hero {
    min-height: clamp(340px, 55vh, 520px);
    background-position: center top;
  }

  .hero-content {
    padding: 80px 24px;
    text-align: center;
  }

  .hero h1,
  .hero p {
    max-width: 100%;
  }

  .hero-buttons {
    justify-content: center;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 22px;
  }

  .product-modal-content {
    grid-template-columns: 1fr;
    max-width: 650px;
  }

  .modal-image-wrap img {
    max-width: 260px;
    max-height: 280px;
  }
}

@media (max-width: 768px) {
  .naslov {
    flex-direction: column;
    text-align: center;
    padding: 14px 16px;
    gap: 16px;
  }

  .ime {
    align-items: center;
  }

  .ime img {
    width: 160px;
  }

  .nav {
    width: 100%;
  }

  .nav ul {
    gap: 12px;
    justify-content: center;
  }

  .nav a {
    font-size: 14px;
  }

  .hero {
    min-height: 420px;
    background-position: center top;
  }

  .hero-content {
    padding: 70px 20px;
    max-width: 100%;
    text-align: center;
  }

  .hero h1 {
    font-size: 30px;
  }

  .hero p {
    font-size: 16px;
    margin-bottom: 28px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 280px;
  }

  .top-products {
    padding: 50px 16px;
  }

  .shop-controls {
    margin-top: 20px;
    margin-bottom: 24px;
  }

  .shop-control {
    min-width: 100%;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
  }

  .product-card {
    padding: 20px;
  }

  .product-card img {
    max-width: 150px;
    height: 150px;
  }

  .cart-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .cart-icon {
    width: 100%;
    max-width: 260px;
    justify-content: center;
  }

  .cart-dropdown {
    width: min(94vw, 360px);
    right: 50%;
    top: calc(100% + 10px);
    transform: translate(50%, 12px);
    padding: 16px;
  }

  .cart-dropdown.open {
    transform: translate(50%, 0);
  }

  .cart-item {
    grid-template-columns: 1fr;
    align-items: flex-start;
    gap: 10px;
  }

  .cart-controls {
    margin-top: 2px;
  }

  .cart-item-total {
    margin-top: 2px;
  }

  .remove-item {
    align-self: flex-end;
  }

  .product-modal {
    padding: 12px;
  }

  .product-modal-content {
    width: 100%;
    padding: 18px;
    gap: 18px;
    border-radius: 18px;
  }

  .modal-image-wrap {
    padding: 14px;
  }

  .modal-image-wrap img {
    max-width: 240px;
    max-height: 260px;
  }

  .modal-info h2 {
    font-size: 26px;
  }

  .modal-price {
    font-size: 22px;
    margin-bottom: 14px;
  }

  .modal-desc {
    font-size: 15px;
    line-height: 1.6;
  }

  .modal-add-btn {
    width: 100%;
  }

  .noga-strani {
    text-align: center;
  }

  .vsebina-noge {
    grid-template-columns: 1fr;
    padding: 45px 20px 25px;
    gap: 24px;
  }

  .kontakt-vrstica {
    justify-content: center;
  }

  .gumb-na-vrh {
    right: 50%;
    transform: translateX(50%);
  }

  .gumb-na-vrh:hover {
    transform: translateX(50%) translateY(-3px);
  }
}

@media (max-width: 576px) {
  .products-grid {
    grid-template-columns: 1fr;
  }

  .product-card {
    max-width: 420px;
    width: 100%;
    margin: 0 auto;
  }
}

@media (max-width: 420px) {
  .hero {
    min-height: 360px;
    background-position: center top;
  }

  .hero-content {
    padding: 56px 16px;
  }

  .hero h1 {
    font-size: 26px;
  }

  .top-products {
    padding: 40px 12px;
  }

  .product-card {
    padding: 18px;
    border-radius: 16px;
  }

  .product-card h3 {
    font-size: 18px;
  }

  .price {
    font-size: 17px;
  }

  .cart-dropdown {
    width: calc(100vw - 16px);
    padding: 14px;
  }

  .cart-dropdown h3 {
    font-size: 18px;
  }

  .checkout-btn {
    padding: 13px;
  }

  .close-modal {
    width: 38px;
    height: 38px;
    top: 10px;
    right: 10px;
  }

  .modal-info h2 {
    font-size: 22px;
  }

  .modal-price {
    font-size: 20px;
  }

  .modal-desc {
    font-size: 14px;
  }
}
.product-card,
.product-card * {
  -webkit-tap-highlight-color: transparent;
}

.product-card {
  touch-action: manipulation;
}

.product-modal {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  pointer-events: none;
}

.product-modal.open {
  pointer-events: auto;
  display: flex;
}

.product-modal-content {
  margin: auto;
}

@media (max-width: 768px) {
  .product-modal {
    align-items: flex-start;
    justify-content: center;
    padding: 14px;
  }

  .product-modal-content {
    margin: 18px auto;
    max-height: none;
    min-height: auto;
  }
}

@media (max-width: 480px) {
  .product-modal {
    padding: 10px;
  }

  .product-modal-content {
    margin: 10px auto;
    padding: 16px;
  }
}
