/*
Theme Name: Medix US Pharmacy
Theme URI: https://yourdomain.com
Author: Antigravity AI
Author URI: https://yourdomain.com
Description: A modern, ultra-fast, and responsive WordPress E-Commerce theme designed for US Pharmacy & Medicine stores. Built-in WooCommerce support, prescription upload modal, discreet shipping badges, USD pricing, and live search.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: medix-pharmacy
*/

:root {
  --primary: #0284c7;
  --primary-dark: #0369a1;
  --primary-light: #e0f2fe;
  --secondary: #059669;
  --secondary-light: #d1fae5;
  --accent: #f97316;
  --dark: #0f172a;
  --gray-dark: #334155;
  --gray: #64748b;
  --gray-light: #f1f5f9;
  --gray-border: #e2e8f0;
  --white: #ffffff;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --radius: 10px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  color: var(--dark);
  background-color: #f8fafc;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Top Bar */
.top-bar {
  background: var(--dark);
  color: #94a3b8;
  font-size: 13px;
  padding: 8px 0;
  border-bottom: 1px solid #1e293b;
}
.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.top-bar a {
  color: #cbd5e1;
  transition: color 0.2s;
}
.top-bar a:hover {
  color: var(--white);
}
.top-badge {
  background: #1e293b;
  color: #38bdf8;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  margin-right: 6px;
}

/* Header & Navigation */
.site-header {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  gap: 20px;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  color: var(--primary-dark);
}
.site-logo span {
  color: var(--secondary);
}
.logo-icon {
  background: var(--primary);
  color: var(--white);
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 22px;
}

/* Search Bar */
.header-search {
  flex: 1;
  max-width: 540px;
  position: relative;
}
.search-form {
  display: flex;
  background: var(--gray-light);
  border: 2px solid var(--gray-border);
  border-radius: 30px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.search-form:focus-within {
  border-color: var(--primary);
  background: var(--white);
}
.search-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 18px;
  font-size: 14px;
  outline: none;
}
.search-btn {
  background: var(--primary);
  color: var(--white);
  border: none;
  padding: 0 20px;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.search-btn:hover {
  background: var(--primary-dark);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.btn-rx {
  background: var(--secondary-light);
  color: var(--secondary);
  border: 1.5px solid var(--secondary);
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}
.btn-rx:hover {
  background: var(--secondary);
  color: var(--white);
}
.cart-trigger {
  position: relative;
  background: var(--gray-light);
  padding: 10px 16px;
  border-radius: 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.cart-badge {
  background: var(--accent);
  color: var(--white);
  font-size: 11px;
  font-weight: 800;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Navbar Links */
.site-nav {
  border-top: 1px solid var(--gray-border);
  background: var(--white);
}
.nav-list {
  display: flex;
  list-style: none;
  gap: 24px;
  padding: 10px 0;
  font-weight: 600;
  font-size: 14px;
}
.nav-list a {
  color: var(--gray-dark);
  transition: color 0.2s;
}
.nav-list a:hover {
  color: var(--primary);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #0284c7 100%);
  color: var(--white);
  padding: 60px 0;
  position: relative;
  overflow: hidden;
}
.hero-content {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 40px;
}
.hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.hero h1 {
  font-size: 40px;
  line-height: 1.2;
  font-weight: 800;
  margin-bottom: 16px;
}
.hero p {
  font-size: 17px;
  color: #cbd5e1;
  margin-bottom: 24px;
  max-width: 540px;
}
.hero-features {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}
.hero-feature-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #e2e8f0;
}
.hero-feature-item svg {
  color: #34d399;
}
.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.btn-primary {
  background: var(--accent);
  color: var(--white);
  padding: 12px 26px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, background 0.2s;
  display: inline-block;
}
.btn-primary:hover {
  background: #ea580c;
  transform: translateY(-2px);
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  padding: 12px 26px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Quick Order Card in Hero */
.hero-card {
  background: var(--white);
  color: var(--dark);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
}
.hero-card h3 {
  font-size: 18px;
  margin-bottom: 6px;
  color: var(--dark);
}
.hero-card p {
  font-size: 13px;
  color: var(--gray);
  margin-bottom: 16px;
}
.rx-upload-box {
  border: 2px dashed #93c5fd;
  background: #f0f9ff;
  border-radius: 8px;
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}
.rx-upload-box:hover {
  border-color: var(--primary);
  background: #e0f2fe;
}
.rx-upload-box svg {
  margin: 0 auto 8px;
  color: var(--primary);
}

/* Trust Badges Strip */
.trust-strip {
  background: var(--white);
  padding: 24px 0;
  border-bottom: 1px solid var(--gray-border);
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 14px;
}
.trust-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.trust-text h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 2px;
}
.trust-text p {
  font-size: 12px;
  color: var(--gray);
}

/* Section Common */
.section {
  padding: 50px 0;
}
.section-header {
  text-align: center;
  margin-bottom: 36px;
}
.section-header h2 {
  font-size: 28px;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 8px;
}
.section-header p {
  color: var(--gray);
  font-size: 15px;
}

/* Categories Grid */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px;
}
.category-card {
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  transition: all 0.2s;
  cursor: pointer;
}
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}
.category-icon {
  width: 56px;
  height: 56px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 26px;
}
.category-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}
.category-card span {
  font-size: 12px;
  color: var(--gray);
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}
.product-card {
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  position: relative;
}
.product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--secondary);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  z-index: 2;
}
.product-img-wrapper {
  background: #f8fafc;
  padding: 20px;
  text-align: center;
  position: relative;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.med-pill-art {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  box-shadow: inset 0 2px 4px rgba(255,255,255,0.8);
}
.product-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.product-category {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.product-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 4px;
}
.product-strength {
  font-size: 13px;
  color: var(--gray);
  margin-bottom: 12px;
}
.product-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #f59e0b;
  margin-bottom: 14px;
}
.product-rating span {
  color: var(--gray);
  margin-left: 4px;
}
.product-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--gray-border);
  padding-top: 14px;
}
.price-box {
  display: flex;
  flex-direction: column;
}
.price-regular {
  font-size: 12px;
  text-decoration: line-through;
  color: var(--gray);
}
.price-current {
  font-size: 20px;
  font-weight: 800;
  color: var(--dark);
}
.btn-cart {
  background: var(--primary);
  color: var(--white);
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.btn-cart:hover {
  background: var(--primary-dark);
}

/* How It Works Steps */
.how-it-works {
  background: var(--white);
  border-top: 1px solid var(--gray-border);
  border-bottom: 1px solid var(--gray-border);
}
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
}
.step-card {
  text-align: center;
  padding: 24px 16px;
}
.step-number {
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  font-weight: 800;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.step-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}
.step-card p {
  color: var(--gray);
  font-size: 14px;
}

/* Reviews / Testimonials */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}
.review-card {
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  padding: 22px;
}
.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.review-author {
  font-weight: 700;
  font-size: 15px;
}
.verified-buyer {
  color: var(--secondary);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}
.review-text {
  font-size: 14px;
  color: var(--gray-dark);
  font-style: italic;
}

/* FAQ Accordion */
.faq-box {
  max-width: 800px;
  margin: 0 auto;
}
.faq-item {
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
}
.faq-question {
  padding: 16px 20px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fdfdfd;
}
.faq-question:hover {
  background: #f8fafc;
}
.faq-answer {
  padding: 0 20px 16px 20px;
  color: var(--gray);
  font-size: 14px;
  line-height: 1.6;
}

/* US Legal Disclaimer */
.disclaimer-bar {
  background: #f1f5f9;
  border-top: 1px solid #e2e8f0;
  padding: 18px 0;
  font-size: 12px;
  color: #64748b;
  text-align: center;
  line-height: 1.6;
}

/* Footer */
.site-footer {
  background: #0b1120;
  color: #94a3b8;
  padding: 60px 0 20px;
  border-top: 1px solid #1e293b;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 30px;
  margin-bottom: 40px;
}
.footer-col h4 {
  color: var(--white);
  font-size: 16px;
  margin-bottom: 16px;
  font-weight: 700;
}
.footer-col ul {
  list-style: none;
}
.footer-col ul li {
  margin-bottom: 10px;
}
.footer-col ul a {
  color: #94a3b8;
  font-size: 14px;
  transition: color 0.2s;
}
.footer-col ul a:hover {
  color: var(--white);
}
.payment-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.payment-badge {
  background: #1e293b;
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid #334155;
}
.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 20px;
  text-align: center;
  font-size: 13px;
}

/* Floating WhatsApp / Contact Pill */
.floating-support {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.btn-float-wa {
  background: #25d366;
  color: white;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4);
  font-size: 26px;
  transition: transform 0.2s;
}
.btn-float-wa:hover {
  transform: scale(1.1);
}

/* Modal for Prescription Upload / Cart */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.active {
  display: flex;
}
.modal-content {
  background: var(--white);
  border-radius: var(--radius);
  max-width: 500px;
  width: 100%;
  padding: 28px;
  position: relative;
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  overflow-y: auto;
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #f1f5f9;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.form-group {
  margin-bottom: 14px;
}
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--gray-border);
  border-radius: 6px;
  font-size: 14px;
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
}

/* Responsive */
@media (max-width: 900px) {
  .hero-content {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 640px) {
  .header-main {
    flex-direction: column;
    align-items: stretch;
  }
  .header-search {
    order: 3;
    max-width: 100%;
  }
  .header-actions {
    justify-content: space-between;
  }
  .hero h1 {
    font-size: 28px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
