/* ==========================================================================
   site-ui.css  (2026-11-19)  -  storefront polish layer
   Loaded LAST in Areas/Website/Views/Shared/_Head.cshtml, so it refines
   style.css / responsive.css without editing them.

   Fixes seen on screenshots:
   - content touched the screen edges (theme: .section .container-xxl {padding:0})
   - 7 product cards squeezed in one row with uneven image heights
   - category menu stretched edge to edge
   - brand logos of different sizes
   ========================================================================== */

:root {
    --site-ink: #2b1416;            /* brand dark maroon used by buttons */
    --site-text: #1d1d1f;
    --site-muted: #6b6f76;
    --site-line: #ececef;
    --site-soft: #f5f5f7;
    --site-radius: 12px;
    --site-gutter: clamp(16px, 3.2vw, 48px);
    --site-max: 1440px;
}

/* ---------- Page width + side margins (every section, header, footer) -- */
.section .container-xxl,
.section .container-xxl.p-0,
.section .container-xxl.p-lg-0,
.header-section .container-xxl.p-0,
.header-menu-part .container-xxl.p-0,
.footer-section .container-xxl,
footer .container-xxl {
    max-width: var(--site-max) !important;
    padding-left: var(--site-gutter) !important;
    padding-right: var(--site-gutter) !important;
    margin-left: auto; margin-right: auto;
}
.header-menu-part { padding-left: 0 !important; padding-right: 0 !important; }
/* product rows sit OUTSIDE the container in the markup - give them the same width */
.products-cursol-box {
    max-width: var(--site-max); margin-left: auto; margin-right: auto;
    padding-left: var(--site-gutter); padding-right: var(--site-gutter);
}

/* ---------- Header ---------------------------------------------------- */
.header_panel { background: #fff; }
.header_panel .top-header-box { padding: 14px 0; }
.header_panel .site-logo .logo-img img,
.header_panel .site-logo img {
    height: 28px; width: auto; max-width: 212px;
    image-rendering: -webkit-optimize-contrast;   /* sharper small PNG logo until an SVG is supplied */
}
.header-middle .search-box { border-radius: 10px; overflow: hidden; border: 1px solid var(--site-line); box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.header-middle .search-box .search-category,
.header-middle .search-box .search-input { border: 0 !important; }
.header-middle .search-box .search-category { border-right: 1px solid var(--site-line) !important; }

/* category menu: grouped in the centre instead of stretched edge to edge */
.header-menu-part { border-top: 1px solid var(--site-line); border-bottom: 1px solid var(--site-line); }
.navbar-expand-lg .navbar-nav {
    justify-content: center !important;
    gap: clamp(1.25rem, 3.5vw, 3.25rem);
}
.header-menu-part .nav-link {
    font-size: .8125rem !important; font-weight: 600 !important; letter-spacing: .12em; text-transform: uppercase;
    padding: 14px 2px !important; position: relative; color: var(--site-text) !important;
}
.header-menu-part .nav-link::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 2px;
    background: var(--site-ink); transform: scaleX(0); transition: transform .2s ease;
}
.header-menu-part .nav-item:hover > .nav-link::after,
.header-menu-part .nav-link.active::after { transform: scaleX(1); }

/* ---------- Section rhythm + titles -------------------------------------- */
.products-slider-section { padding-top: clamp(32px, 4vw, 56px) !important; padding-bottom: clamp(16px, 2vw, 24px) !important; }
.section-title.top-title {
    display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem;
    margin-bottom: 20px !important; padding-bottom: 12px; border-bottom: 1px solid var(--site-line);
}
.section-title.top-title h2,
.section-title.top-title h3 { margin: 0 !important; line-height: 1; }
.section-title.top-title .view-btn {
    font-size: .8125rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
    border-bottom: 1.5px solid currentColor; border-radius: 0; padding: 0 0 2px !important;
}

/* ---------- Product rows: 5 visible, swipe / scroll for more -------------- */
.homepage_product_grid {
    display: grid !important;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 4 * 20px) / 5);
    gap: 20px !important;
    overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding-left: 0;
    padding-bottom: 4px;
    /* no visible scrollbar - the left / right arrows (site-ui.js) do the scrolling; phones swipe */
    scrollbar-width: none; -ms-overflow-style: none;
}
.homepage_product_grid::-webkit-scrollbar { display: none; height: 0; }
.homepage_product_grid > div { flex: none !important; min-width: 0; scroll-snap-align: start; }
@media (max-width: 1199.98px) { .homepage_product_grid { grid-auto-columns: calc((100% - 3 * 18px) / 4); gap: 18px !important; } }
@media (max-width: 991.98px)  { .homepage_product_grid { grid-auto-columns: calc((100% - 2 * 16px) / 3); gap: 16px !important; } }
@media (max-width: 575.98px)  { .homepage_product_grid { grid-auto-columns: 44%; gap: 12px !important; } }

/* ---------- Row arrows (added by site-ui.js) -------------------------------- */
.ui-row-slider { position: relative; }
.ui-row-arrow {
    position: absolute; top: var(--arrow-top, 38%); transform: translateY(-50%); z-index: 4;
    width: 44px; height: 44px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: #fff; color: var(--site-text); border: 1px solid var(--site-line);
    box-shadow: 0 6px 18px rgba(16, 24, 40, .14); font-size: 1.05rem; cursor: pointer;
    transition: opacity .2s, background-color .15s, color .15s;
}
.ui-row-arrow.prev { left: -22px; }
.ui-row-arrow.next { right: -22px; }
.ui-row-arrow:hover:not(:disabled) { background: var(--site-ink); color: #fff; border-color: var(--site-ink); }
.ui-row-arrow:disabled { opacity: 0; pointer-events: none; }
.ui-row-slider.no-overflow .ui-row-arrow { display: none; }
@media (max-width: 767.98px) { .ui-row-arrow { display: none; } }   /* phones: swipe */

/* ---------- Product card -------------------------------------------------- */
.product-card { display: flex; flex-direction: column; height: 100%; background: #fff; }
.product-card .product-img {
    position: relative; aspect-ratio: 3 / 4; overflow: hidden;
    background: var(--site-soft) !important; border-radius: var(--site-radius);
}
.product-card .product-img > img,
.product-card .product-img a > img {
    width: 100%; height: 100% !important; object-fit: cover; display: block;
    transition: transform .45s ease;
}
.product-card:hover .product-img > img,
.product-card:hover .product-img a > img { transform: scale(1.04); }
.product-card .product_page_tags_absolute { position: absolute; top: 10px; right: 10px; z-index: 2; }
.product-card .wishlist-icon {
    width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .92);
    display: inline-flex !important; align-items: center; justify-content: center;
    box-shadow: 0 1px 3px rgba(16, 24, 40, .12); transition: transform .15s;
}
.product-card .wishlist-icon:hover { transform: scale(1.08); }
.product-card .product_information { padding: 12px 2px 4px; display: flex; flex-direction: column; flex: 1; }
.product-card .product-title {
    font-size: 1.05rem !important; line-height: 1.2 !important; margin: 0 0 4px !important;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-card .product-title a { color: var(--site-text); }
.product-card .product-title a:hover { color: var(--site-ink); text-decoration: underline; text-underline-offset: 3px; }
.product-card .product_short_desc {
    font-size: .82rem !important; color: var(--site-muted) !important; line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 6px;
}
.product-card .product_price_scetion { margin-top: auto; }

/* ---------- Banners: inset with rounded corners -------------------------- */
.sales-banner-section .container-xxl > *:first-child { border-radius: 16px; overflow: hidden; }

/* ---------- Brand strip: same height, calm until hover -------------------- */
.brand-section .brand_slide img,
.brand-cursol-slider .brand_slide img {
    max-height: 56px !important; width: auto !important; max-width: 150px; object-fit: contain;
    filter: grayscale(1); opacity: .7; transition: filter .2s, opacity .2s;
}
.brand-section .brand_slide:hover img,
.brand-cursol-slider .brand_slide:hover img { filter: none; opacity: 1; }

/* ---------- Footer -------------------------------------------------------- */
footer .footer-menu a, .footer-section .footer-menu a { transition: color .15s; }
footer .footer-menu a:hover, .footer-section .footer-menu a:hover { color: var(--site-ink); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Product page: "Buy it now" is the main action --------------- */
#btnAddToBuyItNow { background: var(--site-ink) !important; color: #fff !important; border-color: var(--site-ink) !important; }
#btnAddToBuyItNow:hover { filter: brightness(1.15); }

/* ---------- Small screens ------------------------------------------------- */
.section-title.top-title .view-btn { white-space: nowrap; }
@media (max-width: 767.98px) {
    /* theme puts the search absolutely at right:0 with fixed min-widths -> it overflowed.
       Keep it in the menu row, between the menu button and the right margin. */
    .header-middle { left: 84px !important; right: var(--site-gutter) !important; width: auto !important; top: 77px !important; }
    .header-middle .search-box { height: 40px !important; }
    .header-middle .search-box { width: 100% !important; }
    .header-middle .search-category { max-width: 92px !important; min-width: 0 !important; font-size: .8rem; }
    .header-middle .search-input { min-width: 0 !important; flex: 1 1 auto; width: 100%; }
    .section-title.top-title h2, .section-title.top-title h3 { font-size: 1.6rem !important; }
}

/* ---------- Buttons: consistent, with focus ring --------------------------- */
.btn.offer-btn, .btn.view-btn, .btn.add-to-cart-btn, .btn.buy-now-btn { border-radius: 8px; }
a:focus-visible, button:focus-visible, .btn:focus-visible, input:focus-visible, select:focus-visible {
    outline: 2px solid var(--site-ink); outline-offset: 2px;
}

/* ---------- Product list: brand name text (replaces the fixed "Alaseef" logo) --- */
/* brand sits on its own line above the product name, so it is never cut off */
.product_title_sec:has(.product_brand_name) { flex-direction: column-reverse; align-items: flex-start; gap: 2px; }
.product_brand_name {
    display: block; font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    color: var(--site-muted); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}

/* footer e-mail: theme capitalised it to "Info@Trendna.Com" */
.footer-info-box .info-box-body a[href^="mailto:"] { text-transform: none; }

/* ---------- Missing product photo (site-ui.js adds .img-missing) ----------------- */
.product-img.img-missing, .article-card-img.img-missing {
    background: var(--site-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b4b7bd' stroke-width='1.3'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Ccircle cx='9' cy='10' r='2'/%3E%3Cpath d='M21 17l-5-5-9 8'/%3E%3C/svg%3E") center / 56px no-repeat !important;
}
.img-missing > img, .img-missing a > img { visibility: hidden; }

/* ---------- Blog cards: same photo height on every card --------------------- */
.service-widget-box .article-card-img { aspect-ratio: 16 / 10; border-radius: var(--site-radius); background: var(--site-soft); }
.service-widget-box .article-card-img img { width: 100% !important; height: 100%; object-fit: cover; display: block; }
.service-widget-box .article-card { height: 100%; display: flex; flex-direction: column; }
.service-widget-box .article-card .artical-body { display: flex; flex-direction: column; flex: 1; }
.service-widget-box .article-card .artical-body .outline-btn { margin-top: auto; align-self: flex-start; }

/* ---------- FAQ ------------------------------------------------------------- */
.faq-question { gap: 1rem; }
.faq-question .icon { flex: none; }
