/* =========================================
   PRODUCT CSS - Single product stranice
   ========================================= */

/* === MOBILNI PRIKAZ SINGLE PRODUCT === */
@media (max-width: 768px) {
  /* Naslov – manji razmak iznad, primaknut slici */
  body.single-product .product_title {
    margin-top: -30px !important;
    margin-bottom: 5px !important;
    text-align: center !important;
  }

  /* Cena – centrirana u zlatnom okviru */
  body.single-product .summary .price {
    display: flex !important;
    justify-content: center !important;
    margin-bottom: 15px !important;
  }

  body.single-product .summary .price .woocommerce-Price-amount {
    background-color: #d1c466 !important;
    color: #000000 !important;
    padding: 12px 24px !important;
    border-radius: 8px !important;
    font-size: 28px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
  }

  /* Zvezdice – centrirane, bez broja recenzija */
  .woocommerce-product-rating {
    justify-content: center !important;
    display: flex !important;
    margin-top: 0px !important;
    margin-bottom: 0px !important;
  }

  .woocommerce-product-rating .woocommerce-review-link {
    display: none !important;
  }

  /* Kontejner za količinu + dugme */
  form.cart {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 12px !important;
    flex-wrap: nowrap !important;
    margin-top:-10px !important;
    margin-bottom:-10px !important;
  }

  /* Polje za količinu */
  .quantity input.qty {
    width: 60px !important;
    height: 46px !important;
    text-align: center !important;
    border: 1px solid #ccc !important;
    border-radius: 8px !important;
    background-color: #ffffff !important;
    color: #000000 !important;
    font-size: 16px !important;
    font-weight: 500 !important;
  }

  /* Dugme "Dodaj u korpu" – šire za trećinu */
  button.single_add_to_cart_button {
    flex: 1 1 auto !important;
    min-width: 66% !important;
    background-color: #d1c466 !important;
    color: #000000 !important;
    padding: 12px 20px !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 23px !important;
    font-weight: 600 !important;
    transition: background-color 0.3s ease;
    text-align: center !important;
  }

  button.single_add_to_cart_button:hover {
    background-color: #c1b455 !important;
  }

  /* Status zaliha – ispod dugmeta */
  .woocommerce-variation-availability,
  .stock {
    display: block !important;
    text-align: center !important;
    margin-top: 10px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
  }

  .stock.in-stock {
    color: #4CAF50 !important;
  }

  .stock.out-of-stock {
    color: #D32F2F !important;
  }
}

/* Grid za cart i stock */
@media (max-width: 768px) {
  .custom-cart-stock-wrap {
    display: grid !important;
    grid-template-areas:
      "cart"
      "stock";
    row-gap: 10px !important;
    margin-top: 10px !important;
  }

  .custom-cart-stock-wrap form.cart {
    grid-area: cart !important;
  }

  .custom-cart-stock-wrap .stock {
    grid-area: stock !important;
  }
}

/* === CENE SA POPUSTOM - MOBILNO === */
@media screen and (max-width: 768px) {
  /* Kontejner za cene */
  body.single-product .product .summary .price {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 6px !important;
    margin-bottom: 20px !important;
    flex-wrap: nowrap !important;
  }

  /* Stara cena (del) u sivom polju */
  body.single-product .product .summary .price del {
    background-color: #3a3a3a !important;
    padding: 10px 1px !important;
    border-radius: 8px !important;
    display: inline-block !important;
    box-sizing: border-box !important;
  }

  body.single-product .product .summary .price del span.amount {
    font-size: 16px !important;
    text-decoration: line-through !important;
    color: #000000 !important;
    opacity: 1 !important;
    white-space: nowrap !important;
    display: inline-block !important;
  }

  /* Nova cena (ins) u žutom polju */
  body.single-product .product .summary .price ins {
    background-color: #d1c466 !important;
    padding: 10px 0.5px !important;
    border-radius: 8px !important;
    display: inline-block !important;
    box-sizing: border-box !important;
  }

  body.single-product .product .summary .price ins span.amount {
    font-size: 16px !important;
    font-weight: 800 !important;
    color: #000000 !important;
    white-space: nowrap !important;
    display: inline-block !important;
  }

  /* Uklanjanje duplikata stare cene */
  body.single-product .product .summary .price del + ins::before {
    display: none !important;
  }
}

/* === META INFO - SAKRIJ === */
body.single-product div.product .product_meta {
    display: none !important;
}

/* === KRATAK OPIS === */
.woocommerce-product-details__short-description {
  background-color: #000000 !important;
  color: #d1c466 !important;
  padding: 16px;
  border-radius: 12px;
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 20px;
}

/* Dugmad unutar kratkog opisa */
.excerpt-toggle,
.excerpt-toggle-less {
  display: inline !important;
  font-weight: 600;
  color: #d1c466 !important;
  margin-left: 8px;
  font-style: normal !important;
  cursor: pointer;
}

/* === TAB SEKCIJE: OPIS, DODATNE INFORMACIJE, RECENZIJE === */
.woocommerce-tabs .panel {
  background-color: #000000 !important;
  color: #d1c466 !important;
  padding: 20px;
  border-radius: 12px;
  font-size: 16px;
  line-height: 1.7;
}

.woocommerce-tabs ul.tabs {
  border-bottom: 2px solid #d1c466 !important;
  margin-bottom: 0;
}

.woocommerce-tabs ul.tabs li a {
  color: #d1c466 !important;
  font-weight: 600;
  padding: 10px 16px;
}

.woocommerce-tabs ul.tabs li.active a {
  border-bottom: 3px solid #d1c466 !important;
}

/* === AKORDEON TABOVI === */
.woocommerce-tabs {
  margin-top: 30px;
}

/* Accordion blok */
.tab-akordion {
  background-color: #1e1e1e;
  color: #d1c466;
  border-radius: 12px;
  margin-bottom: 20px;
  overflow: hidden;
  border: 1px solid #333;
}

/* Naslov (klikabilan) */
.tab-akordion summary {
  padding: 18px 24px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  background-color: #000;
  color: #d1c466;
  border-bottom: 1px solid #333;
  list-style: none;
}

/* Ikonica za otvaranje */
.tab-akordion summary::marker {
  display: none;
}

.tab-akordion[open] summary {
  border-bottom: 1px solid #d1c466;
}

/* Sadržaj taba */
.tab-akordion .tab-sadrzaj {
  padding: 20px 24px;
  font-size: 15px;
  line-height: 1.7;
  color: #d1c466;
}

/* Unutrašnji pasusi */
.tab-akordion .tab-sadrzaj p {
  margin-bottom: 16px;
}

/* Tabela unutar "Dodatne informacije" */
.woocommerce-product-attributes {
  border-collapse: collapse;
  width: 100%;
  margin-top: 10px;
}

.woocommerce-product-attributes th,
.woocommerce-product-attributes td {
  border: 1px solid #d1c466;
  padding: 10px;
  text-align: left;
  font-size: 15px;
}

/* Sakrij stare WooCommerce tabove */
.woocommerce div.product .woocommerce-tabs ul.tabs,
.woocommerce div.product .woocommerce-tabs .panel:not(.custom-akordioni .panel) {
  display: none !important;
}

/* Stil za spoljne link dugme (Informacije o dostavi) */
.tab-akordion-link {
  background-color: #000;
  border-radius: 12px;
  margin-bottom: 20px;
  border: 1px solid #333;
}

.tab-akordion-link a {
  display: block;
  padding: 18px 24px;
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  color: #d1c466;
  transition: background 0.3s;
}

.tab-akordion-link a:hover {
  background-color: #1e1e1e;
  color: #ffffff;
}

@media (max-width: 480px) {
  .tab-akordion summary,
  .tab-akordion-link a {
    font-size: 16px;
    padding: 16px 20px;
  }

  .tab-akordion .tab-sadrzaj {
    padding: 16px 20px;
  }
}
