/*
Theme Name:   GH Celulares Child
Theme URI:    https://ghcelulares.com
Description:  Astra Child Theme — GH Celulares. Replica visual de Shopify (Inter font, header sticky, CTA verde, variant pills MELI blue, trust badges, reviews carousel).
Author:       GH Celulares
Template:     astra
Version:      2.0.0
Text Domain:  gh-celulares
*/

:root {
  --gh-navy:          #0f172a;
  --gh-blue:          #3483fa;
  --gh-blue-light:    #f0f6ff;
  --gh-green:         #16a34a;
  --gh-green-dark:    #15803d;
  --gh-green-light:   #f8faf8;
  --gh-green-border:  #d4edda;
  --gh-red:           #dc2626;
  --gh-orange:        #ea580c;
  --gh-amber:         #f59e0b;
  --gh-amber-bg:      #fffbeb;
  --gh-amber-border:  #fde68a;
  --gh-amber-text:    #92400e;
  --gh-gray-border:   #e0e0e0;
  --gh-gray-line:     #d1d1d1;
  --gh-gray-bg:       #f8f9fa;
  --gh-gray-bg-2:     #eaeaea;
  --gh-gray-text:     #777;
  --gh-text-dark:     #111;
  --gh-text-mid:      #333;
  --gh-text-light:    #999;
  --gh-radius:        8px;
  --gh-radius-sm:     6px;
  --gh-shadow-card:   0 1px 3px rgba(0,0,0,0.06);
  --gh-shadow-hover:  0 6px 18px rgba(0,0,0,0.10);
  --gh-shadow-green:  0 4px 14px rgba(22,163,74,0.35);
  --gh-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html, body, body * { font-family: var(--gh-font) !important; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { color: var(--gh-text-mid); background: #fff; margin: 0; }
img { max-width: 100%; height: auto; }
a { text-decoration: none; }

/* ANNOUNCEMENT BAR */
.gh-announcement-bar {
  background: var(--gh-navy); color: #fff; font-size: 13px; font-weight: 500;
  text-align: center; padding: 8px 16px; letter-spacing: 0.2px;
}
.gh-announcement-bar span { margin: 0 8px; }

/* HEADER */
.gh-header { background: #fff; border-bottom: 1px solid var(--gh-gray-border); position: sticky; top: 0; z-index: 100; }
.gh-header-inner { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; gap: 24px; }
.gh-logo img { max-height: 46px; width: auto; display: block; }
.gh-nav { display: flex; align-items: center; gap: 22px; flex: 1; justify-content: center; }
.gh-nav a { color: var(--gh-text-dark); font-size: 14px; font-weight: 500; padding: 6px 0; border-bottom: 2px solid transparent; transition: color .15s, border-color .15s; }
.gh-nav a:hover { color: var(--gh-blue); border-bottom-color: var(--gh-blue); }
.gh-header-actions { display: flex; align-items: center; gap: 14px; }
.gh-header-actions button, .gh-header-actions a { background: transparent; border: none; cursor: pointer; font-size: 20px; color: var(--gh-text-dark); position: relative; padding: 6px; }
.gh-cart-count { position: absolute; top: -2px; right: -2px; background: var(--gh-red); color: #fff; font-size: 10px; font-weight: 700; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
@media (max-width: 900px) { .gh-nav { display: none; } }

/* HERO */
.gh-hero { position: relative; max-width: 1280px; margin: 16px auto 32px; border-radius: var(--gh-radius); overflow: hidden; }
.gh-hero img { width: 100%; display: block; }
.gh-hero-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; padding: 0 6%; color: #fff; background: linear-gradient(90deg, rgba(0,0,0,0.45), transparent 60%); }
.gh-hero-overlay h1 { font-size: 2.5rem; font-weight: 800; margin: 0 0 12px; line-height: 1.1; }
.gh-hero-overlay p { font-size: 1.1rem; margin: 0 0 20px; max-width: 480px; }
.gh-hero-cta { display: inline-block; background: var(--gh-green); color: #fff !important; font-weight: 700; font-size: 15px; padding: 12px 28px; border-radius: var(--gh-radius); width: fit-content; box-shadow: var(--gh-shadow-green); transition: transform .15s, background .15s; }
.gh-hero-cta:hover { transform: translateY(-1px); background: var(--gh-green-dark); }

/* SECTIONS */
.gh-section { max-width: 1280px; margin: 0 auto; padding: 36px 20px; }
.gh-section-title { font-size: 1.6rem; font-weight: 800; color: var(--gh-text-dark); text-align: center; margin: 0 0 22px; letter-spacing: -0.01em; }

/* PRODUCT GRID */
.woocommerce ul.products, .gh-product-grid {
  display: grid !important; grid-template-columns: repeat(4, 1fr); gap: 18px;
  margin: 0 !important; padding: 0 !important; list-style: none !important;
}
@media (max-width: 1024px) { .woocommerce ul.products, .gh-product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px)  { .woocommerce ul.products, .gh-product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }

.woocommerce ul.products li.product, .gh-product-card {
  width: 100% !important; margin: 0 !important; padding: 0 !important;
  background: #fff; border: 1px solid var(--gh-gray-border); border-radius: var(--gh-radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .18s, box-shadow .18s, border-color .18s; position: relative;
}
.woocommerce ul.products li.product:hover, .gh-product-card:hover {
  transform: translateY(-2px); box-shadow: var(--gh-shadow-hover); border-color: #c8c8c8;
}
.woocommerce ul.products li.product a img, .gh-product-card .gh-card-img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: contain; background: #fff; padding: 14px; display: block; margin: 0;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title, .gh-card-title {
  font-size: 14px !important; font-weight: 500 !important; color: var(--gh-text-dark) !important;
  padding: 0 12px !important; margin: 0 0 6px !important; line-height: 1.3 !important;
  min-height: 36px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.woocommerce ul.products li.product .price, .gh-card-price {
  display: block; padding: 0 12px 12px;
  font-size: 18px !important; font-weight: 800 !important; color: var(--gh-text-dark) !important;
}
.woocommerce ul.products li.product .price del { font-size: 13px; color: var(--gh-text-light); font-weight: 400; margin-right: 6px; }
.woocommerce ul.products li.product .price ins { background: transparent; text-decoration: none; }
.gh-card-msi { display: block; padding: 0 12px 12px; font-size: 12px; color: var(--gh-green-dark); font-weight: 600; }

.woocommerce ul.products li.product .onsale, .gh-card-badge-sale {
  position: absolute; top: 10px; left: 10px;
  background: var(--gh-red); color: #fff;
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; border: none;
  min-height: 0; min-width: 0; margin: 0; padding: 0; line-height: 1;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2); z-index: 2;
}

.woocommerce ul.products li.product .button {
  display: block !important; margin: 0 12px 12px !important;
  background: var(--gh-text-dark) !important; color: #fff !important;
  border: none !important; border-radius: var(--gh-radius-sm) !important;
  padding: 9px 14px !important; font-size: 13px !important; font-weight: 600 !important;
  text-align: center; text-transform: none;
}
.woocommerce ul.products li.product .button:hover { background: var(--gh-green) !important; }

/* SINGLE PRODUCT */
.woocommerce div.product { max-width: 1100px; margin: 24px auto; }
.woocommerce div.product .woocommerce-product-gallery { width: 52% !important; }
.woocommerce div.product .summary { width: 44% !important; }
.woocommerce div.product .woocommerce-product-gallery__image img {
  border-radius: var(--gh-radius); border: 1px solid var(--gh-gray-border); background: #fff;
}
.woocommerce div.product .product_title {
  font-size: 22px !important; font-weight: 700 !important; color: var(--gh-text-dark) !important;
  line-height: 1.25 !important; margin: 0 0 6px !important;
}
.gh-stars-row { display: inline-flex; align-items: center; gap: 6px; font-size: 16px; color: var(--gh-amber); margin-bottom: 8px; }
.gh-stars-row .gh-stars-text { font-size: 12px; color: var(--gh-gray-text); font-weight: 400; }

.woocommerce div.product p.price, .woocommerce div.product span.price {
  font-size: 28px !important; font-weight: 800 !important; color: var(--gh-text-dark) !important; margin: 8px 0 4px !important;
}
.woocommerce div.product p.price del { font-size: 16px; color: var(--gh-text-light); font-weight: 400; margin-right: 8px; }
.woocommerce div.product p.price ins { background: transparent; text-decoration: none; }

.gh-stock-msg { font-size: 13px; font-weight: 600; margin: 4px 0 8px; }
.gh-stock-msg.low { color: var(--gh-red); font-weight: 700; }
.gh-stock-msg.med { color: var(--gh-orange); }
.gh-stock-msg.ok  { color: var(--gh-green); }

.gh-payment-badges { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.gh-payment-badges > div {
  display: flex; align-items: center; gap: 6px; padding: 6px 10px;
  font-size: 11px; border-radius: var(--gh-radius-sm);
  background: var(--gh-blue-light); color: var(--gh-blue); font-weight: 600; border: 1px solid #d6e4ff;
}

.gh-picker-label { font-size: 13px; font-weight: 600; color: var(--gh-text-mid); margin-bottom: 6px; display: block; }
.gh-picker-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.gh-pill {
  background: #fff; border: 1px solid var(--gh-gray-line); border-radius: var(--gh-radius-sm);
  padding: 8px 18px; font-size: 13px; font-weight: 400; color: var(--gh-text-mid);
  cursor: pointer; transition: border .15s, background .15s, color .15s;
  text-align: center; line-height: 1.2;
  display: inline-flex; flex-direction: column; align-items: center;
}
.gh-pill:hover { border-color: var(--gh-blue); color: var(--gh-blue); }
.gh-pill.selected { border: 2px solid var(--gh-blue); background: var(--gh-blue-light); color: var(--gh-blue); font-weight: 600; padding: 7px 17px; }
.gh-cond-sub { font-size: 10px; font-weight: 400; color: var(--gh-gray-text); margin-top: 2px; }
.gh-pill.selected .gh-cond-sub { color: var(--gh-blue); }

.gh-swatch-wrap { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; }
.gh-swatch {
  width: 60px; height: 60px; border: 1.5px solid var(--gh-gray-line); border-radius: var(--gh-radius);
  overflow: hidden; display: flex; align-items: center; justify-content: center;
  background: var(--gh-gray-bg); padding: 4px; transition: border .15s, box-shadow .15s;
}
.gh-swatch img { width: 100%; height: 100%; object-fit: contain; }
.gh-swatch:hover { border-color: var(--gh-blue); }
.gh-swatch-wrap.selected .gh-swatch { border: 2px solid var(--gh-blue); box-shadow: 0 0 0 1px var(--gh-blue); }
.gh-swatch-name { font-size: 11px; color: var(--gh-gray-text); text-align: center; max-width: 64px; line-height: 1.2; }
.gh-swatch-wrap.selected .gh-swatch-name { color: var(--gh-blue); font-weight: 600; }

/* Includes box */
.gh-includes-box { background: var(--gh-green-light); border: 1px solid var(--gh-green-border); border-radius: var(--gh-radius); padding: 10px 14px; margin: 12px 0; }
.gh-includes-title { font-size: 13px; font-weight: 700; color: var(--gh-green-dark); margin-bottom: 6px; }
.gh-includes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 16px; font-size: 12px; color: var(--gh-text-mid); }

.gh-social-proof { font-size: 13px; color: var(--gh-amber-text); text-align: center; padding: 6px 12px; margin: 8px 0; background: var(--gh-amber-bg); border: 1px solid var(--gh-amber-border); border-radius: var(--gh-radius-sm); }

.woocommerce div.product form.cart .button.single_add_to_cart_button, .gh-buy-btn {
  width: 100% !important; height: 52px !important; font-size: 17px !important; font-weight: 700 !important;
  letter-spacing: 0.5px; border-radius: var(--gh-radius) !important;
  background: var(--gh-green) !important; border: none !important; color: #fff !important;
  box-shadow: var(--gh-shadow-green) !important; transition: transform .15s, background .15s, box-shadow .15s;
  text-transform: none !important;
}
.woocommerce div.product form.cart .button:hover, .gh-buy-btn:hover { background: var(--gh-green-dark) !important; transform: translateY(-1px); }
.gh-pickup-line { text-align: center; font-size: 13px; font-weight: 700; color: var(--gh-text-mid); margin: 6px 0; }

/* Trust badges */
.gh-trust-strip { display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--gh-gray-border); border-radius: var(--gh-radius); padding: 10px 0; margin: 14px 0; background: #fff; }
.gh-trust-item { flex: 1; padding: 0 10px; text-align: center; font-size: 11px; color: var(--gh-text-mid); border-right: 1px solid var(--gh-gray-border); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.gh-trust-item:last-child { border-right: none; }
.gh-trust-item svg { width: 22px; height: 22px; color: var(--gh-green); }
.gh-trust-item strong { display: block; font-weight: 700; color: var(--gh-text-dark); font-size: 12px; }

/* Tabs */
.woocommerce div.product .woocommerce-tabs ul.tabs { border-bottom: 1px solid var(--gh-gray-border); padding: 0; margin: 0 0 16px; }
.woocommerce div.product .woocommerce-tabs ul.tabs::before { display: none; }
.woocommerce div.product .woocommerce-tabs ul.tabs li { background: transparent; border: none; border-radius: 0; padding: 0; margin: 0 18px 0 0; }
.woocommerce div.product .woocommerce-tabs ul.tabs li a { padding: 12px 0; font-weight: 600; color: var(--gh-text-light); border-bottom: 2px solid transparent; }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a { color: var(--gh-text-dark); border-bottom-color: var(--gh-green); }

/* Reviews carousel */
.gh-reviews-carousel { max-width: 1280px; margin: 32px auto; padding: 0 20px; }
.gh-reviews-track { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; scrollbar-width: thin; }
.gh-review-card { flex: 0 0 280px; background: #fff; border: 1px solid var(--gh-gray-border); border-radius: var(--gh-radius); padding: 16px; scroll-snap-align: start; box-shadow: var(--gh-shadow-card); }
.gh-review-stars { color: var(--gh-amber); font-size: 14px; margin-bottom: 6px; }
.gh-review-text { font-size: 13px; color: var(--gh-text-mid); line-height: 1.4; margin-bottom: 10px; }
.gh-review-author { font-size: 12px; color: var(--gh-text-light); font-weight: 600; }

/* Brand strip */
.gh-brands { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; align-items: center; padding: 24px 0; }
.gh-brand-chip { padding: 10px 22px; background: #fff; border: 1px solid var(--gh-gray-border); border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--gh-text-dark); transition: border-color .15s; }
.gh-brand-chip:hover { border-color: var(--gh-blue); color: var(--gh-blue); }

/* FOOTER */
.gh-footer { background: var(--gh-gray-bg-2); color: var(--gh-text-mid); margin-top: 60px; padding: 40px 20px 16px; }
.gh-footer-inner { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.gh-footer-col h4 { font-size: 14px; font-weight: 700; color: var(--gh-text-dark); margin: 0 0 12px; }
.gh-footer-col ul { list-style: none; padding: 0; margin: 0; }
.gh-footer-col li { margin-bottom: 8px; }
.gh-footer-col a { color: var(--gh-text-mid); font-size: 13px; }
.gh-footer-col a:hover { color: var(--gh-blue); }
.gh-footer-about p { font-size: 13px; line-height: 1.5; margin: 0 0 10px; }
.gh-footer-payments { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.gh-footer-payments img { height: 22px; }
.gh-footer-bottom { max-width: 1280px; margin: 28px auto 0; padding-top: 16px; border-top: 1px solid #d9d9d9; display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--gh-text-light); }
.gh-footer-social { display: flex; gap: 10px; }
.gh-footer-social a { color: var(--gh-text-light); font-size: 18px; }
@media (max-width: 768px) {
  .gh-footer-inner { grid-template-columns: 1fr 1fr; }
  .gh-footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

/* STICKY MOBILE BUY */
@media (max-width: 768px) {
  .gh-sticky-buy { position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--gh-gray-border); padding: 10px 16px; z-index: 90; display: flex; gap: 10px; align-items: center; box-shadow: 0 -2px 12px rgba(0,0,0,0.08); }
  .gh-sticky-buy .gh-sticky-price { font-weight: 800; font-size: 16px; color: var(--gh-text-dark); }
  .gh-sticky-buy .gh-buy-btn { flex: 1; height: 44px !important; font-size: 14px !important; }
  body.single-product { padding-bottom: 70px; }
  .woocommerce div.product .woocommerce-product-gallery, .woocommerce div.product .summary { width: 100% !important; }
}

/* HIDE Astra defaults */
.ast-primary-header-bar, .ast-above-header-wrap, .ast-below-header { display: none !important; }
#masthead.site-header { display: none !important; }
.site-footer { display: none !important; }
.ast-header-break-point .main-header-bar-wrap { display: none !important; }
