/*
Theme Name: ReviveCare Pharmacy
Theme URI: https://revivecarepharmacy.com
Author: ReviveCare Pharmacy
Author URI: https://revivecarepharmacy.com
Description: A custom WooCommerce-ready WordPress theme for ReviveCare Pharmacy. Built for online medicine ordering, health services, and patient trust.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: revivecare
Tags: e-commerce, woocommerce, healthcare, custom-colors, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* =========================================================
   ROOT VARIABLES
   ========================================================= */
:root {
  --rc-green: #1E8E5A;
  --rc-green-dark: #14613D;
  --rc-green-light: #E6F5ED;
  --rc-red: #E63946;
  --rc-red-dark: #B82A35;
  --rc-red-light: #FDEBED;
  --rc-text: #1E2A26;
  --rc-text-light: #5C6F68;
  --rc-bg: #FFFFFF;
  --rc-bg-alt: #F6FAF8;
  --rc-border: #E1EAE5;
  --rc-radius: 14px;
  --rc-shadow: 0 8px 24px rgba(20, 97, 61, 0.08);
  --rc-font: 'Poppins', sans-serif;
  --rc-font-body: 'Inter', sans-serif;
}

/* =========================================================
   RESET & BASE
   ========================================================= */
* { box-sizing: border-box; }

body {
  font-family: var(--rc-font-body);
  color: var(--rc-text);
  background: var(--rc-bg);
  line-height: 1.65;
  margin: 0;
  font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--rc-font);
  font-weight: 700;
  color: var(--rc-text);
  line-height: 1.25;
  margin: 0 0 16px;
}

a {
  color: var(--rc-green);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover { color: var(--rc-red); }

img { max-width: 100%; height: auto; display: block; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 80px 0; }
.section--alt { background: var(--rc-bg-alt); }

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}

.section-header .eyebrow {
  display: inline-block;
  color: var(--rc-red);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-header h2 { font-size: 36px; margin-bottom: 12px; }
.section-header p { color: var(--rc-text-light); font-size: 16px; }

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 15px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.btn--primary {
  background: var(--rc-green);
  color: #fff;
}
.btn--primary:hover {
  background: var(--rc-green-dark);
  color: #fff;
  transform: translateY(-2px);
}

.btn--accent {
  background: var(--rc-red);
  color: #fff;
}
.btn--accent:hover {
  background: var(--rc-red-dark);
  color: #fff;
  transform: translateY(-2px);
}

.btn--outline {
  background: transparent;
  border-color: var(--rc-green);
  color: var(--rc-green);
}
.btn--outline:hover {
  background: var(--rc-green);
  color: #fff;
}

/* =========================================================
   HEADER / NAVIGATION
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: #fff;
  border-bottom: 1px solid var(--rc-border);
}

.topbar {
  background: var(--rc-green-dark);
  color: #fff;
  font-size: 13px;
}

.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  padding-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}

.topbar a { color: #fff; }
.topbar .topbar-info { display: flex; gap: 24px; flex-wrap: wrap; }
.topbar .topbar-info span { display: inline-flex; align-items: center; gap: 6px; }

.main-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}

.site-branding { display: flex; align-items: center; gap: 12px; }
.site-branding img { max-height: 48px; }

.site-title {
  font-family: var(--rc-font);
  font-size: 24px;
  font-weight: 800;
  margin: 0;
  color: var(--rc-text);
}
.site-title span { color: var(--rc-red); }

.primary-menu {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.primary-menu li > a {
  color: var(--rc-text);
  font-weight: 600;
  font-size: 15px;
  padding: 8px 0;
}
.primary-menu li > a:hover,
.primary-menu li.current-menu-item > a {
  color: var(--rc-green);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-icon-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--rc-green-light);
  color: var(--rc-green);
}

.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--rc-red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--rc-text);
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  background: linear-gradient(135deg, var(--rc-green-light) 0%, #FFFFFF 60%);
  padding: 90px 0;
  overflow: hidden;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 48px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--rc-red-light);
  color: var(--rc-red);
  font-weight: 600;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 50px;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: 52px;
  margin-bottom: 20px;
}
.hero h1 .highlight { color: var(--rc-green); }

.hero p {
  font-size: 17px;
  color: var(--rc-text-light);
  max-width: 480px;
  margin-bottom: 32px;
}

.hero-actions { display: flex; gap: 16px; margin-bottom: 40px; flex-wrap: wrap; }

.hero-stats {
  display: flex;
  gap: 32px;
}
.hero-stats .stat strong {
  display: block;
  font-size: 28px;
  font-family: var(--rc-font);
  color: var(--rc-green-dark);
}
.hero-stats .stat span {
  font-size: 13px;
  color: var(--rc-text-light);
}

.hero-image {
  position: relative;
}
.hero-image img {
  border-radius: var(--rc-radius);
  box-shadow: var(--rc-shadow);
}

.hero-badge {
  position: absolute;
  bottom: -24px;
  left: -24px;
  background: #fff;
  border-radius: var(--rc-radius);
  box-shadow: var(--rc-shadow);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.hero-badge .icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--rc-green-light);
  color: var(--rc-green);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.hero-badge strong { display: block; font-size: 14px; }
.hero-badge span { font-size: 12px; color: var(--rc-text-light); }

/* =========================================================
   TRUST STRIP
   ========================================================= */
.trust-strip {
  background: var(--rc-green-dark);
  color: #fff;
  padding: 28px 0;
}
.trust-strip .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.trust-strip .item strong {
  display: block;
  font-size: 28px;
  font-family: var(--rc-font);
}
.trust-strip .item span { font-size: 13px; opacity: 0.8; }

/* =========================================================
   CATEGORY GRID
   ========================================================= */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.category-card {
  background: #fff;
  border: 1px solid var(--rc-border);
  border-radius: var(--rc-radius);
  padding: 28px 20px;
  text-align: center;
  transition: all 0.25s ease;
}
.category-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--rc-shadow);
  border-color: transparent;
}
.category-card .icon {
  width: 64px; height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--rc-green-light);
  color: var(--rc-green);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
}
.category-card h3 { font-size: 16px; margin-bottom: 4px; }
.category-card span { font-size: 13px; color: var(--rc-text-light); }

/* =========================================================
   PRODUCT GRID (Featured products / WooCommerce)
   ========================================================= */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.product-card {
  background: #fff;
  border: 1px solid var(--rc-border);
  border-radius: var(--rc-radius);
  overflow: hidden;
  transition: all 0.25s ease;
  position: relative;
}
.product-card:hover { box-shadow: var(--rc-shadow); transform: translateY(-4px); }

.product-card .badge {
  position: absolute;
  top: 14px; left: 14px;
  background: var(--rc-red);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 50px;
  z-index: 2;
}

.product-card .product-image {
  background: var(--rc-bg-alt);
  height: 180px;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}

.product-card .product-body { padding: 18px; }
.product-card .product-category {
  font-size: 12px;
  color: var(--rc-green);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.product-card h3 { font-size: 16px; margin: 8px 0; }
.product-card .price {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 14px;
}
.product-card .price .current { font-size: 18px; font-weight: 700; color: var(--rc-text); }
.product-card .price .old { font-size: 14px; color: var(--rc-text-light); text-decoration: line-through; }

.product-card .add-to-cart-btn {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px;
  border-radius: 50px;
  background: var(--rc-green-light);
  color: var(--rc-green-dark);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}
.product-card .add-to-cart-btn:hover { background: var(--rc-green); color: #fff; }

/* =========================================================
   PRESCRIPTION UPLOAD CTA
   ========================================================= */
.rx-cta {
  background: var(--rc-green-dark);
  border-radius: var(--rc-radius);
  padding: 56px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 32px;
  color: #fff;
  overflow: hidden;
  position: relative;
}
.rx-cta h2 { color: #fff; font-size: 32px; }
.rx-cta p { opacity: 0.85; max-width: 460px; margin-bottom: 24px; }
.rx-cta .rx-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.rx-cta-image { text-align: center; }

/* =========================================================
   SERVICES
   ========================================================= */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.service-card {
  background: #fff;
  border: 1px solid var(--rc-border);
  border-radius: var(--rc-radius);
  padding: 32px;
  transition: all 0.25s ease;
}
.service-card:hover { box-shadow: var(--rc-shadow); border-color: transparent; }
.service-card .icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: var(--rc-red-light);
  color: var(--rc-red);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  margin-bottom: 20px;
}
.service-card h3 { font-size: 18px; margin-bottom: 8px; }
.service-card p { color: var(--rc-text-light); font-size: 14px; margin-bottom: 16px; }
.service-card .service-link { font-weight: 600; font-size: 14px; }

/* =========================================================
   TESTIMONIALS
   ========================================================= */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.testimonial-card {
  background: #fff;
  border: 1px solid var(--rc-border);
  border-radius: var(--rc-radius);
  padding: 28px;
}
.testimonial-card .stars { color: var(--rc-red); margin-bottom: 12px; }
.testimonial-card p { font-size: 14px; color: var(--rc-text-light); margin-bottom: 20px; }
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.testimonial-author img { width: 44px; height: 44px; border-radius: 50%; }
.testimonial-author strong { display: block; font-size: 14px; }
.testimonial-author span { font-size: 12px; color: var(--rc-text-light); }

/* =========================================================
   BLOG
   ========================================================= */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.blog-card {
  background: #fff;
  border: 1px solid var(--rc-border);
  border-radius: var(--rc-radius);
  overflow: hidden;
  transition: all 0.25s ease;
}
.blog-card:hover { box-shadow: var(--rc-shadow); transform: translateY(-4px); }
.blog-card .blog-image { height: 180px; background: var(--rc-bg-alt); }
.blog-card .blog-body { padding: 20px; }
.blog-card .blog-meta { font-size: 12px; color: var(--rc-green); font-weight: 600; margin-bottom: 8px; }
.blog-card h3 { font-size: 17px; margin-bottom: 8px; }
.blog-card .read-more { font-size: 14px; font-weight: 600; }

/* =========================================================
   NEWSLETTER
   ========================================================= */
.newsletter {
  background: var(--rc-red);
  border-radius: var(--rc-radius);
  padding: 48px;
  text-align: center;
  color: #fff;
}
.newsletter h2 { color: #fff; }
.newsletter p { opacity: 0.9; margin-bottom: 24px; }
.newsletter-form {
  display: flex;
  max-width: 480px;
  margin: 0 auto;
  gap: 12px;
}
.newsletter-form input {
  flex: 1;
  padding: 14px 20px;
  border-radius: 50px;
  border: none;
  font-size: 15px;
}
.newsletter-form button {
  background: #fff;
  color: var(--rc-red);
  border: none;
  padding: 14px 28px;
  border-radius: 50px;
  font-weight: 700;
  cursor: pointer;
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background: var(--rc-text);
  color: #cdd6d2;
  padding: 64px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-col h3 { color: #fff; font-size: 16px; margin-bottom: 20px; }
.footer-col p, .footer-col li { font-size: 14px; color: #aebab4; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a { color: #aebab4; }
.footer-col ul li a:hover { color: var(--rc-green); }
.footer-logo { font-family: var(--rc-font); font-size: 22px; font-weight: 800; color: #fff; margin-bottom: 12px; }
.footer-logo span { color: var(--rc-red); }
.social-icons { display: flex; gap: 12px; margin-top: 16px; }
.social-icons a {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.social-icons a:hover { background: var(--rc-green); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #8d9a94;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom a { color: #8d9a94; }
.payment-icons { display: flex; gap: 10px; align-items: center; font-size: 22px; }

/* =========================================================
   PAGE / ARCHIVE / SINGLE / SHOP GENERIC
   ========================================================= */
.page-header {
  background: var(--rc-green-light);
  padding: 60px 0;
  text-align: center;
}
.page-header h1 { font-size: 38px; margin-bottom: 8px; }
.breadcrumbs { font-size: 14px; color: var(--rc-text-light); }
.breadcrumbs a { color: var(--rc-green); }

.content-area { padding: 60px 0; }

.entry-content img { border-radius: var(--rc-radius); margin-bottom: 24px; }

.widget { margin-bottom: 32px; }
.widget h2.widget-title {
  font-size: 18px;
  border-bottom: 2px solid var(--rc-green-light);
  padding-bottom: 10px;
  margin-bottom: 16px;
}

/* =========================================================
   WOOCOMMERCE OVERRIDES
   ========================================================= */
.woocommerce ul.products li.product .price { color: var(--rc-text); font-weight: 700; }
.woocommerce ul.products li.product .price ins { color: var(--rc-green); text-decoration: none; }
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button,
.woocommerce #respond input#submit {
  background: var(--rc-green);
  color: #fff;
  border-radius: 50px;
  padding: 12px 28px;
  font-weight: 600;
  border: none;
}
.woocommerce a.button:hover, .woocommerce button.button:hover {
  background: var(--rc-green-dark);
  color: #fff;
}
.woocommerce span.onsale {
  background: var(--rc-red);
  border-radius: 50px;
  font-weight: 600;
}
.woocommerce-message, .woocommerce-info {
  border-top-color: var(--rc-green) !important;
}
.woocommerce-message::before, .woocommerce-info::before { color: var(--rc-green) !important; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-image { order: -1; }
  .category-grid, .product-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid, .testimonial-grid, .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .rx-cta { grid-template-columns: 1fr; text-align: center; }
  .rx-cta p { margin-left: auto; margin-right: auto; }
}

@media (max-width: 768px) {
  .primary-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 24px 16px;
    border-bottom: 1px solid var(--rc-border);
    box-shadow: var(--rc-shadow);
  }
  .primary-menu.is-open { display: flex; }
  .primary-menu li { width: 100%; }
  .primary-menu li > a { display: block; padding: 12px 0; border-bottom: 1px solid var(--rc-border); }
  .main-nav { position: relative; }
  .menu-toggle { display: block; }
  .hero h1 { font-size: 36px; }
  .trust-strip .container { grid-template-columns: repeat(2, 1fr); }
  .category-grid, .product-grid,
  .services-grid, .testimonial-grid, .blog-grid,
  .footer-grid { grid-template-columns: 1fr; }
  .newsletter-form { flex-direction: column; }
  .topbar .container { flex-direction: column; align-items: flex-start; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
