/* ── Responsive: 768px ── */
@media (max-width: 768px) {
    /* Header */
    .taf-header-inner {
        height: 64px;
    }

    .taf-logo img {
        height: 40px;
        max-width: 200px;
    }

    .taf-header-actions {
        gap: 0.25rem;
    }

    .taf-cart {
        padding: 0.4rem;
    }

    .taf-cart svg {
        width: 20px;
        height: 20px;
    }

    .taf-cart-count {
        min-width: 16px;
        height: 16px;
        font-size: 10px;
        line-height: 16px;
        top: -1px;
        right: -4px;
    }

    .taf-nav {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(10, 10, 10, 0.97);
        padding: 5rem 2rem 2rem;
        z-index: 9999;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .taf-nav.is-open {
        display: flex;
    }

    .taf-nav ul {
        flex-direction: column;
        gap: 0;
        text-align: center;
        width: 100%;
        max-width: 300px;
    }

    .taf-nav a {
        display: block;
        padding: 1.25rem 0;
        font-size: 1.2rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        color: #ffffff;
    }

    .taf-nav a::after {
        display: none;
    }

    .taf-nav a:hover {
        color: var(--color-cyan);
    }

    .taf-nav-toggle {
        display: block;
        z-index: 10000;
    }

    .taf-nav-toggle.is-open span {
        background: #fff;
    }

    .taf-nav-toggle.is-open span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .taf-nav-toggle.is-open span:nth-child(2) {
        opacity: 0;
    }

    .taf-nav-toggle.is-open span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    /* Pages: hero */
    .taf-hero h1 {
        font-size: 2rem;
    }

    .taf-hero p {
        font-size: 1rem;
    }

    .taf-services-grid {
        grid-template-columns: 1fr;
    }

    .taf-features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .taf-contact-grid {
        grid-template-columns: 1fr;
    }

    /* Pages: about */
    .taf-about-grid,
    .taf-about-services {
        grid-template-columns: 1fr;
    }

    /* Pages: policy */
    .taf-policy-grid {
        grid-template-columns: 1fr;
    }

    /* Footer */
    .taf-footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 0;
    }

    .taf-footer-brand {
        grid-column: 1 / -1;
        padding: 0 0 1.5rem;
        margin-bottom: 1rem;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    }

    .taf-footer-col {
        border-right: none;
        padding: 1rem 1rem 1rem 0;
    }

    .taf-footer-col:nth-child(even) {
        padding-left: 1rem;
    }

    /* WooCommerce: shop grid */
    .woocommerce ul.products {
        grid-template-columns: 1fr 1fr;
    }

    /* WooCommerce: single product */
    .woocommerce div.product {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .woocommerce div.product div.images img {
        max-height: 400px;
        object-fit: cover;
    }

    .woocommerce div.product .woocommerce-tabs ul.tabs {
        flex-wrap: wrap;
    }

    .woocommerce div.product .woocommerce-tabs ul.tabs li a {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }

    /* WooCommerce: cart table — card layout on mobile (scoped to cart page only) */
    .woocommerce-cart table.shop_table,
    .woocommerce-cart table.shop_table thead,
    .woocommerce-cart table.shop_table tbody,
    .woocommerce-cart table.shop_table tr,
    .woocommerce-cart table.shop_table th,
    .woocommerce-cart table.shop_table td {
        display: block;
        width: 100%;
    }

    .woocommerce-cart table.shop_table {
        border: none;
        border-radius: 0;
        overflow: visible;
    }

    .woocommerce-cart table.shop_table thead {
        display: none;
    }

    .woocommerce-cart table.shop_table tr {
        padding: 1rem;
        margin-bottom: 0.75rem;
        border: 1px solid var(--color-border);
        border-radius: var(--radius);
        position: relative;
    }

    .woocommerce-cart table.shop_table td {
        border: none;
        padding: 0;
        text-align: left;
    }

    /* Remove button — top right */
    .woocommerce-cart table.shop_table td.product-remove {
        position: absolute;
        top: 0.75rem;
        right: 0.75rem;
        width: auto;
    }

    /* Thumbnail + name — inline row */
    .woocommerce-cart table.shop_table td.product-thumbnail {
        display: inline-block;
        width: 64px;
        vertical-align: top;
        margin-right: 12px;
    }

    .woocommerce-cart table.shop_table td.product-thumbnail img {
        width: 64px;
        height: 64px;
        border-radius: 4px;
    }

    .woocommerce-cart table.shop_table td.product-name {
        display: inline-block;
        width: calc(100% - 100px);
        vertical-align: top;
        padding-right: 24px;
        margin-bottom: 8px;
        font-size: 0.9rem;
    }

    /* Price / Qty / Subtotal — inline row */
    .woocommerce-cart table.shop_table td.product-price,
    .woocommerce-cart table.shop_table td.product-quantity,
    .woocommerce-cart table.shop_table td.product-subtotal {
        display: inline-block;
        width: auto;
        padding: 4px 16px 4px 0;
        font-size: 0.85rem;
        vertical-align: top;
    }

    .woocommerce-cart table.shop_table td.product-price::before {
        content: 'Price ';
        font-size: 0.75rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.3px;
        color: var(--color-text-light);
        display: block;
    }

    .woocommerce-cart table.shop_table td.product-quantity::before {
        content: 'Qty ';
        font-size: 0.75rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.3px;
        color: var(--color-text-light);
        display: block;
    }

    .woocommerce-cart table.shop_table td.product-subtotal::before {
        content: 'Subtotal ';
        font-size: 0.75rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.3px;
        color: var(--color-text-light);
        display: block;
    }

    .woocommerce-cart table.shop_table td.product-subtotal {
        font-weight: 700;
    }

    .woocommerce-cart table.shop_table img {
        width: 64px;
        height: 64px;
    }

    /* Cart totals — compact on mobile */
    .woocommerce .cart-collaterals .cart_totals {
        padding: 1rem;
        max-width: 100%;
        border-radius: var(--radius);
    }

    /* Space above checkout buttons */
    .woocommerce .wc-proceed-to-checkout {
        margin-top: 1.5rem;
    }

    .woocommerce .cart-collaterals .cart_totals table {
        border: none;
    }

    .woocommerce .cart-collaterals .cart_totals table,
    .woocommerce .cart-collaterals .cart_totals table tbody {
        display: block;
        border: none;
    }

    .woocommerce .cart-collaterals .cart_totals table tr {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        border: none;
        padding: 0.6rem 0;
        margin: 0;
    }

    .woocommerce .cart-collaterals .cart_totals table th,
    .woocommerce .cart-collaterals .cart_totals table td {
        display: inline;
        padding: 0;
        border: none;
        background: none;
        width: auto;
    }

    .woocommerce .cart-collaterals .cart_totals table th {
        text-align: left;
    }

    .woocommerce .cart-collaterals .cart_totals table td {
        text-align: right;
    }

    /* Remove order-total border on mobile */
    .woocommerce .cart-collaterals .cart_totals tr.order-total {
        border-top: none;
        padding-top: 0.6rem;
    }

    /* Shipping row — stack since it has multiple options */
    .woocommerce .cart-collaterals .cart_totals .shipping {
        flex-wrap: wrap;
    }

    .woocommerce .cart-collaterals .cart_totals .shipping td {
        width: 100%;
        text-align: left;
        margin-top: 6px;
    }



    /* WooCommerce: checkout */
    .woocommerce form.checkout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .woocommerce form.checkout #customer_details,
    .woocommerce form.checkout #order_review_heading,
    .woocommerce form.checkout #order_review {
        grid-column: 1;
        grid-row: auto;
        position: static;
    }

    /* Checkout order review — clean table on mobile */
    .woocommerce #order_review {
        padding: 1rem;
    }

    .woocommerce #order_review table.shop_table {
        border: none;
        border-radius: 0;
        overflow: visible;
    }

    /* Checkout order review — mobile cleanup */
    .woocommerce #order_review {
        padding: 1rem;
    }

    /* Fix bullet indent */
    .woocommerce #order_review table.shop_table td.product-name ul {
        padding-left: 1.25rem;
        margin: 0;
    }

    /* ── Checkout order review tfoot — keep table layout to align with thead/tbody ── */
    .woocommerce #order_review table.shop_table tfoot th,
    .woocommerce #order_review table.shop_table tfoot td {
        padding: 0.4rem 0;
        border: none;
        background: none;
    }

    .woocommerce #order_review table.shop_table tfoot td {
        text-align: right;
    }

    .woocommerce #order_review table.shop_table tfoot th {
        font-size: 0.85rem;
        font-weight: 500;
        color: var(--color-text-light);
    }

    /* Separators — border-bottom on BOTH th and td for full-width lines */
    .woocommerce #order_review table.shop_table tfoot tr.cart-subtotal th,
    .woocommerce #order_review table.shop_table tfoot tr.cart-subtotal td {
        padding-bottom: 0.6rem;
        border-bottom: 1px solid var(--color-border);
    }

    .woocommerce #order_review table.shop_table tfoot tr.shipping th,
    .woocommerce #order_review table.shop_table tfoot tr.shipping td {
        padding-bottom: 0.6rem;
        border-bottom: 1px solid var(--color-border);
    }

    .woocommerce #order_review table.shop_table tfoot tr.fee th,
    .woocommerce #order_review table.shop_table tfoot tr.fee td {
        padding-bottom: 0.6rem;
        border-bottom: 1px solid var(--color-border);
    }


    /* Shipping — options left-aligned */
    .woocommerce #order_review table.shop_table tfoot .shipping td {
        text-align: left;
    }

    .woocommerce #order_review .woocommerce-shipping-methods li label {
        white-space: normal;
    }

    /* WooCommerce: my account — stack vertically */
    .woocommerce-account .woocommerce {
        flex-direction: column;
    }

    .woocommerce-account .woocommerce-MyAccount-navigation {
        width: 100%;
        margin-bottom: 2rem;
    }

    .woocommerce-account .woocommerce-MyAccount-navigation ul {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .woocommerce-account .woocommerce-MyAccount-navigation ul li {
        margin-bottom: 0;
    }
}

/* ── Responsive: 480px ── */
@media (max-width: 480px) {
    /* WooCommerce: shop grid */
    .woocommerce ul.products {
        grid-template-columns: 1fr;
    }

    /* Pages: hero */
    .taf-hero {
        padding: 3rem 0;
    }

    .taf-hero h1 {
        font-size: 1.75rem;
    }

    .taf-features-grid {
        grid-template-columns: 1fr;
    }

    /* Pages: blog */
    .taf-posts-grid {
        grid-template-columns: 1fr;
    }

    /* Footer: single column */
    .taf-footer-inner {
        grid-template-columns: 1fr;
    }

    .taf-footer-col {
        padding: 1rem 0;
    }

    .taf-footer-col:nth-child(even) {
        padding-left: 0;
    }

    /* WooCommerce: notices — prevent float overlap */
    .woocommerce .woocommerce-message .button,
    .woocommerce .woocommerce-info .button {
        float: none;
        display: inline-block;
        margin-top: 0.5rem;
    }
}
