html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: #334155;
}

/* ==========================================================================
   PROFESSIONAL LAYOUT DESIGN
   ========================================================================== */

/* Hero Section */
.hero-section {
    background: #1e293b;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
    pointer-events: none;
}

.feature-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.hero-stats {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Premium Banner */
.premium-banner {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.alert-premium {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin: 0;
}

/* Section Headers */
.section-header {
    margin-bottom: 1.5rem;
}

.section-header h2 {
    color: #1e293b;
    font-weight: 700;
}

/* Modern Price Cards */
.price-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.price-card-modern {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.price-card-modern:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-color: #3b82f6;
}

.price-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.pharmacy-name-section .pharmacy-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.dosage-text {
    color: #64748b;
    font-size: 0.875rem;
}

.price-section {
    text-align: right;
}

.price-amount {
    font-size: 1.75rem;
    font-weight: 700;
    color: #059669;
    line-height: 1;
}

.cashback-text {
    font-size: 0.75rem;
    color: #059669;
    font-weight: 500;
    margin-top: 0.25rem;
}

.price-card-body {
    padding: 1.5rem;
}

.status-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.status-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-weight: 500;
    border: 1px solid transparent;
}

.status-in-stock {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

.status-out-stock {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}

.status-live {
    background: #dbeafe;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.status-cached {
    background: #f1f5f9;
    color: #475569;
    border-color: #e2e8f0;
}

.btn-primary-modern {
    background: #3b82f6;
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary-modern:hover {
    background: #2563eb;
    transform: translateY(-1px);
    color: white;
}

/* Price List (All Prices Section) */
.price-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.price-list-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.2s ease;
}

.price-list-item:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.pharmacy-info h6 {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.status-indicators {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-success {
    background: #22c55e;
}

.status-danger {
    background: #ef4444;
}

.price-display-compact {
    font-size: 1.25rem;
    font-weight: 700;
    color: #3b82f6;
    text-align: right;
}

/* Clean Premium Card */
.premium-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.premium-card-header {
    background: #f8fafc;
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.premium-card-header h5 {
    color: #1e293b;
    font-weight: 600;
}

.premium-card-body {
    padding: 1.5rem;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feature-item-clean {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #475569;
    font-size: 0.9rem;
}

.feature-item-clean i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

/* Info Card */
.info-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}

.info-card-header {
    background: #f8fafc;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
}

.info-card-body {
    padding: 1.5rem;
}

/* Disclaimer Section */
.disclaimer-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.disclaimer-header {
    margin-bottom: 1.5rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: #475569;
}

.info-item i {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.disclaimer-footer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

/* Sidebar */
.sidebar-sticky {
    position: sticky;
    top: 2rem;
}

/* Last Updated */
.last-updated {
    text-align: center;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

/* Loading Section */
.loading-section {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 3rem;
    text-align: center;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-section .container {
        padding: 0 1rem;
    }
    
    .feature-badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .hero-stats {
        margin-top: 2rem;
        padding: 1.5rem;
    }
    
    .price-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .price-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .price-section {
        text-align: left;
        width: 100%;
    }
    
    .price-amount {
        font-size: 1.5rem;
    }
    
    .status-row {
        flex-wrap: wrap;
    }
    
    .price-list-item {
        padding: 1rem;
    }
    
    .price-list-item .d-flex {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 1rem;
    }
    
    .price-action {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }
    
    .disclaimer-card {
        padding: 1.5rem;
    }
    
    .sidebar-sticky {
        position: static;
        margin-top: 2rem;
    }
    
    .premium-banner .alert-premium {
        padding: 0.75rem 1rem;
    }
    
    .premium-banner .d-flex {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .hero-section .container {
        padding: 0 0.5rem;
    }
    
    .price-card-modern {
        margin: 0 -0.5rem;
    }
    
    .price-card-header,
    .price-card-body {
        padding: 1rem;
    }
    
    .price-list-item {
        margin: 0 -0.5rem;
        border-radius: 8px;
    }
    
    .feature-badge {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }
    
    .disclaimer-card {
        margin: 0 -0.5rem;
        padding: 1rem;
        border-radius: 8px;
    }
    
    .info-item {
        font-size: 0.85rem;
    }
}

/* ==========================================================================
   CLEAN BUTTON STYLES
   ========================================================================== */

.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.btn-primary {
    background: #3b82f6;
    border-color: #3b82f6;
}

.btn-primary:hover {
    background: #2563eb;
    border-color: #2563eb;
    transform: translateY(-1px);
}

.btn-outline-primary {
    color: #3b82f6;
    border-color: #3b82f6;
}

.btn-outline-primary:hover {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
    transform: translateY(-1px);
}

.btn-warning {
    background: #f59e0b;
    border-color: #f59e0b;
    color: white;
}

.btn-warning:hover {
    background: #d97706;
    border-color: #d97706;
    color: white;
    transform: translateY(-1px);
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */

.text-muted {
    color: #64748b !important;
}

.small {
    font-size: 0.875rem;
}

.fw-semibold {
    font-weight: 600;
}

/* Price update animations */
.price-item {
  transition: all 0.3s ease;
}

.price-updated {
  animation: price-update 2s ease-in-out;
}

@keyframes price-update {
  0% {
    background-color: #fff3cd;
    transform: scale(1);
  }
  15% {
    background-color: #d4edda;
    transform: scale(1.02);
  }
  85% {
    background-color: #d4edda;
    transform: scale(1.02);
  }
  100% {
    background-color: transparent;
    transform: scale(1);
  }
}

.pharmacy-card.updated {
  animation: card-flash 1.5s ease-in-out;
  border: 2px solid #28a745;
}

@keyframes card-flash {
  0%, 100% {
    border-color: transparent;
    box-shadow: none;
  }
  50% {
    border-color: #28a745;
    box-shadow: 0 0 15px rgba(40, 167, 69, 0.3);
  }
}

/* Professional styling improvements */
.hero-section {
  background: #007bff;
  position: relative;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.05"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.05"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.03"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.03"/><circle cx="90" cy="30" r="0.5" fill="white" opacity="0.03"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  pointer-events: none;
}

.card {
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.1) !important;
}

.price-display {
  background: #28a745;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.btn {
  transition: all 0.2s ease-in-out;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.badge {
  font-size: 0.75em;
  font-weight: 500;
}

.alert {
  border-radius: 0.5rem;
}

.card {
  border-radius: 0.75rem;
}

.card-header {
  border-radius: 0.75rem 0.75rem 0 0 !important;
  font-weight: 600;
}

.price-item:hover {
  background-color: rgba(0,123,255,0.02);
  border-radius: 0.5rem;
  transform: translateX(2px);
}

.price-badge.updated {
  animation: badge-pulse 1s ease-in-out;
}

@keyframes badge-pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.update-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: #28a745;
  border-radius: 50%;
  margin-left: 5px;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 50% {
    opacity: 1;
  }
  51%, 100% {
    opacity: 0;
  }
}

/* Cookie Consent Banner */
.cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #2c3e50;
  color: white;
  padding: 20px 0;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
  z-index: 9999;
}
