/* ============================================================
   Affiliate Product Box — Frontend Styles
   Color palette: gunsholstersandgear.com
   ============================================================ */

:root {
  --apb-green:        #418513;
  --apb-green-light:  #6cdf1f;
  --apb-dark-olive:   #353500;
  --apb-navy:         #19212b;
  --apb-white:        #ffffff;
  --apb-gray-light:   #f5f5f5;
  --apb-gray-mid:     #dbdbdb;
  --apb-gray-text:    #6d6d6d;
  --apb-black:        #1a1a1a;
  --apb-radius:       6px;
  --apb-shadow:       0 2px 12px rgba(0,0,0,0.10);
}

/* Box wrapper */
.apb-box {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  background: var(--apb-white);
  border: 2px solid var(--apb-green);
  border-radius: var(--apb-radius);
  box-shadow: var(--apb-shadow);
  overflow: hidden;
  margin: 2em 0;
  font-family: inherit;
  position: relative;
}

/* ── Image column ─────────────────────────────────── */
.apb-image-col {
  flex: 0 0 280px;
  max-width: 280px;
  background: var(--apb-gray-light);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  position: relative;
  border-right: 2px solid var(--apb-green);
}

.apb-product-img {
  display: block;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  max-height: 260px;
  border-radius: 4px;
}

/* Badge overlay */
.apb-badge {
  position: absolute;
  top: 14px;
  left: 0;
  background: var(--apb-dark-olive);
  color: var(--apb-white);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px 4px 12px;
  border-radius: 0 4px 4px 0;
  z-index: 2;
  line-height: 1.4;
}

/* ── Content column ────────────────────────────────── */
.apb-content-col {
  flex: 1 1 260px;
  padding: 24px 28px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Product title */
.apb-product-title {
  margin: 0 0 2px;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--apb-navy);
  line-height: 1.3;
}

/* Stars */
.apb-stars {
  display: flex;
  align-items: center;
  gap: 1px;
  line-height: 1;
}

.apb-star {
  font-size: 1.1rem;
}

.apb-star--full {
  color: #f5a623;
}

.apb-star--half {
  color: #f5a623;
  opacity: 0.6;
}

.apb-star--empty {
  color: var(--apb-gray-mid);
}

.apb-rating-number {
  margin-left: 6px;
  font-size: 0.85rem;
  color: var(--apb-gray-text);
  font-weight: 600;
}

/* Description */
.apb-description {
  margin: 0;
  font-size: 1em;
  color: var(--apb-black);
  line-height: 1.6;
}

/* Pros / feature list */
.apb-pros-list {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.apb-pros-list li {
  font-size: 1em;
  color: var(--apb-black);
  padding-left: 22px;
  position: relative;
  line-height: 1.5;
}

.apb-pros-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--apb-green);
  font-weight: 700;
  font-size: 1em;
}

/* Footer: price + CTA */
.apb-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: auto;
  padding-top: 12px;
}

.apb-price {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--apb-dark-olive);
  line-height: 1;
  white-space: nowrap;
}

/* CTA button */
.apb-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--apb-green);
  color: var(--apb-white) !important;
  text-decoration: none !important;
  font-size: 1rem;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: var(--apb-radius);
  border: none;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  box-shadow: 0 3px 8px rgba(65,133,19,0.35);
  line-height: 1;
}

.apb-cta-btn:hover,
.apb-cta-btn:focus {
  background: var(--apb-dark-olive);
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(53,53,0,0.40);
  color: var(--apb-white) !important;
  text-decoration: none !important;
}

.apb-cta-btn:active {
  transform: translateY(0);
}

.apb-arrow {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform 0.18s ease;
}

.apb-cta-btn:hover .apb-arrow {
  transform: translateX(3px);
}

/* Disclaimer */
.apb-disclaimer {
  margin: 2px 0 0;
  font-size: 0.72rem;
  color: var(--apb-gray-text);
  font-style: italic;
  line-height: 1.4;
}

/* ── Responsive ───────────────────────────────────── */
@media ( max-width: 640px ) {
  .apb-box {
    flex-direction: column;
  }

  .apb-image-col {
    flex: none;
    max-width: 100%;
    border-right: none;
    border-bottom: 2px solid var(--apb-green);
    padding: 20px;
    max-height: 240px;
  }

  .apb-product-img {
    max-height: 200px;
  }

  .apb-content-col {
    padding: 20px 18px 18px;
  }

  .apb-product-title {
    font-size: 1.15rem;
  }

  .apb-cta-btn {
    width: 100%;
    justify-content: center;
    padding: 13px 18px;
  }

  .apb-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .apb-price {
    font-size: 1.3rem;
  }
}
