/*
Theme Name: JSTV Sports
Theme URI: https://jstv.com.br
Author: JSTV Sports
Description: Tema custom do portal de notícias esportivas JSTV Sports.
Version: 1.0
Requires PHP: 8.0
Text Domain: jstv-sports
*/

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', Arial, sans-serif; background: #F4F1EC; color: #2A2A2A; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
ul { list-style: none; }

/* ===== Header ===== */
.site-header { background: #3B1752; padding: 18px 0; }
.header-inner { max-width: 1440px; margin: 0 auto; padding: 0 40px; box-sizing: border-box; }
.header-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.site-logo img { height: 70px; width: auto; display: block; }
.search-icon { color: #fff; font-size: 18px; }
.accent-line { height: 3px; width: 200px; background: linear-gradient(90deg, #D8432E, #FBCE3C); margin-bottom: 12px; border-radius: 2px; }
.main-nav ul { display: flex; gap: 26px; flex-wrap: wrap; }
.main-nav a { color: #E8DCEF; font-size: 13px; }
.main-nav a:hover { color: #FBCE3C; }

/* ===== Layout ===== */
.container { max-width: 1440px; margin: 0 auto; padding: 24px 40px; }

.live-strip { display: flex; align-items: center; gap: 10px; background: #3B1752; border-radius: 10px; padding: 12px 20px; margin-bottom: 24px; flex-wrap: wrap; }
.badge-live { background: #D8432E; color: #fff; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 4px; letter-spacing: 0.5px; }
.live-strip .title { color: #fff; font-size: 14px; }
.lock-note { margin-left: auto; color: #FBCE3C; font-size: 12px; display: flex; align-items: center; gap: 4px; }

.layout-grid { display: grid; grid-template-columns: 2.6fr 1fr; gap: 28px; align-items: start; }

/* ===== Hero ===== */
.hero-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; margin-bottom: 32px; }
.hero-main { position: relative; border-radius: 14px; overflow: hidden; height: 420px; background: #3B1752; }
.hero-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(20,5,30,0.88) 5%, transparent 60%); }
.hero-text { position: absolute; bottom: 0; left: 0; right: 0; padding: 22px; }
.tag { display: inline-block; background: #FBCE3C; color: #5C3A0A; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 4px; margin-bottom: 10px; }
.hero-text h1 { color: #fff; font-size: 26px; font-weight: 600; line-height: 1.3; margin-bottom: 8px; }
.hero-text p.meta { color: #DDD; font-size: 12px; }

.side-stack { display: flex; flex-direction: column; gap: 18px; }
.side-card { position: relative; border-radius: 14px; overflow: hidden; height: 201px; background: #3B1752; }
.side-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.side-overlay { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(20,5,30,0.85) 20%, transparent 65%); }
.side-text { position: absolute; bottom: 0; padding: 14px; }
.side-text .tag { font-size: 10px; padding: 2px 8px; margin-bottom: 6px; }
.side-text h2 { color: #fff; font-size: 14px; font-weight: 600; line-height: 1.3; }

.section-label { font-size: 15px; font-weight: 700; color: #3B1752; margin-bottom: 14px; padding-left: 12px; border-left: 4px solid #FBCE3C; }

/* ===== News grid ===== */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 32px; }
.news-card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.news-card .thumb { display: block; height: 130px; background: #3B1752; }
.news-card img { width: 100%; height: 130px; object-fit: cover; display: block; }
.news-card-body { padding: 14px; }
.news-card .cat { font-size: 10px; font-weight: 700; letter-spacing: 0.4px; }
.news-card h3 { font-size: 14px; font-weight: 600; line-height: 1.35; margin-top: 6px; color: #222; }
.news-card .meta { font-size: 11px; color: #888; margin-top: 8px; }

.sponsor-banner { background: #fff; border: 1px dashed #C9B8D4; border-radius: 10px; height: 60px; display: flex; align-items: center; justify-content: center; color: #8A7A94; font-size: 12px; margin-bottom: 32px; }

.commerce-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 8px; }
.commerce-card { background: #fff; border-radius: 12px; padding: 18px; display: flex; align-items: center; gap: 14px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.commerce-icon { width: 44px; height: 44px; border-radius: 10px; background: linear-gradient(160deg, #F5A623, #D8432E); flex-shrink: 0; }
.commerce-card h4 { font-size: 14px; color: #222; margin-bottom: 4px; }
.commerce-card p { font-size: 12px; color: #777; }

/* ===== Sidebar ===== */
.sidebar { display: flex; flex-direction: column; gap: 20px; }
.widget { background: #fff; border-radius: 12px; padding: 16px 18px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.widget h4 { font-size: 13px; font-weight: 700; color: #3B1752; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid #EEE; }
.rank-item { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid #F2F2F2; }
.rank-item:last-child { border-bottom: none; }
.rank-num { font-size: 16px; font-weight: 700; color: #FBCE3C; -webkit-text-stroke: 1px #D8432E; width: 22px; flex-shrink: 0; }
.rank-text { font-size: 12px; line-height: 1.4; color: #333; }
.agenda-item { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #F2F2F2; font-size: 12px; }
.agenda-item:last-child { border-bottom: none; }
.agenda-item .when { color: #993C1D; font-weight: 600; }
.plans-widget { background: linear-gradient(160deg, #3B1752, #26215C); color: #fff; }
.plans-widget h4 { color: #FBCE3C; border-bottom-color: rgba(255,255,255,0.15); }
.plans-widget p { font-size: 12px; color: #E8DCEF; line-height: 1.5; margin-bottom: 12px; }
.plans-widget button, .plans-widget a.button { width: 100%; background: #FBCE3C; color: #5C3A0A; border: none; border-radius: 6px; padding: 10px; font-size: 12px; font-weight: 700; cursor: pointer; display: block; text-align: center; }

/* ===== Category colors (rotates through this palette) ===== */
.cat-0 { color: #D8432E; } .cat-1 { color: #185FA5; } .cat-2 { color: #993556; }
.cat-3 { color: #3B6D11; } .cat-4 { color: #0F6E56; } .cat-5 { color: #BA7517; }
.cat-6 { color: #7F4FBF; } .cat-7 { color: #1D7A99; }

/* ===== Footer ===== */
.site-footer { background: #3B1752; padding: 20px 40px; margin-top: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.site-footer span, .site-footer a { color: #C9B8D4; font-size: 12px; }

/* ===== Single post ===== */
.single-post-wrap { max-width: 1080px; margin: 0 auto; background: #fff; padding: 32px; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.single-post-wrap .featured-image img { width: 100%; height: auto; display: block; object-fit: contain; }
.single-post-wrap .tag { margin-bottom: 12px; }
.single-post-wrap h1 { font-size: 28px; color: #222; line-height: 1.3; margin-bottom: 10px; }
.single-post-wrap .meta { font-size: 12px; color: #888; margin-bottom: 20px; }
.single-post-wrap .featured-image { border-radius: 10px; overflow: hidden; margin-bottom: 24px; }
.single-post-wrap .entry-content { font-size: 16px; line-height: 1.75; color: #333; }
.single-post-wrap .entry-content p { margin-bottom: 1.2em; }

@media (max-width: 1000px) {
  .layout-grid, .hero-grid, .news-grid, .commerce-grid { grid-template-columns: 1fr; }
}

/* ===== Dropdown do menu ===== */
.main-nav ul.sub-menu {
  display: none;
  position: absolute;
  background: #3B1752;
  padding: 10px 0;
  border-radius: 8px;
  min-width: 220px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  z-index: 100;
  max-height: 420px;
  overflow-y: auto;
}
.main-nav li { position: relative; }
.main-nav li:hover > ul.sub-menu { display: block; }
.main-nav ul.sub-menu li { display: block; }
.main-nav ul.sub-menu a {
  display: block;
  padding: 8px 18px;
  white-space: nowrap;
}
.main-nav ul.sub-menu a:hover { background: rgba(255,255,255,0.08); }

/* ===== WooCommerce — loja com a identidade JSTV Sports ===== */
.woocommerce-wrapper { padding-top: 24px; padding-bottom: 40px; }
.woocommerce-wrapper h1.entry-title,
.woocommerce-wrapper h1.page-title { font-size: 24px; font-weight: 700; color: #3B1752; margin-bottom: 20px; padding-left: 12px; border-left: 4px solid #FBCE3C; }

/* Grade de produtos (página da loja) */
.woocommerce ul.products { display: grid !important; grid-template-columns: repeat(4, 1fr); gap: 20px; list-style: none; margin: 0; padding: 0; }
.woocommerce ul.products li.product { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.08); padding: 0 !important; text-align: left !important; width: 100% !important; float: none !important; margin: 0 !important; clear: none !important; }
.woocommerce ul.products li.product img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 0 !important; margin: 0 !important; }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 14px; font-weight: 600; color: #222; padding: 12px 14px 0; }
.woocommerce ul.products li.product .price { padding: 4px 14px 14px; color: #D8432E; font-weight: 700; font-size: 15px; }
.woocommerce ul.products li.product .button { margin: 0 14px 14px; width: calc(100% - 28px); }

/* Botões (adicionar ao carrinho, finalizar compra, etc.) */
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button,
.woocommerce #respond input#submit, .woocommerce-page a.button,
.woocommerce #place_order, .woocommerce a.checkout-button {
  background: #FBCE3C !important; color: #5C3A0A !important; border: none !important;
  border-radius: 8px !important; font-weight: 700 !important; padding: 12px 24px !important;
  text-transform: none !important; box-shadow: none !important; transition: background .15s;
}
.woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover,
.woocommerce #place_order:hover { background: #e8ba28 !important; color: #5C3A0A !important; }

/* Preço em qualquer contexto */
.woocommerce .price, .woocommerce ins .amount { color: #D8432E; font-weight: 700; }

/* Mensagens (adicionado ao carrinho, erros, avisos) */
.woocommerce-message, .woocommerce-info, .woocommerce-noticе, .woocommerce-error {
  background: #EFEAE3 !important; border-top-color: #3B1752 !important; color: #333 !important;
  border-radius: 8px; padding: 14px 20px !important;
}
.woocommerce-message::before, .woocommerce-info::before { color: #3B1752 !important; }

/* Página de produto individual */
.woocommerce div.product {
  background: #fff; border-radius: 12px; padding: 32px;
  box-shadow: 0 2px 10px rgba(59,23,82,0.08); border: 1px solid #EEE;
}
.woocommerce div.product::after { content: ""; display: table; clear: both; }

.woocommerce div.product div.images { padding-right: 24px; box-sizing: border-box; }
.woocommerce div.product div.images .woocommerce-product-gallery__wrapper,
.woocommerce div.product div.images .woocommerce-product-gallery__image--placeholder {
  border-radius: 10px; overflow: hidden; background: #F4F1EC; border: 1px solid #EEE;
}
.woocommerce div.product div.images img { border-radius: 10px; }

.woocommerce div.product div.summary { padding-left: 8px; box-sizing: border-box; }
.woocommerce div.product .product_title {
  color: #3B1752; font-size: 26px; font-weight: 700; line-height: 1.3; margin-bottom: 14px;
  padding-left: 12px; border-left: 4px solid #FBCE3C;
}
.woocommerce div.product p.price, .woocommerce div.product span.price {
  color: #D8432E !important; font-size: 24px !important; font-weight: 700 !important; margin-bottom: 18px; display: block;
}
.woocommerce div.product form.cart { display: flex; align-items: center; gap: 12px; margin-bottom: 24px !important; }
.woocommerce div.product form.cart .quantity { margin: 0 !important; }
.woocommerce div.product form.cart .quantity input {
  border: 1px solid #ddd; border-radius: 8px; padding: 12px; width: 64px; text-align: center; font-size: 14px;
}
.woocommerce div.product form.cart .button { margin: 0 !important; }

.woocommerce div.product .product_meta { font-size: 12px; color: #888; padding-top: 16px; border-top: 1px solid #F0F0F0; }
.woocommerce div.product .product_meta a { color: #3B1752; font-weight: 600; }

.woocommerce div.product .woocommerce-tabs { clear: both; margin-top: 32px; }
.woocommerce div.product .woocommerce-tabs ul.tabs { border: none !important; padding: 0 !important; margin-bottom: 0 !important; }
.woocommerce div.product .woocommerce-tabs ul.tabs li {
  background: none !important; border: none !important; border-bottom: 2px solid transparent !important;
  border-radius: 0 !important; margin: 0 20px 0 0 !important; padding: 0 !important;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li a { color: #888 !important; font-weight: 600 !important; padding: 10px 0 !important; }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active { border-bottom-color: #FBCE3C !important; }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a { color: #3B1752 !important; }
.woocommerce div.product .woocommerce-tabs ul.tabs li::before,
.woocommerce div.product .woocommerce-tabs ul.tabs li::after { display: none !important; }
.woocommerce div.product .woocommerce-tabs .panel { border-top: 1px solid #F0F0F0 !important; padding-top: 20px !important; }

@media (max-width: 780px) {
  .woocommerce div.product div.images, .woocommerce div.product div.summary { float: none !important; width: 100% !important; padding: 0 !important; }
  .woocommerce div.product div.images { margin-bottom: 20px; }
}

/* Carrinho e checkout — tabelas e formulários */
.woocommerce table.shop_table { border: none; border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.woocommerce table.shop_table th { background: #3B1752; color: #fff; font-weight: 600; }
.woocommerce table.shop_table td { border-top: 1px solid #f0f0f0; }

.woocommerce-checkout input.input-text, .woocommerce-checkout select,
.woocommerce form .form-row input.input-text, .woocommerce form .form-row select {
  border: 1px solid #ddd !important; border-radius: 8px !important; padding: 10px !important; font-family: inherit;
}
.woocommerce-checkout #order_review, .woocommerce-checkout-review-order-table {
  background: #fff; border-radius: 12px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* Minha conta */
.woocommerce-MyAccount-navigation ul { list-style: none; padding: 0; background: #fff; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); overflow: hidden; }
.woocommerce-MyAccount-navigation ul li a { display: block; padding: 12px 18px; color: #3B1752; text-decoration: none; border-bottom: 1px solid #f0f0f0; }
.woocommerce-MyAccount-navigation ul li.is-active a { background: #FBCE3C; color: #5C3A0A; font-weight: 700; }

@media (max-width: 1000px) {
  .woocommerce ul.products { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ===== WooCommerce Blocks (Carrinho e Checkout novos) ===== */
.wc-block-checkout, .wc-block-cart { font-family: inherit; }
.wc-block-checkout h2, .wc-block-cart h2,
.wc-block-components-checkout-step__title { color: #3B1752 !important; font-size: 18px !important; font-weight: 700 !important; }

/* Campos de formulário */
.wc-block-components-text-input input,
.wc-block-components-address-form input,
.wc-block-components-address-form select,
.wc-block-components-text-input select {
  border: 1px solid #ddd !important; border-radius: 8px !important;
  padding: 26px 12px 8px !important; min-height: 56px;
  font-family: inherit !important; font-size: 14px !important; box-sizing: border-box !important;
}
.wc-block-components-text-input label {
  color: #888 !important; font-size: 12px !important; line-height: 14px !important; top: 6px !important; transform: none !important;
}

/* Botões principais (Finalizar pedido, Continuar pra finalização) */
.wc-block-components-checkout-place-order-button,
.wc-block-cart__submit-button,
.wc-block-components-button:not(.is-link) {
  background: #FBCE3C !important; color: #5C3A0A !important; border: none !important;
  border-radius: 8px !important; font-weight: 700 !important; padding: 14px 24px !important;
  box-shadow: none !important; text-transform: none !important;
}
.wc-block-components-checkout-place-order-button:hover,
.wc-block-cart__submit-button:hover,
.wc-block-components-button:not(.is-link):hover { background: #e8ba28 !important; color: #5C3A0A !important; }

/* Resumo do pedido (lateral) */
.wc-block-components-sidebar,
.wc-block-components-order-summary,
.wc-block-cart__totals-title {
  background: #fff; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.wc-block-components-totals-item__value,
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
  color: #D8432E !important; font-weight: 700 !important;
}
.wc-block-components-product-name { color: #222 !important; font-weight: 600 !important; }

/* Avisos e mensagens (ex: "Não há métodos de pagamento") */
.wc-block-components-notice-banner {
  border-radius: 8px !important; border-left-width: 4px !important;
}
.wc-block-components-notice-banner.is-error { border-color: #D8432E !important; background: #FBE9E7 !important; }
.wc-block-components-notice-banner.is-info { border-color: #3B1752 !important; background: #EFEAE3 !important; }

/* Painel expansível (Adicionar cupom) */
.wc-block-components-panel__button { color: #3B1752 !important; font-weight: 600 !important; }

/* Radios de método de pagamento/frete */
.wc-block-components-radio-control__input:checked + .wc-block-components-radio-control__label-group,
.wc-block-components-radio-control__option.checked { border-color: #3B1752 !important; }
.wc-block-components-radio-control__input:checked { accent-color: #3B1752 !important; }

/* Itens do carrinho */
.wc-block-cart-item__product-name { color: #222 !important; font-weight: 600 !important; }
.wc-block-cart-item__total .wc-block-components-formatted-money-amount { color: #D8432E !important; font-weight: 700 !important; }

/* ===== Página de campeonato ===== */
.campeonato-banner {
  background-color: #3B1752; background-size: cover; background-position: center;
  border-radius: 14px; padding: 40px; margin-bottom: 28px;
}
.campeonato-banner h1 { color: #fff; font-size: 26px; font-weight: 700; margin-bottom: 6px; }
.campeonato-banner p { color: #E8DCEF; font-size: 13px; }
.campeonato-box { background: #fff; border-radius: 12px; padding: 20px 24px; margin-bottom: 28px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.campeonato-box table { width: 100%; border-collapse: collapse; font-size: 13px; }
.campeonato-box table th { background: #3B1752; color: #fff; padding: 8px 10px; text-align: left; }
.campeonato-box table td { padding: 8px 10px; border-bottom: 1px solid #f0f0f0; }

/* ===== Lista compacta "Mais matérias" ===== */
.more-list { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.more-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid #f0f0f0; }
.more-item:last-child { border-bottom: none; }
.more-thumb { width: 52px; height: 52px; border-radius: 6px; background: #3B1752; flex-shrink: 0; overflow: hidden; display: block; }
.more-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.more-info { min-width: 0; }
.more-title { display: block; font-size: 13px; color: #222; line-height: 1.35; }
.more-date { display: block; font-size: 11px; color: #888; margin-top: 3px; }

/* ===== Página de busca ===== */
.search-page-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 20px; }
.search-page-form input[type="search"] {
  flex: 1 1 240px; border: 1px solid #ddd; border-radius: 8px; padding: 12px 14px; font-size: 14px; font-family: inherit;
}
.search-page-form select,
.search-page-form input[type="date"] {
  border: 1px solid #ddd; border-radius: 8px; padding: 11px 10px; font-size: 13px; font-family: inherit; color: #444;
}
.search-date-label { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #888; }
.search-page-form button {
  background: #3B1752; color: #fff; border: none; border-radius: 8px; padding: 0 20px; height: 42px;
  font-size: 14px; font-weight: 600; cursor: pointer;
}
.search-page-form button:hover { background: #4d1f6b; }
.search-results-count { font-size: 13px; color: #888; margin-bottom: 20px; }

.search-clear-btn {
  color: #888; font-size: 13px; text-decoration: underline; padding: 0 6px;
  display: inline-flex; align-items: center; height: 42px;
}
.search-clear-btn:hover { color: #3B1752; }

/* ===== Slogan + redes sociais no cabeçalho ===== */
.header-social { display: flex; align-items: center; gap: 16px; margin-left: auto; margin-right: 90px; }
.header-tagline { color: #C9B8D4; font-size: 20px; }
.header-social-divider { width: 1px; height: 20px; background: #5C3A78; }
.header-social a { color: #fff; display: flex; align-items: center; opacity: 0.85; transition: opacity 0.15s; }
.header-social svg { width: 32px !important; height: 32px !important; }
.header-social a:hover { opacity: 1; }
@media (max-width: 780px) {
  .header-tagline, .header-social-divider { display: none; }
}
