/*
Theme Name: Hello Elementor Child
Theme URI: https://example.com
Description: Hello Elementor Child Theme
Author: Your Name
Template: hello-elementor
Version: 1.0.0
*/


/* Your Custom CSS */

/* ------------------------------------------------------------------
   Neutralize hello-elementor (parent) reset.css opinionated styling.

   The parent theme's reset.css force-styles bare <button>, <input> and <a>
   elements (red #c36 border/color, border-radius, padding, etc.). The rules
   below use LOW specificity (element/attribute selectors only) on purpose:

     - They override the parent reset (same specificity, but loaded later
       because hello-child-style depends on the 'hello-elementor' handle).
     - They NEVER override class-based styles. Any element with a class
       (.btn_border, .elementor-button, or your own custom class) keeps full
       control, since a single class (0,1,0) outranks these selectors.

   Result: your custom markup renders neutral and is styled only by your own
   CSS / Elementor, while existing styled components are untouched.
   ------------------------------------------------------------------ */
button,
input[type="button"],
input[type="reset"],
input[type="submit"] {
    -webkit-appearance: none;
    appearance: none;
    background-color: transparent;
    border: none;
    border-radius: 0;
    color: inherit;
    padding: 0;
    font-size: inherit;
    font-weight: inherit;
    line-height: normal;
    text-align: inherit;
    width: auto;
}

button:hover,
button:focus,
input[type="button"]:hover,
input[type="reset"]:hover,
input[type="submit"]:hover {
    background-color: transparent;
    color: inherit;
}

a {
    color: inherit;
}

a:hover,
a:active {
    color: inherit;
}

/* ------------------------------------------------------------------
   Site-wide search popup (triggered by .btn_search in the Elementor
   header/footer). Markup is injected via wp_footer (functions.php) and
   opened/closed in assets/js/public.js. Styled to match the theme:
   primary red (#E5131E), Saira, sharp corners, uppercase submit.
   ------------------------------------------------------------------ */
.velkor-search {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 15vh 20px 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.velkor-search.active {
    opacity: 1;
    visibility: visible;
}

.velkor-search__overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 10, 0.7);
    cursor: pointer;
}

.velkor-search__dialog {
    position: relative;
    width: 100%;
    max-width: 720px;
    background: #fff;
    padding: 40px;
    transform: translateY(-24px);
    transition: transform 0.3s ease;
}

.velkor-search.active .velkor-search__dialog {
    transform: translateY(0);
}

body .velkor-search__close {
    position: absolute;
    top: 12px;
    right: 16px;
    width: 40px;
    height: 40px;
    font-size: 32px;
    line-height: 1;
    color: #0a0a0a;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.3s;
    padding: 0 !important;
}

body .velkor-search__close:hover {
    color: #E5131E;
}

.velkor-search__label {
    display: block;
    font-family: 'Saira', sans-serif;
    font-weight: 600;
    font-size: 22px;
    color: #0a0a0a;
    margin-bottom: 18px;
    text-transform: uppercase;
}

.velkor-search__form {
    display: flex;
    align-items: stretch;
    gap: 0;
}

.velkor-search__input {
    flex: 1;
    min-width: 0;
    height: 60px;
    padding: 0 18px;
    border: 1px solid rgba(10, 10, 10, 0.2);
    background: #fff;
    color: #0a0a0a;
    font-family: 'Saira', sans-serif;
    font-size: 18px;
}

.velkor-search__input:focus {
    border-color: #E5131E;
}

.velkor-search__submit {
    flex-shrink: 0;
    height: 60px;
    padding: 0 32px;
    background-color: #E5131E;
    color: #fff;
    font-family: 'Saira', sans-serif;
    font-weight: 500;
    font-size: 18px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid #E5131E;
}

.velkor-search__submit:hover {
    background-color: #fff;
    color: #0a0a0a;
}

@media (max-width: 600px) {
    .velkor-search {
        padding: 12vh 16px 20px;
        align-items: flex-start;
    }
    .velkor-search__dialog {
        /* Extra top padding so the content clears the close button. */
        padding: 56px 20px 28px;
    }
    body .velkor-search__close {
        top: 8px;
        right: 8px;
        width: 36px;
        height: 36px;
        font-size: 28px;
    }
    .velkor-search__label {
        font-size: 18px;
        margin-bottom: 14px;
    }
    .velkor-search__form {
        flex-direction: column;
        gap: 12px;
    }
    .velkor-search__input {
        height: 52px;
        font-size: 16px;
    }
    .velkor-search__submit {
        height: 52px;
        padding: 0 24px;
        font-size: 16px;
    }
}

/* ------------------------------------------------------------------
   Products mega menu (triggered by hovering .btn_menu in the Elementor
   header). Markup is injected via wp_footer (functions.php); the script
   (assets/js/public.js) moves it into the header, shows it on hover and
   swaps the right-hand product panel when a left-hand category tab is
   clicked. Desktop only — hidden at/below the tablet breakpoint.
   ------------------------------------------------------------------ */
.velkor-mega {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9990;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    pointer-events: none;
}

.velkor-mega.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* Standalone dark backdrop, placed right after the header so it dims every
   section below the bar without covering the header itself. */
.velkor-mega-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9980;
    background: rgba(10, 10, 10, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    pointer-events: none;
}

.velkor-mega-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.velkor-mega__inner {
    position: relative;
    z-index: 1;
    width: 100%;
}

/* The menu box uses the site content width (.content = 1440px): left tabs,
   right product list. */
.velkor-mega__container {
    box-sizing: border-box;
    display: flex;
    align-items: stretch;
    gap: 0;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0;
    min-height: 360px;
    background: #fff;
    border-top: 3px solid #E5131E;
    box-shadow: 0 24px 40px rgba(10, 10, 10, 0.18);
}

@media (max-width: 1500px) {
    .velkor-mega__container {
        padding: 0 40px;
    }
}

.velkor-mega__tabs {
    flex: 0 0 24%;
    max-width: 300px;
    border-right: 1px solid rgba(10, 10, 10, 0.08);
    padding: 16px 0;
}

.velkor-mega__tabs ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.velkor-mega__tab {
    display: block;
    width: 100%;
    margin: 0;
    padding: 11px 26px;
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    font-family: 'Saira', sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.4;
    color: #333;
    text-align: left;
    text-transform: none;
    letter-spacing: normal;
    transition: color 0.2s, background 0.2s;
}

.velkor-mega__tab:hover {
    color: #E5131E;
}

.velkor-mega__tab.active {
    color: #E5131E;
    font-weight: 600;
    background: #F7F7F7;
}

.velkor-mega__panels {
    position: relative;
    flex: 1;
    min-width: 0;
    padding: 28px 32px;
}

.velkor-mega__panel {
    display: none;
}

.velkor-mega__panel.active {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.velkor-mega__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.velkor-mega__card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px;
    background: #fff;
    border: 1px solid rgba(10, 10, 10, 0.08);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.velkor-mega__card:hover {
    border-color: #E5131E;
    box-shadow: 0 8px 20px rgba(10, 10, 10, 0.08);
}

.velkor-mega__thumb {
    flex: 0 0 84px;
    width: 84px;
    height: 66px;
    overflow: hidden;
    background: #F4F4F4;
}

.velkor-mega__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.velkor-mega__meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.velkor-mega__name {
    font-family: 'Saira', sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.35;
    color: #0a0a0a;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.velkor-mega__card:hover .velkor-mega__name {
    color: #E5131E;
}

.velkor-mega__cat {
    font-size: 14px;
    line-height: 1.3;
    color: rgba(10, 10, 10, 0.55);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.velkor-mega__empty {
    margin: 0;
    padding: 40px 0;
    text-align: center;
    color: rgba(10, 10, 10, 0.5);
    font-family: 'Saira', sans-serif;
}

.velkor-mega__all {
    align-self: flex-start;
    font-family: 'Saira', sans-serif;
    font-weight: 600;
    font-size: 15px;
    text-transform: uppercase;
    color: #E5131E;
    letter-spacing: 0.02em;
}

.velkor-mega__all::after {
    content: "\2192";
    margin-left: 8px;
    transition: transform 0.2s;
    display: inline-block;
}

.velkor-mega__all:hover {
    color: #E5131E;
}

.velkor-mega__all:hover::after {
    transform: translateX(4px);
}

@media (max-width: 1024px) {
    /* Below desktop the header collapses to a burger menu; hide the mega menu. */
    .velkor-mega,
    .velkor-mega-overlay {
        display: none !important;
    }
}

/* ------------------------------------------------------------------
   Inquiry toast: shown after adding a product to the basket
   (.inquiry_btn), with a button linking to the inquiry page. Injected
   and controlled in assets/js/public.js. Matches the theme brand.
   ------------------------------------------------------------------ */
.velkor-toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 100000;
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: calc(100vw - 48px);
    padding: 16px 18px;
    background: #fff;
    border-left: 4px solid #E5131E;
    box-shadow: 0 8px 30px rgba(10, 10, 10, 0.18);
    font-family: 'Saira', sans-serif;
    transform: translateY(20px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}

.velkor-toast.show {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.velkor-toast__msg {
    font-size: 16px;
    color: #0a0a0a;
}

.velkor-toast__btn {
    flex-shrink: 0;
    display: inline-block;
    line-height: 40px;
    padding: 0 20px;
    background-color: #E5131E;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    white-space: nowrap;
    border: 1px solid #E5131E;
    transition: all 0.3s;
}

.velkor-toast__btn:hover {
    background-color: #fff;
    color: #0a0a0a;
}

.velkor-toast__close {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    font-size: 22px;
    line-height: 1;
    color: #888;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.3s;
    padding: 0 !important;
}

.velkor-toast__close:hover {
    color: #E5131E;
}

@media (max-width: 600px) {
    .velkor-toast {
        right: 16px;
        left: 16px;
        bottom: 16px;
        max-width: none;
    }
}
