/* ==========================================================================
   MEDSUGGEST INDUSTRY-STANDARD NAVBAR SEARCH & PERSISTENT CART SYSTEM
   ========================================================================== */

:root {
    --ms-teal: #0e6b76;
    --ms-teal-dark: #0a4d55;
    --ms-cyan: #00b4ff;
    --ms-orange: #0e6b76;
    --ms-orange-hover: #0a4d55;
    --ms-dark: #0f172a;
    --ms-gray-100: #f8fafc;
    --ms-gray-200: #e2e8f0;
    --ms-gray-300: #cbd5e1;
    --ms-gray-500: #64748b;
    --ms-radius: 12px;
    --ms-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --ms-shadow-md: 0 8px 24px rgba(14, 107, 118, 0.12);
    --ms-shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.18);
    --ms-transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   1. SITE HEADER & NAVBAR (STICKY POSITION)
   ========================================================================== */
.site-header {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1030;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
    transition: all 0.25s ease;
}

.topbar {
    position: relative;
    max-width: 1440px;
    margin: 0 auto;
    padding: 10px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.brand {
    flex-shrink: 0;
}

.brand .logo {
    height: 42px;
    width: auto;
    display: block;
    transition: var(--ms-transition);
}

.nav-search-container {
    flex: 1 1 360px;
    max-width: 480px;
    min-width: 220px;
    margin: 0 12px;
    position: relative;
}

.nav-search-form {
    position: relative;
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 40px;
    padding: 3px 4px 3px 16px;
    transition: var(--ms-transition);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.nav-search-form:hover {
    background: #ffffff;
    border-color: #94a3b8;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.nav-search-form.is-focused {
    background: #ffffff;
    border-color: var(--ms-teal);
    box-shadow: 0 0 0 3px rgba(14, 107, 118, 0.14), var(--ms-shadow-sm);
}

.nav-search-icon-left {
    color: var(--ms-teal);
    font-size: 15px;
    margin-right: 10px;
    flex-shrink: 0;
}

.nav-search-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 13.5px;
    font-family: inherit;
    color: var(--ms-dark);
    padding: 8px 0;
    min-width: 0;
}

.nav-search-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.nav-search-clear {
    border: none;
    background: #e2e8f0;
    color: #475569;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    cursor: pointer;
    margin-right: 8px;
    transition: var(--ms-transition);
    flex-shrink: 0;
}

.nav-search-clear:hover {
    background: #cbd5e1;
    color: #0f172a;
}

.nav-search-clear.visible {
    display: flex;
}

.nav-search-submit {
    background: linear-gradient(135deg, var(--ms-teal), #0284c7);
    color: #ffffff;
    border: none;
    border-radius: 30px;
    padding: 8px 18px;
    font-size: 13.5px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: var(--ms-transition);
    flex-shrink: 0;
}

.nav-search-submit:hover {
    background: linear-gradient(135deg, var(--ms-teal-dark), #0369a1);
    box-shadow: 0 4px 12px rgba(14, 107, 118, 0.25);
    transform: translateY(-1px);
}

/* ==========================================================================
   POPULAR SEARCHES TAGS (FLIPKART / AMAZON STYLE QUICK SUGGESTIONS)
   ========================================================================== */
.search-popular-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px;
    background: #ffffff;
}

.search-popular-tag {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 12.5px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
}

.search-popular-tag i {
    color: #94a3b8;
    font-size: 11px;
}

.search-popular-tag:hover {
    background: var(--ms-teal);
    color: #ffffff;
    border-color: var(--ms-teal);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(14, 107, 118, 0.2);
}

.search-popular-tag:hover i {
    color: #ffffff !important;
}

/* ==========================================================================
   NAVIGATION LINKS & RESOURCES DROPDOWN (INDUSTRY STANDARD)
   ========================================================================== */
.nav-links-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.nav-main-link {
    font-size: 14.5px;
    font-weight: 600;
    color: #1e293b;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 10px;
    transition: var(--ms-transition);
    position: relative;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
}

.nav-main-link:hover {
    color: var(--ms-teal);
    background: rgba(0, 180, 216, 0.08);
}

.nav-main-link.active {
    color: var(--ms-teal);
    font-weight: 700;
    background: rgba(0, 180, 216, 0.12);
}

.nav-dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.nav-dropdown-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    font-size: 14.5px;
    font-weight: 600;
    color: #1e293b;
    padding: 8px 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--ms-transition);
    font-family: inherit;
}

.nav-dropdown-btn:hover,
.nav-dropdown-wrapper:hover .nav-dropdown-btn,
.nav-dropdown-wrapper.is-open .nav-dropdown-btn {
    color: var(--ms-teal);
    background: rgba(0, 180, 216, 0.08);
}

.nav-dropdown-arrow {
    font-size: 11px;
    color: #64748b;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-dropdown-wrapper:hover .nav-dropdown-arrow,
.nav-dropdown-wrapper.is-open .nav-dropdown-arrow {
    transform: rotate(180deg);
    color: var(--ms-teal);
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    min-width: 300px;
    background: #ffffff;
    border: 1px solid var(--ms-gray-200);
    border-radius: 16px;
    padding: 8px;
    box-shadow: 0 16px 40px -10px rgba(15, 23, 42, 0.18), 0 2px 10px rgba(0, 0, 0, 0.04);
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s;
}

/* Invisible bridge so mouse hover never drops across the gap */
.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
}

.nav-dropdown-wrapper:hover .nav-dropdown-menu,
.nav-dropdown-wrapper:focus-within .nav-dropdown-menu,
.nav-dropdown-wrapper.is-open .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--ms-dark);
    transition: all 0.2s ease;
}

.nav-dropdown-item:hover {
    background: #f8fafc;
    transform: translateX(3px);
}

.nav-dropdown-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.nav-dropdown-item:hover .nav-dropdown-icon {
    transform: scale(1.08);
}

.nav-dropdown-icon.icon-qa {
    background: rgba(0, 180, 216, 0.14);
    color: #00b4d8;
}

.nav-dropdown-icon.icon-media {
    background: rgba(239, 68, 68, 0.14);
    color: #ef4444;
}

.nav-dropdown-icon.icon-reviews {
    background: rgba(245, 158, 11, 0.14);
    color: #f59e0b;
}

.nav-dropdown-content {
    display: flex;
    flex-direction: column;
}

.nav-dropdown-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
}

.nav-dropdown-desc {
    font-size: 11.5px;
    color: #64748b;
    font-weight: 500;
    margin-top: 2px;
}

/* ==========================================================================
   2. SEARCH AUTOCOMPLETE DROPDOWN
   ========================================================================== */
.nav-search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid var(--ms-gray-200);
    box-shadow: var(--ms-shadow-lg);
    z-index: 10000;
    max-height: 440px;
    overflow-y: auto;
    display: none;
    animation: msDropdownFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-search-dropdown.active {
    display: block;
}

@keyframes msDropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-dropdown-header {
    padding: 10px 16px;
    background: #f8fafc;
    border-bottom: 1px solid var(--ms-gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
}

.search-results-list {
    list-style: none;
    margin: 0;
    padding: 6px 0;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    gap: 12px;
    text-decoration: none;
    color: var(--ms-dark);
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s ease;
    cursor: pointer;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover,
.search-result-item.highlighted {
    background: #f0fdf4;
}

.search-item-thumb {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    border: 1px solid var(--ms-gray-200);
    object-fit: contain;
    background: #ffffff;
    padding: 2px;
    flex-shrink: 0;
}

.search-item-info {
    flex: 1;
    min-width: 0;
}

.search-item-title {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ms-dark);
    margin: 0 0 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-item-title mark {
    background: #fef08a;
    color: inherit;
    padding: 0 2px;
    border-radius: 2px;
}

.search-item-meta {
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-item-pricing {
    text-align: right;
    flex-shrink: 0;
}

.search-item-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--ms-teal);
    display: block;
}

.search-item-old-price {
    font-size: 11.5px;
    color: #94a3b8;
    text-decoration: line-through;
}

.search-item-badge {
    font-size: 10px;
    font-weight: 700;
    color: #15803d;
    background: #dcfce7;
    padding: 1px 6px;
    border-radius: 4px;
    display: inline-block;
}

.search-dropdown-footer {
    padding: 12px 16px;
    background: #f8fafc;
    border-top: 1px solid var(--ms-gray-200);
    text-align: center;
}

.search-dropdown-view-all {
    color: var(--ms-teal);
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.15s;
}

.search-dropdown-view-all:hover {
    color: var(--ms-teal-dark);
    text-decoration: underline;
}

.search-loading-state,
.search-empty-state {
    padding: 24px 20px;
    text-align: center;
    color: #64748b;
    font-size: 13.5px;
}

.search-loading-state i {
    font-size: 20px;
    color: var(--ms-teal);
    margin-bottom: 8px;
    display: block;
}

/* ==========================================================================
   3. NAVBAR CART BUTTON
   ========================================================================== */
.nav-cart-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background: #ffffff;
    border: 1.5px solid var(--ms-gray-200);
    padding: 10px 18px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    color: var(--ms-dark);
    cursor: pointer;
    text-decoration: none;
    transition: var(--ms-transition);
}

.nav-cart-btn:hover {
    border-color: var(--ms-teal);
    background: #f0fdf4;
    color: var(--ms-teal);
    box-shadow: 0 4px 14px rgba(14, 107, 118, 0.12);
    transform: translateY(-1px);
}

.nav-cart-icon-wrap {
    position: relative;
    font-size: 17px;
    color: var(--ms-teal);
    display: flex;
    align-items: center;
}

.nav-cart-badge {
    position: absolute;
    top: -9px;
    right: -10px;
    background: linear-gradient(135deg, #f43f5e, #e11d48);
    color: #ffffff;
    font-size: 10.5px;
    font-weight: 800;
    height: 19px;
    min-width: 19px;
    padding: 0 5px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(225, 29, 72, 0.35);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.nav-cart-badge.has-items {
    display: flex;
}

.nav-cart-badge.bump {
    animation: cartBadgePop 0.35s ease;
}

@keyframes cartBadgePop {
    0% { transform: scale(1); }
    50% { transform: scale(1.35); }
    100% { transform: scale(1); }
}

/* ==========================================================================
   4. SLIDE-OVER OFFCANVAS CART DRAWER
   ========================================================================== */
.cart-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cart-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: -480px;
    width: 440px;
    max-width: 100vw;
    height: 100vh;
    background: #ffffff;
    z-index: 99999;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.cart-drawer.active {
    right: 0;
}

/* Drawer Header */
.cart-drawer-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--ms-gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    flex-shrink: 0;
}

.cart-drawer-title-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-drawer-title-box h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--ms-dark);
}

.cart-items-count-pill {
    background: #e0f2fe;
    color: #0369a1;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 20px;
}

.cart-drawer-close-btn {
    border: none;
    background: #f1f5f9;
    color: #64748b;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: var(--ms-transition);
}

.cart-drawer-close-btn:hover {
    background: #fee2e2;
    color: #ef4444;
    transform: rotate(90deg);
}

/* Trust Strip */
.cart-drawer-trust-strip {
    background: #f8fafc;
    border-bottom: 1px solid var(--ms-gray-200);
    padding: 8px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    color: #475569;
    flex-shrink: 0;
}

.cart-drawer-trust-strip span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.cart-drawer-trust-strip i {
    color: #10b981;
}

/* Drawer Body & Items */
.cart-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}

.cart-items-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cart-item-card {
    background: #ffffff;
    border: 1px solid var(--ms-gray-200);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    gap: 14px;
    position: relative;
    transition: var(--ms-transition);
}

.cart-item-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.cart-item-img-wrap {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 4px;
}

.cart-item-img-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--ms-dark);
    margin: 0 0 2px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cart-item-title a {
    color: inherit;
    text-decoration: none;
}

.cart-item-title a:hover {
    color: var(--ms-teal);
}

.cart-item-salt {
    font-size: 11.5px;
    color: #64748b;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cart-item-prices {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.cart-item-curr-price {
    font-size: 15px;
    font-weight: 800;
    color: var(--ms-teal);
}

.cart-item-mrp {
    font-size: 12px;
    color: #94a3b8;
    text-decoration: line-through;
}

/* Stepper Controls */
.cart-stepper {
    display: inline-flex;
    align-items: center;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 2px;
}

.cart-stepper-btn {
    border: none;
    background: #ffffff;
    color: var(--ms-dark);
    width: 26px;
    height: 26px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--ms-transition);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.cart-stepper-btn:hover {
    background: var(--ms-teal);
    color: #ffffff;
}

.cart-stepper-val {
    min-width: 28px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--ms-dark);
}

.cart-item-delete {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    font-size: 13px;
    margin-left: 6px;
    transition: color 0.15s ease;
}

.cart-item-delete:hover {
    color: #ef4444;
}

/* Empty State */
.cart-empty-view {
    padding: 60px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.cart-empty-icon {
    width: 90px;
    height: 90px;
    background: #f1f5f9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    color: #94a3b8;
    margin-bottom: 20px;
}

.cart-empty-view h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--ms-dark);
    margin-bottom: 8px;
}

.cart-empty-view p {
    font-size: 13.5px;
    color: #64748b;
    max-width: 280px;
    line-height: 1.5;
    margin-bottom: 24px;
}

.btn-empty-shop {
    background: linear-gradient(135deg, #0e6b76 0%, #00b4d8 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
    padding: 12px 28px;
    border-radius: 10px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(255, 122, 0, 0.25);
    transition: var(--ms-transition);
}

.btn-empty-shop:hover {
    background: linear-gradient(135deg, #0a4d55 0%, #0099b8 100%);
    color: #ffffff;
    transform: translateY(-2px);
}

/* Drawer Footer */
.cart-drawer-footer {
    padding: 18px 22px;
    background: #ffffff;
    border-top: 1px solid var(--ms-gray-200);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.04);
    flex-shrink: 0;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #64748b;
    margin-bottom: 8px;
}

.cart-summary-row.savings {
    color: #16a34a;
    font-weight: 600;
}

.cart-summary-row.total-row {
    font-size: 17px;
    font-weight: 800;
    color: var(--ms-dark);
    border-top: 1px dashed var(--ms-gray-200);
    padding-top: 10px;
    margin-top: 10px;
    margin-bottom: 16px;
}

.cart-summary-row.total-row .total-amount {
    color: var(--ms-teal);
    font-size: 20px;
}

.btn-checkout-cart {
    width: 100%;
    background: linear-gradient(135deg, #0e6b76 0%, #00b4d8 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(234, 88, 12, 0.3);
    transition: var(--ms-transition);
}

.btn-checkout-cart:hover {
    background: linear-gradient(135deg, #0a4d55 0%, #0099b8 100%);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(234, 88, 12, 0.4);
}

.btn-continue-shopping {
    width: 100%;
    background: transparent;
    border: 1px solid var(--ms-gray-200);
    color: #475569;
    border-radius: 10px;
    padding: 9px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    transition: var(--ms-transition);
}

.btn-continue-shopping:hover {
    background: #f8fafc;
    color: var(--ms-dark);
}

/* ==========================================================================
   5. FLOATING TOAST NOTIFICATION
   ========================================================================== */
.ms-cart-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #0f172a;
    color: #ffffff;
    padding: 14px 18px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    gap: 14px;
    z-index: 100000;
    max-width: 380px;
    transform: translateY(100px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.35s ease;
}

.ms-cart-toast.show {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.ms-toast-icon {
    width: 32px;
    height: 32px;
    background: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 15px;
    flex-shrink: 0;
}

.ms-toast-body {
    flex: 1;
    min-width: 0;
}

.ms-toast-title {
    font-size: 13.5px;
    font-weight: 700;
    margin: 0 0 2px;
    color: #ffffff;
}

.ms-toast-desc {
    font-size: 12px;
    color: #cbd5e1;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ms-toast-action-btn {
    background: #ffffff;
    color: #0f172a;
    font-size: 12px;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    cursor: pointer;
    flex-shrink: 0;
    transition: var(--ms-transition);
}

.ms-toast-action-btn:hover {
    background: #e2e8f0;
}

/* ==========================================================================
   6. CHECKOUT MODAL STYLES
   ========================================================================== */
.cart-checkout-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(5px);
    z-index: 100001;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: msFadeIn 0.2s ease;
}

@keyframes msFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.cart-checkout-modal {
    background: #ffffff;
    border-radius: 16px;
    max-width: 580px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    animation: msScaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes msScaleIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.checkout-modal-header {
    background: #ffffff;
    padding: 20px 24px;
    border-bottom: 1px solid var(--ms-gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkout-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--ms-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkout-modal-close {
    border: none;
    background: #f1f5f9;
    color: #64748b;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 15px;
    transition: var(--ms-transition);
}

.checkout-modal-close:hover {
    background: #fee2e2;
    color: #ef4444;
}

.checkout-modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
}

.checkout-order-summary-box {
    background: #f8fafc;
    border: 1px solid var(--ms-gray-200);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 20px;
}

.checkout-items-preview-list {
    max-height: 120px;
    overflow-y: auto;
    font-size: 12.5px;
    margin-bottom: 10px;
}

.checkout-preview-item {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    color: #475569;
}

.checkout-total-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px dashed var(--ms-gray-200);
    padding-top: 8px;
    font-weight: 700;
    color: var(--ms-dark);
}

.checkout-total-banner span:last-child {
    color: var(--ms-teal);
    font-size: 18px;
}

.checkout-form-group {
    margin-bottom: 16px;
}

.checkout-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--ms-dark);
    margin-bottom: 6px;
}

.checkout-form-input {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    font-family: inherit;
    border: 1.5px solid var(--ms-gray-200);
    border-radius: 10px;
    outline: none;
    transition: var(--ms-transition);
}

.checkout-form-input:focus {
    border-color: var(--ms-teal);
    box-shadow: 0 0 0 3px rgba(14, 107, 118, 0.12);
}

.rx-upload-box {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    background: #f8fafc;
    cursor: pointer;
    transition: var(--ms-transition);
}

.rx-upload-box:hover {
    border-color: var(--ms-teal);
    background: #f0fdf4;
}

.rx-upload-box i {
    font-size: 26px;
    color: var(--ms-teal);
    margin-bottom: 6px;
}

.rx-upload-box p {
    margin: 0;
    font-size: 12.5px;
    color: #64748b;
}

.rx-file-name-preview {
    font-size: 12px;
    color: #0369a1;
    font-weight: 600;
    margin-top: 6px;
    display: none;
}

.btn-place-order-final {
    width: 100%;
    background: linear-gradient(135deg, #0e6b76 0%, #00b4d8 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(234, 88, 12, 0.35);
    transition: var(--ms-transition);
}

.btn-place-order-final:hover {
    background: linear-gradient(135deg, #0a4d55 0%, #0099b8 100%);
    transform: translateY(-1px);
}

/* ==========================================================================
   7. RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (min-width: 992px) and (max-width: 1250px) {
    .topbar {
        padding: 8px 16px;
        gap: 8px;
    }

    .brand .logo {
        height: 38px;
    }

    .nav-search-container {
        margin: 0 6px;
        max-width: 320px;
        min-width: 180px;
    }

    .nav-search-input {
        font-size: 12.5px;
    }

    .nav-search-submit {
        padding: 7px 12px;
        font-size: 12.5px;
    }

    .nav-links-menu {
        gap: 2px;
    }

    .nav-main-link,
    .nav-dropdown-btn {
        padding: 6px 8px;
        font-size: 13.5px;
    }

    .nav-cart-btn {
        padding: 8px 12px;
        font-size: 13px;
    }

    .btn-header-store {
        padding: 8px 14px;
        font-size: 13px;
    }
}

.store-text-short {
    display: none;
}
.store-text-full {
    display: inline;
}
.nav-search-btn-text {
    display: inline;
}

@media (max-width: 991px) {
    .site-header {
        position: -webkit-sticky !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 1030 !important;
        background: #ffffff !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06) !important;
    }

    .topbar {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 8px 14px !important;
        gap: 6px 0 !important;
        width: 100% !important;
    }
    
    .brand {
        order: 1 !important;
        flex: 0 0 auto !important;
        display: flex !important;
        align-items: center !important;
        margin: 0 !important;
    }

    .brand .logo {
        height: 30px !important;
        max-width: 120px !important;
        width: auto !important;
    }

    .top-actions {
        order: 2 !important;
        display: flex !important;
        align-items: center !important;
        gap: 7px !important;
        margin-left: auto !important;
        flex: 0 0 auto !important;
    }

    .nav-search-container {
        order: 3 !important;
        flex: 1 1 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 4px 0 2px 0 !important;
    }

    .nav-search-form {
        padding: 2px 4px 2px 14px !important;
        border-radius: 30px !important;
        width: 100% !important;
        height: 38px !important;
    }

    .nav-search-input {
        font-size: 12.5px !important;
        padding: 6px 0 !important;
    }

    .nav-wishlist-btn {
        width: 34px !important;
        height: 34px !important;
        border-radius: 9px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        border: 1.5px solid #e2e8f0 !important;
        background: #ffffff !important;
        color: #475569 !important;
        font-size: 13.5px !important;
        flex-shrink: 0 !important;
        padding: 0 !important;
    }

    .nav-cart-btn {
        height: 34px !important;
        padding: 0 9px !important;
        border-radius: 9px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        border: 1.5px solid #e2e8f0 !important;
        background: #ffffff !important;
        color: #0e6b76 !important;
        font-size: 13.5px !important;
        flex-shrink: 0 !important;
        gap: 5px !important;
        position: relative !important;
    }

    .nav-cart-btn .nav-cart-text {
        display: none !important;
    }

    .btn-header-store {
        height: 34px !important;
        padding: 0 11px !important;
        font-size: 11.5px !important;
        border-radius: 20px !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 5px !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }

    .cart-drawer {
        width: 100% !important;
    }
}

@media (max-width: 576px) {
    .topbar {
        padding: 6px 12px !important;
        gap: 4px 0 !important;
    }

    .brand .logo {
        height: 27px !important;
        max-width: 105px !important;
    }

    .top-actions {
        gap: 5px !important;
    }

    .nav-wishlist-btn {
        width: 32px !important;
        height: 32px !important;
        font-size: 13px !important;
        border-radius: 8px !important;
    }

    .nav-cart-btn {
        height: 32px !important;
        padding: 0 8px !important;
        font-size: 13px !important;
        border-radius: 8px !important;
    }

    .nav-cart-badge {
        top: -4px !important;
        right: -4px !important;
        width: 17px !important;
        height: 17px !important;
        font-size: 9.5px !important;
        line-height: 17px !important;
    }

    .btn-header-store {
        height: 32px !important;
        padding: 0 9px !important;
        font-size: 11px !important;
        border-radius: 18px !important;
    }

    .btn-header-store .store-text-full {
        display: none !important;
    }

    .btn-header-store .store-text-short {
        display: inline !important;
    }

    .nav-search-container {
        margin: 3px 0 1px 0 !important;
    }

    .nav-search-form {
        padding: 2px 3px 2px 11px !important;
        border-radius: 26px !important;
        height: 34px !important;
    }

    .nav-search-input {
        font-size: 12px !important;
        padding: 4px 0 !important;
    }

    .nav-search-input::placeholder {
        font-size: 11.5px !important;
    }

    .nav-search-submit {
        width: 30px !important;
        height: 30px !important;
        padding: 0 !important;
        border-radius: 50% !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0 !important;
    }

    .nav-search-submit .nav-search-btn-text {
        display: none !important;
    }

    .logo {
        height: 27px !important;
    }

    .cart-drawer-header {
        padding: 14px 16px;
    }

    .cart-drawer-body {
        padding: 12px 14px;
    }

    .cart-drawer-footer {
        padding: 14px 16px;
    }
}

@media (max-width: 360px) {
    .topbar {
        padding: 6px 10px !important;
    }

    .brand .logo {
        height: 27px !important;
        max-width: 95px !important;
    }

    .top-actions {
        gap: 4px !important;
    }

    .btn-header-store {
        padding: 0 8px !important;
        font-size: 11px !important;
    }
}

/* ==========================================================================
   PRINT MEDIA RULES - HIDE CART DRAWER & NAV DURING PRINT
   ========================================================================== */
@media print {
    .cart-drawer,
    .cart-drawer-overlay,
    .wishlist-drawer,
    .wishlist-drawer-overlay,
    #cartDrawer,
    #cartDrawerOverlay,
    #wishlistDrawer,
    #wishlistDrawerOverlay,
    .site-nav-container,
    .nav-search-form,
    .navbar-actions,
    .toast-notification {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        width: 0 !important;
        overflow: hidden !important;
    }
}

