/* GMI Mobile Specs v1.3 — colorful cards + unified table headers */

.gmi-specs-wrap {
  --gmi-text: #151a28;
  --gmi-muted: #5a6478;
  --gmi-radius: 18px;
  color: var(--gmi-text);
  line-height: 1.65;
}

.gmi-specs-wrap > h2,
.woocommerce-Tabs-panel--description .gmi-specs-wrap h2 {
  margin: 8px 0 18px;
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  letter-spacing: -0.02em;
}

/* Feature cards */
.gmi-feature-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 0 0 32px;
}

.gmi-feature-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--gmi-radius);
  padding: 18px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 118px;
  color: #fff;
  box-shadow: 0 10px 24px rgba(21, 26, 40, 0.12);
  transform: translateZ(0);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gmi-feature-card::before {
  content: "";
  position: absolute;
  inset: auto -20px -30px auto;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}

.gmi-feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(21, 26, 40, 0.16);
}

.gmi-feature-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.2);
  margin-bottom: 4px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 20px 20px;
}

.gmi-feature-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.88;
}

.gmi-feature-value {
  font-size: 0.98rem;
  font-weight: 750;
  line-height: 1.35;
}

.gmi-card-display {
  background: linear-gradient(145deg, #6d28d9 0%, #4f46e5 100%);
}
.gmi-card-display .gmi-feature-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23fff' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect x='5' y='2' width='14' height='20' rx='2'/%3E%3Cpath d='M12 18h.01'/%3E%3C/svg%3E");
}

.gmi-card-chipset {
  background: linear-gradient(145deg, #ea580c 0%, #f59e0b 100%);
}
.gmi-card-chipset .gmi-feature-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23fff' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect x='7' y='7' width='10' height='10' rx='1'/%3E%3Cpath d='M9 3v4M15 3v4M9 17v4M15 17v4M3 9h4M3 15h4M17 9h4M17 15h4'/%3E%3C/svg%3E");
}

.gmi-card-camera {
  background: linear-gradient(145deg, #db2777 0%, #e11d48 100%);
}
.gmi-card-camera .gmi-feature-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23fff' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M4 8h3l2-3h6l2 3h3v11H4z'/%3E%3Ccircle cx='12' cy='13' r='3.5'/%3E%3C/svg%3E");
}

.gmi-card-battery {
  background: linear-gradient(145deg, #059669 0%, #10b981 100%);
}
.gmi-card-battery .gmi-feature-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23fff' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect x='2' y='7' width='18' height='10' rx='2'/%3E%3Cpath d='M20 11h2v2h-2M7 11l2 2 3-4'/%3E%3C/svg%3E");
}

.gmi-card-storage {
  background: linear-gradient(145deg, #0284c7 0%, #0ea5e9 100%);
}
.gmi-card-storage .gmi-feature-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23fff' stroke-width='2' viewBox='0 0 24 24'%3E%3Cellipse cx='12' cy='6' rx='8' ry='3'/%3E%3Cpath d='M4 6v6c0 1.7 3.6 3 8 3s8-1.3 8-3V6M4 12v6c0 1.7 3.6 3 8 3s8-1.3 8-3v-6'/%3E%3C/svg%3E");
}

.gmi-card-os {
  background: linear-gradient(145deg, #0f766e 0%, #14b8a6 100%);
}
.gmi-card-os .gmi-feature-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23fff' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Cpath d='M8 9h8M8 13h5'/%3E%3C/svg%3E");
}

/* Highlights */
.gmi-specs-wrap .gmi-highlights {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 0 0 28px;
}

.gmi-specs-wrap .gmi-highlight {
  border-radius: var(--gmi-radius);
  padding: 16px 18px;
  background: #fff;
  border: 1px solid #eceff5;
  box-shadow: 0 6px 16px rgba(21, 26, 40, 0.05);
}

.gmi-specs-wrap .gmi-highlight:nth-child(1) { border-top: 4px solid #4f46e5; }
.gmi-specs-wrap .gmi-highlight:nth-child(2) { border-top: 4px solid #f59e0b; }
.gmi-specs-wrap .gmi-highlight:nth-child(3) { border-top: 4px solid #e11d48; }
.gmi-specs-wrap .gmi-highlight:nth-child(4) { border-top: 4px solid #10b981; }

.gmi-specs-wrap .gmi-highlight h3 {
  margin: 0 0 8px;
  font-size: 1.02rem;
}

.gmi-specs-wrap .gmi-highlight p {
  margin: 0;
  color: var(--gmi-muted);
  font-size: 0.92rem;
}

/* Two tables per row on desktop */
.gmi-specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 0 0 24px;
  align-items: stretch;
}

.gmi-specs-wrap table {
  width: 100%;
  height: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0;
  background: #fff;
  border: 1px solid #e8ecf4;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(21, 26, 40, 0.06);
}

.woocommerce #tab-description .gmi-specs-wrap table thead th,
.woocommerce-Tabs-panel--description .gmi-specs-wrap table thead th,
.gmi-specs-wrap table thead th {
  color: #fff !important;
  font-size: 0.95rem;
  font-weight: 800;
  text-align: left;
  padding: 14px 16px;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
  background: linear-gradient(105deg, #6d28d9 0%, #db2777 52%, #f43f5e 100%) !important;
  /* Equal header height across side-by-side tables */
  height: 56px;
  min-height: 56px;
  max-height: 56px;
  box-sizing: border-box;
  vertical-align: middle;
  line-height: 1.25;
}

.gmi-specs-wrap a {
  color: #db2777;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.gmi-specs-wrap a:hover {
  color: #9d174d;
}

.gmi-specs-wrap table tbody tr:nth-child(even) {
  background: #f7f9fc;
}

.gmi-specs-wrap table tbody tr:hover {
  background: #eef4ff;
}

.gmi-specs-wrap table td {
  padding: 11px 16px;
  border-top: 1px solid #eef1f6;
  vertical-align: top;
  font-size: 0.9rem;
}

.gmi-specs-wrap table td:first-child {
  width: 38%;
  font-weight: 700;
  color: #243049;
}

.gmi-specs-wrap table td:last-child {
  color: var(--gmi-muted);
}

.gmi-specs-wrap .gmi-disclaimer {
  margin: 4px 0 24px;
  padding: 14px 16px;
  border-left: 4px solid #4f46e5;
  background: linear-gradient(90deg, #eef2ff, #f8fafc);
  border-radius: 0 12px 12px 0;
  color: var(--gmi-muted);
  font-size: 0.88rem;
}

.gmi-content-banner {
  margin: 8px 0 28px;
  width: 100%;
}

.gmi-content-banner img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 16px;
  object-fit: cover;
}

/* Content gallery: 2–3 different product images in the banner slot */
.gmi-content-gallery {
  margin: 8px 0 28px;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  grid-template-rows: auto auto;
  gap: 12px;
  width: 100%;
}

.gmi-content-gallery .gmi-gallery-item {
  margin: 0;
  overflow: hidden;
  border-radius: 16px;
  background: #f1f5f9;
}

.gmi-content-gallery .gmi-gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gmi-content-gallery .gmi-gallery-hero {
  grid-row: 1 / span 2;
  min-height: 320px;
}

.gmi-content-gallery .gmi-gallery-item:not(.gmi-gallery-hero) {
  min-height: 154px;
}

.gmi-content-gallery.gmi-gallery-count-2 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto;
}

.gmi-content-gallery.gmi-gallery-count-2 .gmi-gallery-hero {
  grid-row: auto;
  min-height: 240px;
}

.gmi-content-gallery.gmi-gallery-count-2 .gmi-gallery-item:not(.gmi-gallery-hero) {
  min-height: 240px;
}

@media (max-width: 767px) {
  .gmi-content-gallery,
  .gmi-content-gallery.gmi-gallery-count-2 {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .gmi-content-gallery .gmi-gallery-hero,
  .gmi-content-gallery .gmi-gallery-item:not(.gmi-gallery-hero),
  .gmi-content-gallery.gmi-gallery-count-2 .gmi-gallery-hero,
  .gmi-content-gallery.gmi-gallery-count-2 .gmi-gallery-item:not(.gmi-gallery-hero) {
    grid-row: auto;
    min-height: 200px;
  }
}

.gmi-product-video {
  margin: 28px 0 8px;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: #0f172a;
}

.gmi-product-video iframe {
  display: block;
  width: 100%;
  height: 450px;
  border: 0;
}

@media (max-width: 575px) {
  .gmi-product-video iframe {
    height: 220px;
  }
}

/* Tablet + mobile: 1 table per row, 2 feature cards */
@media (max-width: 991px) {
  .gmi-feature-cards {
    grid-template-columns: 1fr 1fr;
  }

  .gmi-specs-wrap .gmi-highlights {
    grid-template-columns: 1fr;
  }

  .gmi-specs-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575px) {
  .gmi-feature-cards {
    grid-template-columns: 1fr;
  }

  .gmi-feature-card {
    min-height: 0;
  }
}
