/*== Navbar ==*/
.navbar-modern {
    position: sticky;
    top: 0;
    z-index: 9999;
    width: 100%;
    min-height: 60px;
    padding: 4px 0;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}

.navbar-shell {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
    row-gap: 4px;
}

/*== Brand ==*/
.brand-mark {
    display: flex;
    flex-shrink: 0;
    margin-right: auto;
    color: var(--primary);
    text-decoration: none;
    border: 0;
    outline: 0;
    box-shadow: none;
    background: transparent;
    scale: 1.1;
    margin-left: 1.6rem;
}

.brand-mark:hover,
.brand-mark:focus,
.brand-mark:active,
.brand-mark:focus-visible {
    color: var(--primary);
    text-decoration: none;
    border: 0;
    outline: 0;
    box-shadow: none;
    background: transparent;
}

.brand-mark::before,
.brand-mark::after {
    display: none;
    content: none;
}

.brand-logo {
    display: block;
    width: auto;
    height: 40px;
    margin-left: 0;
    object-fit: contain;
    transform: none;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
    border: 0;
    outline: 0;
    box-shadow: none;
}

/*== Mobile Toggle ==*/
.navbar-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    padding: 0.5rem;
    border: 0;
    appearance: none;
    background: transparent;
    cursor: pointer;
    box-shadow: none;
}

.navbar-toggle:focus,
.navbar-toggle:focus-visible {
    outline: 0;
    box-shadow: none;
}

.navbar-toggler-icon {
    position: relative;
    display: inline-block;
    width: 24px;
    height: 18px;
    background-image: none;
    margin-right: 10px;
}

.navbar-toggler-icon::before,
.navbar-toggler-icon::after,
.navbar-toggler-icon span {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: var(--primary-light);
    transition:
            transform 0.3s ease,
            top 0.3s ease,
            bottom 0.3s ease,
            opacity 0.3s ease;
}

.navbar-toggler-icon::before {
    top: 0;
}

.navbar-toggler-icon span {
    top: 50%;
    transform: translateY(-50%);
}

.navbar-toggler-icon::after {
    bottom: 0;
}

.navbar-toggle[aria-expanded="true"] .navbar-toggler-icon::before,
.navbar-toggle:not(.is-collapsed) .navbar-toggler-icon::before {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.navbar-toggle[aria-expanded="true"] .navbar-toggler-icon span,
.navbar-toggle:not(.is-collapsed) .navbar-toggler-icon span {
    opacity: 0;
}

.navbar-toggle[aria-expanded="true"] .navbar-toggler-icon::after,
.navbar-toggle:not(.is-collapsed) .navbar-toggler-icon::after {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}

/*== Navbar Layout ==*/
.navbar-collapse {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.navbar-main-nav {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    align-items: center;
    justify-content: center;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.navbar-main-nav li {
    min-width: 0;
    list-style: none;
}

.navbar-main-nav .nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 9px;
    border-radius: 999px;
    color: var(--text);
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.1;
    text-decoration: none;
    white-space: nowrap;
    transition:
            background 0.2s ease,
            color 0.2s ease;
}

.navbar-main-nav .nav-link:hover,
.navbar-main-nav .nav-link:focus-visible {
    background: rgba(229, 57, 53, 0.08);
    color: var(--primary);
}

/*== Navbar Actions ==*/
.navbar-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-right: 10px;
}

.navbar-account-btn {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 36px;
    padding: 8px 13px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    color: var(--text);
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    box-shadow: none;
    transition:
            background 0.2s ease,
            color 0.2s ease,
            border-color 0.2s ease,
            filter 0.2s ease;
}

.navbar-account-btn:hover,
.navbar-account-btn:focus-visible {
    background: rgba(17, 24, 39, 0.04);
    color: var(--text);
    border-color: rgba(229, 57, 53, 0.16);
    text-decoration: none;
}

.navbar-account-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-calculator-icon {
    display: block;
    width: 22px;
    height: 22px;
    object-fit: contain;
    user-select: none;
    pointer-events: none;
}

.nav-calculator,
.nav-calculator:hover,
.nav-calculator:focus-visible {
    background: var(--accent);
    color: #fff;
}

.nav-calculator:hover,
.nav-calculator:focus-visible {
    filter: brightness(0.8);
}

.theme-toggle-btn {
    appearance: none;
}

/*== Wishlist ==*/
.wishlist-pill {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    color: var(--text);
    text-decoration: none;
    transition:
            border-color 0.25s ease,
            box-shadow 0.25s ease,
            transform 0.25s ease;
}

.wishlist-pill:hover,
.wishlist-pill:focus-visible {
    color: var(--text);
    text-decoration: none;
    border-color: rgba(229, 57, 53, 0.18);
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.08);
    transform: translateY(-1px);
}

.wishlist-pill-copy {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.wishlist-pill-label {
    color: var(--muted);
    font-size: 0.6rem;
    font-weight: 700;
}

.wishlist-pill-price {
    color: var(--text);
    font-size: 0.8rem;
    font-weight: 900;
}

.wishlist-pill-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    color: var(--text);
}

.wishlist-heart {
    width: 26px;
    height: 26px;
}

#wishlist-heart-fill {
    clip-path: inset(100% 0 0 0);
    transition: clip-path 0.45s ease;
    will-change: clip-path;
}

/*== Dropdowns ==*/
.navbar-account-dropdown {
    position: relative;
    display: inline-flex;
}

.pp-dropdown-menu,
.pp-dropdown-menu li {
    margin: 0;
    padding: 0;
    list-style: none;
}

.pp-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 10000;
    display: none;
    min-width: 220px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 18px 44px rgba(17, 24, 39, 0.12);
}

.navbar-account-dropdown.open .pp-dropdown-menu {
    display: block;
}

.pp-dropdown-item {
    display: flex;
    width: 100%;
    align-items: center;
    padding: 10px 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 600;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.pp-dropdown-item:hover,
.pp-dropdown-item:focus-visible {
    background: rgba(229, 57, 53, 0.06);
    color: var(--primary);
}

.pp-text-danger {
    color: #dc3545;
}

.pp-text-danger:hover,
.pp-text-danger:focus-visible {
    background: rgba(220, 53, 69, 0.08);
    color: #dc3545;
}

.pp-dropdown-divider {
    height: 1px;
    margin: 8px 0;
    border: 0;
    background: var(--border);
}

/*== Desktop ==*/
@media (min-width: 1201px) {
    .navbar-shell {
        height: 52px;
        min-height: 52px;
        flex-wrap: nowrap;
        max-width: 100%;
    }

    .brand-logo {
        height: 72px;
        transform: scale(1.15);
        transform-origin: left center;
    }

    .navbar-toggle {
        display: none;
    }

    .navbar-collapse {
        display: flex;
        flex-basis: auto;
        visibility: visible;
    }

    .navbar-main-nav {
        gap: 2px;
    }

    .navbar-main-nav .nav-link {
        padding: 6px 8px;
        font-size: clamp(0.72rem, 0.75vw, 0.8rem);
    }

    .navbar-actions {
        gap: 8px;
    }
}

/*== Responsive Navbar ==*/
@media (max-width: 1200px) {
    .navbar-modern {
        min-height: 58px;
        padding: 4px 0;
    }

    .navbar-shell {
        flex-wrap: wrap;
    }

    .brand-logo {
        height: 58px;
        transform: none;
    }

    .navbar-toggle {
        display: inline-flex;
        margin-left: auto;
        padding: 0.35rem;
    }

    .navbar-collapse {
        display: none;
        width: 100%;
        flex: 0 0 100%;
        max-height: calc(100vh - 64px);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding-top: 0.5rem;
        padding-bottom: 0.25rem;
        overflow-y: auto;
    }

    .navbar-collapse.open,
    .navbar-collapse.show {
        display: flex;
    }

    .navbar-main-nav {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        margin-bottom: 14px;
    }

    .navbar-main-nav .nav-link {
        display: flex;
        width: 100%;
        justify-content: flex-start;
        padding: 12px 14px;
        border-radius: 14px;
        background: rgba(17, 24, 39, 0.03);
        font-size: 0.9rem;
        white-space: normal;
    }

    .navbar-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .wishlist-pill,
    .navbar-account-btn,
    .nav-calculator {
        width: 100%;
        justify-content: center;
    }

    .navbar-account-dropdown {
        display: flex;
        width: 100%;
        flex-direction: column;
    }

    .navbar-account-dropdown .pp-dropdown-menu {
        position: static;
        width: 100%;
        min-width: 0;
        margin-top: 8px;
        border-radius: 14px;
        box-shadow: none;
    }
}

/*== Footer ==*/
.footer-modern {
    padding: 48px 0 24px;
    border-top: 1px solid var(--border);
    background: linear-gradient(180deg, #fff 0%, #f8f6f2 100%);
    color: var(--text);
}

.footer-grid {
    display: grid;
    grid-template-columns:
        minmax(260px, 1.4fr)
        minmax(150px, 0.8fr)
        minmax(150px, 0.8fr)
        minmax(150px, 0.8fr)
        minmax(280px, 1.25fr);
    align-items: start;
    gap: 32px;
}

.footer-column {
    min-width: 0;
}

.footer-column-brand {
    max-width: 340px;
}

.footer-column-contact {
    min-width: 280px;
    justify-self: end;
}

.footer-brand {
    display: inline-block;
}

.footer-logo {
    display: block;
    width: auto;
    height: 54px;
    object-fit: contain;
    transform: scale(1.6);
    transform-origin: left center;
}

.footer-logo-large {
    width: 90px;
    max-width: 100%;
    height: auto;
}

.footer-title {
    margin: 0 0 12px;
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.2;
}

.footer-text {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

.footer-column-brand .footer-text {
    max-width: 300px;
    margin-left: 10px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.footer-links a,
.footer-copyright-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.45;
}

.footer-column:not(.footer-column-contact) .footer-links a {
    white-space: nowrap;
}

.footer-column-contact .footer-links {
    width: 100%;
}

.footer-column-contact .footer-links a {
    width: 100%;
    overflow-wrap: anywhere;
    word-break: normal;
}

.footer-links a:hover,
.footer-copyright-link:hover {
    color: var(--primary);
}

.footer-bottom {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-copyright {
    margin: 0;
}

/*== Footer Responsive ==*/
@media (max-width: 1200px) {
    .footer-grid {
        grid-template-columns:
            minmax(240px, 1.2fr)
            repeat(3, minmax(140px, 0.8fr));
        gap: 32px;
    }

    .footer-column-contact {
        grid-column: 1 / -1;
        min-width: 0;
        justify-self: stretch;
    }

    .footer-column-contact .footer-links {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px 24px;
    }
}

@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 32px;
    }

    .footer-column-brand {
        grid-column: 1 / -1;
        max-width: none;
    }

    .footer-column-contact {
        grid-column: auto;
    }

    .footer-column-contact .footer-links {
        display: flex;
    }
}

@media (max-width: 768px) {
    .footer-modern {
        margin-top: 56px;
        padding: 36px 0 22px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .footer-column,
    .footer-title,
    .footer-bottom {
        text-align: center;
    }

    .footer-column-contact {
        min-width: 0;
        justify-self: stretch;
    }

    .footer-brand {
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .footer-logo {
        height: 48px;
        margin: 0 auto;
        transform: scale(1.35);
        transform-origin: center;
    }

    .footer-logo-large {
        width: 88px;
    }

    .footer-column-brand .footer-text,
    .footer-text {
        max-width: 320px;
        margin: 14px auto 0;
        font-size: 0.92rem;
        line-height: 1.6;
        text-align: center;
    }

    .footer-title {
        margin-bottom: 12px;
        font-size: 0.92rem;
    }

    .footer-links,
    .footer-column-contact .footer-links {
        display: flex;
        align-items: center;
        gap: 9px;
    }

    .footer-links a,
    .footer-column:not(.footer-column-contact) .footer-links a {
        width: auto;
        font-size: 0.9rem;
        white-space: normal;
        text-align: center;
    }

    .footer-bottom {
        margin-top: 30px;
        padding-top: 18px;
    }

    .footer-bottom .footer-text {
        max-width: 100%;
        margin: 0 auto;
        font-size: 0.85rem;
        line-height: 1.5;
    }
}