/*
 * File: /assets/css/base/global.css
 * Description: This is the foundational stylesheet for the entire Priceyoo theme.
 * It sets CSS variables, base typography, layout, and default styles for common HTML elements.
 */

/* ==========================================================================
   1. CSS Variables (Root Configuration)
   ========================================================================== */
:root {
    /* Colors */
    --py-primary-color: #C8102E; /* Main brand color */
    --py-primary-dark: #a20d24;  /* For hover states */
    --py-primary-rgb: 200, 16, 46; /* For rgba() usage */
    
    --py-secondary-color: #1a202c; /* Dark color for footer/text */
    --py-accent-color: #f5af19;    /* Accent color for highlights */
    
    --py-text-color: #2d3748;      /* Main body text */
    --py-text-light: #718096;     /* Lighter text for meta info */
    --py-border-color: #e2e8f0;   /* Default border color */
    
    --py-bg-color: #f7fafc;        /* Page background */
    --py-card-bg: #ffffff;        /* Background for cards/widgets */

    /* Typography */
    --py-font-primary: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --py-font-secondary: 'Poppins', sans-serif; /* For headings if needed */
    
    /* Spacing & Layout */
    --py-container-width: 1200px;
    --py-border-radius: 8px;
}

/* ==========================================================================
   2. Base Resets & Body Defaults
   ========================================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--py-font-primary);
    font-size: 16px;
    line-height: 1.7;
    color: var(--py-text-color);
    background-color: var(--py-bg-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   3. Global Layout
   ========================================================================== */
.container {
    max-width: var(--py-container-width);
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* Full-width container for heroes/special sections */
.container-fluid {
    width: 100%;
    padding-left: 20px;
    padding-right: 20px;
}

/* ==========================================================================
   4. Typography (Headings, Links, Paragraphs)
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 0.75em;
    font-family: var(--py-font-secondary);
    font-weight: 700;
    line-height: 1.3;
    color: var(--py-secondary-color);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-top: 0;
    margin-bottom: 1.25em;
}

a {
    color: var(--py-primary-color);
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

a:hover {
    color: var(--py-primary-dark);
}


/* ==========================================================================
   5. Default Element Styling (Buttons, Forms, Tables, Lists)
   ========================================================================== */

/* --- Buttons --- */
.button,
button,
input[type="button"],
input[type="reset"],
input[type="submit"] {
    display: inline-block;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--py-font-primary);
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: var(--py-border-radius);
    transition: all 0.2s ease-in-out;
}

.button-primary,
button.button-primary,
input[type="submit"] {
    background-color: var(--py-primary-color);
    color: #fff;
}

.button-primary:hover,
button.button-primary:hover,
input[type="submit"]:hover {
    background-color: var(--py-primary-dark);
    color: #fff;
}

/* --- Forms --- */
input[type="text"],
input[type="email"],
input[type="search"],
input[type="password"],
textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--py-border-color);
    border-radius: var(--py-border-radius);
    font-family: var(--py-font-primary);
    font-size: 1rem;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="search"]:focus,
input[type="password"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--py-primary-color);
    box-shadow: 0 0 0 2px rgba(var(--py-primary-rgb), 0.2);
}

/* --- Lists --- */
ul, ol {
    margin: 0 0 1.5em 1.5em;
    padding: 0;
}

/* --- Tables --- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5em;
}

th, td {
    padding: 12px;
    border: 1px solid var(--py-border-color);
    text-align: left;
}

th {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* ==========================================================================
   6. WordPress Core Styles & Helper Classes
   ========================================================================== */
.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 !important;
    width: 1px;
    word-wrap: normal !important;
}