/**
 * MediCare Customer Frontend Design System & Theme Stylesheet
 * 
 * Clean, Commercial, Healthcare-Focused E-Commerce Design
 */

:root {
    --primary-color: #0d9488;
    --primary-hover: #0f766e;
    --primary-light: #ccfbf1;
    --secondary-color: #0284c7;
    --secondary-hover: #0369a1;
    --dark-slate: #0f172a;
    --text-color: #334155;
    --muted-color: #64748b;
    --light-bg: #f8fafc;
    --border-color: #e2e8f0;
    --danger-color: #e11d48;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --card-shadow-hover: 0 12px 20px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --border-radius: 12px;
}

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-color);
    background-color: #ffffff;
    line-height: 1.6;
}

/* 1. Top Announcement Bar */
.top-bar {
    background-color: var(--dark-slate);
    color: #cbd5e1;
    font-size: 0.85rem;
    padding: 6px 0;
}

.top-bar a {
    color: #5eead4;
    text-decoration: none;
}
.top-bar a:hover {
    text-decoration: underline;
}

/* 2. Header & Navigation */
.main-header {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.brand-logo {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--dark-slate);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}
.brand-logo i {
    color: var(--primary-color);
}
.brand-logo span {
    color: var(--primary-color);
}

/* Header Search Form */
.header-search .form-control {
    border-radius: 50px 0 0 50px;
    border-color: var(--border-color);
    padding-left: 18px;
}
.header-search .btn {
    border-radius: 0 50px 50px 0;
    background-color: var(--primary-color);
    color: #ffffff;
    padding-left: 20px;
    padding-right: 20px;
}
.header-search .btn:hover {
    background-color: var(--primary-hover);
}

/* Cart Button & Badge */
.btn-cart {
    background-color: var(--light-bg);
    border: 1px solid var(--border-color);
    color: var(--dark-slate);
    border-radius: 50px;
    padding: 8px 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}
.btn-cart:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Main Nav Links */
.navbar-nav .nav-link {
    font-weight: 600;
    color: var(--text-color);
    padding: 8px 14px;
    border-radius: 6px;
    transition: all 0.2s ease;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color);
    background-color: var(--primary-light);
}

/* 3. Hero Banner Slider */
.hero-slider-section {
    padding: 0;
    margin: 0 0 20px 0;
    width: 100%;
}
.hero-carousel {
    border-radius: 0;
    overflow: hidden;
    width: 100%;
}
.carousel-item {
    position: relative;
    max-height: 480px;
    width: 100%;
    background-color: var(--dark-slate);
}
.carousel-item img {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    display: block;
}
.carousel-caption-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.75) 0%, rgba(15, 23, 42, 0.25) 60%, rgba(15, 23, 42, 0) 100%);
    display: flex;
    align-items: center;
    padding: 40px;
    color: #ffffff;
}
.carousel-caption-content {
    max-width: 550px;
}
.carousel-caption-content h2 {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 12px;
}
.carousel-caption-content p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 20px;
}

/* 4. Section Headings */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}
.section-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--dark-slate);
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.section-title i {
    color: var(--primary-color);
}

/* 5. Product Grid & Card Components */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}
@media (max-width: 575.98px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

.product-card {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}
.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    border-color: #cbd5e1;
}

.product-badges {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.discount-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    background-color: var(--danger-color);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.72rem;
    padding: 3px 8px;
    border-radius: 20px;
    letter-spacing: 0.3px;
}

.product-img-wrapper {
    height: 195px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    position: relative;
    overflow: hidden;
}
@media (max-width: 767px) {
    .product-img-wrapper {
        height: 155px;
        padding: 8px;
    }
}
.product-img-wrapper img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}
.product-card:hover .product-img-wrapper img {
    transform: scale(1.04);
}

.product-card-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-category-link {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    display: inline-block;
}
.product-category-link:hover {
    text-decoration: underline;
}

.product-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark-slate);
    text-decoration: none;
    margin-bottom: 4px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-title:hover {
    color: var(--primary-color);
}

.product-short-desc {
    font-size: 0.8rem;
    color: var(--muted-color);
    line-height: 1.3;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-brand {
    font-size: 0.78rem;
    color: var(--muted-color);
    margin-bottom: 8px;
}

.product-pricing {
    margin-top: auto;
    padding-top: 6px;
}
.selling-price {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--dark-slate);
}
.mrp-price {
    font-size: 0.82rem;
    color: var(--muted-color);
    text-decoration: line-through;
}

.product-card-actions {
    margin-top: 10px;
}

/* 6. Blog Card Component */
.blog-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow-hover);
}
.blog-card-img {
    height: 200px;
    object-fit: cover;
    width: 100%;
}
.blog-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.blog-meta {
    font-size: 0.8rem;
    color: var(--muted-color);
    margin-bottom: 8px;
    display: flex;
    gap: 12px;
}
.blog-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--dark-slate);
    text-decoration: none;
    margin-bottom: 10px;
    line-height: 1.35;
}
.blog-card-title:hover {
    color: var(--primary-color);
}
.blog-card-excerpt {
    font-size: 0.9rem;
    color: var(--text-color);
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 7. Category Pills Bar */
.category-pill {
    background-color: var(--light-bg);
    border: 1px solid var(--border-color);
    color: var(--dark-slate);
    border-radius: 50px;
    padding: 8px 18px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
}
.category-pill:hover {
    background-color: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}

/* 8. Global Footer */
.main-footer {
    background-color: var(--dark-slate);
    color: #94a3b8;
    padding-top: 60px;
    padding-bottom: 24px;
    margin-top: 60px;
}
.footer-heading {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 18px;
}
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-links li {
    margin-bottom: 10px;
}
.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s ease;
}
.footer-links a:hover {
    color: #5eead4;
}
.footer-bottom {
    border-top: 1px solid #1e293b;
    margin-top: 40px;
    padding-top: 24px;
    font-size: 0.88rem;
}
