/*
Theme Name: Tuấn Vinh – Giàn Phơi
Theme URI: https://gianphoithongminh.org
Author: Tuấn Vinh Shop
Description: Theme hiện đại cho cửa hàng giàn phơi thông minh, cửa lưới chống muỗi, bạt che nắng mưa. Hỗ trợ WooCommerce, tuỳ chỉnh hotline, banner, màu sắc trong Giao diện → Tuỳ biến.
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: tuanvinh
*/

:root{
  --tv-bg:#F4F3EF; --tv-surface:#FFFFFF; --tv-ink:#16201D; --tv-muted:#55605C;
  --tv-line:#E2E3DE; --tv-primary:#1E5A4C; --tv-primary-soft:#E3ECE8; --tv-sale:#A9481B;
  --tv-radius:20px; --tv-ease:cubic-bezier(.22,1,.36,1);
}
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--tv-bg);color:var(--tv-ink);font-family:'Be Vietnam Pro',system-ui,sans-serif;line-height:1.55;font-size:16px}
img{max-width:100%;height:auto;display:block}
a{color:var(--tv-primary)}
a:hover{color:var(--tv-ink)}
h1,h2,h3{line-height:1.15;letter-spacing:-.015em;margin:0}
.tv-container{max-width:1200px;margin:0 auto;padding:0 24px}
.screen-reader-text{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(1px,1px,1px,1px)}
:focus-visible{outline:3px solid var(--tv-primary);outline-offset:3px}

/* Buttons */
.tv-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:0 24px;border-radius:999px;font:inherit;font-weight:600;font-size:15px;text-decoration:none;cursor:pointer;border:1.5px solid transparent;transition:transform .3s var(--tv-ease),box-shadow .3s}
.tv-btn:hover{transform:translateY(-2px);box-shadow:0 10px 24px rgba(22,32,29,.18)}
.tv-btn:active{transform:scale(.98)}
.tv-btn--dark{background:var(--tv-ink);color:#fff}
.tv-btn--dark:hover{color:#fff}
.tv-btn--primary{background:var(--tv-primary);color:#fff}
.tv-btn--primary:hover{color:#fff}
.tv-btn--ghost{background:#fff;border-color:var(--tv-ink);color:var(--tv-ink)}
.tv-btn--light{background:var(--tv-bg);color:var(--tv-ink)}
.tv-btn--block{width:100%;border-radius:12px}

/* Top bar + header */
.tv-topbar{background:var(--tv-ink);color:#E8ECEA;font-size:14px}
.tv-topbar .tv-container{display:flex;flex-wrap:wrap;gap:6px 28px;justify-content:space-between;padding-top:10px;padding-bottom:10px}
.tv-topbar a{color:#fff;font-weight:600;text-decoration:none}
.tv-topbar__phones{display:flex;flex-wrap:wrap;gap:6px 24px}
.tv-header{background:var(--tv-surface);border-bottom:1px solid var(--tv-line);position:sticky;top:0;z-index:50}
.admin-bar .tv-header{top:32px}
.tv-header .tv-container{display:flex;align-items:center;gap:16px 32px;padding-top:16px;padding-bottom:16px;justify-content:space-between}
.tv-brand{display:flex;align-items:center;gap:12px;text-decoration:none;color:var(--tv-ink)}
.tv-brand__mark{width:44px;height:44px;border-radius:12px;background:var(--tv-primary);display:flex;align-items:center;justify-content:center;flex-shrink:0}
.tv-brand__name{font-weight:800;font-size:20px;display:block;line-height:1.15}
.tv-brand__tag{font-size:13px;color:var(--tv-muted);display:block}
.tv-brand .custom-logo{max-height:52px;width:auto}
.tv-nav ul{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:4px 26px}
.tv-nav a{color:var(--tv-ink);text-decoration:none;font-weight:500;font-size:15px}
.tv-nav a:hover,.tv-nav .current-menu-item>a{color:var(--tv-primary)}
.tv-nav .sub-menu{display:none}
.tv-menu-toggle{display:none;background:none;border:1.5px solid var(--tv-line);border-radius:10px;min-width:44px;min-height:44px;cursor:pointer}
@media (max-width:960px){
  .tv-menu-toggle{display:inline-flex;align-items:center;justify-content:center}
  .tv-nav{display:none;width:100%;order:3}
  .tv-nav.is-open{display:block}
  .tv-nav ul{flex-direction:column;gap:0}
  .tv-nav a{display:block;padding:12px 0;border-top:1px solid var(--tv-line)}
  .tv-header .tv-container{flex-wrap:wrap}
  .tv-header__cta{display:none}
}

/* Sections */
.tv-section{padding:80px 0}
.tv-section--white{background:var(--tv-surface)}
.tv-section__head{display:flex;flex-wrap:wrap;gap:16px 24px;justify-content:space-between;align-items:flex-end;margin-bottom:32px}
.tv-kicker{display:block;font-size:14px;font-weight:700;color:var(--tv-primary);margin-bottom:8px}
.tv-h2{font-size:clamp(28px,3.4vw,40px);font-weight:800;max-width:640px}

/* Hero */
.tv-hero .tv-container{display:flex;flex-wrap:wrap;gap:48px;align-items:center;padding-top:72px;padding-bottom:56px}
.tv-hero__text{flex:1 1 460px;min-width:0;display:flex;flex-direction:column;gap:24px}
.tv-pill{align-self:flex-start;font-size:14px;font-weight:600;color:var(--tv-primary);background:var(--tv-primary-soft);padding:6px 14px;border-radius:999px}
.tv-hero h1{font-size:clamp(36px,5vw,58px);line-height:1.08;font-weight:800;letter-spacing:-.02em}
.tv-hero__sub{margin:0;font-size:18px;color:#4A5551;max-width:520px}
.tv-hero__ctas{display:flex;flex-wrap:wrap;gap:12px}
.tv-checks{display:flex;flex-wrap:wrap;gap:12px 28px;font-size:15px;color:#33403B;list-style:none;margin:0;padding:0}
.tv-checks li{display:inline-flex;align-items:center;gap:8px}
.tv-hero__visual{flex:1 1 440px;min-width:0;display:flex}
.tv-stage{flex-grow:1;background:var(--tv-primary-soft);border-radius:28px;padding:28px;border:none;cursor:pointer;font:inherit;color:var(--tv-ink);display:flex;flex-direction:column;align-items:center;gap:12px;transition:transform .5s var(--tv-ease),box-shadow .5s}
.tv-stage:hover{transform:translateY(-4px);box-shadow:0 18px 40px rgba(22,32,29,.12)}
.tv-stage:active{transform:translateY(-1px) scale(.995)}
.tv-stage svg{width:100%;height:auto}
.tv-stage img{width:100%;border-radius:18px;object-fit:cover}
.tv-stage__hint{font-size:14px;font-weight:600;color:var(--tv-primary);background:#fff;padding:8px 16px;border-radius:999px}
@keyframes tvUp{from{opacity:0;transform:translateY(18px)}to{opacity:1;transform:none}}
@keyframes tvSway{0%,100%{transform:rotate(-2.2deg)}50%{transform:rotate(2.2deg)}}
.tv-in{animation:tvUp .9s var(--tv-ease) both}
.tv-in2{animation:tvUp .9s .15s var(--tv-ease) both}
.tv-rack{transition:transform 1.4s cubic-bezier(.65,0,.35,1)}
.is-down .tv-rack{transform:translateY(60px)}
.tv-cables{transform-box:fill-box;transform-origin:50% 0;transition:transform 1.4s cubic-bezier(.65,0,.35,1)}
.is-down .tv-cables{transform:scaleY(1.612)}
.tv-crank{transform-box:view-box;transform-origin:470px 275px;transition:transform 1.4s cubic-bezier(.65,0,.35,1)}
.tv-wire{transition:stroke-dashoffset 1.4s cubic-bezier(.65,0,.35,1)}
.tv-sway{transform-box:fill-box;transform-origin:50% 0;animation:tvSway 5s ease-in-out infinite}
.tv-sway.s2{animation-duration:6s;animation-delay:-1.5s}
.tv-sway.s3{animation-duration:5.5s;animation-delay:-3s}
.tv-sway.s4{animation-duration:6.5s;animation-delay:-2s}

/* Category cards */
.tv-cats{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px;padding-bottom:72px}
.tv-cat{display:flex;flex-direction:column;gap:12px;padding:24px;background:var(--tv-surface);border-radius:var(--tv-radius);border:1px solid var(--tv-line);text-decoration:none;color:var(--tv-ink);transition:transform .4s var(--tv-ease),box-shadow .4s}
.tv-cat:hover{transform:translateY(-4px);box-shadow:0 14px 30px rgba(22,32,29,.10);color:var(--tv-ink)}
.tv-cat strong{font-size:18px}
.tv-cat span{font-size:14px;color:var(--tv-muted)}

/* Product grid */
.tv-tabs{display:flex;flex-wrap:wrap;gap:8px}
.tv-tab{min-height:44px;padding:0 20px;border-radius:999px;border:1.5px solid #CFD2CC;background:#fff;color:var(--tv-ink);font:inherit;font-size:15px;font-weight:500;cursor:pointer}
.tv-tab[aria-selected="true"]{background:var(--tv-ink);border-color:var(--tv-ink);color:#fff;font-weight:600}
.tv-products{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:20px}
.tv-product{display:flex;flex-direction:column;background:var(--tv-bg);border-radius:var(--tv-radius);overflow:hidden;transition:transform .4s var(--tv-ease),box-shadow .4s}
.tv-product:hover{transform:translateY(-4px);box-shadow:0 14px 30px rgba(22,32,29,.10)}
.tv-product[hidden]{display:none}
.tv-product__img{position:relative;aspect-ratio:4/3;background:#E8EAE5;display:flex;align-items:center;justify-content:center;overflow:hidden}
.tv-product__img img{width:100%;height:100%;object-fit:cover;transition:transform .6s var(--tv-ease)}
.tv-product:hover .tv-product__img img{transform:scale(1.04)}
.tv-badge{position:absolute;top:12px;left:12px;background:var(--tv-sale);color:#fff;font-size:13px;font-weight:700;padding:4px 10px;border-radius:999px;z-index:1}
.tv-product__body{padding:18px 20px 20px;display:flex;flex-direction:column;gap:6px;flex-grow:1}
.tv-product__cat{font-size:13px;color:var(--tv-muted)}
.tv-product__title{font-size:17px;font-weight:700;line-height:1.3}
.tv-product__title a{color:var(--tv-ink);text-decoration:none}
.tv-price{font-size:20px;font-weight:800;color:var(--tv-primary)}
.tv-price del{font-size:14px;font-weight:400;color:#6B7571;margin-left:8px}
.tv-price ins{text-decoration:none}
.tv-product .tv-btn{margin-top:auto;border-radius:12px}
.tv-product__foot{margin-top:auto;padding-top:14px}

/* Solutions */
.tv-solutions{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:24px}
.tv-sol{border-radius:28px;padding:36px;display:flex;flex-direction:column;gap:18px}
.tv-sol h3{font-size:28px;font-weight:800}
.tv-sol p{margin:0}
.tv-sol--dark{background:var(--tv-ink);color:#F4F3EF}
.tv-sol--dark p{color:#C9D1CE}
.tv-sol--soft{background:var(--tv-primary-soft)}
.tv-chips{display:flex;flex-wrap:wrap;gap:8px}
.tv-chips span{font-size:14px;padding:6px 14px;border-radius:999px;border:1px solid currentColor;opacity:.85}
.tv-sol .tv-btn{align-self:flex-start;margin-top:8px}

/* Steps */
.tv-steps{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:20px;list-style:none;margin:0;padding:0}
.tv-steps li{display:flex;flex-direction:column;gap:10px;padding-top:20px;border-top:2px solid var(--tv-ink)}
.tv-steps b{color:var(--tv-primary);font-weight:800}
.tv-steps strong{font-size:19px}
.tv-steps span{font-size:15px;color:var(--tv-muted)}

/* Post cards */
.tv-posts{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:24px}
.tv-post{display:flex;flex-direction:column;gap:12px}
.tv-post__img{aspect-ratio:16/10;border-radius:18px;background:#DCDFD9;overflow:hidden;display:flex;align-items:center;justify-content:center;color:var(--tv-muted);font-size:13px}
.tv-post__img img{width:100%;height:100%;object-fit:cover;transition:transform .6s var(--tv-ease)}
.tv-post:hover .tv-post__img img{transform:scale(1.04)}
.tv-post__title{font-size:19px;font-weight:700}
.tv-post__title a{color:var(--tv-ink);text-decoration:none}
.tv-post__meta{font-size:14px;color:var(--tv-muted)}
.tv-post p{margin:0;color:#33403B;font-size:15px}

/* Contact */
.tv-contact{background:var(--tv-primary);color:#fff}
.tv-contact .tv-container{display:flex;flex-wrap:wrap;gap:48px;align-items:flex-start}
.tv-contact__text{flex:1 1 380px;min-width:0;display:flex;flex-direction:column;gap:18px}
.tv-contact__text h2{font-size:clamp(30px,3.6vw,44px);font-weight:800}
.tv-contact__text p{margin:0;font-size:17px;opacity:.85}
.tv-contact__text a{color:#fff;font-weight:700;text-decoration:none;font-size:17px}
.tv-form{flex:1 1 420px;min-width:0;background:#fff;color:var(--tv-ink);border-radius:24px;padding:32px;display:flex;flex-direction:column;gap:18px}
.tv-field{display:flex;flex-direction:column;gap:6px}
.tv-field label{font-size:14px;font-weight:600}
.tv-field input,.tv-field select,.tv-field textarea{min-height:48px;padding:0 14px;border-radius:12px;border:1.5px solid #CFD2CC;font:inherit;font-size:16px;background:#fff;color:var(--tv-ink)}
.tv-field textarea{padding:12px 14px}
.tv-notice{padding:12px 16px;border-radius:12px;font-weight:600;background:var(--tv-primary-soft);color:#123D33}
.tv-notice--error{background:#F3E6DA;color:#6E2F10}

/* Footer */
.tv-footer{background:var(--tv-ink);color:#C9D1CE;padding:56px 0 32px;font-size:15px}
.tv-footer__grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:32px;margin-bottom:40px}
.tv-footer h3{color:#fff;font-size:16px;margin-bottom:10px}
.tv-footer a{color:#fff;text-decoration:none}
.tv-footer ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.tv-footer p{margin:0 0 8px}
.tv-footer__bottom{border-top:1px solid #33403B;padding-top:20px;font-size:14px;color:#A3ADA9}

/* Floating call/zalo */
.tv-float{position:fixed;right:16px;bottom:16px;display:flex;flex-direction:column;gap:10px;z-index:60}
.tv-float a{width:52px;height:52px;border-radius:999px;display:flex;align-items:center;justify-content:center;color:#fff;font-weight:800;font-size:13px;text-decoration:none;box-shadow:0 8px 20px rgba(22,32,29,.25);transition:transform .3s var(--tv-ease)}
.tv-float a:hover{transform:scale(1.08);color:#fff}
.tv-float__call{background:var(--tv-primary)}
.tv-float__zalo{background:#0068FF}

/* Inner pages */
.tv-page{padding:56px 0 80px}
.tv-page__head{margin-bottom:32px}
.tv-page__head h1{font-size:clamp(30px,4vw,46px);font-weight:800}
.tv-entry{max-width:760px;font-size:17px;line-height:1.75}
.tv-entry h2{font-size:28px;margin:1.6em 0 .6em}
.tv-entry h3{font-size:22px;margin:1.4em 0 .5em}
.tv-entry img{border-radius:16px}
.tv-entry blockquote{margin:1.5em 0;padding:4px 20px;border-left:3px solid var(--tv-primary);color:#33403B}
.tv-entry__cover{margin-bottom:32px;border-radius:24px;overflow:hidden}
.tv-pagination{margin-top:40px;display:flex;gap:8px;flex-wrap:wrap}
.tv-pagination .page-numbers{min-width:44px;min-height:44px;display:inline-flex;align-items:center;justify-content:center;border-radius:12px;background:#fff;border:1px solid var(--tv-line);text-decoration:none;color:var(--tv-ink);padding:0 12px}
.tv-pagination .current{background:var(--tv-ink);color:#fff}

/* Breadcrumb */
.tv-breadcrumb{font-size:14px;color:var(--tv-muted);margin-bottom:20px}
.tv-breadcrumb ol{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;align-items:center;gap:4px 0}
.tv-breadcrumb li{display:inline-flex;align-items:center}
.tv-breadcrumb li+li::before{content:"›";margin:0 10px;color:#9AA39F}
.tv-breadcrumb a{color:var(--tv-muted);text-decoration:none}
.tv-breadcrumb a:hover{color:var(--tv-primary);text-decoration:underline}
.tv-breadcrumb [aria-current]{color:var(--tv-ink);font-weight:500}
.tv-breadcrumb--plugin a{color:var(--tv-muted)}

/* WooCommerce touch-ups */
.woocommerce ul.products li.product .price,.woocommerce div.product p.price{color:var(--tv-primary);font-weight:800}
.woocommerce span.onsale{background:var(--tv-sale);border-radius:999px;min-height:auto;line-height:1.6;padding:4px 10px}
.woocommerce a.button,.woocommerce button.button,.woocommerce .single_add_to_cart_button{background:var(--tv-ink)!important;color:#fff!important;border-radius:12px!important;font-weight:600!important;padding:14px 22px!important}
.woocommerce ul.products li.product a img{border-radius:16px}

@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
