/*
Theme Name: Blocksy Child
Template:   blocksy
Version:    1.0.0
Author:     rekuperatorite
License:    GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: blocksy-child
*/

/* ═══════════════════════════════════════════════════════════════
   WooCommerce — Single Product Page
   All rules scoped to body.single-product to avoid any
   interference with the homepage or other pages.
   ═══════════════════════════════════════════════════════════════ */

/* ── Quick Specs Strip ──────────────────────────────────────── */
body.single-product .rk-specs-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 16px 0 20px;
}
body.single-product .rk-spec-box {
  background: #f2f5f7;
  border: 1px solid #e1e8ed;
  border-radius: 8px;
  padding: 12px 10px;
  text-align: center;
}
body.single-product .rk-spec-val {
  font-size: 1.1rem;
  font-weight: 800;
  color: #192a3d;
  line-height: 1;
  margin-bottom: 3px;
}
body.single-product .rk-spec-lbl {
  font-size: .65rem;
  color: #3A4F66;
  text-transform: uppercase;
  letter-spacing: .06em;
  opacity: .75;
}

/* ── Trust Badges ───────────────────────────────────────────── */
body.single-product .rk-trust-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 16px;
}
body.single-product .rk-trust-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .82rem;
  color: #3A4F66;
  background: #f2f5f7;
  border-radius: 7px;
  padding: 10px 12px;
}
body.single-product .rk-trust-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  background: #ffffff;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
body.single-product .rk-trust-item strong {
  display: block;
  font-size: .82rem;
  color: #192a3d;
  line-height: 1.3;
  font-weight: 700;
}
body.single-product .rk-trust-item span {
  font-size: .72rem;
  color: #3A4F66;
  opacity: .75;
}

/* ── Upsell Strip ───────────────────────────────────────────── */
body.single-product .rk-upsell-strip {
  background: #192a3d;
  border-radius: 10px;
  padding: 20px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin: 0 0 48px;
}
body.single-product .rk-upsell-text {
  color: #e1e8ed;
  font-size: .9rem;
}
body.single-product .rk-upsell-text strong {
  color: #ffffff;
  display: block;
  font-size: 1rem;
  margin-bottom: 4px;
}
body.single-product .rk-upsell-btn {
  background: #2872fa;
  color: #ffffff !important;
  padding: 10px 22px;
  border-radius: 7px;
  font-weight: 700;
  font-size: .88rem;
  white-space: nowrap;
  text-decoration: none !important;
  transition: background .15s;
}
body.single-product .rk-upsell-btn:hover {
  background: #1559ed !important;
  color: #ffffff !important;
}

/* ── WooCommerce Tabs ───────────────────────────────────────── */
body.single-product .woocommerce-tabs ul.tabs li a {
  font-weight: 700;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}
body.single-product .woocommerce-tabs ul.tabs li.active a {
  color: #2872fa;
}

/* ── Additional Info / Specs table ─────────────────────────── */
body.single-product .woocommerce-product-attributes th,
body.single-product .woocommerce-product-attributes td {
  padding: 10px 16px;
  font-size: .88rem;
}
body.single-product .woocommerce-product-attributes th {
  color: #192a3d;
  font-weight: 600;
  width: 45%;
}
body.single-product .woocommerce-product-attributes td {
  color: #3A4F66;
}
body.single-product .woocommerce-product-attributes tr:nth-child(odd) th,
body.single-product .woocommerce-product-attributes tr:nth-child(odd) td {
  background: #f2f5f7;
}

/* ── Installation tab content ───────────────────────────────── */
body.single-product .rk-install-tab h3 {
  color: #192a3d;
  margin-bottom: 16px;
  font-size: 1.1rem;
}
body.single-product .rk-install-tab ul {
  color: #3A4F66;
  font-size: .9rem;
  line-height: 1.9;
  margin-bottom: 20px;
  padding-left: 20px;
}
body.single-product .rk-install-tab p {
  color: #3A4F66;
  font-size: .9rem;
  line-height: 1.7;
  margin-bottom: 20px;
}
body.single-product .rk-install-tab .rk-btn {
  display: inline-block;
  background: #2872fa;
  color: #fff !important;
  padding: 10px 22px;
  border-radius: 7px;
  font-weight: 700;
  font-size: .88rem;
  text-decoration: none !important;
}
body.single-product .rk-install-tab .rk-btn:hover {
  background: #1559ed !important;
}

/* ── Documents tab ──────────────────────────────────────────── */
body.single-product .rk-docs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 800px;
  margin-top: 16px;
}
body.single-product .rk-doc-item {
  border: 1px solid #e1e8ed;
  border-radius: 8px;
  padding: 16px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none !important;
  transition: border-color .15s;
  color: inherit;
}
body.single-product .rk-doc-item:hover {
  border-color: #2872fa;
}
body.single-product .rk-doc-icon {
  width: 36px;
  height: 36px;
  background: #f2f5f7;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
body.single-product .rk-doc-name {
  font-size: .82rem;
  font-weight: 600;
  color: #192a3d;
  line-height: 1.3;
}
body.single-product .rk-doc-size {
  font-size: .72rem;
  color: #3A4F66;
  opacity: .65;
}

/* ── Related products grid ──────────────────────────────────── */
body.single-product .related.products ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 16px !important;
}

/* ── Responsive — 768px ─────────────────────────────────────── */
@media (max-width: 768px) {
  body.single-product .rk-specs-strip         { grid-template-columns: repeat(2, 1fr); }
  body.single-product .rk-trust-row           { grid-template-columns: 1fr; }
  body.single-product .rk-upsell-strip        { flex-direction: column; align-items: flex-start; }
  body.single-product .rk-docs-grid           { grid-template-columns: 1fr 1fr; }
  body.single-product .related.products ul.products { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE IMPROVEMENTS — phone-first fixes (≤ 600px / ≤ 480px)
   ═══════════════════════════════════════════════════════════════ */

/* ── Top Ribbon ─────────────────────────────────────────────── */
@media (max-width: 600px) {
  .top-ribbon {
    grid-template-columns: 1fr;
    gap: 4px;
    text-align: center;
  }
  .top-ribbon__left {
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px 14px;
  }
  .top-ribbon__center { white-space: normal; }
  .top-ribbon__right  { display: none; }
}

/* ── Section vertical padding — reduce desktop-scale values ─── */
@media (max-width: 600px) {
  .wp-block-group[style*="padding-top:80px"]  { padding-top:    44px !important; }
  .wp-block-group[style*="padding-bottom:80px"]{ padding-bottom: 44px !important; }
  .wp-block-group[style*="padding-top:72px"]  { padding-top:    40px !important; }
  .wp-block-group[style*="padding-bottom:72px"]{ padding-bottom: 40px !important; }
  .wp-block-group[style*="padding-top:64px"]  { padding-top:    36px !important; }
  .wp-block-group[style*="padding-bottom:64px"]{ padding-bottom: 36px !important; }
  .wp-block-group[style*="padding-top:60px"]  { padding-top:    36px !important; }
  .wp-block-group[style*="padding-bottom:60px"]{ padding-bottom: 36px !important; }
  .wp-block-group[style*="padding-top:56px"]  { padding-top:    32px !important; }
  .wp-block-group[style*="padding-bottom:56px"]{ padding-bottom: 32px !important; }
}

/* ── Section horizontal padding — reduce on phone ───────────── */
@media (max-width: 600px) {
  .wp-block-group[style*="padding-left:48px"]  { padding-left:  20px !important; }
  .wp-block-group[style*="padding-right:48px"] { padding-right: 20px !important; }
  .wp-block-group[style*="padding-left:40px"]  { padding-left:  20px !important; }
  .wp-block-group[style*="padding-right:40px"] { padding-right: 20px !important; }
  .wp-block-group[style*="padding-left:32px"]  { padding-left:  16px !important; }
  .wp-block-group[style*="padding-right:32px"] { padding-right: 16px !important; }
}

/* ── WooCommerce tabs — horizontally scrollable on narrow screens */
body.single-product .woocommerce-tabs ul.tabs {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex-wrap: nowrap;
  white-space: nowrap;
}
body.single-product .woocommerce-tabs ul.tabs::-webkit-scrollbar { display: none; }
body.single-product .woocommerce-tabs ul.tabs > li { display: inline-flex; }

/* ── Product page: extra 480px breakpoint ───────────────────── */
@media (max-width: 480px) {
  body.single-product .rk-docs-grid { grid-template-columns: 1fr; }
  body.single-product .rk-specs-strip { grid-template-columns: repeat(2, 1fr); }
}
