/* =========================================================
   MasterTech Store Styles (cps_eshop)
   - Modern typography (Inter)
   - Professional 2-row Navbar
   - RTL friendly
   - Works with Bootstrap 4 (Frappe/ERPNext v14)
========================================================= */

/* -----------------------------
   0) Base + Variables
----------------------------- */
:root {
    --mt-font: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;

    --mt-bg: #ffffff;
    --mt-surface: rgba(255, 255, 255, .92);
    --mt-text: #0f172a;
    /* slate-900 */
    --mt-muted: rgba(15, 23, 42, .65);

    --mt-border: rgba(15, 23, 42, .10);
    --mt-border-strong: rgba(15, 23, 42, .14);

    --mt-primary: #2563eb;
    /* blue-600 */
    --mt-primary-soft: rgba(37, 99, 235, .10);

    --mt-radius: 18px;
    --mt-radius-sm: 14px;

    --mt-shadow-sm: 0 8px 24px rgba(15, 23, 42, .08);
    --mt-shadow-md: 0 16px 40px rgba(15, 23, 42, .12);

    --mt-nav-h: 64px;
    --mt-gap: 12px;

    --mt-focus: 0 0 0 4px rgba(37, 99, 235, .14);
}

html,
body {
    font-family: var(--mt-font);
    color: var(--mt-text);
    background: var(--mt-bg);
}

a {
    color: inherit;
}

a:hover {
    color: inherit;
    text-decoration: none;
}

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

/* Slightly better container spacing on small screens */
@media (max-width: 767px) {
    .container {
        padding-left: 14px;
        padding-right: 14px;
    }
}

/* Optional: smoother general feel */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* -----------------------------
   1) Navbar (2 rows)
----------------------------- */
.mt-navbar {
    background: var(--mt-surface);
    border-bottom: 1px solid var(--mt-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 1030;
}

.mt-nav-wrap {
    display: flex;
    flex-direction: column;
}

/* Rows */
.mt-nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--mt-gap);
}

.mt-nav-top {
    min-height: var(--mt-nav-h);
    padding: 10px 0;
}

.mt-nav-bottom {
    padding: 8px 0 10px;
    border-top: 1px solid rgba(15, 23, 42, .06);
}

/* -----------------------------
   1.1 Brand
----------------------------- */
.mt-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    white-space: nowrap;
}

.mt-brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    letter-spacing: .5px;
    color: #fff;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    box-shadow: 0 12px 28px rgba(15, 23, 42, .18);
}

.mt-brand-text {
    display: inline-flex;
    flex-direction: column;
    line-height: 1.05;
}

.mt-brand-text strong {
    font-weight: 900;
    font-size: 14.5px;
}

.mt-brand-text span {
    font-weight: 600;
    font-size: 12px;
    color: var(--mt-muted);
}

/* -----------------------------
   1.2 Search (pro)
----------------------------- */
.mt-search {
    flex: 1;
    max-width: 620px;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 220px;
}

.mt-search-box {
    flex: 1;
    position: relative;
}

.mt-search-input {
    width: 100%;
    height: 44px;
    border-radius: var(--mt-radius);
    border: 1px solid var(--mt-border);
    background: rgba(15, 23, 42, .02);
    padding: 0 44px 0 14px;
    outline: none;
    font-weight: 600;
}

.mt-search-input::placeholder {
    color: rgba(15, 23, 42, .45);
    font-weight: 600;
}

.mt-search-input:focus {
    border-color: rgba(37, 99, 235, .45);
    box-shadow: var(--mt-focus);
    background: #fff;
}

.mt-search-ico {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    opacity: .55;
    pointer-events: none;
    font-size: 16px;
}

html[dir="rtl"] .mt-search-input {
    padding: 0 14px 0 44px;
}

html[dir="rtl"] .mt-search-ico {
    right: auto;
    left: 12px;
}

.mt-search-btn {
    height: 44px;
    border-radius: var(--mt-radius);
    border: 1px solid rgba(37, 99, 235, .25);
    background: var(--mt-primary-soft);
    color: var(--mt-text);
    font-weight: 800;
    padding: 0 16px;
    transition: transform .08s ease, background .2s ease, border-color .2s ease;
}

.mt-search-btn:hover {
    background: rgba(37, 99, 235, .14);
    border-color: rgba(37, 99, 235, .35);
}

.mt-search-btn:active {
    transform: translateY(1px);
}

/* لو انت عايز تشيل السيرش من الـ Navbar بالكامل:
   شيل التعليق من السطرين الجايين */
/*
.mt-search{ display: none !important; }
.mt-nav-top{ gap: 10px; }
*/

/* -----------------------------
   1.3 Actions (Lang / Account / Cart)
----------------------------- */
.mt-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.mt-btn {
    border-radius: var(--mt-radius);
    padding: 10px 12px;
    font-weight: 800;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform .08s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}

.mt-btn-ghost {
    border: 1px solid var(--mt-border);
    background: #fff;
    color: var(--mt-text);
}

.mt-btn-ghost:hover {
    border-color: var(--mt-border-strong);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
}

.mt-btn-primary {
    border: 1px solid rgba(37, 99, 235, .25);
    background: var(--mt-primary-soft);
}

.mt-btn-primary:hover {
    border-color: rgba(37, 99, 235, .35);
    background: rgba(37, 99, 235, .14);
    box-shadow: 0 10px 24px rgba(37, 99, 235, .14);
}

.mt-btn:active {
    transform: translateY(1px);
}

/* Dropdown polish (Bootstrap 4 dropdown-menu) */
.mt-navbar .dropdown-menu {
    border-radius: 16px;
    border: 1px solid var(--mt-border);
    box-shadow: var(--mt-shadow-sm);
    padding: 8px;
    margin-top: 10px;
}

.mt-navbar .dropdown-item {
    border-radius: 12px;
    padding: 10px 12px;
    font-weight: 700;
}

.mt-navbar .dropdown-item:hover {
    background: rgba(15, 23, 42, .04);
}

/* Cart */
.mt-cart {
    position: relative;
    border-radius: var(--mt-radius);
    padding: 10px 12px;
    border: 1px solid var(--mt-border);
    background: #fff;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
}

.mt-cart:hover {
    border-color: var(--mt-border-strong);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
}

.mt-cart-ico {
    font-size: 18px;
    opacity: .9;
}

/* Badge align with ERPNext cart count */
.mt-cart .shopping-badge,
#cart-count {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    background: var(--mt-primary);
    color: #3e19c5;
    position: static !important;
}

/* -----------------------------
   1.4 Categories Row
----------------------------- */
.mt-cats {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.mt-cat-item {
    position: relative;
}

.mt-cat-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 999px;
    /* pills */
    text-decoration: none;
    font-weight: 900;
    font-size: 13px;
    color: var(--mt-text);
    transition: background .2s ease, transform .08s ease;
    background: transparent;
}

.mt-cat-link:hover {
    background: rgba(15, 23, 42, .05);
}

.mt-cat-link:active {
    transform: translateY(1px);
}

/* Make dropdowns look nicer */
.mt-nav-bottom .dropdown-menu {
    min-width: 220px;
}

.mt-nav-bottom .dropdown-toggle::after {
    margin-left: 8px;
    opacity: .7;
}

html[dir="rtl"] .mt-nav-bottom .dropdown-toggle::after {
    margin-left: 0;
    margin-right: 8px;
}

/* Active link style (optional) */
.mt-cat-link.is-active {
    background: rgba(37, 99, 235, .12);
    border: 1px solid rgba(37, 99, 235, .22);
}

/* -----------------------------
   1.5 Responsive behavior
----------------------------- */
@media (max-width: 991px) {
    .mt-search {
        max-width: 480px;
    }
}

@media (max-width: 767px) {

    /* Top row stacks better on mobile */
    .mt-nav-top {
        flex-wrap: wrap;
        gap: 10px;
        padding: 10px 0 8px;
    }

    .mt-brand {
        flex: 1;
    }

    .mt-actions {
        gap: 8px;
    }

    .mt-search {
        order: 3;
        width: 100%;
        max-width: 100%;
    }

    .mt-nav-bottom {
        padding-top: 6px;
    }

    .mt-cats {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 6px;
        -webkit-overflow-scrolling: touch;
    }

    .mt-cats::-webkit-scrollbar {
        height: 6px;
    }

    .mt-cats::-webkit-scrollbar-thumb {
        background: rgba(15, 23, 42, .15);
        border-radius: 999px;
    }
}

/* -----------------------------
   2) Small Global Enhancements
   (makes layout feel more modern)
----------------------------- */
.page-container,
.web-page-content,
.page_content {
    font-family: var(--mt-font);
}

/* Buttons polishing (Bootstrap 4) */
.btn {
    border-radius: 14px;
    font-weight: 800;
}

.btn:focus {
    box-shadow: var(--mt-focus);
}

/* Inputs polishing */
.form-control {
    border-radius: 14px;
    border-color: var(--mt-border);
}

.form-control:focus {
    border-color: rgba(37, 99, 235, .45);
    box-shadow: var(--mt-focus);
}

/* Cards feel nicer */
.card {
    border-radius: 18px;
    border-color: rgba(15, 23, 42, .08);
}

/* -----------------------------
   3) Footer placeholder (optional)
   (لو هتزبطه بعدين)
----------------------------- */
.mt-footer {
    border-top: 1px solid var(--mt-border);
    background: #fff;
    padding: 28px 0;
    color: var(--mt-muted);
}

/* -----------------------------
   4) Utility
----------------------------- */
.mt-hide {
    display: none !important;
}