/* ---------- Global Styles Bricomol ---------- */

::selection { background-color: var(--color-text); color: #fff; }

/* Global scrollbar styling */
* {
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 transparent;
}

*::-webkit-scrollbar { width: 6px; height: 6px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 3px; }

body {
    font-family: var(--font-family);
    font-weight: var(--font-weight-medium);
    font-size: 16px;
    line-height: 1.5;
    color: var(--color-text);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-top: 80px;
}

html.sidebar-is-open { overflow: hidden; }
html { scroll-behavior: auto; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
.section { margin-bottom: 40px; }
.height-auto { height: auto; }

.fullscreen-overlay {
    display: none;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.4);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1050;
}

/* ---- Side Panel (Cart / Favorites) ---- */
.side-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    height: 100vh;
    background: #fff;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform .3s ease;
    box-shadow: -4px 0 24px rgba(0,0,0,.08);
}

.side-panel.active { transform: translateX(0); }

.side-panel_header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #E5E7EB;
    flex-shrink: 0;
}

.side-panel_title {
    font-weight: var(--font-weight-semibold);
    font-size: 18px;
    margin: 0;
}

.side-panel_header .header-ico--close {
    flex-shrink: 0;
    margin-left: auto;
}

.side-panel_body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
}

.side-panel_empty {
    text-align: center;
    color: #9CA3AF;
    font-size: 15px;
    padding: 40px 0;
}

.side-panel_footer {
    border-top: 1px solid #E5E7EB;
    padding: 16px 24px;
    flex-shrink: 0;
}

.side-panel_total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
}

.side-panel_total strong {
    font-weight: var(--font-weight-bold);
    font-size: 18px;
}

/* Side panel product item */
.side-panel-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #F0F2F3;
    position: relative;
}

.side-panel-item_img {
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #F9FAFB;
}

.side-panel-item_img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.side-panel-item_info {
    flex: 1;
    min-width: 0;
}

.side-panel-item_name {
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    color: var(--color-text);
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-decoration: none;
    max-width: 90%;
}

.side-panel-item_name:hover { color: var(--color-green-main); }

.side-panel-item_price {
    font-size: 14px;
    font-weight: var(--font-weight-semibold);
    color: var(--color-text);
}

.side-panel-item_price-old {
    font-size: 12px;
    color: #9CA3AF;
    text-decoration: line-through;
    font-weight: var(--font-weight-regular);
}

.side-panel-item_price-sale {
    color: var(--color-rose);
}

.side-panel-item_remove {
    position: absolute;
    top: 12px;
    right: 0;
    background: none;
    border: none;
    color: #9CA3AF;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.side-panel-item_remove:hover { color: var(--color-rose); }

/* Favorite button heart icons */
.btn-fav .heart-outline { display: block; }
.btn-fav .heart-filled { display: none; color: var(--color-rose); }
.btn-fav.active .heart-outline { display: none; }
.btn-fav.active .heart-filled { display: block; }

/* ---------- Bootstrap-like Utilities ---------- */

/* Display */
.d-none        { display: none !important; }
.d-block       { display: block !important; }
.d-flex        { display: flex !important; }
.d-inline      { display: inline !important; }
.d-inline-flex { display: inline-flex !important; }

/* Flex */
.flex-row       { flex-direction: row !important; }
.flex-column    { flex-direction: column !important; }
.flex-wrap      { flex-wrap: wrap !important; }
.flex-nowrap    { flex-wrap: nowrap !important; }
.align-items-center   { align-items: center !important; }
.align-items-start    { align-items: flex-start !important; }
.align-items-end      { align-items: flex-end !important; }
.justify-content-center  { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-end     { justify-content: flex-end !important; }
.flex-1 { flex: 1 !important; }

/* Spacing */
.m-0  { margin: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 3rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.ms-auto { margin-left: auto !important; }
.me-auto { margin-right: auto !important; }
.me-2 { margin-right: 0.5rem !important; }

.p-0  { padding: 0 !important; }
.p-3  { padding: 1rem !important; }
.p-4  { padding: 1.5rem !important; }
.pb-0 { padding-bottom: 0 !important; }
.pb-1 { padding-bottom: 0.25rem !important; }
.pb-3 { padding-bottom: 1rem !important; }
.pb-5 { padding-bottom: 3rem !important; }
.pt-2 { padding-top: 0.5rem !important; }
.pt-3 { padding-top: 1rem !important; }
.px-2 { padding-left: 0.5rem !important; padding-right: 0.5rem !important; }
.px-3 { padding-left: 1rem !important; padding-right: 1rem !important; }
.py-2 { padding-left: 0.5rem !important; padding-right: 0.5rem !important; }
.py-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
.py-5 { padding-top: 3rem !important; padding-bottom: 3rem !important; }
.pe-2 { padding-right: 0.5rem !important; }
.pe-3 { padding-right: 1rem !important; }
.pe-5 { padding-right: 3rem !important; }

/* Gap */
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }

/* Text */
.text-center { text-align: center !important; }

/* Misc */
.col   { flex: 1 0 0% !important; }
.col-auto { flex: 0 0 auto !important; width: auto !important; }
.p-relative { position: relative !important; }

/* ---- Responsive Display: lg (≥992px) ---- */
@media (min-width: 992px) {
    .d-lg-none  { display: none !important; }
    .d-lg-block { display: block !important; }
    .d-lg-flex  { display: flex !important; }
}

/* ---- Responsive Display: xl (≥1200px) ---- */
@media (min-width: 1200px) {
    .d-xl-none  { display: none !important; }
    .d-xl-block { display: block !important; }
    .d-xl-flex  { display: flex !important; }
}

/* ---- Responsive ---- */
@media (max-width: 767px) {
    .section { margin-bottom: 24px; padding-left: 4%; padding-right: 4%; }
    .home-hero_wrapper { padding-left: 4%; padding-right: 4%; }
    .categories { padding-left: 4%; padding-right: 4%; }
    .brands-section { padding-left: 4%; padding-right: 4%; }
    .articles-section { padding-left: 4%; padding-right: 4%; }
    .footer_main { padding-left: 4%; padding-right: 4%; }
    .side-panel {
        width: 100%;
    }
}

/* ---- Responsive: md (768–1450px) ---- */
@media (min-width: 768px) and (max-width: 1450px) {
    .section, 
    .home-hero_wrapper, 
    .brands-section, 
    .articles-section, 
    .footer_main, 
    .categories_title, 
    .categories_grid, 
    .footer_bottom, 
    .deskcat_layout {
        padding: 0 10px;
    }
}

@media (min-width: 1200px) {
    body { padding-top: 116px; }
    .container-xl { max-width: calc(1448px + var(--bs-gutter-x)); }
    .section { margin-bottom: 60px; }
}

/* ---------- Toast Notifications ---------- */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 420px;
    width: calc(100% - 40px);
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 4px 24px rgba(0,0,0,0.12), 0 1px 4px rgba(0,0,0,0.08);
    animation: toastSlideIn 0.35s ease forwards, toastFadeOut 0.4s ease 5s forwards;
    opacity: 0;
    transform: translateX(40px);
    font-size: 14px;
    line-height: 1.4;
    border-left: 4px solid #9CA3AF;
}

.toast--success { border-left-color: #16A34A; }
.toast--error   { border-left-color: #DC2626; }
.toast--warning { border-left-color: #F59E0B; }
.toast--info    { border-left-color: #2563EB; }

.toast_icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.toast_message {
    flex: 1;
    color: var(--color-text, #1F2937);
}

.toast_close {
    flex-shrink: 0;
    background: none;
    border: none;
    font-size: 18px;
    line-height: 1;
    color: #9CA3AF;
    cursor: pointer;
    padding: 0 0 0 8px;
}

.toast_close:hover { color: #374151; }

@keyframes toastSlideIn {
    to { opacity: 1; transform: translateX(0); }
}

@keyframes toastFadeOut {
    to { opacity: 0; transform: translateX(40px); pointer-events: none; }
}
