/* ==========================================================================
   GRD Trading storefront styles
   Loaded after the Bagisto theme bundle (see components/layouts/index.blade.php).
   Brand: blue #0080CB (buttons/logo), navy #0B1929 (announcement bar).
   ========================================================================== */

:root {
    --grd-blue: #0080cb;
    --grd-blue-dark: #00639e;
    --grd-blue-soft: #e8f4fb;
    --grd-navy: #0b1929;
    --grd-ink: #111827;
    --grd-muted: #6b7280;
    --grd-line: #e5e7eb;
    --grd-radius: 14px;
    --grd-shadow: 0 10px 30px -12px rgba(11, 25, 41, .25);
}

html { scroll-behavior: smooth; }
body { color: var(--grd-ink); -webkit-font-smoothing: antialiased; }

:focus-visible { outline: 2px solid var(--grd-blue); outline-offset: 2px; }

/* ---------- Header ---------------------------------------------------- */

header.sticky { box-shadow: 0 1px 0 var(--grd-line), 0 6px 18px -14px rgba(11, 25, 41, .35); }

/* Logo JPG has an off-white background: blend it into the white header */
.grd-logo { mix-blend-mode: multiply; }

/* ---------- Desktop navigation (.grd-nav, header/desktop/bottom.blade.php) */

.grd-nav { display: flex; align-items: stretch; height: 77px; }

.grd-nav__item { position: relative; display: flex; align-items: stretch; }

.grd-nav__link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 18px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--grd-ink);
    white-space: nowrap;
    transition: color .15s ease;
}

.grd-nav__link::after {
    content: "";
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--grd-blue);
    transform: scaleX(0);
    transition: transform .2s ease;
}

.grd-nav__caret {
    width: 7px;
    height: 7px;
    margin-top: -3px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    opacity: .55;
    transition: transform .2s ease, margin .2s ease;
}

.grd-nav__item:hover .grd-nav__link,
.grd-nav__item:focus-within .grd-nav__link,
.grd-nav__item--active .grd-nav__link { color: var(--grd-blue); }

.grd-nav__item:hover .grd-nav__link::after,
.grd-nav__item:focus-within .grd-nav__link::after,
.grd-nav__item--active .grd-nav__link::after { transform: scaleX(1); }

.grd-nav__item:hover .grd-nav__caret,
.grd-nav__item:focus-within .grd-nav__caret { transform: rotate(225deg); margin-top: 4px; }

/* Panel: anchored under its own item, flush with the header (no hover gap) */
.grd-nav__panel {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 30;
    min-width: 260px;
    max-width: min(760px, calc(100vw - 48px));
    max-height: calc(100vh - 120px);
    overflow: auto;
    padding: 22px 24px 18px;
    background: #fff;
    border: 1px solid var(--grd-line);
    border-top: 0;
    border-radius: 0 0 var(--grd-radius) var(--grd-radius);
    box-shadow: var(--grd-shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    /* small close delay = forgiving when the pointer moves diagonally */
    transition: opacity .18s ease .12s, transform .18s ease .12s, visibility 0s linear .3s;
}

.grd-nav__item:hover > .grd-nav__panel,
.grd-nav__item:focus-within > .grd-nav__panel {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .18s ease, transform .18s ease, visibility 0s;
}

.grd-nav__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 18px 32px;
}

/* Small menus (e.g. Laptops with 2 children) stay compact */
.grd-nav__item:not(.grd-nav__item--mega) .grd-nav__panel { width: max-content; }
.grd-nav__item:not(.grd-nav__item--mega) .grd-nav__grid { grid-template-columns: repeat(2, minmax(180px, auto)); }

/* "All" = full mega menu. The item is position:static so the panel is laid out
   against the sticky <header> (full width) and centred under it. */
.grd-nav__item--mega { position: static; }
.grd-nav__item--mega .grd-nav__panel {
    left: 50%;
    width: min(1180px, calc(100vw - 48px));
    max-width: none;
    padding: 28px 32px 24px;
    border-radius: 0 0 var(--grd-radius) var(--grd-radius);
    transform: translate(-50%, 6px);
}
.grd-nav__item--mega:hover > .grd-nav__panel,
.grd-nav__item--mega:focus-within > .grd-nav__panel { transform: translate(-50%, 0); }
.grd-nav__item--mega .grd-nav__grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 26px 36px; }

.grd-nav__heading {
    display: block;
    padding: 6px 10px;
    margin: 0 -10px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--grd-ink);
    transition: background .15s ease, color .15s ease;
}
.grd-nav__heading:hover { background: var(--grd-blue-soft); color: var(--grd-blue); }

.grd-nav__list { display: grid; gap: 2px; margin-top: 6px; }
.grd-nav__list a {
    display: block;
    padding: 4px 10px;
    margin: 0 -10px;
    border-radius: 6px;
    font-size: 13px;
    color: var(--grd-muted);
    transition: background .15s ease, color .15s ease;
}
.grd-nav__list a:hover { color: var(--grd-blue); background: #f5f9fc; }

.grd-nav__all {
    display: inline-flex;
    margin-top: 16px;
    padding-top: 14px;
    width: 100%;
    border-top: 1px solid var(--grd-line);
    font-size: 13px;
    font-weight: 600;
    color: var(--grd-blue);
}
.grd-nav__all:hover { color: var(--grd-blue-dark); }

/* Tighter nav on small laptops */
@media (max-width: 1180px) {
    .grd-nav__link { padding: 0 12px; font-size: 13px; }
    .grd-nav__link::after { left: 12px; right: 12px; }
}

/* ---------- Buttons ------------------------------------------------------ */

.primary-button {
    background: var(--grd-blue);
    border-color: var(--grd-blue);
    transition: background .15s ease, box-shadow .15s ease, transform .15s ease;
}
.primary-button:hover {
    background: var(--grd-blue-dark);
    border-color: var(--grd-blue-dark);
    box-shadow: 0 8px 18px -8px rgba(0, 128, 203, .6);
}
.primary-button:active { transform: translateY(1px); }

/* ---------- Section headings on the home page --------------------------- */

main h2.font-dmserif {
    font-family: Poppins, sans-serif;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--grd-ink);
}
main h2.font-dmserif::after {
    content: "";
    display: block;
    width: 44px;
    height: 4px;
    margin-top: 10px;
    border-radius: 4px;
    background: var(--grd-blue);
}

/* ---------- Category cards (components/categories/carousel) ------------- */

.grd-cat-card {
    background: #fff;
    border-color: var(--grd-line) !important;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.grd-cat-card:hover {
    transform: translateY(-4px);
    border-color: transparent !important;
    box-shadow: var(--grd-shadow);
}
.grd-cat-card > a:first-child {
    background: #f7f8fa;
    display: flex !important;
    align-items: center;
    justify-content: center;
}
.grd-cat-card > a:first-child img { mix-blend-mode: multiply; padding: 6px; }

/* ---------- Product cards (components/products/card) -------------------- */

.grd-card {
    background: #fff;
    border: 1px solid var(--grd-line);
    border-radius: var(--grd-radius);
    overflow: hidden;
    transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.grd-card:hover {
    border-color: transparent;
    box-shadow: var(--grd-shadow);
    transform: translateY(-3px);
}
.grd-card img { object-fit: contain; mix-blend-mode: multiply; }
.grd-card > div:first-child { background: #f7f8fa; }
.grd-card > div:nth-child(2) { padding: 14px 16px 16px; max-width: none; }
.grd-card p.line-clamp-3 { font-size: 15px; line-height: 1.45; color: var(--grd-ink); }
.grd-card .final-price,
.grd-card [class*="font-semibold"] { color: var(--grd-ink); }

@media (max-width: 767px) {
    .grd-card > div:nth-child(2) { padding: 10px 10px 12px; }
    .grd-card:hover { transform: none; }
}

/* ---------- Services strip ---------------------------------------------- */

.grd-services > div > div {
    flex: 1;
    padding: 18px 20px;
    border: 1px solid var(--grd-line);
    border-radius: var(--grd-radius);
}
.grd-services [class*="icon-"] {
    border-color: transparent !important;
    background: var(--grd-blue-soft) !important;
    color: var(--grd-blue) !important;
}
.grd-services p.font-dmserif { font-family: Poppins, sans-serif; font-weight: 600; }

/* ---------- Footer: dark navy to match the announcement bar ------------- */

.grd-footer { background: var(--grd-navy) !important; color: #cbd5e1; }
.grd-footer a { color: #cbd5e1; transition: color .15s ease; }
.grd-footer a:hover { color: #fff; }
.grd-footer p,
.grd-footer li { color: inherit; }
.grd-footer .text-navyBlue { color: #fff !important; font-style: normal; font-weight: 600; }
.grd-footer input[type="email"],
.grd-footer input[name="email"] {
    background: rgba(255, 255, 255, .06) !important;
    border-color: rgba(255, 255, 255, .15) !important;
    color: #fff;
}
.grd-footer input::placeholder { color: #94a3b8; }
.grd-footer button[type="submit"] { background: var(--grd-blue) !important; color: #fff; }
.grd-footer button[type="submit"]:hover { background: var(--grd-blue-dark) !important; }
.grd-footer > div:last-child {
    background: #07111d !important;
    border-top: 1px solid rgba(255, 255, 255, .08);
}
.grd-footer > div:last-child p { color: #94a3b8 !important; }
/* Mobile accordion in footer */
.grd-footer [class*="border-[#e9decc]"] { border-color: rgba(255, 255, 255, .15) !important; }
.grd-footer [class*="bg-[#F1EADF]"] { background: rgba(255, 255, 255, .06) !important; color: #fff; }

/* ---------- Reduced motion --------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
