/* ==========================================================================
   base.css — Yuvraj Jewellers storefront base layer.

   Replaces the live rules that css/custom.css, css/media-query.css and
   css/animations.css used to supply. Those sheets were the original
   snack-brand template: ~60% of their rules targeted markup this site no
   longer has, and the remainder fought css/theme.css on specificity. The
   storefront no longer loads them (see includes/plug_links.php); admin still
   does, unchanged.

   Everything here is mobile-first (min-width queries only) and consumes
   css/tokens.css. Scope is the storefront: admin never loads this file.
   ========================================================================== */

/* ==========================================================================
   1. Document & reset
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    /* `clip` contains overflow without creating a scroll container, so
       position:sticky keeps working (which `overflow-x:hidden` broke). */
    overflow-x: clip;
}

body {
    margin: 0;
    overflow-x: clip;
    text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; height: auto; }

/* The template shipped a hand-built cursor that is commented out in
   includes/footer.php; its elements must never take space if reinstated. */
.cursor-dot, .cursor-outline { display: none; }

/* ==========================================================================
   2. Typography defaults
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 600;
    line-height: var(--lh-heading);
    letter-spacing: var(--ls-heading);
    color: var(--ink);
    margin: 0 0 var(--sp-4);
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }
h5, h6 { font-size: var(--fs-body); }

p { margin: 0 0 var(--sp-4); }

a { color: var(--ink); text-decoration: none; transition: color var(--dur) var(--ease); }
a:hover { color: var(--gold-deep); }

hr { border: 0; border-top: 1px solid var(--line); margin: var(--sp-6) 0; }

/* ==========================================================================
   3. Form controls
   Bootstrap 5 dropped .form-group, which this codebase still uses heavily on
   the account/checkout pages — so it gets its spacing back here.
   ========================================================================== */
.form-group { margin-bottom: var(--sp-4); }

.form-group > label,
.form-label {
    display: block;
    font-size: var(--fs-xs);
    font-weight: 500;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin-bottom: var(--sp-2);
}

.form-control,
.form-select,
input[type="text"], input[type="email"], input[type="tel"],
input[type="password"], input[type="number"], input[type="search"],
select, textarea {
    width: 100%;
    min-height: var(--tap-min);
    padding: var(--sp-3) var(--sp-4);
    font-family: var(--font-sans);
    font-size: var(--fs-sm);
    color: var(--ink);
    background: var(--white);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
    -webkit-appearance: none;
    appearance: none;
}
select {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%2357534c' d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--sp-4) center;
    background-size: 14px;
    padding-right: var(--sp-8);
}
textarea { min-height: 120px; resize: vertical; }

.form-control:focus,
.form-select:focus,
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 162, 39, .16);
}

/* iOS zooms the page when a focused field is under 16px. */
@media (max-width: 767.98px) {
    .form-control, .form-select, input, select, textarea { font-size: 16px; }
}

.form-check { display: flex; align-items: flex-start; gap: var(--sp-2); margin-bottom: var(--sp-2); }
.form-check-input { flex: 0 0 auto; width: 18px; height: 18px; min-height: 0; margin-top: 3px; accent-color: var(--gold-deep); }
.form-check-label { font-size: var(--fs-sm); color: var(--ink-soft); }

/* ==========================================================================
   4. Layout wrappers
   ========================================================================== */
.ts-page-wrapper { position: relative; width: 100%; }

/* Legacy wrapper kept because ~15 pages open with it. It is a horizontal
   gutter only; --theme_side_spacing is 0 and stays that way. */
.theme_side_spacing {
    margin: 0 var(--theme_side_spacing);
    max-width: var(--content-max);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

/* ==========================================================================
   5. Header
   ========================================================================== */
.headerinner { padding: 0; }
.headerinner > .row {
    align-items: center;
    margin: 0;
    padding: var(--sp-3) var(--gutter);
}

.hdr_logo { text-align: center; }
.hdr_logo img { max-height: 54px; width: auto; }

.hdr_nav_section { display: none; }
.hdr_nav_section .navbar { padding: 0; flex-direction: row; gap: var(--sp-6); }
.hdr_nav_section .nav-link {
    font-family: var(--font-sans);
    font-size: var(--fs-xs);
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ink);
    padding: var(--sp-2) 0;
}
.hdr_nav_section .nav-link:hover { color: var(--gold-deep); }

/* Badge colour is set in css/theme.css, which loads after this file. */
.hdr_action_badge { font-family: var(--font-sans); font-weight: 600; }

/* .hdr_marquee / .hdr_top_desc / .hdr_cont are intentionally absent: that
   markup was removed from includes/header.php, not merely hidden. */

/* Centre-out underline on nav links (was .hvr-underline-from-center_acme_dash
   in the template's hover.css fork). */
.hvr-underline-from-center_acme_dash { position: relative; overflow: hidden; }
.hvr-underline-from-center_acme_dash::before {
    content: "";
    position: absolute;
    left: 50%;
    right: 50%;
    bottom: 0;
    height: 1px;
    background: var(--gold);
    transition: left var(--dur) var(--ease), right var(--dur) var(--ease);
}
.hvr-underline-from-center_acme_dash:hover::before,
.hvr-underline-from-center_acme_dash:focus::before { left: 0; right: 0; }

/* ---- Hamburger trigger ----
   The template forced these bars to #fff, which rendered them invisible
   against the white header. They are ink, and sized to a real tap target. */
.hdr_mob_menu_sec { display: flex; justify-content: flex-end; }
.hdr_mob_menu > div {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: var(--tap-min);
    height: var(--tap-min);
    padding: var(--sp-3);
    cursor: pointer;
}
.hdr_mob_menu .bar1,
.hdr_mob_menu .bar2,
.hdr_mob_menu .bar3 {
    width: 22px;
    height: 2px;
    background-color: var(--ink);
    border-radius: 2px;
    transition: transform var(--dur) var(--ease), opacity var(--dur-fast) var(--ease);
}
.hdr_mob_menu .change .bar1 { transform: translateY(7px) rotate(45deg); }
.hdr_mob_menu .change .bar2 { opacity: 0; }
.hdr_mob_menu .change .bar3 { transform: translateY(-7px) rotate(-45deg); }

@media (min-width: 992px) {
    .hdr_nav_section { display: block; }
    .hdr_mob_menu_sec { display: none; }
    .headerinner > .row { padding: var(--sp-5) var(--gutter) var(--sp-3); }
}

/* ==========================================================================
   6. Footer
   ========================================================================== */
.footer_section {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: var(--sp-8) var(--gutter) var(--sp-6);
}
.footer_section h5 {
    font-family: var(--font-sans);
    font-size: var(--fs-xs);
    font-weight: 600;
    letter-spacing: var(--ls-eyebrow);
    text-transform: uppercase;
    color: var(--white);
    margin-bottom: var(--sp-4);
}
.footer_logo { width: auto; max-height: 56px; margin-bottom: var(--sp-4); }
.ftr_address { width: 100%; font-size: var(--fs-sm); color: var(--footer-text); line-height: var(--lh-body); }

.footer_navigation ul { list-style: none; margin: 0; padding: 0; }
.footer_navigation ul li { margin-bottom: var(--sp-2); }
.footer_navigation ul li a {
    font-size: var(--fs-sm);
    color: var(--footer-text);
    display: inline-block;
    padding: var(--sp-1) 0;
}
.footer_navigation ul li a:hover { color: var(--gold-soft); }

.footer_social ul { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--sp-3); }
.footer_social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--footer-line);
    border-radius: var(--radius-pill);
    color: var(--footer-text);
}
.footer_social a:hover { border-color: var(--gold); color: var(--gold-soft); }

/* ==========================================================================
   7. Floating action buttons (positioned by .theme_fab_stack in theme.css)
   ========================================================================== */
.topbtn, .whatsapp { display: flex; align-items: center; justify-content: center; }
.topbtn a, .whatsapp a { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: inherit; }
.whatsapp img { width: 26px; height: 26px; }

/* ==========================================================================
   8. Product listing (products.php)
   Structural only — the visual treatment lives in css/theme.css.
   ========================================================================== */
.products_section { max-width: var(--content-max); margin: 0 auto; padding: var(--sp-6) var(--gutter) var(--sp-8); }

.product_results_wrap { position: relative; min-height: 200px; }
.product_results_wrap.is-loading { opacity: .45; pointer-events: none; }
.product_results_summary { font-size: var(--fs-sm); color: var(--ink-soft); margin-bottom: var(--sp-4); }
.product_results_row { margin-inline: calc(var(--sp-3) * -1); }
.product_grid_col { padding-inline: var(--sp-3); margin-bottom: var(--sp-5); }

/* Wishlist card — was a hardcoded inline style on account-wishlist.php that
   bypassed the token palette. */
.wishlist_card {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: var(--sp-3);
    background: var(--white);
    height: 100%;
}

.product_empty_alert {
    text-align: center;
    padding: var(--sp-8) var(--sp-4);
    color: var(--ink-soft);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
}

.product_filter_bar { display: block; }
.product_filter_bar label {
    display: block;
    font-size: var(--fs-xs);
    font-weight: 500;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin-bottom: var(--sp-2);
}
.product_filter_categories { list-style: none; margin: 0 0 var(--sp-5); padding: 0; }
.product_filter_cat_btn {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: 0;
    padding: var(--sp-2) 0;
    font-size: var(--fs-sm);
    color: var(--ink-soft);
    cursor: pointer;
}
.product_filter_cat_btn:hover { color: var(--gold-deep); }
.product_filter_cat_btn.is-active { color: var(--ink); font-weight: 600; }

.product_filter_actions { display: flex; gap: var(--sp-3); margin-top: var(--sp-4); }
.product_filter_actions .btn { flex: 1 1 auto; min-height: var(--tap-min); }

.product_pagination { display: flex; flex-wrap: wrap; gap: var(--sp-2); justify-content: center; margin-top: var(--sp-7); }
.product_page_link {
    min-width: var(--tap-min);
    min-height: var(--tap-min);
    padding: 0 var(--sp-3);
    background: var(--white);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    color: var(--ink);
    font-size: var(--fs-sm);
    cursor: pointer;
}
.product_page_link:hover:not(:disabled) { border-color: var(--ink); }
.product_page_link.is-active { background: var(--ink); border-color: var(--ink); color: var(--white); }
.product_page_link:disabled { opacity: .4; cursor: not-allowed; }
