/*
 Theme Name:   TPTrue
 Description:  Standalone theme for shop.tptrue.com (no page builder). Physical and digital products on WooCommerce.
 Author:       TPTrue
 Version:      1.0.0
 Requires PHP: 8.2
 Text Domain:  tptrue
*/

/* Page frames (header.php, footer.php, page.php):
   - #tp-content.tp-content          every page's <main>
   - .tp-prose                       plain pages (policy, contact...): readable text column
   - .tp-section > .tp-container     checkout / thank-you: logo bar, then .tp-section-body with the Woo shortcode
   Checkout: assets/css/checkout.css. Thank-you: assets/css/thankyou.css, inc/thankyou.php. */

/* ---------- Base (replaces the page builder's reset) ---------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
}
body {
    margin: 0;
    background: #fff;
    color: #1f3147;
    font-family: "Google Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.3;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
:where(a) {
    color: currentColor;
    text-decoration: none;
}
:where(h1, h2, h3, h4, h5, h6) {
    margin: 0;
    line-height: 1.4;
}
img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
    border-style: none;
}
svg:not([width]) {
    min-width: 1em;
}
:where(button, input, select, textarea) {
    margin: 0;
    font: inherit;
    text-align: inherit;
}
:where(button) {
    padding: 0;
    border: none;
    cursor: pointer;
}
:where(table) {
    width: 100%;
}
.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Frames ---------- */

.tp-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}
.tp-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 1440px;
    max-width: 100%;
    margin-inline: auto;
    padding-inline: 20px;
}
.tp-section-body {
    width: 100%;
}

/* WooCommerce appends a "View cart" link after AJAX add-to-cart buttons; our buttons turn into
   "Trong giỏ hàng" links instead (assets/js/home.js), so the extra link is hidden. */
.added_to_cart.wc-forward {
    display: none;
}

.woocommerce-checkout .optional {
    display: none;
}

/* Inline SVG icons (inc/icons.php): sized by font-size, coloured by currentColor */
.tp-icon {
    display: inline-block;
    flex: none;
    width: 1em;
    height: 1em;
    vertical-align: -0.125em;
}

/* [tp_contact] on the "Liên hệ" page */
.tp-contact {
    display: grid;
    gap: 12px;
    margin: 24px 0;
    padding: 0;
    list-style: none;
}
.tp-contact li {
    display: flex;
    gap: 16px;
    align-items: baseline;
}
.tp-contact__label {
    min-width: 64px;
    color: #6b7384;
}
.tp-contact a {
    color: #155dff;
    font-weight: 500;
}

/* ---------- Plain pages (policy, contact): readable column like the shop pages ----------
   Class selectors only (no IDs), so page-specific stylesheets such as my-account.css win easily. */
.tp-prose {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: 56px 24px 96px;
    font-size: 16px;
    line-height: 1.7;
    color: #1f3147;
}
.tp-prose > h1:first-child {
    margin: 0 0 24px;
    font-size: clamp(32px, 3.6vw, 44px);
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -0.02em;
}
.tp-prose h2 {
    margin: 40px 0 12px;
    font-size: 22px;
    font-weight: 500;
    line-height: 1.3;
}
.tp-prose :where(p, ul, ol) {
    margin: 0 0 16px;
}
.tp-prose :where(ul, ol) {
    padding-left: 24px;
}
.tp-prose hr {
    margin: 32px 0;
    border: 0;
    border-top: 1px solid #e6ebf5;
}
.tp-prose a {
    color: #155dff;
}
@media (max-width: 767px) {
    .tp-prose {
        padding: 32px 16px 64px;
    }
}
