/*
 * Pharmacy CMS — Default Theme Stylesheet
 * Front-end only. Admin has its own separate stylesheet.
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --color-primary:      #0057a8;
    --color-primary-dark: #003f7a;
    --color-primary-light:#e8f0fb;
    --color-accent:       #e8002d;
    --color-notice-bg:    #ffe607;
    --color-notice-text:  #1a1a1a;
    --color-logo-bg:      #0057a8;
    --color-logo-text:    #ffffff;
    --color-navbar-bg:    #003f7a;
    --color-navbar-text:  #ffffff;
    --color-body-bg:      #f5f5f0;
    --color-text:         #1a1a2e;
    --color-text-muted:   #6b7280;
    --color-border:       #e5e7eb;
    --color-white:        #ffffff;
    --color-footer-bg:    #ffffff;
    --color-footer2-bg:   #e8edf2;
    --color-footer3-bg:   #0d1117;
    --color-footer3-text: #8b949e;
    --max-width:    1300px;
    --gutter:       1.5rem;
    --radius:       8px;
    --radius-lg:    14px;
    --font-body:    'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --shadow-sm:    0 1px 3px rgba(0,0,0,.08);
    --shadow-md:    0 4px 16px rgba(0,0,0,.10);
    --transition:   0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background-color: var(--color-body-bg); color: var(--color-text); font-size: 1rem; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-primary-dark); }
ul { list-style: none; }

.site-container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 var(--gutter); }
.site-main { min-height: 60vh; }

/* NOTICE BAR */
.notice-bar { background: var(--color-notice-bg); color: var(--color-notice-text); text-align: center; font-size: 0.8rem; font-weight: 700; line-height: 1rem; padding: 0.5rem var(--gutter); letter-spacing: 0.01em; }

/* LOGO BAR */
.logo-bar { background: var(--color-logo-bg); height: 4rem; box-shadow: 0 2px 8px rgba(0,0,0,0.2); position: sticky; top: 0; z-index: 100; }
.logo-bar__inner { display: flex; align-items: center; gap: 1.5rem; height: 100%; }
.logo-bar__logo { display: flex; align-items: center; flex-shrink: 0; }
.logo-bar__logo img { height: 48px; width: auto; object-fit: contain; }
.logo-bar__logo-text { color: var(--color-logo-text); font-size: 1rem; font-weight: 800; line-height: 1.2; max-width: 200px; }
.logo-bar__search { display: flex; align-items: center; flex: 1; max-width: 560px; margin: 0 auto; background: var(--color-white); border-radius: 25px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.15); border: 2px solid transparent; transition: border-color var(--transition); }
.logo-bar__search:focus-within { border-color: var(--color-accent); }
.logo-bar__search input { flex: 1; border: none; outline: none; padding: 0.55rem 1.1rem; font-size: 0.92rem; background: transparent; font-family: var(--font-body); color: var(--color-text); }
.logo-bar__search input::placeholder { color: #9ca3af; }
.logo-bar__search button { background: var(--color-accent); border: none; cursor: pointer; padding: 0.55rem 1.1rem; color: #fff; display: flex; align-items: center; transition: background var(--transition); height: 100%; }
.logo-bar__search button:hover { background: #c0001f; }

/* HAMBURGER */
.hamburger { display: none; flex-direction: column; gap: 5px; background: transparent; border: none; cursor: pointer; padding: 8px; margin-left: auto; border-radius: var(--radius); transition: background var(--transition); }
.hamburger:hover { background: rgba(255,255,255,0.1); }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--color-white); border-radius: 2px; transition: transform var(--transition), opacity var(--transition); }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* NAVBAR */
.navbar { background: var(--color-navbar-bg); height: 2.4rem; border-bottom: 1px solid rgba(255,255,255,0.08); }
.navbar__inner { height: 100%; }
.navbar__list { display: flex; align-items: center; height: 100%; }
.navbar__list li { height: 100%; }
.navbar__list a { display: flex; align-items: center; color: rgba(255,255,255,0.88); font-size: 0.82rem; font-weight: 600; padding: 0 1.1rem; height: 100%; letter-spacing: 0.02em; text-transform: uppercase; transition: background var(--transition), color var(--transition); border-bottom: 3px solid transparent; }
.navbar__list a:hover { background: rgba(255,255,255,0.1); color: #fff; border-bottom-color: var(--color-accent); }
.navbar__list a.active { background: rgba(255,255,255,0.12); color: #fff; border-bottom-color: var(--color-notice-bg); }
.navbar__admin-link { margin-left: auto !important; color: var(--color-notice-bg) !important; font-size: 0.78rem !important; }

/* SLIDER */
.slider { position: relative; width: 100%; height: 280px; overflow: hidden; background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%); }
.slider__track { display: flex; height: 100%; transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94); will-change: transform; }
.slider__slide { flex-shrink: 0; height: 100%; overflow: hidden; }
.slider__slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slider__placeholder { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.75rem; font-size: 0.9rem; color: var(--color-primary); font-weight: 500; background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%); }
.slider__placeholder::before { content: '🖼'; font-size: 2.5rem; }
.slider__btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.4); border: 2px solid rgba(255,255,255,0.5); color: #fff; font-size: 1.2rem; width: 42px; height: 42px; border-radius: 50%; cursor: pointer; z-index: 10; transition: background var(--transition); display: flex; align-items: center; justify-content: center; }
.slider__btn:hover { background: rgba(0,0,0,0.65); }
.slider__btn--prev { left: 16px; }
.slider__btn--next { right: 16px; }
.slider__dots { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 7px; }
.slider__dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.5); border: 2px solid rgba(255,255,255,0.8); cursor: pointer; transition: background var(--transition), transform var(--transition); }
.slider__dot.active { background: #fff; transform: scale(1.2); }

/* SECTIONS */
.section { padding: 2.25rem 0; }
.section + .section { border-top: 1px solid var(--color-border); }
.section__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.4rem; }
.section__title { font-size: 1.25rem; font-weight: 800; color: var(--color-text); position: relative; padding-left: 0.85rem; letter-spacing: -0.01em; }
.section__title::before { content: ''; position: absolute; left: 0; top: 0.15em; bottom: 0.15em; width: 4px; background: var(--color-accent); border-radius: 2px; }
.section__link { font-size: 0.82rem; font-weight: 700; color: var(--color-primary); text-transform: uppercase; letter-spacing: 0.04em; }
.section__link:hover { color: var(--color-accent); }

/* CARDS */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.1rem; }
.card { background: var(--color-white); border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition); text-decoration: none; color: inherit; display: flex; flex-direction: column; }
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: var(--color-primary-light); text-decoration: none; color: inherit; }
.card__image-wrapper { overflow: hidden; height: 200px; background: var(--color-primary-light); }
.card__image { width: 100%; height: 200px; object-fit: cover; transition: transform 0.4s ease; }
.card:hover .card__image { transform: scale(1.03); }
.card__image-placeholder { width: 100%; height: 200px; background: linear-gradient(135deg, #f0f4ff 0%, var(--color-primary-light) 100%); display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--color-primary); font-size: 0.78rem; gap: 0.5rem; }
.card__image-placeholder::before { content: '💊'; font-size: 1.8rem; }
.card__body { padding: 0.85rem; flex: 1; display: flex; flex-direction: column; }
.card__title { font-size: 0.88rem; font-weight: 700; color: var(--color-text); margin-bottom: 0.3rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.35; }
.card__excerpt { font-size: 0.78rem; color: var(--color-text-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: auto; padding-top: 0.35rem; }

/* BRANDS SECTION */
.brands-section { background: var(--color-white); border-radius: var(--radius-lg); padding: 1.75rem 2rem; box-shadow: var(--shadow-sm); border: 1px solid var(--color-border); }
.brands-section .card-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.brands-section .card__image-wrapper, .brands-section .card__image, .brands-section .card__image-placeholder { height: 140px; }

/* HEALTH SERVICES */
.health-services { background: linear-gradient(135deg, var(--color-logo-bg) 0%, var(--color-primary-dark) 100%); border-radius: var(--radius-lg); padding: 2rem; min-height: 250px; }
.health-services .section__title { color: #fff; }
.health-services .section__title::before { background: var(--color-notice-bg); }
.health-services .card { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.2); }
.health-services .card:hover { background: rgba(255,255,255,0.2); border-color: rgba(255,255,255,0.4); }
.health-services .card__title { color: #fff; }
.health-services .card__excerpt { color: rgba(255,255,255,0.75); }
.health-services .card__image-placeholder { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.8); }

/* ABOUT BANNER */
.about-banner { background: var(--color-white); border-radius: var(--radius-lg); padding: 2.5rem 3rem; margin: 2rem 0; font-size: 0.95rem; line-height: 1.85; color: var(--color-text); box-shadow: var(--shadow-sm); border: 1px solid var(--color-border); position: relative; overflow: hidden; }
.about-banner::before { content: ''; position: absolute; top: 0; left: 0; bottom: 0; width: 5px; background: linear-gradient(to bottom, var(--color-primary), var(--color-accent)); }
.about-banner p { margin-bottom: 0.85rem; }
.about-banner a { font-weight: 700; color: var(--color-accent); }

/* FOOTER MAIN */
.footer-main { background: var(--color-footer-bg); border-top: 3px solid var(--color-primary); padding: 3rem 0 2rem; min-height: 292px; }
.footer-main__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2.5rem; }
.footer-col__heading { font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-text); margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--color-accent); display: inline-block; }
.footer-col ul li { margin-bottom: 0.45rem; }
.footer-col ul li a, .footer-col address a { font-size: 0.84rem; color: var(--color-text-muted); transition: color var(--transition), padding-left var(--transition); display: inline-block; }
.footer-col ul li a:hover, .footer-col address a:hover { color: var(--color-primary); padding-left: 3px; }
.footer-col address { font-size: 0.84rem; color: var(--color-text-muted); font-style: normal; line-height: 1.9; }
.footer-hours { font-size: 0.82rem; color: var(--color-text-muted); border-collapse: collapse; width: 100%; }
.footer-hours td { padding: 0.22rem 0.5rem 0.22rem 0; }
.footer-hours td:first-child { font-weight: 600; color: var(--color-text); min-width: 90px; }
.footer-hours .closed { color: var(--color-accent); font-weight: 700; }

/* FOOTER POLICY */
.footer-policy { background: var(--color-footer2-bg); min-height: 233px; display: flex; align-items: center; border-top: 1px solid #d1d9e0; }
.footer-policy__inner { display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem; padding-top: 2rem; padding-bottom: 2rem; align-items: center; }
.footer-policy__inner a { font-size: 0.8rem; color: #4b5563; transition: color var(--transition); }
.footer-policy__inner a:hover { color: var(--color-primary); }

/* FOOTER COPYRIGHT */
.footer-copyright { background: var(--color-footer3-bg); padding: 1rem var(--gutter); text-align: center; }
.footer-copyright p { font-size: 0.78rem; color: var(--color-footer3-text); letter-spacing: 0.02em; }

/* PAGE CONTENT */
.page-content h1, .page-content h2, .page-content h3, .page-content h4 { margin: 1.5rem 0 0.75rem; line-height: 1.3; color: var(--color-text); font-weight: 800; }
.page-content h1 { font-size: 1.7rem; }
.page-content h2 { font-size: 1.25rem; padding-bottom: 0.4rem; border-bottom: 2px solid var(--color-border); }
.page-content h3 { font-size: 1.05rem; }
.page-content p { margin-bottom: 1rem; }
.page-content ul, .page-content ol { padding-left: 1.5rem; margin-bottom: 1rem; list-style: disc; }
.page-content ol { list-style: decimal; }
.page-content li { margin-bottom: 0.4rem; }
.page-content blockquote { border-left: 4px solid var(--color-primary); padding: 0.75rem 1rem; color: var(--color-text-muted); margin: 1rem 0; background: var(--color-primary-light); border-radius: 0 var(--radius) var(--radius) 0; }
.page-content code { background: #f1f5f9; padding: 0.15rem 0.4rem; border-radius: 4px; font-size: 0.88em; color: var(--color-accent); }
.page-content hr { border: none; border-top: 2px solid var(--color-border); margin: 2rem 0; }
.page-content a { color: var(--color-primary); font-weight: 600; }
.page-content a:hover { color: var(--color-accent); }
.page-content strong { font-weight: 700; }
.page-content img { border-radius: var(--radius); margin: 1rem 0; box-shadow: var(--shadow-md); }

/* UTILITY */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }

/* RESPONSIVE */
@media (max-width: 1100px) {
    .footer-main__grid { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
}

@media (max-width: 768px) {
    :root { --gutter: 1rem; }
    .hamburger { display: flex; }
    .logo-bar__search { display: none; }
    .logo-bar { height: 3.5rem; }
    .navbar { height: auto; overflow: hidden; max-height: 0; transition: max-height 0.35s ease; position: relative; z-index: 99; }
    .navbar.open { max-height: 320px; }
    .navbar__inner { height: auto; }
    .navbar__list { flex-direction: column; align-items: stretch; padding: 0.35rem 0; }
    .navbar__list li { height: auto; }
    .navbar__list a { height: auto; border-bottom: 1px solid rgba(255,255,255,0.06); padding: 0.7rem 1.25rem; border-left: 3px solid transparent; }
    .navbar__list a.active { border-left-color: var(--color-notice-bg); }
    .navbar__admin-link { margin-left: 0 !important; }
    .slider { height: 200px; }
    .card-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
    .brands-section, .health-services { margin: 0; border-radius: 0; padding: 1.25rem 1rem; }
    .about-banner { padding: 1.5rem 1.25rem 1.5rem 1.75rem; border-radius: 0; margin: 1rem 0; }
    .footer-main__grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
    .footer-policy__inner { gap: 0.5rem 1rem; }
}

@media (max-width: 480px) {
    .card-grid { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
    .card__image-wrapper, .card__image, .card__image-placeholder { height: 140px; }
    .brands-section .card__image-wrapper, .brands-section .card__image, .brands-section .card__image-placeholder { height: 110px; }
    .slider { height: 160px; }
    .footer-main__grid { grid-template-columns: 1fr; }
    .about-banner { padding: 1.25rem 1rem 1.25rem 1.5rem; }
}

/* HEALTH SERVICES BANNER STYLE POST */
.hs-banner { display: flex; align-items: center; gap: 1.5rem; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.2); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1rem; text-decoration: none; color: inherit; transition: background 0.2s; }
.hs-banner:hover { background: rgba(255,255,255,0.2); text-decoration: none; color: inherit; }
.hs-banner__image { flex-shrink: 0; width: 140px; height: 100px; border-radius: var(--radius); overflow: hidden; }
.hs-banner__image img { width: 100%; height: 100%; object-fit: cover; }
.hs-banner__body { flex: 1; }
.hs-banner__title { font-size: 1.1rem; font-weight: 700; color: #fff; margin-bottom: 0.4rem; }
.hs-banner__excerpt { font-size: 0.85rem; color: rgba(255,255,255,0.75); line-height: 1.6; margin-bottom: 0.6rem; }
.hs-banner__cta { font-size: 0.82rem; font-weight: 700; color: var(--color-notice-bg); }
@media (max-width: 480px) { .hs-banner { flex-direction: column; } .hs-banner__image { width: 100%; height: 160px; } }
