/*
Theme Name: Delegation
Theme URI: https://delegation.online
Author: Delegation
Author URI: https://delegation.online
Description: Premium, mobile-first WooCommerce theme for Delegation — boutique home decor, nationwide COD, free shipping in Pakistan.
Version: 1.0.1
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
WC requires at least: 8.0
WC tested up to: 9.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: delegation
*/

/*
This file is the required WordPress theme identifier and loads FIRST
(it is enqueued as a dependency of delegation-main in functions.php),
so it also carries:
  1) a hard reset against horizontal-scroll bugs, and
  2) the core design tokens as a fallback — if main.css ever 404s
     (wrong file permissions, CDN cache miss, etc.) the site still
     has sane colors/spacing instead of unstyled HTML.
Full component styling lives in /assets/css/main.css and reels.css.
*/

:root {
    --color-canvas: #F9F8F6;
    --color-black: #121212;
    --color-gold: #D4AF37;
    --color-divider: #E8E5E0;
    --color-white: #FFFFFF;
    --color-error: #B3261E;

    --font-heading: 'Cinzel', 'Playfair Display', serif;
    --font-body: 'Plus Jakarta Sans', 'Inter', sans-serif;

    --container-max: 1180px;
    --radius-sm: 6px;
    --radius-md: 12px;
    --touch-target: 48px;

    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);

    /* Fluid type scale used across templates so headings never force
       horizontal scroll on narrow viewports — fixed px headings were
       the main source of the "text overlapping" reports on small
       Android widths under 360px. */
    --fs-h1: clamp(1.5rem, 1.1rem + 2.2vw, 3rem);
    --fs-h2: clamp(1.2rem, 1rem + 1vw, 1.7rem);
    --fs-body: clamp(0.95rem, 0.9rem + 0.15vw, 1rem);

    /* Named stacking contexts instead of ad-hoc z-index values
       scattered per template — this is what let the sticky buy bar,
       header, and mini-cart drawer overlap each other before. */
    --z-base: 1;
    --z-sticky-bar: 80;
    --z-header: 100;
    --z-drawer: 200;
    --z-reels: 50;
}

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

html {
    overflow-x: hidden;
    width: 100%;
}

body {
    overflow-x: hidden;
    max-width: 100vw;
    margin: 0;
    background: var(--color-canvas);
    color: var(--color-black);
    font-family: var(--font-body);
    font-size: var(--fs-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Any element that ignores intrinsic sizing (embeds, iframes,
   third-party widgets, WooCommerce shortcode tables) can push page
   width past 100vw even with overflow-x:hidden on body. Clamping
   media/tables directly is the actual fix for sideways scroll on
   product/checkout pages, not just the html/body rule alone. */
img, video, iframe, table, embed, object, svg {
    max-width: 100%;
    height: auto;
}
