/* =========================
   SINGLE PRODUKT LAYOUT
========================= */

.single-product__grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 40px;
  align-items: start;
}
@media (max-width:1080px) {
  .single-product__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* Sticky kÃ¶psektion pÃ¥ desktop */
.single-product__summary {
  position: sticky;
  top: var(--header-sticky-offset, 96px);
  align-self: start;
}

/* =========================
   TITEL & PRIS
========================= */

.product_title {
  margin: .2rem 0 .35rem;
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  line-height: 1.15;
}

.single-product .single-product__price .price {
  font-size: clamp(1.2rem, 1.4vw, 1.5rem);
  font-weight: 700;
  display: inline-flex;
  flex-direction: row-reverse; /* reapris först */
  gap: .6rem;
  align-items: baseline;
  margin: .25rem 0 1rem;
}

.single-product__price del {
  color: #9ca3af;
  font-weight: 400;
}

.single-product__price ins {
  text-decoration: none;
  color: var(--vcom-sale);
}

/* =========================
   KORT BESKRIVNING
========================= */

.single-product__shortdesc {
  color: #444;
  font-size: .95rem;
  margin: 0 0 1rem;
}

/* =========================
   KÖPSEKTION (premiumkort)
========================= */

.single-product__purchase {
  margin-top: 1.25rem;

  background: var(--vcom-bg);
  border: 1px solid var(--vcom-border, #e5e7eb);
  border-radius: 14px; /* matchar product-card */
  padding: 20px;

  display: grid;
  gap: 16px;

  max-width: 360px; /* lite bredare = lugnare */
  box-shadow: 0 8px 24px rgba(0,0,0,.05);
}

.single-product__purchase .single_add_to_cart_button {
  height: 44px;
  border-radius: 10px;
  font-weight: 700;
  letter-spacing: .2px;
}

/* =========================
   FORM-LAGER
========================= */

.single-product__purchase form.cart,
.single-product__purchase form.variations_form {
  display: grid;
  gap: 16px;
  width: 100%;
  max-width: 100%;
}

/* =========================
   VARIATIONSRAD
========================= */

.single-product__purchase .variations {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  width: 100%;
}

.variations .label {
  font-weight: 600;
  font-size: 1rem;
  color: #111827;
  white-space: nowrap;
  line-height: 1;
  display: flex;
  align-items: center;
}

.variations .value {
  flex: 1;
}

.single-product__purchase .variations select {
  width: auto;                  /* override forms.css 100% */
  max-width: 190px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: #fff url("data:image/svg+xml;utf8,<svg fill='black' height='18' viewBox='0 0 24 24' width='18' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>")
             no-repeat right .6rem center/.8rem auto;
  border: 1.5px solid var(--vcom-border, #e5e7eb);
  border-radius: 6px;
  padding: .5rem 2rem .5rem .75rem;
  font-size: .95rem;
  font-weight: 500;
  color: #111;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
}
.variations select:hover { border-color: var(--vcom-accent, #111); }
.variations select:focus {
  border-color: var(--vcom-accent, #111);
  box-shadow: 0 0 0 2px rgba(17,17,17,.15);
  outline: none;
}

/* =========================
   ANTAL + KNAPP
========================= */

.single-product__purchase .cart,
.single-product__purchase .woocommerce-variation-add-to-cart {
  display: flex;
  gap: 10px;
  align-items: stretch;
  flex-wrap: wrap;
  width: 100%;
}

.single-product__purchase .quantity .qty {
  width: 70px;                  /* override forms.css 100% */
  height: 38px;
  padding: 0 .5rem;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1.5px solid var(--vcom-border, #e5e7eb);
  border-radius: 6px;
  text-align: center;
}

.single-product__purchase .single_add_to_cart_button {
  flex: 1;
  height: 38px;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 700;
}

/* =========================
   RESPONSIVITET
========================= */

@media (max-width: 640px) {
  .single-product__purchase {
    width: 100% !important;
    max-width: 100% !important;
  }
  .single-product__purchase .variations select {
    max-width: 100%;
  }
}

/* =========================
   LAGER / LEVERANS / TRUST / META
========================= */

.single-product__stockdelivery { margin-top: .75rem; }

.single-product__trust {
  margin-top: .75rem;
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 8px;
}
@media (max-width:640px) {
  .single-product__trust { grid-template-columns: repeat(2,1fr); }
}

.single-product__meta {
  margin-top: .75rem;
  font-size: .9rem;
  color: #6b7280;
}
.single-product__meta .posted_in,
.single-product__meta .sku_wrapper,
.single-product__meta .tagged_as { display:block; }

/* =========================
   TABS
========================= */

.single-product__tabs { margin-top: 40px; }

.woocommerce-tabs .wc-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  border-bottom: 1px solid #eee;
  margin-bottom: 16px;
}

.woocommerce-tabs .wc-tabs li { list-style: none; margin: 0; }
.woocommerce-tabs .wc-tabs li a {
  display: inline-block;
  padding: .6rem .9rem;
  border-radius: 10px 10px 0 0;
  border: 1px solid transparent;
  background: #f7f7f8;
}
.woocommerce-tabs .wc-tabs li.active a {
  background: var(--vcom-bg);
  border-color: #e5e7eb #e5e7eb transparent #e5e7eb;
}

.woocommerce-Tabs-panel {
  background: var(--vcom-bg);
  border: 1px solid var(--vcom-border);
  border-radius: 0 12px 12px 12px;
  padding: 16px;
}

/* =========================
   RELATERADE PRODUKTER GRID
========================= */

.single-product__related { margin-top: 48px; }

.related ul.products {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 16px;
}
@media (max-width:960px) {
  .related ul.products { grid-template-columns: repeat(2,1fr); }
}
.related li.product { list-style: none; }

/* =========================
   Kampanjrad Single product
========================= */

.single-product__campaign {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin: .35rem 0 .75rem;
  font-size: .9rem;
  color: var(--vcom-success);
  text-decoration: none;
}

.single-product__campaign .campaign-badge {
  background: var(--vcom-success);
  color: #fff;
  font-weight: 700;
  font-size: .7rem;
  padding: .2rem .45rem;
  border-radius: 6px;
  text-transform: uppercase;
}

.single-product__campaign .campaign-text {
  font-weight: 500;
}

.single-product__campaign:hover {
  text-decoration: underline;
}

.single-product__campaign {
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease;
}

.single-product__campaign:hover {
  background: #ecfdf5;
  border-color: #86efac;
  border: 1px solid transparent;
}

/* Pris på produktsida */
.single-product .price {
    font-family: 'Playfair Display', serif;
    font-size: 26px;
    font-weight: 600;
    color: var(--sc-dark);
}

button.single_add_to_cart_button:hover,
.add_to_cart_button:hover,
.vcom-product-card__actions .button:hover,
.single-product__purchase .button:hover {
    background-color: var(--btn-primary-bg-hover);
    border-color: var(--btn-primary-bg-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ==========================================
   SINGLE PRODUCT – Primary Add to Cart
========================================== */

.single-product .single_add_to_cart_button {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  border: 1px solid var(--btn-primary-border);
}

.single-product .single_add_to_cart_button:hover {
  background: var(--btn-primary-bg-hover);
  border-color: var(--btn-primary-border-hover);
  color: var(--btn-primary-text);
}