/*
Theme Name:  Flextribe
Theme URI:   https://flextribe.com
Author:      Flextribe Dev
Author URI:  https://flextribe.com
Description: A production-ready custom WordPress + WooCommerce theme for Flextribe Premium Packaging. Built with Tailwind CSS utility classes compiled via CDN (swap for CLI build in production). Fully compatible with Elementor Pro.
Version:     1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License:     GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: flextribe
Tags:        e-commerce, woocommerce, elementor, custom-menu, featured-images, full-width-template, threaded-comments
*/

/* =========================================================
   FLEXTRIBE DESIGN SYSTEM — CSS CUSTOM PROPERTIES
   These drive every color, font, and transition across the
   entire theme. Change once, update everywhere.
   ========================================================= */

:root {
    /* Brand Colors */
    --flex-orange:    #F3924D;
    --flex-orange-dk: #e08442;
    --flex-charcoal:  #414042;
    --flex-charcoal-dk: #2a2a2b;
    --flex-light:     #D1D3D4;
    --flex-white:     #FFFFFF;
    --flex-offwhite:  #F8F9FA;

    /* Typography */
    --font-heading: 'Poppins', sans-serif;
    --font-body:    'Roboto', sans-serif;
    --font-mono:    'JetBrains Mono', monospace;

    /* Spacing scale (mirrors Tailwind) */
    --space-1:  0.25rem;
    --space-2:  0.5rem;
    --space-3:  0.75rem;
    --space-4:  1rem;
    --space-6:  1.5rem;
    --space-8:  2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;

    /* Border radii */
    --radius-sm:  0.75rem;   /* rounded-xl  */
    --radius-md:  1rem;      /* rounded-2xl */
    --radius-lg:  1.5rem;    /* rounded-3xl */
    --radius-xl:  2rem;      /* rounded-[2rem] */
    --radius-2xl: 3rem;      /* rounded-[3rem] */

    /* Shadows */
    --shadow-sm:  0 1px 2px 0 rgba(0,0,0,.05);
    --shadow-md:  0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
    --shadow-lg:  0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);
    --shadow-xl:  0 20px 25px -5px rgba(0,0,0,.1), 0 10px 10px -5px rgba(0,0,0,.04);
    --shadow-orange: 0 10px 15px -3px rgba(243,146,77,.3);

    /* Transitions */
    --transition-fast:   all 0.15s ease;
    --transition-normal: all 0.3s ease;
    --transition-lift:   transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;

    /* Layout */
    --max-width:     80rem;   /* max-w-7xl = 1280px */
    --nav-height:    6rem;    /* h-24 */
    --nav-h-mobile:  5rem;    /* h-20 */
}

/* =========================================================
   GLOBAL RESET & BASE TYPOGRAPHY
   ========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    background-color: var(--flex-offwhite);
    color: var(--flex-charcoal);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    line-height: 1.2;
    margin-top: 0;
    color: var(--flex-charcoal);
}

p {
    font-family: var(--font-body);
    line-height: 1.7;
    margin-top: 0;
}

a {
    color: var(--flex-charcoal);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--flex-orange);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    padding-left: var(--space-6);
}

/* =========================================================
   GLOBAL UTILITY CLASSES
   These mirror the custom Tailwind classes used in templates
   ========================================================= */

.diagonal-bg {
    background: linear-gradient(135deg, #414042 0%, #2a2a2b 100%);
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
}

.image-mask {
    border-radius: 40px 0px 40px 0px;
}

.hover-lift {
    transition: var(--transition-lift);
}
.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

/* Marquee / logo rail animation */
@keyframes marquee {
    0%   { transform: translateX(0%); }
    100% { transform: translateX(-50%); }
}
.animate-marquee {
    animation: marquee 30s linear infinite;
}

/* =========================================================
   NAVIGATION — GLOBAL HEADER
   ========================================================= */

.flextribe-nav {
    position: fixed;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 50;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid rgba(209, 211, 212, 0.2);
    top: 0;
    left: 0;
}

.flextribe-nav .nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-4);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--nav-h-mobile);
}

@media (min-width: 768px) {
    .flextribe-nav .nav-inner {
        height: var(--nav-height);
    }
}

/* Logo mark */
.nav-logo-mark {
    width: 40px;
    height: 40px;
    background-color: var(--flex-charcoal);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    box-shadow: var(--shadow-md);
    transition: background-color 0.3s ease;
    flex-shrink: 0;
}

.nav-logo-wrap:hover .nav-logo-mark {
    background-color: var(--flex-orange);
}

/* Mobile menu (pure CSS toggle) */
#menu-toggle {
    display: none;
}
#mobile-menu {
    display: none;
}
#menu-toggle:checked ~ #mobile-menu {
    display: block;
}

/* =========================================================
   BUTTONS — Global button styles
   ========================================================= */

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    background-color: var(--flex-orange);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
    box-shadow: var(--shadow-orange);
    text-decoration: none;
}
.btn-primary:hover {
    background-color: var(--flex-orange-dk);
    color: white;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    background-color: var(--flex-charcoal);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-decoration: none;
}
.btn-secondary:hover {
    background-color: #000;
    color: white;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    background-color: transparent;
    color: var(--flex-charcoal);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.875rem;
    border: 2px solid var(--flex-charcoal);
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
}
.btn-outline:hover {
    background-color: var(--flex-charcoal);
    color: white;
}

/* =========================================================
   FORMS — Global input / textarea / select styles
   Covers native WP pages, comments, search, etc.
   ========================================================= */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="search"],
textarea,
select {
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: var(--flex-charcoal);
    background-color: var(--flex-offwhite);
    border: 1px solid rgba(209, 211, 212, 0.6);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    width: 100%;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
textarea:focus,
select:focus {
    border-color: var(--flex-orange);
    box-shadow: 0 0 0 4px rgba(243, 146, 77, 0.1);
}

input[type="submit"],
button[type="submit"] {
    font-family: var(--font-heading);
    font-weight: 700;
    background-color: var(--flex-orange);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.875rem;
    transition: background-color 0.2s ease;
}
input[type="submit"]:hover,
button[type="submit"]:hover {
    background-color: var(--flex-orange-dk);
}

label {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--flex-charcoal);
    display: block;
    margin-bottom: var(--space-2);
}

/* Hide number spinners */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type=number] { -moz-appearance: textfield; }

/* =========================================================
   SITE LAYOUT WRAPPERS
   ========================================================= */

#page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#content,
.site-content {
    flex-grow: 1;
}

/* Standard content area padding (used on non-Elementor pages) */
.entry-content {
    max-width: 720px;
    margin: 0 auto;
    padding: calc(var(--nav-height) + var(--space-12)) var(--space-4) var(--space-16);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.8;
    color: var(--flex-charcoal);
}

.entry-content h1 { font-size: 2.5rem; margin-bottom: var(--space-6); }
.entry-content h2 { font-size: 2rem;   margin-bottom: var(--space-4); margin-top: var(--space-8); }
.entry-content h3 { font-size: 1.5rem; margin-bottom: var(--space-3); margin-top: var(--space-6); }
.entry-content h4 { font-size: 1.25rem; margin-bottom: var(--space-2); margin-top: var(--space-4); }
.entry-content p  { margin-bottom: var(--space-4); }
.entry-content a  { color: var(--flex-orange); text-decoration: underline; text-underline-offset: 3px; }
.entry-content ul, .entry-content ol { margin-bottom: var(--space-4); }
.entry-content li { margin-bottom: var(--space-1); }
.entry-content blockquote {
    border-left: 4px solid var(--flex-orange);
    padding: var(--space-4) var(--space-6);
    background: white;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: var(--space-6) 0;
    font-style: italic;
}
.entry-content img {
    border-radius: var(--radius-sm);
    margin: var(--space-6) 0;
}
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: var(--space-6);
}
.entry-content table th {
    background: var(--flex-charcoal);
    color: white;
    font-family: var(--font-heading);
    font-weight: 600;
    padding: var(--space-3) var(--space-4);
    text-align: left;
}
.entry-content table td {
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--flex-light);
}
.entry-content table tr:nth-child(even) td {
    background: var(--flex-offwhite);
}
.entry-content code {
    font-family: var(--font-mono);
    font-size: 0.875em;
    background: var(--flex-offwhite);
    border: 1px solid var(--flex-light);
    border-radius: 4px;
    padding: 2px 6px;
}
.entry-content pre {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    background: var(--flex-charcoal);
    color: white;
    border-radius: var(--radius-sm);
    padding: var(--space-4) var(--space-6);
    overflow-x: auto;
    margin-bottom: var(--space-4);
}
.entry-content pre code {
    background: none;
    border: none;
    padding: 0;
    color: inherit;
}

/* =========================================================
   COMMENTS
   ========================================================= */
.comments-area {
    max-width: 720px;
    margin: 0 auto;
    padding: var(--space-8) var(--space-4);
}
.comments-title,
.comment-reply-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-6);
}
.comment-list {
    list-style: none;
    padding: 0;
}
.comment-body {
    background: white;
    border: 1px solid rgba(209, 211, 212, 0.4);
    border-radius: var(--radius-sm);
    padding: var(--space-6);
    margin-bottom: var(--space-4);
}
.comment-author .fn {
    font-family: var(--font-heading);
    font-weight: 600;
}
.comment-metadata a {
    font-size: 0.75rem;
    color: #9ca3af;
}
.comment-content p { margin-bottom: var(--space-2); }
.reply a {
    font-size: 0.75rem;
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--flex-orange);
}

/* =========================================================
   BREADCRUMBS
   ========================================================= */
.flextribe-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.625rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #9ca3af;
    margin-bottom: var(--space-8);
}
.flextribe-breadcrumbs a {
    color: #9ca3af;
    transition: color 0.2s ease;
}
.flextribe-breadcrumbs a:hover {
    color: var(--flex-charcoal);
}
.flextribe-breadcrumbs span.sep {
    color: var(--flex-light);
}
.flextribe-breadcrumbs span.current {
    color: var(--flex-charcoal);
    font-weight: 600;
}

/* =========================================================
   WOOCOMMERCE — OVERRIDE BASE NOTICES / MESSAGES
   We do more heavy overriding in woocommerce.css
   ========================================================= */

.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.woocommerce-notice {
    font-family: var(--font-body);
    border-radius: var(--radius-sm);
    padding: var(--space-4) var(--space-6);
    margin-bottom: var(--space-4);
    border-left: none;
    display: block;
}
.woocommerce-message {
    background-color: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
}
.woocommerce-info {
    background-color: #eff6ff;
    border: 1px solid #93c5fd;
    color: #1e40af;
}
.woocommerce-error {
    background-color: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    list-style: none;
    padding-left: var(--space-6);
}

/* =========================================================
   PAGINATION
   ========================================================= */
.woocommerce-pagination,
.pagination,
.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    margin-top: var(--space-12);
    flex-wrap: wrap;
}
.woocommerce-pagination ul,
.pagination ul {
    display: flex;
    gap: var(--space-2);
    list-style: none;
    padding: 0;
    margin: 0;
}
.woocommerce-pagination .page-numbers,
.pagination .page-numbers,
.nav-links .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.8125rem;
    color: var(--flex-charcoal);
    background: white;
    border: 1px solid rgba(209, 211, 212, 0.5);
    transition: var(--transition-fast);
    text-decoration: none;
}
.woocommerce-pagination .page-numbers:hover,
.pagination .page-numbers:hover {
    background: var(--flex-charcoal);
    color: white;
    border-color: var(--flex-charcoal);
}
.woocommerce-pagination .page-numbers.current,
.pagination .page-numbers.current {
    background: var(--flex-orange);
    color: white;
    border-color: var(--flex-orange);
}

/* =========================================================
   FOOTER
   ========================================================= */
.flextribe-footer {
    background-color: var(--flex-charcoal);
    color: white;
    padding-top: var(--space-20);
    padding-bottom: var(--space-10);
    margin-top: auto;
    border-top: 8px solid var(--flex-orange);
}

/* =========================================================
   ELEMENTOR OVERRIDES
   Fix Elementor default spacing conflicts
   ========================================================= */
.elementor-page .site-main,
.elementor-page .entry-content {
    padding: 0;
    max-width: none;
    margin: 0;
}

.elementor-section.elementor-top-section {
    margin-top: 0;
}

/* Ensure first Elementor section clears fixed nav */
.elementor-page .elementor-top-section:first-child {
    padding-top: var(--nav-height) !important;
}

/* =========================================================
   ACCESSIBILITY
   ========================================================= */
:focus-visible {
    outline: 2px solid var(--flex-orange);
    outline-offset: 2px;
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* =========================================================
   PRINT STYLES
   ========================================================= */
@media print {
    .flextribe-nav,
    .flextribe-footer,
    #mobile-menu {
        display: none !important;
    }
    body {
        background: white;
        color: black;
    }
}
