/* HiFlyte Theme - Main Styles for non-homepage pages */
/* Color tokens (matching the homepage) */
:root {
    --hf-green: #253f22;
    --hf-yellow: #f2e74d;
    --hf-navy: #172641;
    --hf-cream: #f8f3e7;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { 
    font-family: 'DM Sans', sans-serif; 
    background: var(--hf-cream); 
    color: var(--hf-navy);
}
img { max-width: 100%; display: block; }
a { color: var(--hf-green); }

/* ===== HEADER ===== */
.hiflyte-header {
    background: var(--hf-navy);
    padding: 1.25rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
}
.hiflyte-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}
.hiflyte-header-logo img { height: 50px; width: auto; }
.hiflyte-header-nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}
.hiflyte-header-nav a {
    color: var(--hf-cream);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    position: relative;
    transition: color 0.2s;
}
.hiflyte-header-nav a:hover { color: var(--hf-yellow); }
.hiflyte-cart-count {
    background: var(--hf-yellow);
    color: var(--hf-navy);
    font-size: 0.7rem;
    border-radius: 999px;
    padding: 0.15rem 0.5rem;
    margin-left: 0.4rem;
    font-weight: 700;
    letter-spacing: 0;
}

/* ===== SHOP / WOOCOMMERCE WRAPPER ===== */
.hiflyte-shop-wrapper {
    min-height: 60vh;
    padding: 4rem 1.5rem;
}
.hiflyte-shop-inner {
    max-width: 1200px;
    margin: 0 auto;
}

/* Page heading */
.hiflyte-shop-inner h1,
.hiflyte-shop-inner h2.entry-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2.2rem, 4.5vw, 3.4rem);
    color: var(--hf-green);
    text-align: center;
    margin-bottom: 2.5rem;
    font-weight: 600;
}

/* ===== SHOP / PRODUCT LISTING ===== */
.products {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    padding: 0;
}
.product {
    background: #fff;
    border: 1px solid rgba(37,63,34,0.07);
    text-align: center;
    padding: 1.5rem;
    transition: box-shadow 0.3s, transform 0.3s;
    list-style: none;
}
.product:hover {
    box-shadow: 0 18px 40px rgba(0,0,0,0.12);
    transform: translateY(-4px);
}
.product .woocommerce-loop-product__link {
    text-decoration: none;
    color: inherit;
    display: block;
}
.product img {
    margin: 0 auto 1rem;
    max-width: 100%;
    height: auto;
}
.product .woocommerce-loop-product__title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--hf-green);
    margin: 0.5rem 0;
}
.product .price {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.1rem;
    color: var(--hf-navy);
    font-weight: 600;
    margin-bottom: 1rem;
}

/* "Add to Cart" / general buttons */
.button,
button.alt,
button[type=submit],
.wc-block-components-button,
input.button {
    background: var(--hf-green) !important;
    color: var(--hf-yellow) !important;
    border: none !important;
    border-radius: 999px !important;
    padding: 0.85rem 2rem !important;
    font-family: 'DM Sans', sans-serif !important;
    font-weight: 600 !important;
    letter-spacing: 0.1em !important;
    text-transform: uppercase !important;
    font-size: 0.85rem !important;
    cursor: pointer !important;
    transition: transform 0.25s, box-shadow 0.25s !important;
    text-decoration: none !important;
    display: inline-block !important;
}
.button:hover,
button.alt:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 22px rgba(0,0,0,0.25) !important;
}

/* Ensure ALL WooCommerce buttons (including 'Select options') have centered text */
.button,
button.alt,
button[type=submit],
input.button,
a.button,
.product .button,
.products .button,
.related .button {
    text-align: center !important;
    line-height: 1.2 !important;
    vertical-align: middle !important;
}

/* ===== RELATED PRODUCTS SECTION ===== */
.related.products,
.related-products,
section.related {
    margin-top: 5rem;
    padding-top: 3rem;
    border-top: 1px solid rgba(37,63,34,0.1);
}
.related.products > h2,
.related-products > h2,
section.related > h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    color: var(--hf-green);
    text-align: center;
    margin-bottom: 2rem;
    font-weight: 600;
}

/* Related products grid - centered, well-spaced cards */
.related.products ul.products,
.related-products ul.products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Related product card */
.related.products .product,
.related-products .product {
    background: #fff;
    border: 1px solid rgba(37,63,34,0.07);
    text-align: center;
    padding: 1.5rem 1rem;
    transition: box-shadow 0.3s, transform 0.3s;
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}
.related.products .product:hover,
.related-products .product:hover {
    box-shadow: 0 18px 40px rgba(0,0,0,0.12);
    transform: translateY(-4px);
}
.related.products .product img,
.related-products .product img {
    max-width: 80%;
    height: auto;
    margin: 0 auto;
}
.related.products .product .woocommerce-loop-product__title,
.related-products .product .woocommerce-loop-product__title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    color: var(--hf-green);
    margin: 0.25rem 0;
}
.related.products .product .price,
.related-products .product .price {
    font-size: 1rem;
    color: var(--hf-navy);
    margin-bottom: 0.5rem;
}

/* The 'Select options' / 'Add to cart' button on related cards - properly styled and centered */
.related.products .product .button,
.related-products .product .button {
    margin-top: auto;
    padding: 0.75rem 1.5rem !important;
    font-size: 0.78rem !important;
    width: auto;
    min-width: 160px;
    text-align: center !important;
    display: inline-block !important;
}

/* ===== SINGLE PRODUCT PAGE ===== */
.single-product .product {
    background: transparent;
    border: none;
    padding: 0;
    text-align: left;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}
.single-product .product:hover {
    transform: none;
    box-shadow: none;
}
.single-product .product .woocommerce-product-gallery img {
    margin: 0 auto;
}
.single-product .product_title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--hf-green);
    font-weight: 600;
    margin-bottom: 1rem;
}
.single-product .price {
    font-size: 1.5rem;
    color: var(--hf-navy);
    margin-bottom: 1.5rem;
    font-weight: 600;
}
.single-product .woocommerce-product-details__short-description {
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}

/* ===== CART PAGE ===== */
.woocommerce-cart-form table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}
.woocommerce-cart-form th,
.woocommerce-cart-form td {
    padding: 1rem;
    border-bottom: 1px solid rgba(37,63,34,0.1);
    text-align: left;
}
.woocommerce-cart-form th {
    background: var(--hf-green);
    color: var(--hf-cream);
    font-family: 'DM Sans', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.85rem;
}
.cart_totals {
    background: #fff;
    padding: 2rem;
    margin-top: 2rem;
}
.cart_totals h2 {
    font-family: 'Cormorant Garamond', serif;
    color: var(--hf-green);
    margin-bottom: 1rem;
}

/* ===== CHECKOUT ===== */
.woocommerce-checkout {
    background: #fff;
    padding: 2rem;
    border: 1px solid rgba(37,63,34,0.07);
}
.woocommerce-checkout h3 {
    font-family: 'Cormorant Garamond', serif;
    color: var(--hf-green);
    margin: 1.5rem 0 1rem;
}
.woocommerce-checkout input[type=text],
.woocommerce-checkout input[type=email],
.woocommerce-checkout input[type=tel],
.woocommerce-checkout select,
.woocommerce-checkout textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid rgba(37,63,34,0.2);
    border-radius: 4px;
    font-family: 'DM Sans', sans-serif;
    margin-bottom: 0.5rem;
}

/* Notices */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    background: var(--hf-yellow);
    color: var(--hf-navy);
    padding: 1rem 1.5rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    list-style: none;
}
.woocommerce-error {
    background: #ffd9d9;
}

/* ===== FOOTER ===== */
.hiflyte-footer {
    background: var(--hf-navy);
    color: var(--hf-cream);
    padding: 3rem 1.5rem 2rem;
    text-align: center;
    margin-top: 4rem;
}
.hiflyte-footer-inner {
    max-width: 1100px;
    margin: 0 auto;
}
.hiflyte-footer-logo {
    width: clamp(212px, 29.12vw, 351px);
    height: auto;
    margin: 0 auto 0.5rem;
}
.hiflyte-footer-nav {
    display: flex;
    gap: 1.6rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 1.2rem 0;
}
.hiflyte-footer-nav a {
    color: var(--hf-cream);
    text-decoration: none;
    font-size: 0.88rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.85;
    transition: opacity 0.2s;
}
.hiflyte-footer-nav a:hover {
    opacity: 1;
    color: var(--hf-yellow);
}
.hiflyte-footer-copyright {
    font-size: 0.85rem;
    margin-top: 1rem;
    opacity: 0.85;
}
.hiflyte-footer-copyright a {
    color: var(--hf-cream);
    text-decoration: none;
}
.hiflyte-footer-legal {
    font-size: 0.72rem;
    line-height: 1.7;
    opacity: 0.75;
    max-width: 880px;
    margin: 1.5rem auto 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hiflyte-header-inner { gap: 1rem; }
    .hiflyte-header-logo img { height: 36px; }
    .hiflyte-header-nav { gap: 1rem; }
    .hiflyte-header-nav a { font-size: 0.75rem; letter-spacing: 0.05em; }
    .single-product .product {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}
