/* ========= BASE ========= */

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: #111827;
}

/* не го кинеме .container од Bootstrap – работиме само внатре во product-page */

.product-page {
  max-width: 1200px;
  margin: 40px auto 60px;
  padding: 0 16px;
}

/* главен layout: слики лево, детали десно */

.product-main-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: flex-start;
}

.left-column {
  min-width: 0;
}

.right-column {
  min-width: 0;
}

/* ========= GALLERY (лево) ========= */

.product-gallery {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* MAIN PRODUCT IMAGE WRAPPER */

.product-main-image {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #f6f6f6;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  cursor: zoom-in;
}

.product-main-image img {
  width: 100%;
  display: block;
  transition: transform 0.25s ease-out;
  transform-origin: center center;
}

/* Кога е zoom-нато (десктоп hover) */
.product-main-image.zoom-active img {
  transform: scale(1.7);
  cursor: zoom-out;
}


/* thumbs */

.product-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}

.product-thumb {
  width: 82px;
  height: 82px;
  border-radius: 18px;
  background: #f4f4f5;
  padding: 8px;
  object-fit: contain;
  cursor: pointer;
  opacity: 0.6;
  border: 1px solid transparent;
  transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.product-thumb:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.product-thumb.active {
  opacity: 1;
  border-color: #111827;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
}

/* ========= PRODUCT INFO (десно) ========= */

.product-description {
  border-bottom: 1px solid #e5e7eb;
}

.product-category {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6b7280;
}

.product-title {
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 4px 0 8px;
  color: #111827;
}

.product-rating {
  font-size: 14px;
  color: #fbbf24;
  margin-bottom: 6px;
}

.product-rating small {
  color: #6b7280;
}

.product-text {
  font-size: 15px;
  line-height: 1.6;
  color: #4b5563;
  margin-top: 6px;
}

/* ========= CONFIG (боја / големина) ========= */

.product-configuration {
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
  padding: 18px 0 20px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.product-color span,
.cable-config span {
  font-size: 13px;
  font-weight: 600;
  color: #4b5563;
  margin-bottom: 6px;
  display: inline-block;
}

/* colors */

.color-choose {
  display: flex;
  gap: 10px;
  align-items: center;
}

.color-choose div {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.color-choose input[type="radio"] {
  display: none;
}

.color-choose input[type="radio"] + label span {
  display: inline-block;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 2px solid #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}

.color-choose input[type="radio"]:checked + label span {
  outline: 2px solid #111827;
  outline-offset: 2px;
}

/* sizes */

.cable-choose {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.cable-choose button {
  border-radius: 999px;
  border: 1px solid #d1d5db;
  padding: 6px 12px;
  font-size: 13px;
  background: #ffffff;
  color: #374151;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease,
    color 0.15s ease, transform 0.15s ease;
}

.cable-choose button:hover {
  border-color: #111827;
  transform: translateY(-1px);
}

.cable-choose button.active {
  background: #111827;
  border-color: #111827;
  color: #ffffff;
}

.cable-config a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #2563eb;
  text-decoration: none;
  margin-top: 8px;
}

.cable-config a::before {
  content: "?";
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(37, 99, 235, 0.4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

/* ========= PRICE & CTA ========= */

.product-price {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
}

#price-section {
  display: flex;
  flex-direction: column;
  gap: 0px;
}

.old-price {
  font-size: 15px;
  color: #9ca3af;
  text-decoration: line-through;
}

.new-price {
  font-size: 22px;
  font-weight: 700;
  color: #ef4444;
}

/* quantity */

.qty-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.qty-wrapper span {
  font-size: 14px;
  color: #374151;
}

.qty-input {
  width: 64px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: 14px;
}

/* add to cart */

.cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #111827;
  border-radius: 999px;
  border: 2px solid transparent;
  padding: 11px 24px;
  font-size: 15px;
  font-weight: 500;
  color: #ffffff;
  text-decoration: none;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.28);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease,
    transform 0.15s ease, box-shadow 0.2s ease;
}

.cart-btn i {
  font-size: 16px;
}

.cart-btn:hover {
  background: #ffffff;
  color: #111827;
  border-color: #111827;
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.32);
}

/* ========= TRUST BADGES ========= */

.trust-badges {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: #4b5563;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.trust-item i {
  width: 20px;
  text-align: center;
  color: #10b981;
}

/* ========= ATTENTION BAR ========= */

.attBar {
  width: 100%;
  background-color: black;
  padding: 10px 0 6px;
  text-align: center;
}

.attBar p {
  font-size: 14px;
  font-family: "Montserrat", sans-serif;
  color: white;
  margin: 0;
}

/* ========= RELATED PRODUCTS ========= */

.related-section {
  margin-top: 40px;
  margin-bottom: 80px;
}

.related-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.related-card {
  border-radius: 16px;
  padding: 16px;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  text-align: center;
}

.related-img-wrap {
  background: #ffffff;
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 10px;
}

.related-card img {
  width: 100%;
  height: 200px;
  object-fit: contain;
}

.related-card h4 {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
}

.related-price {
  font-size: 14px;
  font-weight: 600;
}

.related-old-price {
  font-size: 12px;
  text-decoration: line-through;
  color: #9ca3af;
  margin-right: 4px;
}

.related-new-price {
  color: #111827;
}

.related-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
}

/* ========= RESPONSIVE ========= */

@media (max-width: 992px) {
  .product-main-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .product-page {
    margin-top: 24px;
  }

  .right-column {
    order: 2;
  }

  .left-column {
    order: 1;
  }

  .product-title {
    font-size: 32px;
  }
}

@media (max-width: 640px) {
  .product-page {
    padding: 0 12px;
  }

  .product-main-image {
    border-radius: 18px;
    padding: 18px;
  }

  .product-thumb {
    width: 70px;
    height: 70px;
  }

  .product-title {
    font-size: 26px;
  }

  .cart-btn {
    width: 100%;
    justify-content: center;
  }

  .trust-badges {
    font-size: 12px;
  }
}

/* === Bundle Size Wrapper === */
.bundle-size-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 15px;
}

/* Label */
.bundle-size-wrapper label {
    font-size: 15px;
    font-weight: 600;
    color: #222;
    margin-bottom: 4px;
}

/* Premium Select */
.bundle-size-select {
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #dcdcdc;
    background: #ffffff;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    appearance: none;
    outline: none;
    cursor: pointer;

    /* Apple smooth transition */
    transition: all 0.25s ease;
    
    /* Subtle shadow */
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    background-image: url('data:image/svg+xml;utf8,<svg fill="black" height="16" viewBox="0 0 24 24" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
}

/* Hover */
.bundle-size-select:hover {
    border-color: #999;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

/* Focus */
.bundle-size-select:focus {
    border-color: #0066ff;
    box-shadow: 0 0 0 3px rgba(0,102,255,0.25);
}

/* Dropdown options */
.bundle-size-select option {
    font-size: 15px;
    padding: 8px;
}

/* ---- NEXT IMAGE ARROW ---- */
.next-image-arrow {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 32px;
    background: rgba(0,0,0,0.35);
    color: #fff;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    z-index: 20;
}
.next-image-arrow:hover {
    background: rgba(0,0,0,0.55);
}

/* ---- QUANTITY INPUT IMPROVED ---- */
.qty-wrapper {
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.qty-input {
    width: 70px;
    height: 45px;
    font-size: 18px;
    text-align: center;
    padding: 5px;
    border: 2px solid #ddd;
    border-radius: 10px;
    transition: 0.2s;
}

.qty-input:focus {
    border-color: #000;
    outline: none;
    box-shadow: 0 0 5px rgba(0,0,0,0.25);
}

/* --- FIX: Arrow stays next to thumbnails on desktop --- */
.product-thumbs-row {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    width: auto;
    max-width: 100%;
}

/* At desktop: thumbnails take natural width, arrow stays next to them */
.product-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-width: calc(100% - 60px);
}

/* Arrow button */
.next-image-arrow {
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: #111827;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: 0.2s;
}

/* ---- NEXT IMAGE ARROW FIX (POSITIONED NEXT TO THUMBNAILS) ---- */
.next-image-arrow {
    position: absolute;
    right: -55px; /* блиску до thumbnails */
    top: 50%;
    transform: translateY(-50%);
    font-size: 32px;
    background: rgba(0,0,0,0.35);
    color: #fff;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    z-index: 20;
}

/* На помали екрани ја враќаме над сликата */
@media (max-width: 992px) {
    .next-image-arrow {
        right: 15px;
        top: 50%;
    }
}