/*
Theme Name: Astra Child
Template: astra
*/

/* =========================
   ICON STRIP (single product)
   ========================= */
.woocommerce div.product .product-icon-strip {
  display: flex !important;
  flex-wrap: nowrap;             /* altid én række på desktop/tablet */
  justify-content: space-evenly; /* jævnt fordelt og centreret */
  align-items: flex-start;
  gap: 0;
  padding: 20px 0;
  border-top: 1px solid rgba(0,0,0,0.08);
  text-align: center;
  overflow-x: auto;              /* horisontal scroll hvis pladsen er for smal */
}

.woocommerce div.product .product-icon-strip .pis-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.woocommerce div.product .product-icon-strip .prod-icon {
  max-width: 60px;              /* maks ikonbredde desktop */
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  margin-bottom: 6px;
}

.woocommerce div.product .product-icon-strip .ikon-label {
  font-size: 12px;
  line-height: 1.3;
  font-weight: 600;
  color: #222;
}

/* Gråtonet ikon når feltet er tomt (ingen tekst) */
.woocommerce div.product .product-icon-strip .pis-item.is-off .prod-icon { filter: grayscale(100%); opacity: .5; }
.woocommerce div.product .product-icon-strip .pis-item.is-off .ikon-label { display: none; }

/* Ekstra responsiv: meget små skærme (<500px) — skift til grid og gør ikoner mindre */
@media (max-width: 500px) {
  .woocommerce div.product .product-icon-strip {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr); /* 3 pr. række */
    gap: 16px;
    justify-items: center;
  }
  .woocommerce div.product .product-icon-strip .prod-icon { max-width: 40px; }
  .woocommerce div.product .product-icon-strip .ikon-label { font-size: 11px; }
}

/* =========================
   SPECS TABLE (custom tab)
   ========================= */

/* Sørg for at tabellens container ikke begrænser bredden */
.woocommerce-Tabs-panel--specs { padding-left: 0; padding-right: 0; }

/* ÉN samlet tabelblok */
.acf-specs-table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  table-layout: fixed;          /* jævn fordeling og stabilt layout */
}

.acf-specs-table th,
.acf-specs-table td {
  padding: .6em .8em;
  border-bottom: 1px solid #e0e0e0;
  width: auto;                  /* reset – styres nedenfor */
}

/* Kolonnebredder: 30% / 70% */
.acf-specs-table th {
  width: 30%;
  text-align: left;
  font-weight: 600;
}
.acf-specs-table td {
  width: 70%;
  word-break: break-word;       /* bryd lange værdier */
}
/* Tving 30/70 på kun data-rækker (ikke sektioner) */
.woocommerce .acf-specs-table tr.acf-spec-row > th { width: 30% !important; }
.woocommerce .acf-specs-table tr.acf-spec-row > td { width: 70% !important; }

/* Hvis Astra/Woo sætter faste px-bredder */
.woocommerce .acf-specs-table th,
.woocommerce table.shop_attributes.acf-specs-table th { max-width: none !important; }

/* Behold fast layout så widths respekteres */
.woocommerce .acf-specs-table { table-layout: fixed; }


/* Sektion-overskrifter (colspan=2) */
.acf-specs-table .acf-spec-section th {
  width: 100% !important;
  background: #f5f5f5;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: .03em;
  color: #444;
}
.acf-specs-table .acf-spec-section td { display: none; }

/* Tom afstandsrække (colspan=2) */
.acf-specs-table .acf-spec-spacer td {
  padding: .4em 0;
  border: 0;
  background: transparent;
}

/* Ekstra sikkerhed: tving fuld bredde inde i vores specs-panel */
.woocommerce-Tabs-panel--specs .acf-specs-table,
.woocommerce-Tabs-panel--specs .acf-specs-table th,
.woocommerce-Tabs-panel--specs .acf-specs-table td {
  width: 100% !important;
}
